diff options
613 files changed, 52763 insertions, 1203 deletions
diff --git a/Android.bp b/Android.bp index 4473d9458d25..81a1fac6346e 100644..100755 --- a/Android.bp +++ b/Android.bp @@ -124,6 +124,7 @@ filegroup { ":installd_aidl", ":libaudioclient_aidl", ":libbinder_aidl", + ":libbluetooth-binder-aidl", ":libcamera_client_aidl", ":libcamera_client_framework_aidl", ":libupdate_engine_aidl", @@ -264,14 +265,38 @@ filegroup { visibility: ["//visibility:public"], } +soong_config_module_type_import { + from: "device/qcom/qssi/Android.bp", + module_types: [ + "bredr_vs_btadva_java_defaults", + ], +} + +bredr_vs_btadva_java_defaults { + name: "btadva_fwk_java_defaults", + + soong_config_variables: { + bredr_or_btadva: { + btadva: { + srcs: [ + ":framework-bluetooth-adva-srcs", + ":libbluetooth-binder-aidl-adva", + ], + } + } + } +} + java_defaults { name: "framework-minus-apex-defaults", defaults: [ "framework-aidl-export-defaults", "latest_android_hardware_soundtrigger3_java_static", + "btadva_fwk_java_defaults" ], srcs: [ ":framework-non-updatable-sources", + ":framework-bluetooth-sources", // TODO(b/214988855) : Remove once framework-bluetooth jar is ready "core/java/**/*.logtags", ":apex-info-list", ], @@ -336,7 +361,6 @@ java_defaults { include_dirs: [ "frameworks/av/aidl", "frameworks/native/libs/permission/aidl", - "packages/modules/Bluetooth/framework/aidl-export", "packages/modules/Connectivity/framework/aidl-export", "packages/modules/Media/apex/aidl/stable", "hardware/interfaces/biometrics/common/aidl", @@ -625,7 +649,6 @@ stubs_defaults { "frameworks/base/media/aidl", "frameworks/base/telephony/java", "frameworks/native/libs/permission/aidl", - "packages/modules/Bluetooth/framework/aidl-export", "packages/modules/Connectivity/framework/aidl-export", "packages/modules/Media/apex/aidl/stable", "hardware/interfaces/biometrics/common/aidl", @@ -669,7 +692,6 @@ stubs_defaults { name: "module-classpath-stubs-defaults", aidl: { include_dirs: [ - "packages/modules/Bluetooth/framework/aidl-export", "packages/modules/Connectivity/framework/aidl-export", "packages/modules/Media/apex/aidl/stable", ], diff --git a/Android.mk b/Android.mk index d9e202c9305c..d9e202c9305c 100644..100755 --- a/Android.mk +++ b/Android.mk diff --git a/apct-tests/perftests/rubidium/Android.bp b/apct-tests/perftests/rubidium/Android.bp index ebd228f76a1d..53723e93a0c4 100644 --- a/apct-tests/perftests/rubidium/Android.bp +++ b/apct-tests/perftests/rubidium/Android.bp @@ -24,6 +24,8 @@ package { android_test { name: "RubidiumPerfTests", srcs: ["src/**/*.java"], + // b/244510347: Temporary change to enable GMS + enabled: false, min_sdk_version: "33", static_libs: [ "androidx.test.rules", diff --git a/api/api.go b/api/api.go index 09c238336a39..103e5acc1c68 100644 --- a/api/api.go +++ b/api/api.go @@ -164,26 +164,26 @@ func createMergedTxt(ctx android.LoadHookContext, txt MergedTxtDefinition) { } func createMergedAnnotationsFilegroups(ctx android.LoadHookContext, modules, system_server_modules []string) { - for _, i := range []struct{ + for _, i := range []struct { name string tag string modules []string }{ { - name: "all-modules-public-annotations", - tag: "{.public.annotations.zip}", + name: "all-modules-public-annotations", + tag: "{.public.annotations.zip}", modules: modules, }, { - name: "all-modules-system-annotations", - tag: "{.system.annotations.zip}", + name: "all-modules-system-annotations", + tag: "{.system.annotations.zip}", modules: modules, }, { - name: "all-modules-module-lib-annotations", - tag: "{.module-lib.annotations.zip}", + name: "all-modules-module-lib-annotations", + tag: "{.module-lib.annotations.zip}", modules: modules, }, { - name: "all-modules-system-server-annotations", - tag: "{.system-server.annotations.zip}", + name: "all-modules-system-server-annotations", + tag: "{.system-server.annotations.zip}", modules: system_server_modules, }, } { @@ -245,6 +245,8 @@ func createMergedFrameworkImpl(ctx android.LoadHookContext, modules []string) { // First create updatable-framework-module-impl, which contains all updatable modules. // This module compiles against module_lib SDK. { + // TODO(b/214988855): remove the line below when framework-bluetooth has an impl jar. + modules = remove(modules, "framework-bluetooth") props := libraryProps{} props.Name = proptools.StringPtr("updatable-framework-module-impl") props.Static_libs = transformArray(modules, "", ".impl") @@ -374,7 +376,7 @@ func (a *CombinedApis) ConvertWithBp2build(ctx android.TopDownMutatorContext) { "system-server": "-system-server-current.txt", } - for scopeName, suffix := range scopeToSuffix{ + for scopeName, suffix := range scopeToSuffix { name := a.Name() + suffix var scope bazel.StringAttribute diff --git a/api/system-current.txt b/api/system-current.txt new file mode 100644 index 000000000000..6d30669637b9 --- /dev/null +++ b/api/system-current.txt @@ -0,0 +1,13777 @@ +// Signature format: 2.0 +package android { + + public static final class Manifest.permission { + field public static final String ACCESS_AMBIENT_LIGHT_STATS = "android.permission.ACCESS_AMBIENT_LIGHT_STATS"; + field public static final String ACCESS_BROADCAST_RADIO = "android.permission.ACCESS_BROADCAST_RADIO"; + field public static final String ACCESS_CACHE_FILESYSTEM = "android.permission.ACCESS_CACHE_FILESYSTEM"; + field public static final String ACCESS_CONTEXT_HUB = "android.permission.ACCESS_CONTEXT_HUB"; + field public static final String ACCESS_DRM_CERTIFICATES = "android.permission.ACCESS_DRM_CERTIFICATES"; + field @Deprecated public static final String ACCESS_FM_RADIO = "android.permission.ACCESS_FM_RADIO"; + field public static final String ACCESS_INSTANT_APPS = "android.permission.ACCESS_INSTANT_APPS"; + field public static final String ACCESS_LOCUS_ID_USAGE_STATS = "android.permission.ACCESS_LOCUS_ID_USAGE_STATS"; + field public static final String ACCESS_MOCK_LOCATION = "android.permission.ACCESS_MOCK_LOCATION"; + field public static final String ACCESS_MTP = "android.permission.ACCESS_MTP"; + field public static final String ACCESS_NETWORK_CONDITIONS = "android.permission.ACCESS_NETWORK_CONDITIONS"; + field public static final String ACCESS_NOTIFICATIONS = "android.permission.ACCESS_NOTIFICATIONS"; + field public static final String ACCESS_SHARED_LIBRARIES = "android.permission.ACCESS_SHARED_LIBRARIES"; + field public static final String ACCESS_SHORTCUTS = "android.permission.ACCESS_SHORTCUTS"; + field public static final String ACCESS_SURFACE_FLINGER = "android.permission.ACCESS_SURFACE_FLINGER"; + field public static final String ACCESS_TV_DESCRAMBLER = "android.permission.ACCESS_TV_DESCRAMBLER"; + field public static final String ACCESS_TV_TUNER = "android.permission.ACCESS_TV_TUNER"; + field public static final String ACCESS_VIBRATOR_STATE = "android.permission.ACCESS_VIBRATOR_STATE"; + field public static final String ACTIVITY_EMBEDDING = "android.permission.ACTIVITY_EMBEDDING"; + field public static final String ADJUST_RUNTIME_PERMISSIONS_POLICY = "android.permission.ADJUST_RUNTIME_PERMISSIONS_POLICY"; + field public static final String ALLOCATE_AGGRESSIVE = "android.permission.ALLOCATE_AGGRESSIVE"; + field public static final String ALLOW_ANY_CODEC_FOR_PLAYBACK = "android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK"; + field public static final String AMBIENT_WALLPAPER = "android.permission.AMBIENT_WALLPAPER"; + field public static final String APPROVE_INCIDENT_REPORTS = "android.permission.APPROVE_INCIDENT_REPORTS"; + field public static final String BACKUP = "android.permission.BACKUP"; + field public static final String BIND_ATTENTION_SERVICE = "android.permission.BIND_ATTENTION_SERVICE"; + field public static final String BIND_AUGMENTED_AUTOFILL_SERVICE = "android.permission.BIND_AUGMENTED_AUTOFILL_SERVICE"; + field public static final String BIND_CELL_BROADCAST_SERVICE = "android.permission.BIND_CELL_BROADCAST_SERVICE"; + field @Deprecated public static final String BIND_CONNECTION_SERVICE = "android.permission.BIND_CONNECTION_SERVICE"; + field public static final String BIND_CONTENT_CAPTURE_SERVICE = "android.permission.BIND_CONTENT_CAPTURE_SERVICE"; + field public static final String BIND_CONTENT_SUGGESTIONS_SERVICE = "android.permission.BIND_CONTENT_SUGGESTIONS_SERVICE"; + field public static final String BIND_DIRECTORY_SEARCH = "android.permission.BIND_DIRECTORY_SEARCH"; + field public static final String BIND_EUICC_SERVICE = "android.permission.BIND_EUICC_SERVICE"; + field public static final String BIND_EXTERNAL_STORAGE_SERVICE = "android.permission.BIND_EXTERNAL_STORAGE_SERVICE"; + field public static final String BIND_IMS_SERVICE = "android.permission.BIND_IMS_SERVICE"; + field public static final String BIND_KEYGUARD_APPWIDGET = "android.permission.BIND_KEYGUARD_APPWIDGET"; + field public static final String BIND_MUSIC_RECOGNITION_SERVICE = "android.permission.BIND_MUSIC_RECOGNITION_SERVICE"; + field public static final String BIND_NETWORK_RECOMMENDATION_SERVICE = "android.permission.BIND_NETWORK_RECOMMENDATION_SERVICE"; + field public static final String BIND_NOTIFICATION_ASSISTANT_SERVICE = "android.permission.BIND_NOTIFICATION_ASSISTANT_SERVICE"; + field public static final String BIND_PHONE_ACCOUNT_SUGGESTION_SERVICE = "android.permission.BIND_PHONE_ACCOUNT_SUGGESTION_SERVICE"; + field public static final String BIND_PRINT_RECOMMENDATION_SERVICE = "android.permission.BIND_PRINT_RECOMMENDATION_SERVICE"; + field public static final String BIND_RESOLVER_RANKER_SERVICE = "android.permission.BIND_RESOLVER_RANKER_SERVICE"; + field public static final String BIND_RUNTIME_PERMISSION_PRESENTER_SERVICE = "android.permission.BIND_RUNTIME_PERMISSION_PRESENTER_SERVICE"; + field public static final String BIND_SETTINGS_SUGGESTIONS_SERVICE = "android.permission.BIND_SETTINGS_SUGGESTIONS_SERVICE"; + field public static final String BIND_SOUND_TRIGGER_DETECTION_SERVICE = "android.permission.BIND_SOUND_TRIGGER_DETECTION_SERVICE"; + field public static final String BIND_TELEPHONY_DATA_SERVICE = "android.permission.BIND_TELEPHONY_DATA_SERVICE"; + field public static final String BIND_TELEPHONY_NETWORK_SERVICE = "android.permission.BIND_TELEPHONY_NETWORK_SERVICE"; + field public static final String BIND_TEXTCLASSIFIER_SERVICE = "android.permission.BIND_TEXTCLASSIFIER_SERVICE"; + field public static final String BIND_TRUST_AGENT = "android.permission.BIND_TRUST_AGENT"; + field public static final String BIND_TV_REMOTE_SERVICE = "android.permission.BIND_TV_REMOTE_SERVICE"; + field public static final String BRICK = "android.permission.BRICK"; + field public static final String BRIGHTNESS_SLIDER_USAGE = "android.permission.BRIGHTNESS_SLIDER_USAGE"; + field @Deprecated public static final String BROADCAST_NETWORK_PRIVILEGED = "android.permission.BROADCAST_NETWORK_PRIVILEGED"; + field public static final String CAMERA_DISABLE_TRANSMIT_LED = "android.permission.CAMERA_DISABLE_TRANSMIT_LED"; + field public static final String CAPTURE_AUDIO_HOTWORD = "android.permission.CAPTURE_AUDIO_HOTWORD"; + field public static final String CAPTURE_MEDIA_OUTPUT = "android.permission.CAPTURE_MEDIA_OUTPUT"; + field public static final String CAPTURE_TV_INPUT = "android.permission.CAPTURE_TV_INPUT"; + field public static final String CAPTURE_VOICE_COMMUNICATION_OUTPUT = "android.permission.CAPTURE_VOICE_COMMUNICATION_OUTPUT"; + field public static final String CHANGE_APP_IDLE_STATE = "android.permission.CHANGE_APP_IDLE_STATE"; + field public static final String CHANGE_DEVICE_IDLE_TEMP_WHITELIST = "android.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST"; + field public static final String CLEAR_APP_USER_DATA = "android.permission.CLEAR_APP_USER_DATA"; + field public static final String COMPANION_APPROVE_WIFI_CONNECTIONS = "android.permission.COMPANION_APPROVE_WIFI_CONNECTIONS"; + field public static final String CONFIGURE_DISPLAY_BRIGHTNESS = "android.permission.CONFIGURE_DISPLAY_BRIGHTNESS"; + field public static final String CONFIGURE_WIFI_DISPLAY = "android.permission.CONFIGURE_WIFI_DISPLAY"; + field @Deprecated public static final String CONNECTIVITY_INTERNAL = "android.permission.CONNECTIVITY_INTERNAL"; + field public static final String CONNECTIVITY_USE_RESTRICTED_NETWORKS = "android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS"; + field public static final String CONTROL_DEVICE_LIGHTS = "android.permission.CONTROL_DEVICE_LIGHTS"; + field public static final String CONTROL_DISPLAY_COLOR_TRANSFORMS = "android.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS"; + field public static final String CONTROL_DISPLAY_SATURATION = "android.permission.CONTROL_DISPLAY_SATURATION"; + field public static final String CONTROL_INCALL_EXPERIENCE = "android.permission.CONTROL_INCALL_EXPERIENCE"; + field public static final String CONTROL_KEYGUARD_SECURE_NOTIFICATIONS = "android.permission.CONTROL_KEYGUARD_SECURE_NOTIFICATIONS"; + field public static final String CONTROL_VPN = "android.permission.CONTROL_VPN"; + field public static final String CREATE_USERS = "android.permission.CREATE_USERS"; + field public static final String CRYPT_KEEPER = "android.permission.CRYPT_KEEPER"; + field public static final String DEVICE_POWER = "android.permission.DEVICE_POWER"; + field public static final String DISPATCH_PROVISIONING_MESSAGE = "android.permission.DISPATCH_PROVISIONING_MESSAGE"; + field public static final String ENTER_CAR_MODE_PRIORITIZED = "android.permission.ENTER_CAR_MODE_PRIORITIZED"; + field public static final String EXEMPT_FROM_AUDIO_RECORD_RESTRICTIONS = "android.permission.EXEMPT_FROM_AUDIO_RECORD_RESTRICTIONS"; + field public static final String FORCE_BACK = "android.permission.FORCE_BACK"; + field public static final String FORCE_STOP_PACKAGES = "android.permission.FORCE_STOP_PACKAGES"; + field public static final String GET_APP_OPS_STATS = "android.permission.GET_APP_OPS_STATS"; + field public static final String GET_PROCESS_STATE_AND_OOM_SCORE = "android.permission.GET_PROCESS_STATE_AND_OOM_SCORE"; + field public static final String GET_RUNTIME_PERMISSIONS = "android.permission.GET_RUNTIME_PERMISSIONS"; + field public static final String GET_TOP_ACTIVITY_INFO = "android.permission.GET_TOP_ACTIVITY_INFO"; + field @Deprecated public static final String GRANT_PROFILE_OWNER_DEVICE_IDS_ACCESS = "android.permission.GRANT_PROFILE_OWNER_DEVICE_IDS_ACCESS"; + field public static final String GRANT_RUNTIME_PERMISSIONS = "android.permission.GRANT_RUNTIME_PERMISSIONS"; + field public static final String GRANT_RUNTIME_PERMISSIONS_TO_TELEPHONY_DEFAULTS = "android.permission.GRANT_RUNTIME_PERMISSIONS_TO_TELEPHONY_DEFAULTS"; + field public static final String HANDLE_CAR_MODE_CHANGES = "android.permission.HANDLE_CAR_MODE_CHANGES"; + field public static final String HARDWARE_TEST = "android.permission.HARDWARE_TEST"; + field public static final String HDMI_CEC = "android.permission.HDMI_CEC"; + field public static final String HIDE_NON_SYSTEM_OVERLAY_WINDOWS = "android.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS"; + field public static final String INJECT_EVENTS = "android.permission.INJECT_EVENTS"; + field public static final String INSTALL_DYNAMIC_SYSTEM = "android.permission.INSTALL_DYNAMIC_SYSTEM"; + field public static final String INSTALL_GRANT_RUNTIME_PERMISSIONS = "android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS"; + field public static final String INSTALL_LOCATION_TIME_ZONE_PROVIDER = "android.permission.INSTALL_LOCATION_TIME_ZONE_PROVIDER"; + field public static final String INSTALL_PACKAGE_UPDATES = "android.permission.INSTALL_PACKAGE_UPDATES"; + field public static final String INSTALL_SELF_UPDATES = "android.permission.INSTALL_SELF_UPDATES"; + field public static final String INTENT_FILTER_VERIFICATION_AGENT = "android.permission.INTENT_FILTER_VERIFICATION_AGENT"; + field public static final String INTERACT_ACROSS_USERS = "android.permission.INTERACT_ACROSS_USERS"; + field public static final String INTERACT_ACROSS_USERS_FULL = "android.permission.INTERACT_ACROSS_USERS_FULL"; + field public static final String INTERNAL_SYSTEM_WINDOW = "android.permission.INTERNAL_SYSTEM_WINDOW"; + field public static final String INVOKE_CARRIER_SETUP = "android.permission.INVOKE_CARRIER_SETUP"; + field public static final String KILL_UID = "android.permission.KILL_UID"; + field public static final String LOCAL_MAC_ADDRESS = "android.permission.LOCAL_MAC_ADDRESS"; + field public static final String LOCK_DEVICE = "android.permission.LOCK_DEVICE"; + field public static final String LOOP_RADIO = "android.permission.LOOP_RADIO"; + field public static final String MANAGE_ACCESSIBILITY = "android.permission.MANAGE_ACCESSIBILITY"; + field @Deprecated public static final String MANAGE_ACTIVITY_STACKS = "android.permission.MANAGE_ACTIVITY_STACKS"; + field public static final String MANAGE_ACTIVITY_TASKS = "android.permission.MANAGE_ACTIVITY_TASKS"; + field public static final String MANAGE_APP_OPS_RESTRICTIONS = "android.permission.MANAGE_APP_OPS_RESTRICTIONS"; + field public static final String MANAGE_APP_PREDICTIONS = "android.permission.MANAGE_APP_PREDICTIONS"; + field public static final String MANAGE_APP_TOKENS = "android.permission.MANAGE_APP_TOKENS"; + field public static final String MANAGE_AUTO_FILL = "android.permission.MANAGE_AUTO_FILL"; + field public static final String MANAGE_CARRIER_OEM_UNLOCK_STATE = "android.permission.MANAGE_CARRIER_OEM_UNLOCK_STATE"; + field public static final String MANAGE_CA_CERTIFICATES = "android.permission.MANAGE_CA_CERTIFICATES"; + field public static final String MANAGE_CONTENT_CAPTURE = "android.permission.MANAGE_CONTENT_CAPTURE"; + field public static final String MANAGE_CONTENT_SUGGESTIONS = "android.permission.MANAGE_CONTENT_SUGGESTIONS"; + field public static final String MANAGE_DEBUGGING = "android.permission.MANAGE_DEBUGGING"; + field public static final String MANAGE_FACTORY_RESET_PROTECTION = "android.permission.MANAGE_FACTORY_RESET_PROTECTION"; + field public static final String MANAGE_IPSEC_TUNNELS = "android.permission.MANAGE_IPSEC_TUNNELS"; + field public static final String MANAGE_MUSIC_RECOGNITION = "android.permission.MANAGE_MUSIC_RECOGNITION"; + field public static final String MANAGE_NOTIFICATION_LISTENERS = "android.permission.MANAGE_NOTIFICATION_LISTENERS"; + field public static final String MANAGE_ONE_TIME_PERMISSION_SESSIONS = "android.permission.MANAGE_ONE_TIME_PERMISSION_SESSIONS"; + field public static final String MANAGE_ROLE_HOLDERS = "android.permission.MANAGE_ROLE_HOLDERS"; + field public static final String MANAGE_ROLLBACKS = "android.permission.MANAGE_ROLLBACKS"; + field public static final String MANAGE_SENSOR_PRIVACY = "android.permission.MANAGE_SENSOR_PRIVACY"; + field public static final String MANAGE_SOUND_TRIGGER = "android.permission.MANAGE_SOUND_TRIGGER"; + field public static final String MANAGE_SUBSCRIPTION_PLANS = "android.permission.MANAGE_SUBSCRIPTION_PLANS"; + field public static final String MANAGE_TIME_AND_ZONE_DETECTION = "android.permission.MANAGE_TIME_AND_ZONE_DETECTION"; + field public static final String MANAGE_USB = "android.permission.MANAGE_USB"; + field public static final String MANAGE_USERS = "android.permission.MANAGE_USERS"; + field public static final String MANAGE_USER_OEM_UNLOCK_STATE = "android.permission.MANAGE_USER_OEM_UNLOCK_STATE"; + field public static final String MODIFY_APPWIDGET_BIND_PERMISSIONS = "android.permission.MODIFY_APPWIDGET_BIND_PERMISSIONS"; + field public static final String MODIFY_AUDIO_ROUTING = "android.permission.MODIFY_AUDIO_ROUTING"; + field public static final String MODIFY_CELL_BROADCASTS = "android.permission.MODIFY_CELL_BROADCASTS"; + field public static final String MODIFY_DAY_NIGHT_MODE = "android.permission.MODIFY_DAY_NIGHT_MODE"; + field @Deprecated public static final String MODIFY_NETWORK_ACCOUNTING = "android.permission.MODIFY_NETWORK_ACCOUNTING"; + field public static final String MODIFY_PARENTAL_CONTROLS = "android.permission.MODIFY_PARENTAL_CONTROLS"; + field public static final String MODIFY_QUIET_MODE = "android.permission.MODIFY_QUIET_MODE"; + field public static final String MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE = "android.permission.MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE"; + field public static final String MOVE_PACKAGE = "android.permission.MOVE_PACKAGE"; + field public static final String NETWORK_AIRPLANE_MODE = "android.permission.NETWORK_AIRPLANE_MODE"; + field public static final String NETWORK_CARRIER_PROVISIONING = "android.permission.NETWORK_CARRIER_PROVISIONING"; + field public static final String NETWORK_FACTORY = "android.permission.NETWORK_FACTORY"; + field public static final String NETWORK_MANAGED_PROVISIONING = "android.permission.NETWORK_MANAGED_PROVISIONING"; + field public static final String NETWORK_SCAN = "android.permission.NETWORK_SCAN"; + field public static final String NETWORK_SETTINGS = "android.permission.NETWORK_SETTINGS"; + field public static final String NETWORK_SETUP_WIZARD = "android.permission.NETWORK_SETUP_WIZARD"; + field public static final String NETWORK_SIGNAL_STRENGTH_WAKEUP = "android.permission.NETWORK_SIGNAL_STRENGTH_WAKEUP"; + field public static final String NETWORK_STACK = "android.permission.NETWORK_STACK"; + field public static final String NETWORK_STATS_PROVIDER = "android.permission.NETWORK_STATS_PROVIDER"; + field public static final String NOTIFICATION_DURING_SETUP = "android.permission.NOTIFICATION_DURING_SETUP"; + field public static final String NOTIFY_TV_INPUTS = "android.permission.NOTIFY_TV_INPUTS"; + field public static final String OBSERVE_APP_USAGE = "android.permission.OBSERVE_APP_USAGE"; + field public static final String OBSERVE_NETWORK_POLICY = "android.permission.OBSERVE_NETWORK_POLICY"; + field public static final String OBSERVE_ROLE_HOLDERS = "android.permission.OBSERVE_ROLE_HOLDERS"; + field public static final String OPEN_ACCESSIBILITY_DETAILS_SETTINGS = "android.permission.OPEN_ACCESSIBILITY_DETAILS_SETTINGS"; + field public static final String OVERRIDE_WIFI_CONFIG = "android.permission.OVERRIDE_WIFI_CONFIG"; + field public static final String PACKAGE_VERIFICATION_AGENT = "android.permission.PACKAGE_VERIFICATION_AGENT"; + field public static final String PACKET_KEEPALIVE_OFFLOAD = "android.permission.PACKET_KEEPALIVE_OFFLOAD"; + field public static final String PEERS_MAC_ADDRESS = "android.permission.PEERS_MAC_ADDRESS"; + field public static final String PERFORM_CDMA_PROVISIONING = "android.permission.PERFORM_CDMA_PROVISIONING"; + field public static final String PERFORM_SIM_ACTIVATION = "android.permission.PERFORM_SIM_ACTIVATION"; + field public static final String POWER_SAVER = "android.permission.POWER_SAVER"; + field public static final String PROVIDE_RESOLVER_RANKER_SERVICE = "android.permission.PROVIDE_RESOLVER_RANKER_SERVICE"; + field public static final String PROVIDE_TRUST_AGENT = "android.permission.PROVIDE_TRUST_AGENT"; + field public static final String QUERY_TIME_ZONE_RULES = "android.permission.QUERY_TIME_ZONE_RULES"; + field public static final String RADIO_SCAN_WITHOUT_LOCATION = "android.permission.RADIO_SCAN_WITHOUT_LOCATION"; + field public static final String READ_ACTIVE_EMERGENCY_SESSION = "android.permission.READ_ACTIVE_EMERGENCY_SESSION"; + field public static final String READ_CARRIER_APP_INFO = "android.permission.READ_CARRIER_APP_INFO"; + field public static final String READ_CELL_BROADCASTS = "android.permission.READ_CELL_BROADCASTS"; + field public static final String READ_CONTENT_RATING_SYSTEMS = "android.permission.READ_CONTENT_RATING_SYSTEMS"; + field public static final String READ_DEVICE_CONFIG = "android.permission.READ_DEVICE_CONFIG"; + field public static final String READ_DREAM_STATE = "android.permission.READ_DREAM_STATE"; + field public static final String READ_INSTALL_SESSIONS = "android.permission.READ_INSTALL_SESSIONS"; + field public static final String READ_NETWORK_USAGE_HISTORY = "android.permission.READ_NETWORK_USAGE_HISTORY"; + field public static final String READ_OEM_UNLOCK_STATE = "android.permission.READ_OEM_UNLOCK_STATE"; + field public static final String READ_PRINT_SERVICES = "android.permission.READ_PRINT_SERVICES"; + field public static final String READ_PRINT_SERVICE_RECOMMENDATIONS = "android.permission.READ_PRINT_SERVICE_RECOMMENDATIONS"; + field public static final String READ_PRIVILEGED_PHONE_STATE = "android.permission.READ_PRIVILEGED_PHONE_STATE"; + field public static final String READ_RUNTIME_PROFILES = "android.permission.READ_RUNTIME_PROFILES"; + field public static final String READ_SEARCH_INDEXABLES = "android.permission.READ_SEARCH_INDEXABLES"; + field public static final String READ_SYSTEM_UPDATE_INFO = "android.permission.READ_SYSTEM_UPDATE_INFO"; + field public static final String READ_WALLPAPER_INTERNAL = "android.permission.READ_WALLPAPER_INTERNAL"; + field public static final String READ_WIFI_CREDENTIAL = "android.permission.READ_WIFI_CREDENTIAL"; + field public static final String REAL_GET_TASKS = "android.permission.REAL_GET_TASKS"; + field public static final String RECEIVE_DATA_ACTIVITY_CHANGE = "android.permission.RECEIVE_DATA_ACTIVITY_CHANGE"; + field public static final String RECEIVE_DEVICE_CUSTOMIZATION_READY = "android.permission.RECEIVE_DEVICE_CUSTOMIZATION_READY"; + field public static final String RECEIVE_EMERGENCY_BROADCAST = "android.permission.RECEIVE_EMERGENCY_BROADCAST"; + field public static final String RECEIVE_WIFI_CREDENTIAL_CHANGE = "android.permission.RECEIVE_WIFI_CREDENTIAL_CHANGE"; + field public static final String RECOVERY = "android.permission.RECOVERY"; + field public static final String RECOVER_KEYSTORE = "android.permission.RECOVER_KEYSTORE"; + field public static final String REGISTER_CALL_PROVIDER = "android.permission.REGISTER_CALL_PROVIDER"; + field public static final String REGISTER_CONNECTION_MANAGER = "android.permission.REGISTER_CONNECTION_MANAGER"; + field public static final String REGISTER_SIM_SUBSCRIPTION = "android.permission.REGISTER_SIM_SUBSCRIPTION"; + field public static final String REGISTER_STATS_PULL_ATOM = "android.permission.REGISTER_STATS_PULL_ATOM"; + field public static final String REMOTE_DISPLAY_PROVIDER = "android.permission.REMOTE_DISPLAY_PROVIDER"; + field public static final String REMOVE_DRM_CERTIFICATES = "android.permission.REMOVE_DRM_CERTIFICATES"; + field public static final String REMOVE_TASKS = "android.permission.REMOVE_TASKS"; + field public static final String REQUEST_NETWORK_SCORES = "android.permission.REQUEST_NETWORK_SCORES"; + field public static final String REQUEST_NOTIFICATION_ASSISTANT_SERVICE = "android.permission.REQUEST_NOTIFICATION_ASSISTANT_SERVICE"; + field public static final String RESET_PASSWORD = "android.permission.RESET_PASSWORD"; + field public static final String RESTORE_RUNTIME_PERMISSIONS = "android.permission.RESTORE_RUNTIME_PERMISSIONS"; + field public static final String RESTRICTED_VR_ACCESS = "android.permission.RESTRICTED_VR_ACCESS"; + field public static final String RETRIEVE_WINDOW_CONTENT = "android.permission.RETRIEVE_WINDOW_CONTENT"; + field public static final String REVIEW_ACCESSIBILITY_SERVICES = "android.permission.REVIEW_ACCESSIBILITY_SERVICES"; + field public static final String REVOKE_RUNTIME_PERMISSIONS = "android.permission.REVOKE_RUNTIME_PERMISSIONS"; + field public static final String SCORE_NETWORKS = "android.permission.SCORE_NETWORKS"; + field public static final String SECURE_ELEMENT_PRIVILEGED_OPERATION = "android.permission.SECURE_ELEMENT_PRIVILEGED_OPERATION"; + field public static final String SEND_CATEGORY_CAR_NOTIFICATIONS = "android.permission.SEND_CATEGORY_CAR_NOTIFICATIONS"; + field public static final String SEND_DEVICE_CUSTOMIZATION_READY = "android.permission.SEND_DEVICE_CUSTOMIZATION_READY"; + field public static final String SEND_SHOW_SUSPENDED_APP_DETAILS = "android.permission.SEND_SHOW_SUSPENDED_APP_DETAILS"; + field public static final String SEND_SMS_NO_CONFIRMATION = "android.permission.SEND_SMS_NO_CONFIRMATION"; + field public static final String SERIAL_PORT = "android.permission.SERIAL_PORT"; + field public static final String SET_ACTIVITY_WATCHER = "android.permission.SET_ACTIVITY_WATCHER"; + field public static final String SET_HARMFUL_APP_WARNINGS = "android.permission.SET_HARMFUL_APP_WARNINGS"; + field public static final String SET_MEDIA_KEY_LISTENER = "android.permission.SET_MEDIA_KEY_LISTENER"; + field public static final String SET_ORIENTATION = "android.permission.SET_ORIENTATION"; + field public static final String SET_POINTER_SPEED = "android.permission.SET_POINTER_SPEED"; + field public static final String SET_SCREEN_COMPATIBILITY = "android.permission.SET_SCREEN_COMPATIBILITY"; + field public static final String SET_VOLUME_KEY_LONG_PRESS_LISTENER = "android.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER"; + field public static final String SET_WALLPAPER_COMPONENT = "android.permission.SET_WALLPAPER_COMPONENT"; + field public static final String SHOW_KEYGUARD_MESSAGE = "android.permission.SHOW_KEYGUARD_MESSAGE"; + field public static final String SHUTDOWN = "android.permission.SHUTDOWN"; + field public static final String START_ACTIVITIES_FROM_BACKGROUND = "android.permission.START_ACTIVITIES_FROM_BACKGROUND"; + field public static final String STATUS_BAR_SERVICE = "android.permission.STATUS_BAR_SERVICE"; + field public static final String STOP_APP_SWITCHES = "android.permission.STOP_APP_SWITCHES"; + field public static final String SUBSTITUTE_NOTIFICATION_APP_NAME = "android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME"; + field public static final String SUBSTITUTE_SHARE_TARGET_APP_NAME_AND_ICON = "android.permission.SUBSTITUTE_SHARE_TARGET_APP_NAME_AND_ICON"; + field public static final String SUSPEND_APPS = "android.permission.SUSPEND_APPS"; + field public static final String SYSTEM_CAMERA = "android.permission.SYSTEM_CAMERA"; + field public static final String TETHER_PRIVILEGED = "android.permission.TETHER_PRIVILEGED"; + field public static final String TV_INPUT_HARDWARE = "android.permission.TV_INPUT_HARDWARE"; + field public static final String TV_VIRTUAL_REMOTE_CONTROLLER = "android.permission.TV_VIRTUAL_REMOTE_CONTROLLER"; + field public static final String UNLIMITED_SHORTCUTS_API_CALLS = "android.permission.UNLIMITED_SHORTCUTS_API_CALLS"; + field public static final String UPDATE_APP_OPS_STATS = "android.permission.UPDATE_APP_OPS_STATS"; + field public static final String UPDATE_LOCK = "android.permission.UPDATE_LOCK"; + field public static final String UPDATE_TIME_ZONE_RULES = "android.permission.UPDATE_TIME_ZONE_RULES"; + field public static final String UPGRADE_RUNTIME_PERMISSIONS = "android.permission.UPGRADE_RUNTIME_PERMISSIONS"; + field public static final String USER_ACTIVITY = "android.permission.USER_ACTIVITY"; + field public static final String USE_RESERVED_DISK = "android.permission.USE_RESERVED_DISK"; + field public static final String WHITELIST_AUTO_REVOKE_PERMISSIONS = "android.permission.WHITELIST_AUTO_REVOKE_PERMISSIONS"; + field public static final String WHITELIST_RESTRICTED_PERMISSIONS = "android.permission.WHITELIST_RESTRICTED_PERMISSIONS"; + field public static final String WIFI_SET_DEVICE_MOBILITY_STATE = "android.permission.WIFI_SET_DEVICE_MOBILITY_STATE"; + field public static final String WIFI_UPDATE_USABILITY_STATS_SCORE = "android.permission.WIFI_UPDATE_USABILITY_STATS_SCORE"; + field public static final String WRITE_DEVICE_CONFIG = "android.permission.WRITE_DEVICE_CONFIG"; + field public static final String WRITE_DREAM_STATE = "android.permission.WRITE_DREAM_STATE"; + field public static final String WRITE_EMBEDDED_SUBSCRIPTIONS = "android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS"; + field @Deprecated public static final String WRITE_MEDIA_STORAGE = "android.permission.WRITE_MEDIA_STORAGE"; + field public static final String WRITE_OBB = "android.permission.WRITE_OBB"; + } + + public static final class Manifest.permission_group { + field public static final String UNDEFINED = "android.permission-group.UNDEFINED"; + } + + public static final class R.array { + field public static final int config_keySystemUuidMapping = 17235973; // 0x1070005 + } + + public static final class R.attr { + field public static final int allowClearUserDataOnFailedRestore = 16844288; // 0x1010600 + field public static final int isVrOnly = 16844152; // 0x1010578 + field public static final int minExtensionVersion = 16844305; // 0x1010611 + field public static final int requiredSystemPropertyName = 16844133; // 0x1010565 + field public static final int requiredSystemPropertyValue = 16844134; // 0x1010566 + field public static final int sdkVersion = 16844304; // 0x1010610 + field public static final int supportsAmbientMode = 16844173; // 0x101058d + field public static final int userRestriction = 16844164; // 0x1010584 + } + + public static final class R.bool { + field public static final int config_sendPackageName = 17891328; // 0x1110000 + field public static final int config_showDefaultAssistant = 17891329; // 0x1110001 + field public static final int config_showDefaultEmergency = 17891330; // 0x1110002 + field public static final int config_showDefaultHome = 17891331; // 0x1110003 + } + + public static final class R.color { + field public static final int system_notification_accent_color = 17170460; // 0x106001c + } + + public static final class R.dimen { + field public static final int config_restrictedIconSize = 17104903; // 0x1050007 + } + + public static final class R.drawable { + field public static final int ic_info = 17301684; // 0x10800b4 + } + + public static final class R.raw { + field public static final int loaderror = 17825792; // 0x1100000 + field public static final int nodomain = 17825793; // 0x1100001 + } + + public static final class R.string { + field public static final int config_defaultAssistant = 17039393; // 0x1040021 + field public static final int config_defaultBrowser = 17039394; // 0x1040022 + field public static final int config_defaultCallRedirection = 17039397; // 0x1040025 + field public static final int config_defaultCallScreening = 17039398; // 0x1040026 + field public static final int config_defaultDialer = 17039395; // 0x1040023 + field public static final int config_defaultSms = 17039396; // 0x1040024 + field public static final int config_feedbackIntentExtraKey = 17039391; // 0x104001f + field public static final int config_feedbackIntentNameKey = 17039392; // 0x1040020 + field public static final int config_helpIntentExtraKey = 17039389; // 0x104001d + field public static final int config_helpIntentNameKey = 17039390; // 0x104001e + field public static final int config_helpPackageNameKey = 17039387; // 0x104001b + field public static final int config_helpPackageNameValue = 17039388; // 0x104001c + field public static final int config_systemAutomotiveCluster = 17039400; // 0x1040028 + field public static final int config_systemAutomotiveProjection = 17039402; // 0x104002a + field public static final int config_systemGallery = 17039399; // 0x1040027 + field public static final int config_systemVideoCall = 17039401; // 0x1040029 + } + + public static final class R.style { + field public static final int Theme_DeviceDefault_DocumentsUI = 16974562; // 0x10302e2 + field public static final int Theme_Leanback_FormWizard = 16974544; // 0x10302d0 + } + +} + +package android.accounts { + + public class AccountManager { + method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public android.accounts.AccountManagerFuture<android.os.Bundle> finishSessionAsUser(android.os.Bundle, android.app.Activity, android.os.UserHandle, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler); + } + +} + +package android.app { + + 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 { + method public void convertFromTranslucent(); + method public boolean convertToTranslucent(android.app.Activity.TranslucentConversionListener, android.app.ActivityOptions); + method @Deprecated public boolean isBackgroundVisibleBehind(); + method @Deprecated public void onBackgroundVisibleBehindChanged(boolean); + } + + public static interface Activity.TranslucentConversionListener { + method public void onTranslucentConversionComplete(boolean); + } + + public class ActivityManager { + method @RequiresPermission(android.Manifest.permission.PACKAGE_USAGE_STATS) public void addOnUidImportanceListener(android.app.ActivityManager.OnUidImportanceListener, int); + method @RequiresPermission(android.Manifest.permission.FORCE_STOP_PACKAGES) public void forceStopPackage(String); + method @RequiresPermission(anyOf={"android.permission.INTERACT_ACROSS_USERS", "android.permission.INTERACT_ACROSS_USERS_FULL"}) public static int getCurrentUser(); + method @RequiresPermission(android.Manifest.permission.PACKAGE_USAGE_STATS) public int getPackageImportance(String); + method @NonNull public java.util.Collection<java.util.Locale> getSupportedLocales(); + method @RequiresPermission(android.Manifest.permission.PACKAGE_USAGE_STATS) public int getUidImportance(int); + method @RequiresPermission(android.Manifest.permission.FORCE_STOP_PACKAGES) public void killProcessesWhenImperceptible(@NonNull int[], @NonNull String); + method @RequiresPermission(android.Manifest.permission.KILL_UID) public void killUid(int, String); + method @RequiresPermission(android.Manifest.permission.PACKAGE_USAGE_STATS) public void removeOnUidImportanceListener(android.app.ActivityManager.OnUidImportanceListener); + method public void setDeviceLocales(@NonNull android.os.LocaleList); + method @RequiresPermission(android.Manifest.permission.RESTRICTED_VR_ACCESS) public static void setPersistentVrThread(int); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public boolean switchUser(@NonNull android.os.UserHandle); + } + + public static interface ActivityManager.OnUidImportanceListener { + method public void onUidImportance(int, int); + } + + public class AlarmManager { + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void set(int, long, long, long, android.app.PendingIntent, android.os.WorkSource); + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void set(int, long, long, long, android.app.AlarmManager.OnAlarmListener, android.os.Handler, android.os.WorkSource); + } + + public class AppOpsManager { + method @Nullable @RequiresPermission(android.Manifest.permission.GET_APP_OPS_STATS) public android.app.RuntimeAppOpAccessMessage collectRuntimeAppOpAccessMessage(); + method @RequiresPermission(android.Manifest.permission.GET_APP_OPS_STATS) public void getHistoricalOps(@NonNull android.app.AppOpsManager.HistoricalOpsRequest, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<android.app.AppOpsManager.HistoricalOps>); + method public static String[] getOpStrs(); + method @NonNull @RequiresPermission(android.Manifest.permission.GET_APP_OPS_STATS) public java.util.List<android.app.AppOpsManager.PackageOps> getOpsForPackage(int, @NonNull String, @Nullable java.lang.String...); + method @NonNull @RequiresPermission(android.Manifest.permission.GET_APP_OPS_STATS) public java.util.List<android.app.AppOpsManager.PackageOps> getPackagesForOps(@Nullable String[]); + method public static int opToDefaultMode(@NonNull String); + method @Nullable public static String opToPermission(@NonNull String); + method @RequiresPermission("android.permission.MANAGE_APP_OPS_MODES") public void setMode(@NonNull String, int, @Nullable String, int); + method @RequiresPermission("android.permission.MANAGE_APP_OPS_MODES") public void setUidMode(@NonNull String, int, int); + field public static final String OPSTR_ACCEPT_HANDOVER = "android:accept_handover"; + field public static final String OPSTR_ACCESS_ACCESSIBILITY = "android:access_accessibility"; + field public static final String OPSTR_ACCESS_NOTIFICATIONS = "android:access_notifications"; + field public static final String OPSTR_ACTIVATE_VPN = "android:activate_vpn"; + field public static final String OPSTR_ASSIST_SCREENSHOT = "android:assist_screenshot"; + field public static final String OPSTR_ASSIST_STRUCTURE = "android:assist_structure"; + field public static final String OPSTR_AUDIO_ACCESSIBILITY_VOLUME = "android:audio_accessibility_volume"; + field public static final String OPSTR_AUDIO_ALARM_VOLUME = "android:audio_alarm_volume"; + field public static final String OPSTR_AUDIO_BLUETOOTH_VOLUME = "android:audio_bluetooth_volume"; + field public static final String OPSTR_AUDIO_MASTER_VOLUME = "android:audio_master_volume"; + field public static final String OPSTR_AUDIO_MEDIA_VOLUME = "android:audio_media_volume"; + field public static final String OPSTR_AUDIO_NOTIFICATION_VOLUME = "android:audio_notification_volume"; + field public static final String OPSTR_AUDIO_RING_VOLUME = "android:audio_ring_volume"; + field public static final String OPSTR_AUDIO_VOICE_VOLUME = "android:audio_voice_volume"; + field public static final String OPSTR_AUTO_REVOKE_MANAGED_BY_INSTALLER = "android:auto_revoke_managed_by_installer"; + field public static final String OPSTR_AUTO_REVOKE_PERMISSIONS_IF_UNUSED = "android:auto_revoke_permissions_if_unused"; + field public static final String OPSTR_BIND_ACCESSIBILITY_SERVICE = "android:bind_accessibility_service"; + field public static final String OPSTR_CHANGE_WIFI_STATE = "android:change_wifi_state"; + field public static final String OPSTR_GET_ACCOUNTS = "android:get_accounts"; + field public static final String OPSTR_GPS = "android:gps"; + field public static final String OPSTR_INSTANT_APP_START_FOREGROUND = "android:instant_app_start_foreground"; + field public static final String OPSTR_INTERACT_ACROSS_PROFILES = "android:interact_across_profiles"; + field public static final String OPSTR_LEGACY_STORAGE = "android:legacy_storage"; + field public static final String OPSTR_LOADER_USAGE_STATS = "android:loader_usage_stats"; + field public static final String OPSTR_MANAGE_EXTERNAL_STORAGE = "android:manage_external_storage"; + field public static final String OPSTR_MANAGE_IPSEC_TUNNELS = "android:manage_ipsec_tunnels"; + field public static final String OPSTR_MANAGE_ONGOING_CALLS = "android:manage_ongoing_calls"; + field public static final String OPSTR_MUTE_MICROPHONE = "android:mute_microphone"; + field public static final String OPSTR_NEIGHBORING_CELLS = "android:neighboring_cells"; + field public static final String OPSTR_PLAY_AUDIO = "android:play_audio"; + field public static final String OPSTR_POST_NOTIFICATION = "android:post_notification"; + field public static final String OPSTR_PROJECT_MEDIA = "android:project_media"; + field public static final String OPSTR_READ_CLIPBOARD = "android:read_clipboard"; + field public static final String OPSTR_READ_ICC_SMS = "android:read_icc_sms"; + field public static final String OPSTR_READ_MEDIA_AUDIO = "android:read_media_audio"; + field public static final String OPSTR_READ_MEDIA_IMAGES = "android:read_media_images"; + field public static final String OPSTR_READ_MEDIA_VIDEO = "android:read_media_video"; + field public static final String OPSTR_RECEIVE_EMERGENCY_BROADCAST = "android:receive_emergency_broadcast"; + field public static final String OPSTR_REQUEST_DELETE_PACKAGES = "android:request_delete_packages"; + field public static final String OPSTR_REQUEST_INSTALL_PACKAGES = "android:request_install_packages"; + field public static final String OPSTR_RUN_ANY_IN_BACKGROUND = "android:run_any_in_background"; + field public static final String OPSTR_RUN_IN_BACKGROUND = "android:run_in_background"; + field public static final String OPSTR_START_FOREGROUND = "android:start_foreground"; + field public static final String OPSTR_TAKE_AUDIO_FOCUS = "android:take_audio_focus"; + field public static final String OPSTR_TAKE_MEDIA_BUTTONS = "android:take_media_buttons"; + field public static final String OPSTR_TOAST_WINDOW = "android:toast_window"; + field public static final String OPSTR_TURN_SCREEN_ON = "android:turn_screen_on"; + field public static final String OPSTR_VIBRATE = "android:vibrate"; + field public static final String OPSTR_WAKE_LOCK = "android:wake_lock"; + field public static final String OPSTR_WIFI_SCAN = "android:wifi_scan"; + field public static final String OPSTR_WRITE_CLIPBOARD = "android:write_clipboard"; + field public static final String OPSTR_WRITE_ICC_SMS = "android:write_icc_sms"; + field public static final String OPSTR_WRITE_MEDIA_AUDIO = "android:write_media_audio"; + field public static final String OPSTR_WRITE_MEDIA_IMAGES = "android:write_media_images"; + field public static final String OPSTR_WRITE_MEDIA_VIDEO = "android:write_media_video"; + field public static final String OPSTR_WRITE_SMS = "android:write_sms"; + field public static final String OPSTR_WRITE_WALLPAPER = "android:write_wallpaper"; + field public static final int OP_FLAGS_ALL = 31; // 0x1f + field public static final int OP_FLAGS_ALL_TRUSTED = 13; // 0xd + field public static final int OP_FLAG_SELF = 1; // 0x1 + field public static final int OP_FLAG_TRUSTED_PROXIED = 8; // 0x8 + field public static final int OP_FLAG_TRUSTED_PROXY = 2; // 0x2 + field public static final int OP_FLAG_UNTRUSTED_PROXIED = 16; // 0x10 + field public static final int OP_FLAG_UNTRUSTED_PROXY = 4; // 0x4 + field public static final int UID_STATE_BACKGROUND = 600; // 0x258 + field public static final int UID_STATE_CACHED = 700; // 0x2bc + field public static final int UID_STATE_FOREGROUND = 500; // 0x1f4 + field public static final int UID_STATE_FOREGROUND_SERVICE = 400; // 0x190 + field @Deprecated public static final int UID_STATE_FOREGROUND_SERVICE_LOCATION = 300; // 0x12c + field public static final int UID_STATE_PERSISTENT = 100; // 0x64 + field public static final int UID_STATE_TOP = 200; // 0xc8 + } + + public static final class AppOpsManager.AttributedHistoricalOps implements android.os.Parcelable { + method public int describeContents(); + method @Nullable public android.app.AppOpsManager.HistoricalOp getOp(@NonNull String); + method @NonNull public android.app.AppOpsManager.HistoricalOp getOpAt(@IntRange(from=0) int); + method @IntRange(from=0) public int getOpCount(); + method @Nullable public String getTag(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.AttributedHistoricalOps> CREATOR; + } + + public static final class AppOpsManager.AttributedOpEntry implements android.os.Parcelable { + method public int describeContents(); + method public long getLastAccessBackgroundTime(int); + method public long getLastAccessForegroundTime(int); + method public long getLastAccessTime(int); + method public long getLastAccessTime(int, int, int); + method public long getLastBackgroundDuration(int); + method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastBackgroundProxyInfo(int); + method public long getLastDuration(int); + method public long getLastDuration(int, int, int); + method public long getLastForegroundDuration(int); + method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastForegroundProxyInfo(int); + method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastProxyInfo(int); + method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastProxyInfo(int, int, int); + method public long getLastRejectBackgroundTime(int); + method public long getLastRejectForegroundTime(int); + method public long getLastRejectTime(int); + method public long getLastRejectTime(int, int, int); + method public boolean isRunning(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.AttributedOpEntry> CREATOR; + } + + public static final class AppOpsManager.HistoricalOp implements android.os.Parcelable { + method public int describeContents(); + method public long getAccessCount(int, int, int); + method public long getAccessDuration(int, int, int); + method public long getBackgroundAccessCount(int); + method public long getBackgroundAccessDuration(int); + method public long getBackgroundRejectCount(int); + method public long getForegroundAccessCount(int); + method public long getForegroundAccessDuration(int); + method public long getForegroundRejectCount(int); + method @NonNull public String getOpName(); + method public long getRejectCount(int, int, int); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.HistoricalOp> CREATOR; + } + + public static final class AppOpsManager.HistoricalOps implements android.os.Parcelable { + method public int describeContents(); + method public long getBeginTimeMillis(); + method public long getEndTimeMillis(); + method @IntRange(from=0) public int getUidCount(); + method @Nullable public android.app.AppOpsManager.HistoricalUidOps getUidOps(int); + method @NonNull public android.app.AppOpsManager.HistoricalUidOps getUidOpsAt(@IntRange(from=0) int); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.HistoricalOps> CREATOR; + } + + public static final class AppOpsManager.HistoricalOpsRequest { + } + + public static final class AppOpsManager.HistoricalOpsRequest.Builder { + ctor public AppOpsManager.HistoricalOpsRequest.Builder(long, long); + method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest build(); + method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest.Builder setAttributionTag(@Nullable String); + method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest.Builder setFlags(int); + method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest.Builder setOpNames(@Nullable java.util.List<java.lang.String>); + method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest.Builder setPackageName(@Nullable String); + method @NonNull public android.app.AppOpsManager.HistoricalOpsRequest.Builder setUid(int); + } + + public static final class AppOpsManager.HistoricalPackageOps implements android.os.Parcelable { + method public int describeContents(); + method @Nullable public android.app.AppOpsManager.AttributedHistoricalOps getAttributedOps(@NonNull String); + method @NonNull public android.app.AppOpsManager.AttributedHistoricalOps getAttributedOpsAt(@IntRange(from=0) int); + method @IntRange(from=0) public int getAttributedOpsCount(); + method @Nullable public android.app.AppOpsManager.HistoricalOp getOp(@NonNull String); + method @NonNull public android.app.AppOpsManager.HistoricalOp getOpAt(@IntRange(from=0) int); + method @IntRange(from=0) public int getOpCount(); + method @NonNull public String getPackageName(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.HistoricalPackageOps> CREATOR; + } + + public static final class AppOpsManager.HistoricalUidOps implements android.os.Parcelable { + method public int describeContents(); + method @IntRange(from=0) public int getPackageCount(); + method @Nullable public android.app.AppOpsManager.HistoricalPackageOps getPackageOps(@NonNull String); + method @NonNull public android.app.AppOpsManager.HistoricalPackageOps getPackageOpsAt(@IntRange(from=0) int); + method public int getUid(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.HistoricalUidOps> CREATOR; + } + + public static final class AppOpsManager.OpEntry implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public java.util.Map<java.lang.String,android.app.AppOpsManager.AttributedOpEntry> getAttributedOpEntries(); + method @Deprecated public long getDuration(); + method public long getLastAccessBackgroundTime(int); + method public long getLastAccessForegroundTime(int); + method public long getLastAccessTime(int); + method public long getLastAccessTime(int, int, int); + method public long getLastBackgroundDuration(int); + method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastBackgroundProxyInfo(int); + method public long getLastDuration(int); + method public long getLastDuration(int, int, int); + method public long getLastForegroundDuration(int); + method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastForegroundProxyInfo(int); + method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastProxyInfo(int); + method @Nullable public android.app.AppOpsManager.OpEventProxyInfo getLastProxyInfo(int, int, int); + method public long getLastRejectBackgroundTime(int); + method public long getLastRejectForegroundTime(int); + method public long getLastRejectTime(int); + method public long getLastRejectTime(int, int, int); + method public int getMode(); + method @NonNull public String getOpStr(); + method @Deprecated @Nullable public String getProxyPackageName(); + method @Deprecated @Nullable public String getProxyPackageName(int, int); + method @Deprecated public int getProxyUid(); + method @Deprecated public int getProxyUid(int, int); + method public boolean isRunning(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.OpEntry> CREATOR; + } + + public static final class AppOpsManager.OpEventProxyInfo implements android.os.Parcelable { + method public int describeContents(); + method @Nullable public String getAttributionTag(); + method @Nullable public String getPackageName(); + method @IntRange(from=0) public int getUid(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.OpEventProxyInfo> CREATOR; + } + + public static final class AppOpsManager.PackageOps implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public java.util.List<android.app.AppOpsManager.OpEntry> getOps(); + method @NonNull public String getPackageName(); + method public int getUid(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.AppOpsManager.PackageOps> CREATOR; + } + + public class BroadcastOptions { + method public static android.app.BroadcastOptions makeBasic(); + method @RequiresPermission(android.Manifest.permission.START_ACTIVITIES_FROM_BACKGROUND) public void setBackgroundActivityStartsAllowed(boolean); + method public void setDontSendToRestrictedApps(boolean); + method @RequiresPermission(android.Manifest.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST) public void setTemporaryAppWhitelistDuration(long); + method public android.os.Bundle toBundle(); + } + + public class DownloadManager { + method @RequiresPermission(android.Manifest.permission.WRITE_MEDIA_STORAGE) public void onMediaStoreDownloadsDeleted(@NonNull android.util.LongSparseArray<java.lang.String>); + field public static final String ACTION_DOWNLOAD_COMPLETED = "android.intent.action.DOWNLOAD_COMPLETED"; + } + + public abstract class InstantAppResolverService extends android.app.Service { + ctor public InstantAppResolverService(); + method public final void attachBaseContext(android.content.Context); + method public final android.os.IBinder onBind(android.content.Intent); + method @Deprecated public void onGetInstantAppIntentFilter(@Nullable int[], @NonNull String, @NonNull android.app.InstantAppResolverService.InstantAppResolutionCallback); + method @Deprecated public void onGetInstantAppIntentFilter(@NonNull android.content.Intent, @Nullable int[], @NonNull String, @NonNull android.app.InstantAppResolverService.InstantAppResolutionCallback); + method @Deprecated public void onGetInstantAppIntentFilter(@NonNull android.content.Intent, @Nullable int[], @NonNull android.os.UserHandle, @NonNull String, @NonNull android.app.InstantAppResolverService.InstantAppResolutionCallback); + method @MainThread public void onGetInstantAppIntentFilter(@NonNull android.content.pm.InstantAppRequestInfo, @NonNull android.app.InstantAppResolverService.InstantAppResolutionCallback); + method @Deprecated public void onGetInstantAppResolveInfo(@Nullable int[], @NonNull String, @NonNull android.app.InstantAppResolverService.InstantAppResolutionCallback); + method @Deprecated public void onGetInstantAppResolveInfo(@NonNull android.content.Intent, @Nullable int[], @NonNull String, @NonNull android.app.InstantAppResolverService.InstantAppResolutionCallback); + method @Deprecated public void onGetInstantAppResolveInfo(@NonNull android.content.Intent, @Nullable int[], @NonNull android.os.UserHandle, @NonNull String, @NonNull android.app.InstantAppResolverService.InstantAppResolutionCallback); + method @MainThread public void onGetInstantAppResolveInfo(@NonNull android.content.pm.InstantAppRequestInfo, @NonNull android.app.InstantAppResolverService.InstantAppResolutionCallback); + } + + public static final class InstantAppResolverService.InstantAppResolutionCallback { + method public void onInstantAppResolveInfo(java.util.List<android.content.pm.InstantAppResolveInfo>); + } + + public class KeyguardManager { + method public android.content.Intent createConfirmFactoryResetCredentialIntent(CharSequence, CharSequence, CharSequence); + method @RequiresPermission("android.permission.SET_INITIAL_LOCK") public int getMinLockLength(boolean, int); + method @RequiresPermission(android.Manifest.permission.CONTROL_KEYGUARD_SECURE_NOTIFICATIONS) public boolean getPrivateNotificationsAllowed(); + method @RequiresPermission("android.permission.SET_INITIAL_LOCK") public boolean isValidLockPasswordComplexity(int, @NonNull byte[], int); + method @RequiresPermission(android.Manifest.permission.SHOW_KEYGUARD_MESSAGE) public void requestDismissKeyguard(@NonNull android.app.Activity, @Nullable CharSequence, @Nullable android.app.KeyguardManager.KeyguardDismissCallback); + method @RequiresPermission("android.permission.SET_INITIAL_LOCK") public boolean setLock(int, @NonNull byte[], int); + method @RequiresPermission(android.Manifest.permission.CONTROL_KEYGUARD_SECURE_NOTIFICATIONS) public void setPrivateNotificationsAllowed(boolean); + } + + public class Notification implements android.os.Parcelable { + field public static final String CATEGORY_CAR_EMERGENCY = "car_emergency"; + field public static final String CATEGORY_CAR_INFORMATION = "car_information"; + field public static final String CATEGORY_CAR_WARNING = "car_warning"; + field @RequiresPermission(android.Manifest.permission.NOTIFICATION_DURING_SETUP) public static final String EXTRA_ALLOW_DURING_SETUP = "android.allowDuringSetup"; + field @RequiresPermission(android.Manifest.permission.SUBSTITUTE_NOTIFICATION_APP_NAME) public static final String EXTRA_SUBSTITUTE_APP_NAME = "android.substName"; + field public static final int FLAG_AUTOGROUP_SUMMARY = 1024; // 0x400 + } + + public static final class Notification.TvExtender implements android.app.Notification.Extender { + ctor public Notification.TvExtender(); + ctor public Notification.TvExtender(android.app.Notification); + method public android.app.Notification.Builder extend(android.app.Notification.Builder); + method public String getChannelId(); + method public android.app.PendingIntent getContentIntent(); + method public android.app.PendingIntent getDeleteIntent(); + method public boolean getSuppressShowOverApps(); + method public boolean isAvailableOnTv(); + method public android.app.Notification.TvExtender setChannel(String); + method public android.app.Notification.TvExtender setChannelId(String); + method public android.app.Notification.TvExtender setContentIntent(android.app.PendingIntent); + method public android.app.Notification.TvExtender setDeleteIntent(android.app.PendingIntent); + method public android.app.Notification.TvExtender setSuppressShowOverApps(boolean); + } + + public final class NotificationChannel implements android.os.Parcelable { + method public int getUserLockedFields(); + method public boolean isDeleted(); + method public void populateFromXml(org.xmlpull.v1.XmlPullParser); + method public void setBlockable(boolean); + method public org.json.JSONObject toJson() throws org.json.JSONException; + method public void writeXml(org.xmlpull.v1.XmlSerializer) throws java.io.IOException; + field public static final int USER_LOCKED_SOUND = 32; // 0x20 + } + + public final class NotificationChannelGroup implements android.os.Parcelable { + method public org.json.JSONObject toJson() throws org.json.JSONException; + } + + public class NotificationManager { + method @NonNull public java.util.List<java.lang.String> getAllowedAssistantAdjustments(); + method @Nullable public android.content.ComponentName getAllowedNotificationAssistant(); + method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_NOTIFICATION_LISTENERS) public java.util.List<android.content.ComponentName> getEnabledNotificationListeners(); + method public boolean isNotificationAssistantAccessGranted(@NonNull android.content.ComponentName); + method public void setNotificationAssistantAccessGranted(@Nullable android.content.ComponentName, boolean); + method @RequiresPermission(android.Manifest.permission.MANAGE_NOTIFICATION_LISTENERS) public void setNotificationListenerAccessGranted(@NonNull android.content.ComponentName, boolean, boolean); + field @RequiresPermission(android.Manifest.permission.STATUS_BAR_SERVICE) public static final String ACTION_CLOSE_NOTIFICATION_HANDLER_PANEL = "android.app.action.CLOSE_NOTIFICATION_HANDLER_PANEL"; + field @RequiresPermission(android.Manifest.permission.STATUS_BAR_SERVICE) public static final String ACTION_OPEN_NOTIFICATION_HANDLER_PANEL = "android.app.action.OPEN_NOTIFICATION_HANDLER_PANEL"; + field @RequiresPermission(android.Manifest.permission.STATUS_BAR_SERVICE) public static final String ACTION_TOGGLE_NOTIFICATION_HANDLER_PANEL = "android.app.action.TOGGLE_NOTIFICATION_HANDLER_PANEL"; + } + + public final class RuntimeAppOpAccessMessage implements android.os.Parcelable { + ctor public RuntimeAppOpAccessMessage(@IntRange(from=0L) int, @IntRange(from=0L) int, @NonNull String, @Nullable String, @NonNull String, int); + method public int describeContents(); + method @Nullable public String getAttributionTag(); + method @NonNull public String getMessage(); + method @NonNull public String getOp(); + method @NonNull public String getPackageName(); + method public int getSamplingStrategy(); + method @IntRange(from=0L) public int getUid(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.RuntimeAppOpAccessMessage> CREATOR; + } + + public class SearchManager implements android.content.DialogInterface.OnCancelListener android.content.DialogInterface.OnDismissListener { + method public void launchAssist(@Nullable android.os.Bundle); + } + + public final class StatsManager { + method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void addConfig(long, byte[]) throws android.app.StatsManager.StatsUnavailableException; + method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean addConfiguration(long, byte[]); + method @RequiresPermission(android.Manifest.permission.REGISTER_STATS_PULL_ATOM) public void clearPullAtomCallback(int); + method @Deprecated @Nullable @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getData(long); + method @Deprecated @Nullable @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getMetadata(); + method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public long[] getRegisteredExperimentIds() throws android.app.StatsManager.StatsUnavailableException; + method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getReports(long) throws android.app.StatsManager.StatsUnavailableException; + method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public byte[] getStatsMetadata() throws android.app.StatsManager.StatsUnavailableException; + method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void removeConfig(long) throws android.app.StatsManager.StatsUnavailableException; + method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean removeConfiguration(long); + method @NonNull @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public long[] setActiveConfigsChangedOperation(@Nullable android.app.PendingIntent) throws android.app.StatsManager.StatsUnavailableException; + method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void setBroadcastSubscriber(android.app.PendingIntent, long, long) throws android.app.StatsManager.StatsUnavailableException; + method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean setBroadcastSubscriber(long, long, android.app.PendingIntent); + method @Deprecated @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean setDataFetchOperation(long, android.app.PendingIntent); + method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void setFetchReportsOperation(android.app.PendingIntent, long) throws android.app.StatsManager.StatsUnavailableException; + method @RequiresPermission(android.Manifest.permission.REGISTER_STATS_PULL_ATOM) public void setPullAtomCallback(int, @Nullable android.app.StatsManager.PullAtomMetadata, @NonNull java.util.concurrent.Executor, @NonNull android.app.StatsManager.StatsPullAtomCallback); + field public static final String ACTION_STATSD_STARTED = "android.app.action.STATSD_STARTED"; + field public static final String EXTRA_STATS_ACTIVE_CONFIG_KEYS = "android.app.extra.STATS_ACTIVE_CONFIG_KEYS"; + field public static final String EXTRA_STATS_BROADCAST_SUBSCRIBER_COOKIES = "android.app.extra.STATS_BROADCAST_SUBSCRIBER_COOKIES"; + field public static final String EXTRA_STATS_CONFIG_KEY = "android.app.extra.STATS_CONFIG_KEY"; + field public static final String EXTRA_STATS_CONFIG_UID = "android.app.extra.STATS_CONFIG_UID"; + field public static final String EXTRA_STATS_DIMENSIONS_VALUE = "android.app.extra.STATS_DIMENSIONS_VALUE"; + field public static final String EXTRA_STATS_SUBSCRIPTION_ID = "android.app.extra.STATS_SUBSCRIPTION_ID"; + field public static final String EXTRA_STATS_SUBSCRIPTION_RULE_ID = "android.app.extra.STATS_SUBSCRIPTION_RULE_ID"; + field public static final int PULL_SKIP = 1; // 0x1 + field public static final int PULL_SUCCESS = 0; // 0x0 + } + + public static class StatsManager.PullAtomMetadata { + method @Nullable public int[] getAdditiveFields(); + method public long getCoolDownMillis(); + method public long getTimeoutMillis(); + } + + public static class StatsManager.PullAtomMetadata.Builder { + ctor public StatsManager.PullAtomMetadata.Builder(); + method @NonNull public android.app.StatsManager.PullAtomMetadata build(); + method @NonNull public android.app.StatsManager.PullAtomMetadata.Builder setAdditiveFields(@NonNull int[]); + method @NonNull public android.app.StatsManager.PullAtomMetadata.Builder setCoolDownMillis(long); + method @NonNull public android.app.StatsManager.PullAtomMetadata.Builder setTimeoutMillis(long); + } + + public static interface StatsManager.StatsPullAtomCallback { + method public int onPullAtom(int, @NonNull java.util.List<android.util.StatsEvent>); + } + + public static class StatsManager.StatsUnavailableException extends android.util.AndroidException { + ctor public StatsManager.StatsUnavailableException(String); + ctor public StatsManager.StatsUnavailableException(String, Throwable); + } + + public class StatusBarManager { + method @NonNull @RequiresPermission(android.Manifest.permission.STATUS_BAR) public android.app.StatusBarManager.DisableInfo getDisableInfo(); + method @RequiresPermission(android.Manifest.permission.STATUS_BAR) public void setDisabledForSetup(boolean); + } + + public static final class StatusBarManager.DisableInfo { + method public boolean areAllComponentsEnabled(); + method public boolean isNavigateToHomeDisabled(); + method public boolean isNotificationPeekingDisabled(); + method public boolean isRecentsDisabled(); + method public boolean isSearchDisabled(); + method public boolean isStatusBarExpansionDisabled(); + } + + public final class SystemServiceRegistry { + method public static <TServiceClass> void registerContextAwareService(@NonNull String, @NonNull Class<TServiceClass>, @NonNull android.app.SystemServiceRegistry.ContextAwareServiceProducerWithBinder<TServiceClass>); + method public static <TServiceClass> void registerContextAwareService(@NonNull String, @NonNull Class<TServiceClass>, @NonNull android.app.SystemServiceRegistry.ContextAwareServiceProducerWithoutBinder<TServiceClass>); + method public static <TServiceClass> void registerStaticService(@NonNull String, @NonNull Class<TServiceClass>, @NonNull android.app.SystemServiceRegistry.StaticServiceProducerWithBinder<TServiceClass>); + method public static <TServiceClass> void registerStaticService(@NonNull String, @NonNull Class<TServiceClass>, @NonNull android.app.SystemServiceRegistry.StaticServiceProducerWithoutBinder<TServiceClass>); + } + + public static interface SystemServiceRegistry.ContextAwareServiceProducerWithBinder<TServiceClass> { + method @NonNull public TServiceClass createService(@NonNull android.content.Context, @NonNull android.os.IBinder); + } + + public static interface SystemServiceRegistry.ContextAwareServiceProducerWithoutBinder<TServiceClass> { + method @NonNull public TServiceClass createService(@NonNull android.content.Context); + } + + public static interface SystemServiceRegistry.StaticServiceProducerWithBinder<TServiceClass> { + method @NonNull public TServiceClass createService(@NonNull android.os.IBinder); + } + + public static interface SystemServiceRegistry.StaticServiceProducerWithoutBinder<TServiceClass> { + method @NonNull public TServiceClass createService(); + } + + public class UiModeManager { + method @RequiresPermission(android.Manifest.permission.ENTER_CAR_MODE_PRIORITIZED) public void enableCarMode(@IntRange(from=0) int, int); + field public static final String ACTION_ENTER_CAR_MODE_PRIORITIZED = "android.app.action.ENTER_CAR_MODE_PRIORITIZED"; + field public static final String ACTION_EXIT_CAR_MODE_PRIORITIZED = "android.app.action.EXIT_CAR_MODE_PRIORITIZED"; + field public static final int DEFAULT_PRIORITY = 0; // 0x0 + field public static final String EXTRA_CALLING_PACKAGE = "android.app.extra.CALLING_PACKAGE"; + field public static final String EXTRA_PRIORITY = "android.app.extra.PRIORITY"; + } + + public final class Vr2dDisplayProperties implements android.os.Parcelable { + ctor public Vr2dDisplayProperties(int, int, int); + method public int describeContents(); + method public void dump(@NonNull java.io.PrintWriter, @NonNull String); + method public int getAddedFlags(); + method public int getDpi(); + method public int getHeight(); + method public int getRemovedFlags(); + method public int getWidth(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.Vr2dDisplayProperties> CREATOR; + field public static final int FLAG_VIRTUAL_DISPLAY_ENABLED = 1; // 0x1 + } + + public static final class Vr2dDisplayProperties.Builder { + ctor public Vr2dDisplayProperties.Builder(); + method @NonNull public android.app.Vr2dDisplayProperties.Builder addFlags(int); + method @NonNull public android.app.Vr2dDisplayProperties build(); + method @NonNull public android.app.Vr2dDisplayProperties.Builder removeFlags(int); + method @NonNull public android.app.Vr2dDisplayProperties.Builder setDimensions(int, int, int); + method @NonNull public android.app.Vr2dDisplayProperties.Builder setEnabled(boolean); + } + + public class VrManager { + method @RequiresPermission(android.Manifest.permission.RESTRICTED_VR_ACCESS) public int getVr2dDisplayId(); + method @RequiresPermission(anyOf={android.Manifest.permission.RESTRICTED_VR_ACCESS, "android.permission.ACCESS_VR_STATE"}) public boolean isPersistentVrModeEnabled(); + method @RequiresPermission(anyOf={android.Manifest.permission.RESTRICTED_VR_ACCESS, "android.permission.ACCESS_VR_STATE"}) public boolean isVrModeEnabled(); + method @RequiresPermission(anyOf={android.Manifest.permission.RESTRICTED_VR_ACCESS, "android.permission.ACCESS_VR_STATE"}) public void registerVrStateCallback(@NonNull java.util.concurrent.Executor, @NonNull android.app.VrStateCallback); + method @RequiresPermission(android.Manifest.permission.RESTRICTED_VR_ACCESS) public void setAndBindVrCompositor(android.content.ComponentName); + method @RequiresPermission(android.Manifest.permission.RESTRICTED_VR_ACCESS) public void setPersistentVrModeEnabled(boolean); + method @RequiresPermission("android.permission.ACCESS_VR_MANAGER") public void setStandbyEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.RESTRICTED_VR_ACCESS) public void setVr2dDisplayProperties(@NonNull android.app.Vr2dDisplayProperties); + method @RequiresPermission(android.Manifest.permission.RESTRICTED_VR_ACCESS) public void setVrInputMethod(@Nullable android.content.ComponentName); + method @RequiresPermission(anyOf={android.Manifest.permission.RESTRICTED_VR_ACCESS, "android.permission.ACCESS_VR_STATE"}) public void unregisterVrStateCallback(@NonNull android.app.VrStateCallback); + } + + public abstract class VrStateCallback { + ctor public VrStateCallback(); + method public void onPersistentVrStateChanged(boolean); + method public void onVrStateChanged(boolean); + } + + public final class WallpaperColors implements android.os.Parcelable { + ctor public WallpaperColors(@NonNull android.graphics.Color, @Nullable android.graphics.Color, @Nullable android.graphics.Color, int); + method public int getColorHints(); + field public static final int HINT_SUPPORTS_DARK_TEXT = 1; // 0x1 + field public static final int HINT_SUPPORTS_DARK_THEME = 2; // 0x2 + } + + public final class WallpaperInfo implements android.os.Parcelable { + method public boolean supportsAmbientMode(); + } + + public class WallpaperManager { + method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public void clearWallpaper(int, int); + method public void setDisplayOffset(android.os.IBinder, int, int); + method @RequiresPermission(android.Manifest.permission.SET_WALLPAPER_COMPONENT) public boolean setWallpaperComponent(android.content.ComponentName); + } + +} + +package android.app.admin { + + public class DevicePolicyKeyguardService extends android.app.Service { + ctor public DevicePolicyKeyguardService(); + method @Nullable public void dismiss(); + method @Nullable public final android.os.IBinder onBind(@Nullable android.content.Intent); + method @Nullable public android.view.SurfaceControlViewHost.SurfacePackage onCreateKeyguardSurface(@NonNull android.os.IBinder); + } + + public class DevicePolicyManager { + method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public boolean getBluetoothContactSharingDisabled(@NonNull android.os.UserHandle); + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public String getDeviceOwner(); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public android.content.ComponentName getDeviceOwnerComponentOnAnyUser(); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public String getDeviceOwnerNameOnAnyUser(); + method @Nullable public CharSequence getDeviceOwnerOrganizationName(); + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public android.os.UserHandle getDeviceOwnerUser(); + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public java.util.List<java.lang.String> getPermittedAccessibilityServices(int); + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public java.util.List<java.lang.String> getPermittedInputMethodsForCurrentUser(); + method @Nullable public android.content.ComponentName getProfileOwner() throws java.lang.IllegalArgumentException; + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public String getProfileOwnerNameAsUser(int) throws java.lang.IllegalArgumentException; + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public int getUserProvisioningState(); + method public boolean isDeviceManaged(); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public boolean isDeviceProvisioned(); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public boolean isDeviceProvisioningConfigApplied(); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public boolean isManagedKiosk(); + method public boolean isSecondaryLockscreenEnabled(@NonNull android.os.UserHandle); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public boolean isUnattendedManagedKiosk(); + method @RequiresPermission("android.permission.NOTIFY_PENDING_SYSTEM_UPDATE") public void notifyPendingSystemUpdate(long); + method @RequiresPermission("android.permission.NOTIFY_PENDING_SYSTEM_UPDATE") public void notifyPendingSystemUpdate(long, boolean); + method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public boolean packageHasActiveAdmins(String); + method @Deprecated @RequiresPermission("android.permission.MANAGE_DEVICE_ADMINS") public boolean setActiveProfileOwner(@NonNull android.content.ComponentName, String) throws java.lang.IllegalArgumentException; + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public void setDeviceProvisioningConfigApplied(); + method @Deprecated @RequiresPermission(value=android.Manifest.permission.GRANT_PROFILE_OWNER_DEVICE_IDS_ACCESS, conditional=true) public void setProfileOwnerCanAccessDeviceIds(@NonNull android.content.ComponentName); + method public void setSecondaryLockscreenEnabled(@NonNull android.content.ComponentName, boolean); + field public static final String ACCOUNT_FEATURE_DEVICE_OR_PROFILE_OWNER_ALLOWED = "android.account.DEVICE_OR_PROFILE_OWNER_ALLOWED"; + field public static final String ACCOUNT_FEATURE_DEVICE_OR_PROFILE_OWNER_DISALLOWED = "android.account.DEVICE_OR_PROFILE_OWNER_DISALLOWED"; + field public static final String ACTION_BIND_SECONDARY_LOCKSCREEN_SERVICE = "android.app.action.BIND_SECONDARY_LOCKSCREEN_SERVICE"; + field public static final String ACTION_PROVISION_FINALIZATION = "android.app.action.PROVISION_FINALIZATION"; + field public static final String ACTION_PROVISION_FINANCED_DEVICE = "android.app.action.PROVISION_FINANCED_DEVICE"; + field public static final String ACTION_PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE = "android.app.action.PROVISION_MANAGED_DEVICE_FROM_TRUSTED_SOURCE"; + field @RequiresPermission(android.Manifest.permission.MANAGE_FACTORY_RESET_PROTECTION) public static final String ACTION_RESET_PROTECTION_POLICY_CHANGED = "android.app.action.RESET_PROTECTION_POLICY_CHANGED"; + field public static final String ACTION_SET_PROFILE_OWNER = "android.app.action.SET_PROFILE_OWNER"; + field public static final String ACTION_STATE_USER_SETUP_COMPLETE = "android.app.action.STATE_USER_SETUP_COMPLETE"; + field public static final String EXTRA_PROFILE_OWNER_NAME = "android.app.extra.PROFILE_OWNER_NAME"; + field public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_ICON_URI = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_ICON_URI"; + field public static final String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_LABEL = "android.app.extra.PROVISIONING_DEVICE_ADMIN_PACKAGE_LABEL"; + field public static final String EXTRA_PROVISIONING_ORGANIZATION_NAME = "android.app.extra.PROVISIONING_ORGANIZATION_NAME"; + field public static final String EXTRA_PROVISIONING_SUPPORT_URL = "android.app.extra.PROVISIONING_SUPPORT_URL"; + field public static final String EXTRA_PROVISIONING_TRIGGER = "android.app.extra.PROVISIONING_TRIGGER"; + field public static final String EXTRA_RESTRICTION = "android.app.extra.RESTRICTION"; + field public static final int PROVISIONING_TRIGGER_CLOUD_ENROLLMENT = 1; // 0x1 + field public static final int PROVISIONING_TRIGGER_PERSISTENT_DEVICE_OWNER = 3; // 0x3 + field public static final int PROVISIONING_TRIGGER_QR_CODE = 2; // 0x2 + field public static final int PROVISIONING_TRIGGER_UNSPECIFIED = 0; // 0x0 + field public static final int STATE_USER_PROFILE_COMPLETE = 4; // 0x4 + field public static final int STATE_USER_PROFILE_FINALIZED = 5; // 0x5 + field public static final int STATE_USER_SETUP_COMPLETE = 2; // 0x2 + field public static final int STATE_USER_SETUP_FINALIZED = 3; // 0x3 + field public static final int STATE_USER_SETUP_INCOMPLETE = 1; // 0x1 + field public static final int STATE_USER_UNMANAGED = 0; // 0x0 + } + + public final class SystemUpdatePolicy implements android.os.Parcelable { + method public android.app.admin.SystemUpdatePolicy.InstallationOption getInstallationOptionAt(long); + field public static final int TYPE_PAUSE = 4; // 0x4 + } + + public static class SystemUpdatePolicy.InstallationOption { + method public long getEffectiveTime(); + method public int getType(); + } + +} + +package android.app.appsearch { + + public class AppSearchManagerFrameworkInitializer { + method public static void initialize(); + } + +} + +package android.app.assist { + + public static class AssistStructure.ViewNode { + ctor public AssistStructure.ViewNode(); + } + +} + +package android.app.backup { + + public class BackupDataInput { + ctor public BackupDataInput(java.io.FileDescriptor); + } + + public class BackupDataOutput { + ctor public BackupDataOutput(java.io.FileDescriptor); + ctor public BackupDataOutput(java.io.FileDescriptor, long); + } + + public class BackupManager { + method @RequiresPermission(android.Manifest.permission.BACKUP) public void backupNow(); + method @RequiresPermission(android.Manifest.permission.BACKUP) public android.app.backup.RestoreSession beginRestoreSession(); + method @RequiresPermission(android.Manifest.permission.BACKUP) public void cancelBackups(); + method @RequiresPermission(android.Manifest.permission.BACKUP) public void excludeKeysFromRestore(@NonNull String, @NonNull java.util.List<java.lang.String>); + method @RequiresPermission(android.Manifest.permission.BACKUP) public long getAvailableRestoreToken(String); + method @RequiresPermission(android.Manifest.permission.BACKUP) public android.content.Intent getConfigurationIntent(String); + method @RequiresPermission(android.Manifest.permission.BACKUP) public String getCurrentTransport(); + method @Nullable @RequiresPermission(android.Manifest.permission.BACKUP) public android.content.ComponentName getCurrentTransportComponent(); + method @RequiresPermission(android.Manifest.permission.BACKUP) public android.content.Intent getDataManagementIntent(String); + method @Nullable @RequiresPermission(android.Manifest.permission.BACKUP) public CharSequence getDataManagementIntentLabel(@NonNull String); + method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.BACKUP) public String getDataManagementLabel(@NonNull String); + method @RequiresPermission(android.Manifest.permission.BACKUP) public String getDestinationString(String); + method @RequiresPermission(android.Manifest.permission.BACKUP) public boolean isAppEligibleForBackup(String); + method @RequiresPermission(android.Manifest.permission.BACKUP) public boolean isBackupEnabled(); + method @RequiresPermission(android.Manifest.permission.BACKUP) public boolean isBackupServiceActive(android.os.UserHandle); + method @RequiresPermission(android.Manifest.permission.BACKUP) public String[] listAllTransports(); + method @RequiresPermission(android.Manifest.permission.BACKUP) public int requestBackup(String[], android.app.backup.BackupObserver); + method @RequiresPermission(android.Manifest.permission.BACKUP) public int requestBackup(String[], android.app.backup.BackupObserver, android.app.backup.BackupManagerMonitor, int); + method @Deprecated public int requestRestore(android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor); + method @Deprecated @RequiresPermission(android.Manifest.permission.BACKUP) public String selectBackupTransport(String); + method @RequiresPermission(android.Manifest.permission.BACKUP) public void selectBackupTransport(android.content.ComponentName, android.app.backup.SelectBackupTransportCallback); + method @RequiresPermission(android.Manifest.permission.BACKUP) public void setAncestralSerialNumber(long); + method @RequiresPermission(android.Manifest.permission.BACKUP) public void setAutoRestore(boolean); + method @RequiresPermission(android.Manifest.permission.BACKUP) public void setBackupEnabled(boolean); + method @Deprecated @RequiresPermission(android.Manifest.permission.BACKUP) public void updateTransportAttributes(@NonNull android.content.ComponentName, @NonNull String, @Nullable android.content.Intent, @NonNull String, @Nullable android.content.Intent, @Nullable String); + method @RequiresPermission(android.Manifest.permission.BACKUP) public void updateTransportAttributes(@NonNull android.content.ComponentName, @NonNull String, @Nullable android.content.Intent, @NonNull String, @Nullable android.content.Intent, @Nullable CharSequence); + field public static final int ERROR_AGENT_FAILURE = -1003; // 0xfffffc15 + field public static final int ERROR_BACKUP_CANCELLED = -2003; // 0xfffff82d + field public static final int ERROR_BACKUP_NOT_ALLOWED = -2001; // 0xfffff82f + field public static final int ERROR_PACKAGE_NOT_FOUND = -2002; // 0xfffff82e + field public static final int ERROR_TRANSPORT_ABORTED = -1000; // 0xfffffc18 + field public static final int ERROR_TRANSPORT_INVALID = -2; // 0xfffffffe + field public static final int ERROR_TRANSPORT_PACKAGE_REJECTED = -1002; // 0xfffffc16 + field public static final int ERROR_TRANSPORT_QUOTA_EXCEEDED = -1005; // 0xfffffc13 + field public static final int ERROR_TRANSPORT_UNAVAILABLE = -1; // 0xffffffff + field public static final int FLAG_NON_INCREMENTAL_BACKUP = 1; // 0x1 + field public static final String PACKAGE_MANAGER_SENTINEL = "@pm@"; + field public static final int SUCCESS = 0; // 0x0 + } + + public class BackupManagerMonitor { + ctor public BackupManagerMonitor(); + method public void onEvent(android.os.Bundle); + field public static final String EXTRA_LOG_CANCEL_ALL = "android.app.backup.extra.LOG_CANCEL_ALL"; + field public static final String EXTRA_LOG_EVENT_CATEGORY = "android.app.backup.extra.LOG_EVENT_CATEGORY"; + field public static final String EXTRA_LOG_EVENT_ID = "android.app.backup.extra.LOG_EVENT_ID"; + field public static final String EXTRA_LOG_EVENT_PACKAGE_LONG_VERSION = "android.app.backup.extra.LOG_EVENT_PACKAGE_FULL_VERSION"; + field public static final String EXTRA_LOG_EVENT_PACKAGE_NAME = "android.app.backup.extra.LOG_EVENT_PACKAGE_NAME"; + field @Deprecated public static final String EXTRA_LOG_EVENT_PACKAGE_VERSION = "android.app.backup.extra.LOG_EVENT_PACKAGE_VERSION"; + field public static final String EXTRA_LOG_EXCEPTION_FULL_BACKUP = "android.app.backup.extra.LOG_EXCEPTION_FULL_BACKUP"; + field public static final String EXTRA_LOG_ILLEGAL_KEY = "android.app.backup.extra.LOG_ILLEGAL_KEY"; + field public static final String EXTRA_LOG_MANIFEST_PACKAGE_NAME = "android.app.backup.extra.LOG_MANIFEST_PACKAGE_NAME"; + field public static final String EXTRA_LOG_OLD_VERSION = "android.app.backup.extra.LOG_OLD_VERSION"; + field public static final String EXTRA_LOG_POLICY_ALLOW_APKS = "android.app.backup.extra.LOG_POLICY_ALLOW_APKS"; + field public static final String EXTRA_LOG_PREFLIGHT_ERROR = "android.app.backup.extra.LOG_PREFLIGHT_ERROR"; + field public static final String EXTRA_LOG_RESTORE_ANYWAY = "android.app.backup.extra.LOG_RESTORE_ANYWAY"; + field public static final String EXTRA_LOG_RESTORE_VERSION = "android.app.backup.extra.LOG_RESTORE_VERSION"; + field public static final String EXTRA_LOG_WIDGET_PACKAGE_NAME = "android.app.backup.extra.LOG_WIDGET_PACKAGE_NAME"; + field public static final int LOG_EVENT_CATEGORY_AGENT = 2; // 0x2 + field public static final int LOG_EVENT_CATEGORY_BACKUP_MANAGER_POLICY = 3; // 0x3 + field public static final int LOG_EVENT_CATEGORY_TRANSPORT = 1; // 0x1 + field public static final int LOG_EVENT_ID_APK_NOT_INSTALLED = 40; // 0x28 + field public static final int LOG_EVENT_ID_APP_HAS_NO_AGENT = 28; // 0x1c + field public static final int LOG_EVENT_ID_BACKUP_DISABLED = 13; // 0xd + field public static final int LOG_EVENT_ID_CANNOT_RESTORE_WITHOUT_APK = 41; // 0x29 + field public static final int LOG_EVENT_ID_CANT_FIND_AGENT = 30; // 0x1e + field public static final int LOG_EVENT_ID_CORRUPT_MANIFEST = 46; // 0x2e + field public static final int LOG_EVENT_ID_DEVICE_NOT_PROVISIONED = 14; // 0xe + field public static final int LOG_EVENT_ID_ERROR_PREFLIGHT = 16; // 0x10 + field public static final int LOG_EVENT_ID_EXCEPTION_FULL_BACKUP = 19; // 0x13 + field public static final int LOG_EVENT_ID_EXPECTED_DIFFERENT_PACKAGE = 43; // 0x2b + field public static final int LOG_EVENT_ID_FULL_BACKUP_CANCEL = 4; // 0x4 + field public static final int LOG_EVENT_ID_FULL_RESTORE_ALLOW_BACKUP_FALSE = 39; // 0x27 + field public static final int LOG_EVENT_ID_FULL_RESTORE_SIGNATURE_MISMATCH = 37; // 0x25 + field public static final int LOG_EVENT_ID_FULL_RESTORE_TIMEOUT = 45; // 0x2d + field public static final int LOG_EVENT_ID_ILLEGAL_KEY = 5; // 0x5 + field public static final int LOG_EVENT_ID_KEY_VALUE_BACKUP_CANCEL = 21; // 0x15 + field public static final int LOG_EVENT_ID_KEY_VALUE_RESTORE_TIMEOUT = 31; // 0x1f + field public static final int LOG_EVENT_ID_LOST_TRANSPORT = 25; // 0x19 + field public static final int LOG_EVENT_ID_MISSING_SIGNATURE = 42; // 0x2a + field public static final int LOG_EVENT_ID_NO_DATA_TO_SEND = 7; // 0x7 + field public static final int LOG_EVENT_ID_NO_PACKAGES = 49; // 0x31 + field public static final int LOG_EVENT_ID_NO_PM_METADATA_RECEIVED = 23; // 0x17 + field public static final int LOG_EVENT_ID_NO_RESTORE_METADATA_AVAILABLE = 22; // 0x16 + field public static final int LOG_EVENT_ID_PACKAGE_INELIGIBLE = 9; // 0x9 + field public static final int LOG_EVENT_ID_PACKAGE_KEY_VALUE_PARTICIPANT = 10; // 0xa + field public static final int LOG_EVENT_ID_PACKAGE_NOT_FOUND = 12; // 0xc + field public static final int LOG_EVENT_ID_PACKAGE_NOT_PRESENT = 26; // 0x1a + field public static final int LOG_EVENT_ID_PACKAGE_STOPPED = 11; // 0xb + field public static final int LOG_EVENT_ID_PACKAGE_TRANSPORT_NOT_PRESENT = 15; // 0xf + field public static final int LOG_EVENT_ID_PM_AGENT_HAS_NO_METADATA = 24; // 0x18 + field public static final int LOG_EVENT_ID_QUOTA_HIT_PREFLIGHT = 18; // 0x12 + field public static final int LOG_EVENT_ID_RESTORE_ANY_VERSION = 34; // 0x22 + field public static final int LOG_EVENT_ID_RESTORE_VERSION_HIGHER = 27; // 0x1b + field public static final int LOG_EVENT_ID_SIGNATURE_MISMATCH = 29; // 0x1d + field public static final int LOG_EVENT_ID_SYSTEM_APP_NO_AGENT = 38; // 0x26 + field public static final int LOG_EVENT_ID_TRANSPORT_IS_NULL = 50; // 0x32 + field public static final int LOG_EVENT_ID_TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED = 51; // 0x33 + field public static final int LOG_EVENT_ID_UNKNOWN_VERSION = 44; // 0x2c + field public static final int LOG_EVENT_ID_VERSIONS_MATCH = 35; // 0x23 + field public static final int LOG_EVENT_ID_VERSION_OF_BACKUP_OLDER = 36; // 0x24 + field public static final int LOG_EVENT_ID_WIDGET_METADATA_MISMATCH = 47; // 0x2f + field public static final int LOG_EVENT_ID_WIDGET_UNKNOWN_VERSION = 48; // 0x30 + } + + public abstract class BackupObserver { + ctor public BackupObserver(); + method public void backupFinished(int); + method public void onResult(String, int); + method public void onUpdate(String, android.app.backup.BackupProgress); + } + + public class BackupProgress implements android.os.Parcelable { + ctor public BackupProgress(long, long); + method public int describeContents(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.backup.BackupProgress> CREATOR; + field public final long bytesExpected; + field public final long bytesTransferred; + } + + public class BackupTransport { + ctor public BackupTransport(); + method public int abortFullRestore(); + method public void cancelFullBackup(); + method public int checkFullBackupSize(long); + method public int clearBackupData(android.content.pm.PackageInfo); + method public android.content.Intent configurationIntent(); + method public String currentDestinationString(); + method public android.content.Intent dataManagementIntent(); + method @Nullable public CharSequence dataManagementIntentLabel(); + method @Deprecated @Nullable public String dataManagementLabel(); + method public int finishBackup(); + method public void finishRestore(); + method public android.app.backup.RestoreSet[] getAvailableRestoreSets(); + method public long getBackupQuota(String, boolean); + method public android.os.IBinder getBinder(); + method public long getCurrentRestoreSet(); + method public int getNextFullRestoreDataChunk(android.os.ParcelFileDescriptor); + method public int getRestoreData(android.os.ParcelFileDescriptor); + method public int getTransportFlags(); + method public int initializeDevice(); + method public boolean isAppEligibleForBackup(android.content.pm.PackageInfo, boolean); + method public String name(); + method public android.app.backup.RestoreDescription nextRestorePackage(); + method public int performBackup(android.content.pm.PackageInfo, android.os.ParcelFileDescriptor, int); + method public int performBackup(android.content.pm.PackageInfo, android.os.ParcelFileDescriptor); + method public int performFullBackup(android.content.pm.PackageInfo, android.os.ParcelFileDescriptor, int); + method public int performFullBackup(android.content.pm.PackageInfo, android.os.ParcelFileDescriptor); + method public long requestBackupTime(); + method public long requestFullBackupTime(); + method public int sendBackupData(int); + method public int startRestore(long, android.content.pm.PackageInfo[]); + method public String transportDirName(); + field public static final int AGENT_ERROR = -1003; // 0xfffffc15 + field public static final int AGENT_UNKNOWN = -1004; // 0xfffffc14 + field public static final String EXTRA_TRANSPORT_REGISTRATION = "android.app.backup.extra.TRANSPORT_REGISTRATION"; + field public static final int FLAG_DATA_NOT_CHANGED = 8; // 0x8 + field public static final int FLAG_INCREMENTAL = 2; // 0x2 + field public static final int FLAG_NON_INCREMENTAL = 4; // 0x4 + field public static final int FLAG_USER_INITIATED = 1; // 0x1 + field public static final int NO_MORE_DATA = -1; // 0xffffffff + field public static final int TRANSPORT_ERROR = -1000; // 0xfffffc18 + field public static final int TRANSPORT_NON_INCREMENTAL_BACKUP_REQUIRED = -1006; // 0xfffffc12 + field public static final int TRANSPORT_NOT_INITIALIZED = -1001; // 0xfffffc17 + field public static final int TRANSPORT_OK = 0; // 0x0 + field public static final int TRANSPORT_PACKAGE_REJECTED = -1002; // 0xfffffc16 + field public static final int TRANSPORT_QUOTA_EXCEEDED = -1005; // 0xfffffc13 + } + + public class RestoreDescription implements android.os.Parcelable { + ctor public RestoreDescription(String, int); + method public int describeContents(); + method public int getDataType(); + method public String getPackageName(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.backup.RestoreDescription> CREATOR; + field public static final android.app.backup.RestoreDescription NO_MORE_PACKAGES; + field public static final int TYPE_FULL_STREAM = 2; // 0x2 + field public static final int TYPE_KEY_VALUE = 1; // 0x1 + } + + public abstract class RestoreObserver { + method public void restoreSetsAvailable(android.app.backup.RestoreSet[]); + } + + public class RestoreSession { + method public void endRestoreSession(); + method public int getAvailableRestoreSets(android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor); + method public int getAvailableRestoreSets(android.app.backup.RestoreObserver); + method public int restoreAll(long, android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor); + method public int restoreAll(long, android.app.backup.RestoreObserver); + method public int restorePackage(String, android.app.backup.RestoreObserver, android.app.backup.BackupManagerMonitor); + method public int restorePackage(String, android.app.backup.RestoreObserver); + method public int restorePackages(long, @Nullable android.app.backup.RestoreObserver, @NonNull java.util.Set<java.lang.String>, @Nullable android.app.backup.BackupManagerMonitor); + method public int restorePackages(long, @Nullable android.app.backup.RestoreObserver, @NonNull java.util.Set<java.lang.String>); + } + + public class RestoreSet implements android.os.Parcelable { + ctor public RestoreSet(); + ctor public RestoreSet(String, String, long); + method public int describeContents(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.backup.RestoreSet> CREATOR; + field public String device; + field public String name; + field public long token; + } + + public abstract class SelectBackupTransportCallback { + ctor public SelectBackupTransportCallback(); + method public void onFailure(int); + method public void onSuccess(String); + } + +} + +package android.app.compat { + + public final class CompatChanges { + method public static boolean isChangeEnabled(long); + method @RequiresPermission(allOf={"android.permission.READ_COMPAT_CHANGE_CONFIG", "android.permission.LOG_COMPAT_CHANGE"}) public static boolean isChangeEnabled(long, @NonNull String, @NonNull android.os.UserHandle); + method @RequiresPermission(allOf={"android.permission.READ_COMPAT_CHANGE_CONFIG", "android.permission.LOG_COMPAT_CHANGE"}) public static boolean isChangeEnabled(long, int); + } + +} + +package android.app.contentsuggestions { + + public final class ClassificationsRequest implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public android.os.Bundle getExtras(); + method @NonNull public java.util.List<android.app.contentsuggestions.ContentSelection> getSelections(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.contentsuggestions.ClassificationsRequest> CREATOR; + } + + public static final class ClassificationsRequest.Builder { + ctor public ClassificationsRequest.Builder(@NonNull java.util.List<android.app.contentsuggestions.ContentSelection>); + method @NonNull public android.app.contentsuggestions.ClassificationsRequest build(); + method @NonNull public android.app.contentsuggestions.ClassificationsRequest.Builder setExtras(@NonNull android.os.Bundle); + } + + public final class ContentClassification implements android.os.Parcelable { + ctor public ContentClassification(@NonNull String, @NonNull android.os.Bundle); + method public int describeContents(); + method @NonNull public android.os.Bundle getExtras(); + method @NonNull public String getId(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.contentsuggestions.ContentClassification> CREATOR; + } + + public final class ContentSelection implements android.os.Parcelable { + ctor public ContentSelection(@NonNull String, @NonNull android.os.Bundle); + method public int describeContents(); + method @NonNull public android.os.Bundle getExtras(); + method @NonNull public String getId(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.contentsuggestions.ContentSelection> CREATOR; + } + + public final class ContentSuggestionsManager { + method public void classifyContentSelections(@NonNull android.app.contentsuggestions.ClassificationsRequest, @NonNull java.util.concurrent.Executor, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.ClassificationsCallback); + method public boolean isEnabled(); + method public void notifyInteraction(@NonNull String, @NonNull android.os.Bundle); + method public void provideContextImage(@NonNull android.graphics.Bitmap, @NonNull android.os.Bundle); + method public void provideContextImage(int, @NonNull android.os.Bundle); + method public void suggestContentSelections(@NonNull android.app.contentsuggestions.SelectionsRequest, @NonNull java.util.concurrent.Executor, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.SelectionsCallback); + } + + public static interface ContentSuggestionsManager.ClassificationsCallback { + method public void onContentClassificationsAvailable(int, @NonNull java.util.List<android.app.contentsuggestions.ContentClassification>); + } + + public static interface ContentSuggestionsManager.SelectionsCallback { + method public void onContentSelectionsAvailable(int, @NonNull java.util.List<android.app.contentsuggestions.ContentSelection>); + } + + public final class SelectionsRequest implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public android.os.Bundle getExtras(); + method @Nullable public android.graphics.Point getInterestPoint(); + method public int getTaskId(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.contentsuggestions.SelectionsRequest> CREATOR; + } + + public static final class SelectionsRequest.Builder { + ctor public SelectionsRequest.Builder(int); + method @NonNull public android.app.contentsuggestions.SelectionsRequest build(); + method @NonNull public android.app.contentsuggestions.SelectionsRequest.Builder setExtras(@NonNull android.os.Bundle); + method @NonNull public android.app.contentsuggestions.SelectionsRequest.Builder setInterestPoint(@NonNull android.graphics.Point); + } + +} + +package android.app.job { + + public abstract class JobScheduler { + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public abstract int scheduleAsPackage(@NonNull android.app.job.JobInfo, @NonNull String, int, String); + } + + public class JobSchedulerFrameworkInitializer { + method public static void registerServiceWrappers(); + } + +} + +package android.app.prediction { + + public final class AppPredictionContext implements android.os.Parcelable { + method public int describeContents(); + method @Nullable public android.os.Bundle getExtras(); + method @NonNull public String getPackageName(); + method @IntRange(from=0) public int getPredictedTargetCount(); + method @NonNull public String getUiSurface(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.prediction.AppPredictionContext> CREATOR; + } + + public static final class AppPredictionContext.Builder { + ctor public AppPredictionContext.Builder(@NonNull android.content.Context); + method @NonNull public android.app.prediction.AppPredictionContext build(); + method @NonNull public android.app.prediction.AppPredictionContext.Builder setExtras(@Nullable android.os.Bundle); + method @NonNull public android.app.prediction.AppPredictionContext.Builder setPredictedTargetCount(@IntRange(from=0) int); + method @NonNull public android.app.prediction.AppPredictionContext.Builder setUiSurface(@NonNull String); + } + + public final class AppPredictionManager { + method @NonNull public android.app.prediction.AppPredictor createAppPredictionSession(@NonNull android.app.prediction.AppPredictionContext); + } + + public final class AppPredictionSessionId implements android.os.Parcelable { + method public int describeContents(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.prediction.AppPredictionSessionId> CREATOR; + } + + public final class AppPredictor { + method public void destroy(); + method public void notifyAppTargetEvent(@NonNull android.app.prediction.AppTargetEvent); + method public void notifyLaunchLocationShown(@NonNull String, @NonNull java.util.List<android.app.prediction.AppTargetId>); + method public void registerPredictionUpdates(@NonNull java.util.concurrent.Executor, @NonNull android.app.prediction.AppPredictor.Callback); + method public void requestPredictionUpdate(); + method @Nullable public void sortTargets(@NonNull java.util.List<android.app.prediction.AppTarget>, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.util.List<android.app.prediction.AppTarget>>); + method public void unregisterPredictionUpdates(@NonNull android.app.prediction.AppPredictor.Callback); + } + + public static interface AppPredictor.Callback { + method public void onTargetsAvailable(@NonNull java.util.List<android.app.prediction.AppTarget>); + } + + public final class AppTarget implements android.os.Parcelable { + method public int describeContents(); + method @Nullable public String getClassName(); + method @NonNull public android.app.prediction.AppTargetId getId(); + method @NonNull public String getPackageName(); + method @IntRange(from=0) public int getRank(); + method @Nullable public android.content.pm.ShortcutInfo getShortcutInfo(); + method @NonNull public android.os.UserHandle getUser(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.prediction.AppTarget> CREATOR; + } + + public static final class AppTarget.Builder { + ctor public AppTarget.Builder(@NonNull android.app.prediction.AppTargetId, @NonNull String, @NonNull android.os.UserHandle); + ctor public AppTarget.Builder(@NonNull android.app.prediction.AppTargetId, @NonNull android.content.pm.ShortcutInfo); + method @NonNull public android.app.prediction.AppTarget build(); + method @NonNull public android.app.prediction.AppTarget.Builder setClassName(@NonNull String); + method @NonNull public android.app.prediction.AppTarget.Builder setRank(@IntRange(from=0) int); + } + + public final class AppTargetEvent implements android.os.Parcelable { + method public int describeContents(); + method public int getAction(); + method @Nullable public String getLaunchLocation(); + method @Nullable public android.app.prediction.AppTarget getTarget(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int ACTION_DISMISS = 2; // 0x2 + field public static final int ACTION_LAUNCH = 1; // 0x1 + field public static final int ACTION_PIN = 3; // 0x3 + field public static final int ACTION_UNPIN = 4; // 0x4 + field @NonNull public static final android.os.Parcelable.Creator<android.app.prediction.AppTargetEvent> CREATOR; + } + + public static final class AppTargetEvent.Builder { + ctor public AppTargetEvent.Builder(@Nullable android.app.prediction.AppTarget, int); + method @NonNull public android.app.prediction.AppTargetEvent build(); + method @NonNull public android.app.prediction.AppTargetEvent.Builder setLaunchLocation(@Nullable String); + } + + public final class AppTargetId implements android.os.Parcelable { + ctor public AppTargetId(@NonNull String); + method public int describeContents(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.prediction.AppTargetId> CREATOR; + } + +} + +package android.app.role { + + public interface OnRoleHoldersChangedListener { + method public void onRoleHoldersChanged(@NonNull String, @NonNull android.os.UserHandle); + } + + public abstract class RoleControllerService extends android.app.Service { + ctor public RoleControllerService(); + method @WorkerThread public abstract boolean onAddRoleHolder(@NonNull String, @NonNull String, int); + method @Nullable public final android.os.IBinder onBind(@Nullable android.content.Intent); + method @WorkerThread public abstract boolean onClearRoleHolders(@NonNull String, int); + method @WorkerThread public abstract boolean onGrantDefaultRoles(); + method @Deprecated public abstract boolean onIsApplicationQualifiedForRole(@NonNull String, @NonNull String); + method public boolean onIsApplicationVisibleForRole(@NonNull String, @NonNull String); + method public abstract boolean onIsRoleVisible(@NonNull String); + method @WorkerThread public abstract boolean onRemoveRoleHolder(@NonNull String, @NonNull String, int); + field public static final String SERVICE_INTERFACE = "android.app.role.RoleControllerService"; + } + + public final class RoleManager { + method @RequiresPermission(android.Manifest.permission.OBSERVE_ROLE_HOLDERS) public void addOnRoleHoldersChangedListenerAsUser(@NonNull java.util.concurrent.Executor, @NonNull android.app.role.OnRoleHoldersChangedListener, @NonNull android.os.UserHandle); + method @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public void addRoleHolderAsUser(@NonNull String, @NonNull String, int, @NonNull android.os.UserHandle, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>); + method @RequiresPermission("com.android.permissioncontroller.permission.MANAGE_ROLES_FROM_CONTROLLER") public boolean addRoleHolderFromController(@NonNull String, @NonNull String); + method @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public void clearRoleHoldersAsUser(@NonNull String, int, @NonNull android.os.UserHandle, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>); + method @NonNull @RequiresPermission("com.android.permissioncontroller.permission.MANAGE_ROLES_FROM_CONTROLLER") public java.util.List<java.lang.String> getHeldRolesFromController(@NonNull String); + method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public java.util.List<java.lang.String> getRoleHolders(@NonNull String); + method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public java.util.List<java.lang.String> getRoleHoldersAsUser(@NonNull String, @NonNull android.os.UserHandle); + method @RequiresPermission(android.Manifest.permission.OBSERVE_ROLE_HOLDERS) public void removeOnRoleHoldersChangedListenerAsUser(@NonNull android.app.role.OnRoleHoldersChangedListener, @NonNull android.os.UserHandle); + method @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public void removeRoleHolderAsUser(@NonNull String, @NonNull String, int, @NonNull android.os.UserHandle, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>); + method @RequiresPermission("com.android.permissioncontroller.permission.MANAGE_ROLES_FROM_CONTROLLER") public boolean removeRoleHolderFromController(@NonNull String, @NonNull String); + method @RequiresPermission("com.android.permissioncontroller.permission.MANAGE_ROLES_FROM_CONTROLLER") public void setRoleNamesFromController(@NonNull java.util.List<java.lang.String>); + field public static final int MANAGE_HOLDERS_FLAG_DONT_KILL_APP = 1; // 0x1 + } + +} + +package android.app.time { + + public final class TimeManager { + method @RequiresPermission(android.Manifest.permission.MANAGE_TIME_AND_ZONE_DETECTION) public void addTimeZoneDetectorListener(@NonNull java.util.concurrent.Executor, @NonNull android.app.time.TimeManager.TimeZoneDetectorListener); + method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_TIME_AND_ZONE_DETECTION) public android.app.time.TimeZoneCapabilitiesAndConfig getTimeZoneCapabilitiesAndConfig(); + method @RequiresPermission(android.Manifest.permission.MANAGE_TIME_AND_ZONE_DETECTION) public void removeTimeZoneDetectorListener(@NonNull android.app.time.TimeManager.TimeZoneDetectorListener); + method @RequiresPermission(android.Manifest.permission.MANAGE_TIME_AND_ZONE_DETECTION) public boolean updateTimeZoneConfiguration(@NonNull android.app.time.TimeZoneConfiguration); + } + + @java.lang.FunctionalInterface public static interface TimeManager.TimeZoneDetectorListener { + method public void onChange(); + } + + public final class TimeZoneCapabilities implements android.os.Parcelable { + method public int describeContents(); + method public int getConfigureAutoDetectionEnabledCapability(); + method public int getConfigureGeoDetectionEnabledCapability(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field public static final int CAPABILITY_NOT_ALLOWED = 20; // 0x14 + field public static final int CAPABILITY_NOT_APPLICABLE = 30; // 0x1e + field public static final int CAPABILITY_NOT_SUPPORTED = 10; // 0xa + field public static final int CAPABILITY_POSSESSED = 40; // 0x28 + field @NonNull public static final android.os.Parcelable.Creator<android.app.time.TimeZoneCapabilities> CREATOR; + } + + public final class TimeZoneCapabilitiesAndConfig implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public android.app.time.TimeZoneCapabilities getCapabilities(); + method @NonNull public android.app.time.TimeZoneConfiguration getConfiguration(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.time.TimeZoneCapabilitiesAndConfig> CREATOR; + } + + public final class TimeZoneConfiguration implements android.os.Parcelable { + method public int describeContents(); + method public boolean isAutoDetectionEnabled(); + method public boolean isGeoDetectionEnabled(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.time.TimeZoneConfiguration> CREATOR; + } + + public static final class TimeZoneConfiguration.Builder { + ctor public TimeZoneConfiguration.Builder(); + ctor public TimeZoneConfiguration.Builder(@NonNull android.app.time.TimeZoneConfiguration); + method @NonNull public android.app.time.TimeZoneConfiguration build(); + method @NonNull public android.app.time.TimeZoneConfiguration.Builder setAutoDetectionEnabled(boolean); + method @NonNull public android.app.time.TimeZoneConfiguration.Builder setGeoDetectionEnabled(boolean); + } + +} + +package android.app.usage { + + public final class CacheQuotaHint implements android.os.Parcelable { + ctor public CacheQuotaHint(@NonNull android.app.usage.CacheQuotaHint.Builder); + method public int describeContents(); + method public long getQuota(); + method public int getUid(); + method @Nullable public android.app.usage.UsageStats getUsageStats(); + method @Nullable public String getVolumeUuid(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.usage.CacheQuotaHint> CREATOR; + field public static final long QUOTA_NOT_SET = -1L; // 0xffffffffffffffffL + } + + public static final class CacheQuotaHint.Builder { + ctor public CacheQuotaHint.Builder(); + ctor public CacheQuotaHint.Builder(@NonNull android.app.usage.CacheQuotaHint); + method @NonNull public android.app.usage.CacheQuotaHint build(); + method @NonNull public android.app.usage.CacheQuotaHint.Builder setQuota(long); + method @NonNull public android.app.usage.CacheQuotaHint.Builder setUid(int); + method @NonNull public android.app.usage.CacheQuotaHint.Builder setUsageStats(@Nullable android.app.usage.UsageStats); + method @NonNull public android.app.usage.CacheQuotaHint.Builder setVolumeUuid(@Nullable String); + } + + public abstract class CacheQuotaService extends android.app.Service { + ctor public CacheQuotaService(); + method public android.os.IBinder onBind(android.content.Intent); + method public abstract java.util.List<android.app.usage.CacheQuotaHint> onComputeCacheQuotaHints(java.util.List<android.app.usage.CacheQuotaHint>); + field public static final String SERVICE_INTERFACE = "android.app.usage.CacheQuotaService"; + } + + public class NetworkStatsManager { + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STATS_PROVIDER, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void registerNetworkStatsProvider(@NonNull String, @NonNull android.net.netstats.provider.NetworkStatsProvider); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STATS_PROVIDER, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void unregisterNetworkStatsProvider(@NonNull android.net.netstats.provider.NetworkStatsProvider); + } + + public static final class UsageEvents.Event { + method public int getInstanceId(); + method @Nullable public String getNotificationChannelId(); + method @Nullable public String getTaskRootClassName(); + method @Nullable public String getTaskRootPackageName(); + method public boolean isInstantApp(); + field public static final int NOTIFICATION_INTERRUPTION = 12; // 0xc + field public static final int NOTIFICATION_SEEN = 10; // 0xa + field public static final int SLICE_PINNED = 14; // 0xe + field public static final int SLICE_PINNED_PRIV = 13; // 0xd + field public static final int SYSTEM_INTERACTION = 6; // 0x6 + } + + public final class UsageStats implements android.os.Parcelable { + method public int getAppLaunchCount(); + } + + public final class UsageStatsManager { + method @RequiresPermission(android.Manifest.permission.PACKAGE_USAGE_STATS) public int getAppStandbyBucket(String); + method @RequiresPermission(android.Manifest.permission.PACKAGE_USAGE_STATS) public java.util.Map<java.lang.String,java.lang.Integer> getAppStandbyBuckets(); + method public int getUsageSource(); + method @RequiresPermission(android.Manifest.permission.BIND_CARRIER_SERVICES) public void onCarrierPrivilegedAppsChanged(); + method @RequiresPermission(allOf={android.Manifest.permission.SUSPEND_APPS, android.Manifest.permission.OBSERVE_APP_USAGE}) public void registerAppUsageLimitObserver(int, @NonNull String[], @NonNull java.time.Duration, @NonNull java.time.Duration, @Nullable android.app.PendingIntent); + method @RequiresPermission(android.Manifest.permission.OBSERVE_APP_USAGE) public void registerAppUsageObserver(int, @NonNull String[], long, @NonNull java.util.concurrent.TimeUnit, @NonNull android.app.PendingIntent); + method @RequiresPermission(android.Manifest.permission.OBSERVE_APP_USAGE) public void registerUsageSessionObserver(int, @NonNull String[], @NonNull java.time.Duration, @NonNull java.time.Duration, @NonNull android.app.PendingIntent, @Nullable android.app.PendingIntent); + method public void reportUsageStart(@NonNull android.app.Activity, @NonNull String); + method public void reportUsageStart(@NonNull android.app.Activity, @NonNull String, long); + method public void reportUsageStop(@NonNull android.app.Activity, @NonNull String); + method @RequiresPermission(android.Manifest.permission.CHANGE_APP_IDLE_STATE) public void setAppStandbyBucket(String, int); + method @RequiresPermission(android.Manifest.permission.CHANGE_APP_IDLE_STATE) public void setAppStandbyBuckets(java.util.Map<java.lang.String,java.lang.Integer>); + method @RequiresPermission(allOf={android.Manifest.permission.SUSPEND_APPS, android.Manifest.permission.OBSERVE_APP_USAGE}) public void unregisterAppUsageLimitObserver(int); + method @RequiresPermission(android.Manifest.permission.OBSERVE_APP_USAGE) public void unregisterAppUsageObserver(int); + method @RequiresPermission(android.Manifest.permission.OBSERVE_APP_USAGE) public void unregisterUsageSessionObserver(int); + method @Deprecated @RequiresPermission(android.Manifest.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST) public void whitelistAppTemporarily(String, long, android.os.UserHandle); + field public static final String EXTRA_OBSERVER_ID = "android.app.usage.extra.OBSERVER_ID"; + field public static final String EXTRA_TIME_LIMIT = "android.app.usage.extra.TIME_LIMIT"; + field public static final String EXTRA_TIME_USED = "android.app.usage.extra.TIME_USED"; + field public static final int STANDBY_BUCKET_EXEMPTED = 5; // 0x5 + field public static final int STANDBY_BUCKET_NEVER = 50; // 0x32 + field public static final int USAGE_SOURCE_CURRENT_ACTIVITY = 2; // 0x2 + field public static final int USAGE_SOURCE_TASK_ROOT_ACTIVITY = 1; // 0x1 + } + +} + +package android.bluetooth { + + public final class BluetoothA2dp implements android.bluetooth.BluetoothProfile { + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); + field public static final int OPTIONAL_CODECS_NOT_SUPPORTED = 0; // 0x0 + field public static final int OPTIONAL_CODECS_PREF_DISABLED = 0; // 0x0 + field public static final int OPTIONAL_CODECS_PREF_ENABLED = 1; // 0x1 + field public static final int OPTIONAL_CODECS_PREF_UNKNOWN = -1; // 0xffffffff + field public static final int OPTIONAL_CODECS_SUPPORTED = 1; // 0x1 + field public static final int OPTIONAL_CODECS_SUPPORT_UNKNOWN = -1; // 0xffffffff + } + + public final class BluetoothA2dpSink implements android.bluetooth.BluetoothProfile { + method public void finalize(); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean isAudioPlaying(@NonNull android.bluetooth.BluetoothDevice); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); + field @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.a2dp-sink.profile.action.CONNECTION_STATE_CHANGED"; + } + + public final class BluetoothAdapter { + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean addOnMetadataChangedListener(@NonNull android.bluetooth.BluetoothDevice, @NonNull java.util.concurrent.Executor, @NonNull android.bluetooth.BluetoothAdapter.OnMetadataChangedListener); + method public boolean disableBLE(); + method public boolean enableBLE(); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean enableNoAutoConnect(); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public long getDiscoveryEndMillis(); + method public boolean isBleScanAlwaysAvailable(); + method public boolean isLeEnabled(); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean removeActiveDevice(int); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean removeOnMetadataChangedListener(@NonNull android.bluetooth.BluetoothDevice, @NonNull android.bluetooth.BluetoothAdapter.OnMetadataChangedListener); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setActiveDevice(@NonNull android.bluetooth.BluetoothDevice, int); + field public static final String ACTION_BLE_STATE_CHANGED = "android.bluetooth.adapter.action.BLE_STATE_CHANGED"; + field public static final String ACTION_REQUEST_BLE_SCAN_ALWAYS_AVAILABLE = "android.bluetooth.adapter.action.REQUEST_BLE_SCAN_ALWAYS_AVAILABLE"; + field public static final int ACTIVE_DEVICE_ALL = 2; // 0x2 + field public static final int ACTIVE_DEVICE_AUDIO = 0; // 0x0 + field public static final int ACTIVE_DEVICE_PHONE_CALL = 1; // 0x1 + } + + public static interface BluetoothAdapter.OnMetadataChangedListener { + method public void onMetadataChanged(@NonNull android.bluetooth.BluetoothDevice, int, @Nullable byte[]); + } + + public final class BluetoothDevice implements android.os.Parcelable { + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean cancelBondProcess(); + method @Nullable @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public byte[] getMetadata(int); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public int getSimAccessPermission(); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public boolean isConnected(); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH) public boolean isEncrypted(); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean isInSilenceMode(); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean removeBond(); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setMessageAccessPermission(int); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setMetadata(int, @NonNull byte[]); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setPhonebookAccessPermission(int); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setSilenceMode(boolean); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setSimAccessPermission(int); + field public static final int ACCESS_ALLOWED = 1; // 0x1 + field public static final int ACCESS_REJECTED = 2; // 0x2 + field public static final int ACCESS_UNKNOWN = 0; // 0x0 + field public static final String ACTION_SILENCE_MODE_CHANGED = "android.bluetooth.device.action.SILENCE_MODE_CHANGED"; + field public static final int METADATA_COMPANION_APP = 4; // 0x4 + field public static final int METADATA_ENHANCED_SETTINGS_UI_URI = 16; // 0x10 + field public static final int METADATA_HARDWARE_VERSION = 3; // 0x3 + field public static final int METADATA_IS_UNTETHERED_HEADSET = 6; // 0x6 + field public static final int METADATA_MAIN_ICON = 5; // 0x5 + field public static final int METADATA_MANUFACTURER_NAME = 0; // 0x0 + field public static final int METADATA_MAX_LENGTH = 2048; // 0x800 + field public static final int METADATA_MODEL_NAME = 1; // 0x1 + field public static final int METADATA_SOFTWARE_VERSION = 2; // 0x2 + field public static final int METADATA_UNTETHERED_CASE_BATTERY = 12; // 0xc + field public static final int METADATA_UNTETHERED_CASE_CHARGING = 15; // 0xf + field public static final int METADATA_UNTETHERED_CASE_ICON = 9; // 0x9 + field public static final int METADATA_UNTETHERED_LEFT_BATTERY = 10; // 0xa + field public static final int METADATA_UNTETHERED_LEFT_CHARGING = 13; // 0xd + field public static final int METADATA_UNTETHERED_LEFT_ICON = 7; // 0x7 + field public static final int METADATA_UNTETHERED_RIGHT_BATTERY = 11; // 0xb + field public static final int METADATA_UNTETHERED_RIGHT_CHARGING = 14; // 0xe + field public static final int METADATA_UNTETHERED_RIGHT_ICON = 8; // 0x8 + } + + public final class BluetoothHeadset implements android.bluetooth.BluetoothProfile { + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean connect(android.bluetooth.BluetoothDevice); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean disconnect(android.bluetooth.BluetoothDevice); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); + method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean setPriority(android.bluetooth.BluetoothDevice, int); + } + + public final class BluetoothHearingAid implements android.bluetooth.BluetoothProfile { + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public long getHiSyncId(@NonNull android.bluetooth.BluetoothDevice); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); + } + + public final class BluetoothHidDevice implements android.bluetooth.BluetoothProfile { + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); + } + + public final class BluetoothHidHost implements android.bluetooth.BluetoothProfile { + method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); + field public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.input.profile.action.CONNECTION_STATE_CHANGED"; + } + + public final class BluetoothMap implements java.lang.AutoCloseable android.bluetooth.BluetoothProfile { + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public void close(); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) protected void finalize(); + method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); + field public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.map.profile.action.CONNECTION_STATE_CHANGED"; + } + + public final class BluetoothPan implements android.bluetooth.BluetoothProfile { + method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public java.util.List<android.bluetooth.BluetoothDevice> getConnectedDevices(); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean isTetheringOn(); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public void setBluetoothTethering(boolean); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); + field public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.pan.profile.action.CONNECTION_STATE_CHANGED"; + field public static final String ACTION_TETHERING_STATE_CHANGED = "android.bluetooth.action.TETHERING_STATE_CHANGED"; + field public static final String EXTRA_LOCAL_ROLE = "android.bluetooth.pan.extra.LOCAL_ROLE"; + field public static final String EXTRA_TETHERING_STATE = "android.bluetooth.extra.TETHERING_STATE"; + field public static final int LOCAL_NAP_ROLE = 1; // 0x1 + field public static final int LOCAL_PANU_ROLE = 2; // 0x2 + field public static final int PAN_ROLE_NONE = 0; // 0x0 + field public static final int REMOTE_NAP_ROLE = 1; // 0x1 + field public static final int REMOTE_PANU_ROLE = 2; // 0x2 + field public static final int TETHERING_STATE_OFF = 1; // 0x1 + field public static final int TETHERING_STATE_ON = 2; // 0x2 + } + + public class BluetoothPbap implements android.bluetooth.BluetoothProfile { + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getConnectionState(@NonNull android.bluetooth.BluetoothDevice); + method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); + field @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public static final String ACTION_CONNECTION_STATE_CHANGED = "android.bluetooth.pbap.profile.action.CONNECTION_STATE_CHANGED"; + } + + public interface BluetoothProfile { + field public static final int A2DP_SINK = 11; // 0xb + field public static final int AVRCP_CONTROLLER = 12; // 0xc + field public static final int CONNECTION_POLICY_ALLOWED = 100; // 0x64 + field public static final int CONNECTION_POLICY_FORBIDDEN = 0; // 0x0 + field public static final int CONNECTION_POLICY_UNKNOWN = -1; // 0xffffffff + field public static final int HEADSET_CLIENT = 16; // 0x10 + field public static final int PAN = 5; // 0x5 + field public static final int PBAP_CLIENT = 17; // 0x11 + field @Deprecated public static final int PRIORITY_OFF = 0; // 0x0 + field @Deprecated public static final int PRIORITY_ON = 100; // 0x64 + } + + public final class BluetoothUuid { + method public static boolean containsAnyUuid(@Nullable android.os.ParcelUuid[], @Nullable android.os.ParcelUuid[]); + method @NonNull public static android.os.ParcelUuid parseUuidFrom(@Nullable byte[]); + field @NonNull public static final android.os.ParcelUuid A2DP_SINK; + field @NonNull public static final android.os.ParcelUuid A2DP_SOURCE; + field @NonNull public static final android.os.ParcelUuid ADV_AUDIO_DIST; + field @NonNull public static final android.os.ParcelUuid AVRCP_CONTROLLER; + field @NonNull public static final android.os.ParcelUuid AVRCP_TARGET; + field @NonNull public static final android.os.ParcelUuid BASE_UUID; + field @NonNull public static final android.os.ParcelUuid BNEP; + field @NonNull public static final android.os.ParcelUuid HEARING_AID; + field @NonNull public static final android.os.ParcelUuid HFP; + field @NonNull public static final android.os.ParcelUuid HFP_AG; + field @NonNull public static final android.os.ParcelUuid HID; + field @NonNull public static final android.os.ParcelUuid HOGP; + field @NonNull public static final android.os.ParcelUuid HSP; + field @NonNull public static final android.os.ParcelUuid HSP_AG; + field @NonNull public static final android.os.ParcelUuid MAP; + field @NonNull public static final android.os.ParcelUuid MAS; + field @NonNull public static final android.os.ParcelUuid MNS; + field @NonNull public static final android.os.ParcelUuid NAP; + field @NonNull public static final android.os.ParcelUuid OBEX_OBJECT_PUSH; + field @NonNull public static final android.os.ParcelUuid PANU; + field @NonNull public static final android.os.ParcelUuid PBAP_PCE; + field @NonNull public static final android.os.ParcelUuid PBAP_PSE; + field @NonNull public static final android.os.ParcelUuid SAP; + field public static final int UUID_BYTES_128_BIT = 16; // 0x10 + field public static final int UUID_BYTES_16_BIT = 2; // 0x2 + field public static final int UUID_BYTES_32_BIT = 4; // 0x4 + } + +} + +package android.bluetooth.le { + + public final class BluetoothLeScanner { + method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_ADMIN, android.Manifest.permission.UPDATE_DEVICE_STATS}) public void startScanFromSource(android.os.WorkSource, android.bluetooth.le.ScanCallback); + method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_ADMIN, android.Manifest.permission.UPDATE_DEVICE_STATS}) public void startScanFromSource(java.util.List<android.bluetooth.le.ScanFilter>, android.bluetooth.le.ScanSettings, android.os.WorkSource, android.bluetooth.le.ScanCallback); + method public void startTruncatedScan(java.util.List<android.bluetooth.le.TruncatedFilter>, android.bluetooth.le.ScanSettings, android.bluetooth.le.ScanCallback); + } + + public final class ResultStorageDescriptor implements android.os.Parcelable { + ctor public ResultStorageDescriptor(int, int, int); + method public int describeContents(); + method public int getLength(); + method public int getOffset(); + method public int getType(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.ResultStorageDescriptor> CREATOR; + } + + public final class ScanSettings implements android.os.Parcelable { + field public static final int SCAN_RESULT_TYPE_ABBREVIATED = 1; // 0x1 + field public static final int SCAN_RESULT_TYPE_FULL = 0; // 0x0 + } + + public static final class ScanSettings.Builder { + method public android.bluetooth.le.ScanSettings.Builder setScanResultType(int); + } + + public final class TruncatedFilter { + ctor public TruncatedFilter(android.bluetooth.le.ScanFilter, java.util.List<android.bluetooth.le.ResultStorageDescriptor>); + method public android.bluetooth.le.ScanFilter getFilter(); + method public java.util.List<android.bluetooth.le.ResultStorageDescriptor> getStorageDescriptors(); + } + +} + +package android.companion { + + public final class CompanionDeviceManager { + method @RequiresPermission("android.permission.MANAGE_COMPANION_DEVICES") public boolean isDeviceAssociatedForWifiConnection(@NonNull String, @NonNull android.net.MacAddress, @NonNull android.os.UserHandle); + } + +} + +package android.content { + + public class ApexEnvironment { + method @NonNull public static android.content.ApexEnvironment getApexEnvironment(@NonNull String); + method @NonNull public java.io.File getCredentialProtectedDataDirForUser(@NonNull android.os.UserHandle); + method @NonNull public java.io.File getDeviceProtectedDataDir(); + method @NonNull public java.io.File getDeviceProtectedDataDirForUser(@NonNull android.os.UserHandle); + } + + public abstract class BroadcastReceiver { + method @NonNull public final android.os.UserHandle getSendingUser(); + } + + public abstract class ContentProvider implements android.content.ComponentCallbacks2 { + method public int checkUriPermission(@NonNull android.net.Uri, int, int); + } + + public class ContentProviderClient implements java.lang.AutoCloseable { + method @RequiresPermission(android.Manifest.permission.REMOVE_TASKS) public void setDetectNotResponding(long); + } + + public abstract class ContentResolver { + method public int checkUriPermission(@NonNull android.net.Uri, int, int); + method @NonNull public static android.net.Uri decodeFromFile(@NonNull java.io.File); + method @NonNull public static java.io.File encodeToFile(@NonNull android.net.Uri); + method @Nullable @RequiresPermission("android.permission.CACHE_CONTENT") public android.os.Bundle getCache(@NonNull android.net.Uri); + method @RequiresPermission("android.permission.CACHE_CONTENT") public void putCache(@NonNull android.net.Uri, @Nullable android.os.Bundle); + } + + public abstract class Context { + method @NonNull public android.content.Context createContextAsUser(@NonNull android.os.UserHandle, int); + method public abstract android.content.Context createCredentialProtectedStorageContext(); + method @NonNull public android.content.Context createPackageContextAsUser(@NonNull String, int, @NonNull android.os.UserHandle) throws android.content.pm.PackageManager.NameNotFoundException; + method @Nullable public abstract java.io.File getPreloadsFileCache(); + method public abstract boolean isCredentialProtectedStorage(); + method @Nullable @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public android.content.Intent registerReceiverForAllUsers(@Nullable android.content.BroadcastReceiver, @NonNull android.content.IntentFilter, @Nullable String, @Nullable android.os.Handler); + method public abstract void sendBroadcast(android.content.Intent, @Nullable String, @Nullable android.os.Bundle); + method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public abstract void sendBroadcastAsUser(@RequiresPermission android.content.Intent, android.os.UserHandle, @Nullable String, @Nullable android.os.Bundle); + method public abstract void sendOrderedBroadcast(@NonNull android.content.Intent, @Nullable String, @Nullable android.os.Bundle, @Nullable android.content.BroadcastReceiver, @Nullable android.os.Handler, int, @Nullable String, @Nullable android.os.Bundle); + method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public void startActivityAsUser(@NonNull @RequiresPermission android.content.Intent, @NonNull android.os.UserHandle); + field public static final String APP_INTEGRITY_SERVICE = "app_integrity"; + field public static final String APP_PREDICTION_SERVICE = "app_prediction"; + field public static final String BACKUP_SERVICE = "backup"; + field public static final String BATTERY_STATS_SERVICE = "batterystats"; + field public static final int BIND_ALLOW_BACKGROUND_ACTIVITY_STARTS = 1048576; // 0x100000 + field public static final String BUGREPORT_SERVICE = "bugreport"; + field public static final String CONTENT_SUGGESTIONS_SERVICE = "content_suggestions"; + field public static final String CONTEXTHUB_SERVICE = "contexthub"; + field public static final String ETHERNET_SERVICE = "ethernet"; + field public static final String EUICC_CARD_SERVICE = "euicc_card"; + field public static final String HDMI_CONTROL_SERVICE = "hdmi_control"; + field public static final String MEDIA_TRANSCODING_SERVICE = "media_transcoding"; + field public static final String NETD_SERVICE = "netd"; + field public static final String NETWORK_SCORE_SERVICE = "network_score"; + field public static final String OEM_LOCK_SERVICE = "oem_lock"; + field public static final String PERMISSION_SERVICE = "permission"; + field public static final String PERSISTENT_DATA_BLOCK_SERVICE = "persistent_data_block"; + field public static final String ROLLBACK_SERVICE = "rollback"; + field public static final String SECURE_ELEMENT_SERVICE = "secure_element"; + field public static final String STATS_MANAGER = "stats"; + field public static final String STATUS_BAR_SERVICE = "statusbar"; + field public static final String SYSTEM_CONFIG_SERVICE = "system_config"; + field public static final String SYSTEM_UPDATE_SERVICE = "system_update"; + field public static final String TETHERING_SERVICE = "tethering"; + field public static final String VR_SERVICE = "vrmanager"; + field public static final String WIFI_NL80211_SERVICE = "wifinl80211"; + field @Deprecated public static final String WIFI_RTT_SERVICE = "rttmanager"; + field public static final String WIFI_SCANNING_SERVICE = "wifiscanner"; + } + + public class ContextWrapper extends android.content.Context { + method public android.content.Context createCredentialProtectedStorageContext(); + method public java.io.File getPreloadsFileCache(); + method public boolean isCredentialProtectedStorage(); + method public void sendBroadcast(android.content.Intent, String, android.os.Bundle); + method public void sendBroadcastAsUser(android.content.Intent, android.os.UserHandle, String, android.os.Bundle); + method public void sendOrderedBroadcast(android.content.Intent, String, android.os.Bundle, android.content.BroadcastReceiver, android.os.Handler, int, String, android.os.Bundle); + } + + public class Intent implements java.lang.Cloneable android.os.Parcelable { + field public static final String ACTION_BATTERY_LEVEL_CHANGED = "android.intent.action.BATTERY_LEVEL_CHANGED"; + field public static final String ACTION_CALL_EMERGENCY = "android.intent.action.CALL_EMERGENCY"; + field public static final String ACTION_CALL_PRIVILEGED = "android.intent.action.CALL_PRIVILEGED"; + field public static final String ACTION_DEVICE_CUSTOMIZATION_READY = "android.intent.action.DEVICE_CUSTOMIZATION_READY"; + field public static final String ACTION_DIAL_EMERGENCY = "android.intent.action.DIAL_EMERGENCY"; + field public static final String ACTION_FACTORY_RESET = "android.intent.action.FACTORY_RESET"; + field public static final String ACTION_GLOBAL_BUTTON = "android.intent.action.GLOBAL_BUTTON"; + field public static final String ACTION_INCIDENT_REPORT_READY = "android.intent.action.INCIDENT_REPORT_READY"; + field public static final String ACTION_INSTALL_INSTANT_APP_PACKAGE = "android.intent.action.INSTALL_INSTANT_APP_PACKAGE"; + field public static final String ACTION_INSTANT_APP_RESOLVER_SETTINGS = "android.intent.action.INSTANT_APP_RESOLVER_SETTINGS"; + field public static final String ACTION_INTENT_FILTER_NEEDS_VERIFICATION = "android.intent.action.INTENT_FILTER_NEEDS_VERIFICATION"; + field public static final String ACTION_LOAD_DATA = "android.intent.action.LOAD_DATA"; + field @RequiresPermission(android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS) public static final String ACTION_MANAGE_APP_PERMISSION = "android.intent.action.MANAGE_APP_PERMISSION"; + field public static final String ACTION_MANAGE_APP_PERMISSIONS = "android.intent.action.MANAGE_APP_PERMISSIONS"; + field @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public static final String ACTION_MANAGE_DEFAULT_APP = "android.intent.action.MANAGE_DEFAULT_APP"; + field public static final String ACTION_MANAGE_PERMISSIONS = "android.intent.action.MANAGE_PERMISSIONS"; + field public static final String ACTION_MANAGE_PERMISSION_APPS = "android.intent.action.MANAGE_PERMISSION_APPS"; + field @RequiresPermission(android.Manifest.permission.MANAGE_ROLE_HOLDERS) public static final String ACTION_MANAGE_SPECIAL_APP_ACCESSES = "android.intent.action.MANAGE_SPECIAL_APP_ACCESSES"; + field public static final String ACTION_MASTER_CLEAR_NOTIFICATION = "android.intent.action.MASTER_CLEAR_NOTIFICATION"; + field public static final String ACTION_PACKAGE_NEEDS_INTEGRITY_VERIFICATION = "android.intent.action.PACKAGE_NEEDS_INTEGRITY_VERIFICATION"; + field public static final String ACTION_PACKAGE_UNSUSPENDED_MANUALLY = "android.intent.action.PACKAGE_UNSUSPENDED_MANUALLY"; + field public static final String ACTION_PENDING_INCIDENT_REPORTS_CHANGED = "android.intent.action.PENDING_INCIDENT_REPORTS_CHANGED"; + field public static final String ACTION_PRE_BOOT_COMPLETED = "android.intent.action.PRE_BOOT_COMPLETED"; + field public static final String ACTION_QUERY_PACKAGE_RESTART = "android.intent.action.QUERY_PACKAGE_RESTART"; + field public static final String ACTION_RESOLVE_INSTANT_APP_PACKAGE = "android.intent.action.RESOLVE_INSTANT_APP_PACKAGE"; + field @RequiresPermission(android.Manifest.permission.REVIEW_ACCESSIBILITY_SERVICES) public static final String ACTION_REVIEW_ACCESSIBILITY_SERVICES = "android.intent.action.REVIEW_ACCESSIBILITY_SERVICES"; + field @RequiresPermission(android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS) public static final String ACTION_REVIEW_ONGOING_PERMISSION_USAGE = "android.intent.action.REVIEW_ONGOING_PERMISSION_USAGE"; + field public static final String ACTION_REVIEW_PERMISSIONS = "android.intent.action.REVIEW_PERMISSIONS"; + field @RequiresPermission(android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS) public static final String ACTION_REVIEW_PERMISSION_USAGE = "android.intent.action.REVIEW_PERMISSION_USAGE"; + field public static final String ACTION_ROLLBACK_COMMITTED = "android.intent.action.ROLLBACK_COMMITTED"; + field public static final String ACTION_SHOW_SUSPENDED_APP_DETAILS = "android.intent.action.SHOW_SUSPENDED_APP_DETAILS"; + field @Deprecated public static final String ACTION_SIM_STATE_CHANGED = "android.intent.action.SIM_STATE_CHANGED"; + field public static final String ACTION_SPLIT_CONFIGURATION_CHANGED = "android.intent.action.SPLIT_CONFIGURATION_CHANGED"; + field public static final String ACTION_UPGRADE_SETUP = "android.intent.action.UPGRADE_SETUP"; + field public static final String ACTION_USER_ADDED = "android.intent.action.USER_ADDED"; + field public static final String ACTION_USER_REMOVED = "android.intent.action.USER_REMOVED"; + field public static final String ACTION_VOICE_ASSIST = "android.intent.action.VOICE_ASSIST"; + field public static final String CATEGORY_LEANBACK_SETTINGS = "android.intent.category.LEANBACK_SETTINGS"; + field public static final String EXTRA_CALLING_PACKAGE = "android.intent.extra.CALLING_PACKAGE"; + field public static final String EXTRA_FORCE_FACTORY_RESET = "android.intent.extra.FORCE_FACTORY_RESET"; + field public static final String EXTRA_INSTANT_APP_ACTION = "android.intent.extra.INSTANT_APP_ACTION"; + field public static final String EXTRA_INSTANT_APP_BUNDLES = "android.intent.extra.INSTANT_APP_BUNDLES"; + field public static final String EXTRA_INSTANT_APP_EXTRAS = "android.intent.extra.INSTANT_APP_EXTRAS"; + field public static final String EXTRA_INSTANT_APP_FAILURE = "android.intent.extra.INSTANT_APP_FAILURE"; + field public static final String EXTRA_INSTANT_APP_HOSTNAME = "android.intent.extra.INSTANT_APP_HOSTNAME"; + field public static final String EXTRA_INSTANT_APP_SUCCESS = "android.intent.extra.INSTANT_APP_SUCCESS"; + field public static final String EXTRA_INSTANT_APP_TOKEN = "android.intent.extra.INSTANT_APP_TOKEN"; + field public static final String EXTRA_LONG_VERSION_CODE = "android.intent.extra.LONG_VERSION_CODE"; + field public static final String EXTRA_ORIGINATING_UID = "android.intent.extra.ORIGINATING_UID"; + field public static final String EXTRA_PACKAGES = "android.intent.extra.PACKAGES"; + field public static final String EXTRA_PERMISSION_GROUP_NAME = "android.intent.extra.PERMISSION_GROUP_NAME"; + field public static final String EXTRA_PERMISSION_NAME = "android.intent.extra.PERMISSION_NAME"; + field public static final String EXTRA_REASON = "android.intent.extra.REASON"; + field public static final String EXTRA_REMOTE_CALLBACK = "android.intent.extra.REMOTE_CALLBACK"; + field public static final String EXTRA_RESULT_NEEDED = "android.intent.extra.RESULT_NEEDED"; + field public static final String EXTRA_ROLE_NAME = "android.intent.extra.ROLE_NAME"; + field public static final String EXTRA_UNKNOWN_INSTANT_APP = "android.intent.extra.UNKNOWN_INSTANT_APP"; + field public static final String EXTRA_VERIFICATION_BUNDLE = "android.intent.extra.VERIFICATION_BUNDLE"; + field public static final int FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT = 67108864; // 0x4000000 + field public static final String METADATA_SETUP_VERSION = "android.SETUP_VERSION"; + } + + public class IntentFilter implements android.os.Parcelable { + method public final int getOrder(); + method public final void setOrder(int); + } + +} + +package android.content.integrity { + + public class AppIntegrityManager { + method @NonNull public String getCurrentRuleSetProvider(); + method @NonNull public String getCurrentRuleSetVersion(); + method public void updateRuleSet(@NonNull android.content.integrity.RuleSet, @NonNull android.content.IntentSender); + field public static final String EXTRA_STATUS = "android.content.integrity.extra.STATUS"; + field public static final int STATUS_FAILURE = 1; // 0x1 + field public static final int STATUS_SUCCESS = 0; // 0x0 + } + + public abstract class IntegrityFormula { + method @NonNull public static android.content.integrity.IntegrityFormula all(@NonNull android.content.integrity.IntegrityFormula...); + method @NonNull public static android.content.integrity.IntegrityFormula any(@NonNull android.content.integrity.IntegrityFormula...); + method @NonNull public static android.content.integrity.IntegrityFormula not(@NonNull android.content.integrity.IntegrityFormula); + } + + public static final class IntegrityFormula.Application { + method @NonNull public static android.content.integrity.IntegrityFormula certificatesContain(@NonNull String); + method @NonNull public static android.content.integrity.IntegrityFormula isPreInstalled(); + method @NonNull public static android.content.integrity.IntegrityFormula packageNameEquals(@NonNull String); + method @NonNull public static android.content.integrity.IntegrityFormula versionCodeEquals(@NonNull long); + method @NonNull public static android.content.integrity.IntegrityFormula versionCodeGreaterThan(@NonNull long); + method @NonNull public static android.content.integrity.IntegrityFormula versionCodeGreaterThanOrEqualTo(@NonNull long); + } + + public static final class IntegrityFormula.Installer { + method @NonNull public static android.content.integrity.IntegrityFormula certificatesContain(@NonNull String); + method @NonNull public static android.content.integrity.IntegrityFormula notAllowedByManifest(); + method @NonNull public static android.content.integrity.IntegrityFormula packageNameEquals(@NonNull String); + } + + public static final class IntegrityFormula.SourceStamp { + method @NonNull public static android.content.integrity.IntegrityFormula notTrusted(); + method @NonNull public static android.content.integrity.IntegrityFormula stampCertificateHashEquals(@NonNull String); + } + + public final class Rule implements android.os.Parcelable { + ctor public Rule(@NonNull android.content.integrity.IntegrityFormula, int); + method public int describeContents(); + method public int getEffect(); + method @NonNull public android.content.integrity.IntegrityFormula getFormula(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.content.integrity.Rule> CREATOR; + field public static final int DENY = 0; // 0x0 + field public static final int FORCE_ALLOW = 1; // 0x1 + } + + public class RuleSet { + method @NonNull public java.util.List<android.content.integrity.Rule> getRules(); + method @NonNull public String getVersion(); + } + + public static class RuleSet.Builder { + ctor public RuleSet.Builder(); + method @NonNull public android.content.integrity.RuleSet.Builder addRules(@NonNull java.util.List<android.content.integrity.Rule>); + method @NonNull public android.content.integrity.RuleSet build(); + method @NonNull public android.content.integrity.RuleSet.Builder setVersion(@NonNull String); + } + +} + +package android.content.om { + + public final class OverlayInfo implements android.os.Parcelable { + method public int describeContents(); + method @Nullable public String getCategory(); + method @NonNull public String getPackageName(); + method @Nullable public String getTargetOverlayableName(); + method @NonNull public String getTargetPackageName(); + method public int getUserId(); + method public boolean isEnabled(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.content.om.OverlayInfo> CREATOR; + } + + public class OverlayManager { + method @Nullable public android.content.om.OverlayInfo getOverlayInfo(@NonNull String, @NonNull android.os.UserHandle); + method @NonNull @RequiresPermission(anyOf={"android.permission.INTERACT_ACROSS_USERS", "android.permission.INTERACT_ACROSS_USERS_FULL"}) public java.util.List<android.content.om.OverlayInfo> getOverlayInfosForTarget(@NonNull String, @NonNull android.os.UserHandle); + method @RequiresPermission(anyOf={"android.permission.INTERACT_ACROSS_USERS", "android.permission.INTERACT_ACROSS_USERS_FULL"}) public void setEnabled(@NonNull String, boolean, @NonNull android.os.UserHandle) throws java.lang.IllegalStateException, java.lang.SecurityException; + method @RequiresPermission(anyOf={"android.permission.INTERACT_ACROSS_USERS", "android.permission.INTERACT_ACROSS_USERS_FULL"}) public void setEnabledExclusiveInCategory(@NonNull String, @NonNull android.os.UserHandle) throws java.lang.IllegalStateException, java.lang.SecurityException; + } + +} + +package android.content.pm { + + public class ApplicationInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable { + method public boolean isEncryptionAware(); + method public boolean isInstantApp(); + field public String credentialProtectedDataDir; + field public int targetSandboxVersion; + } + + public class CrossProfileApps { + method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_PROFILES) public void startActivity(@NonNull android.content.ComponentName, @NonNull android.os.UserHandle); + } + + public class DataLoaderParams { + method @NonNull public static final android.content.pm.DataLoaderParams forIncremental(@NonNull android.content.ComponentName, @NonNull String); + method @NonNull public static final android.content.pm.DataLoaderParams forStreaming(@NonNull android.content.ComponentName, @NonNull String); + method @NonNull public final String getArguments(); + method @NonNull public final android.content.ComponentName getComponentName(); + method @NonNull public final int getType(); + } + + public final class InstallationFile { + method public long getLengthBytes(); + method public int getLocation(); + method @Nullable public byte[] getMetadata(); + method @NonNull public String getName(); + method @Nullable public byte[] getSignature(); + } + + public final class InstantAppInfo implements android.os.Parcelable { + ctor public InstantAppInfo(android.content.pm.ApplicationInfo, String[], String[]); + ctor public InstantAppInfo(String, CharSequence, String[], String[]); + method public int describeContents(); + method @Nullable public android.content.pm.ApplicationInfo getApplicationInfo(); + method @Nullable public String[] getGrantedPermissions(); + method @NonNull public String getPackageName(); + method @Nullable public String[] getRequestedPermissions(); + method @NonNull public android.graphics.drawable.Drawable loadIcon(@NonNull android.content.pm.PackageManager); + method @NonNull public CharSequence loadLabel(@NonNull android.content.pm.PackageManager); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.InstantAppInfo> CREATOR; + } + + public final class InstantAppIntentFilter implements android.os.Parcelable { + ctor public InstantAppIntentFilter(@Nullable String, @NonNull java.util.List<android.content.IntentFilter>); + method public int describeContents(); + method public java.util.List<android.content.IntentFilter> getFilters(); + method public String getSplitName(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.InstantAppIntentFilter> CREATOR; + } + + public final class InstantAppRequestInfo implements android.os.Parcelable { + ctor public InstantAppRequestInfo(@NonNull android.content.Intent, @Nullable int[], @NonNull android.os.UserHandle, boolean, @NonNull String); + method public int describeContents(); + method @Nullable public int[] getHostDigestPrefix(); + method @NonNull public android.content.Intent getIntent(); + method @NonNull public String getToken(); + method @NonNull public android.os.UserHandle getUserHandle(); + method public boolean isRequesterInstantApp(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.InstantAppRequestInfo> CREATOR; + } + + public final class InstantAppResolveInfo implements android.os.Parcelable { + ctor public InstantAppResolveInfo(@NonNull android.content.pm.InstantAppResolveInfo.InstantAppDigest, @Nullable String, @Nullable java.util.List<android.content.pm.InstantAppIntentFilter>, int); + ctor public InstantAppResolveInfo(@NonNull android.content.pm.InstantAppResolveInfo.InstantAppDigest, @Nullable String, @Nullable java.util.List<android.content.pm.InstantAppIntentFilter>, long, @Nullable android.os.Bundle); + ctor public InstantAppResolveInfo(@NonNull String, @Nullable String, @Nullable java.util.List<android.content.pm.InstantAppIntentFilter>); + ctor public InstantAppResolveInfo(@Nullable android.os.Bundle); + method public int describeContents(); + method public byte[] getDigestBytes(); + method public int getDigestPrefix(); + method @Nullable public android.os.Bundle getExtras(); + method public java.util.List<android.content.pm.InstantAppIntentFilter> getIntentFilters(); + method public long getLongVersionCode(); + method public String getPackageName(); + method @Deprecated public int getVersionCode(); + method public boolean shouldLetInstallerDecide(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.InstantAppResolveInfo> CREATOR; + } + + public static final class InstantAppResolveInfo.InstantAppDigest implements android.os.Parcelable { + ctor public InstantAppResolveInfo.InstantAppDigest(@NonNull String); + method public int describeContents(); + method public byte[][] getDigestBytes(); + method public int[] getDigestPrefix(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.InstantAppResolveInfo.InstantAppDigest> CREATOR; + field public static final android.content.pm.InstantAppResolveInfo.InstantAppDigest UNDEFINED; + } + + public final class IntentFilterVerificationInfo implements android.os.Parcelable { + method public int describeContents(); + method public java.util.Set<java.lang.String> getDomains(); + method public String getPackageName(); + method public int getStatus(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.IntentFilterVerificationInfo> CREATOR; + } + + public class LauncherApps { + method @Nullable public android.content.pm.LauncherApps.AppUsageLimit getAppUsageLimit(@NonNull String, @NonNull android.os.UserHandle); + } + + public static final class LauncherApps.AppUsageLimit implements android.os.Parcelable { + method public int describeContents(); + method public long getTotalUsageLimit(); + method public long getUsageRemaining(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.LauncherApps.AppUsageLimit> CREATOR; + } + + public class PackageInstaller { + method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void setPermissionsResult(int, boolean); + field public static final int DATA_LOADER_TYPE_INCREMENTAL = 2; // 0x2 + field public static final int DATA_LOADER_TYPE_NONE = 0; // 0x0 + field public static final int DATA_LOADER_TYPE_STREAMING = 1; // 0x1 + field public static final String EXTRA_DATA_LOADER_TYPE = "android.content.pm.extra.DATA_LOADER_TYPE"; + field public static final int LOCATION_DATA_APP = 0; // 0x0 + field public static final int LOCATION_MEDIA_DATA = 2; // 0x2 + field public static final int LOCATION_MEDIA_OBB = 1; // 0x1 + } + + public static class PackageInstaller.Session implements java.io.Closeable { + method @RequiresPermission("com.android.permission.USE_INSTALLER_V2") public void addFile(int, @NonNull String, long, @NonNull byte[], @Nullable byte[]); + method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void commitTransferred(@NonNull android.content.IntentSender); + method @Nullable @RequiresPermission("com.android.permission.USE_INSTALLER_V2") public android.content.pm.DataLoaderParams getDataLoaderParams(); + method @RequiresPermission("com.android.permission.USE_INSTALLER_V2") public void removeFile(int, @NonNull String); + } + + public static class PackageInstaller.SessionInfo implements android.os.Parcelable { + method public boolean getAllocateAggressive(); + method @Deprecated public boolean getAllowDowngrade(); + method public int getAutoRevokePermissionsMode(); + method public boolean getDontKillApp(); + method public boolean getEnableRollback(); + method @Nullable public String[] getGrantedRuntimePermissions(); + method public boolean getInstallAsFullApp(boolean); + method public boolean getInstallAsInstantApp(boolean); + method public boolean getInstallAsVirtualPreload(); + method public boolean getRequestDowngrade(); + method public int getRollbackDataPolicy(); + method @NonNull public java.util.Set<java.lang.String> getWhitelistedRestrictedPermissions(); + } + + public static class PackageInstaller.SessionParams implements android.os.Parcelable { + method @RequiresPermission(android.Manifest.permission.ALLOCATE_AGGRESSIVE) public void setAllocateAggressive(boolean); + method @Deprecated public void setAllowDowngrade(boolean); + method @RequiresPermission(allOf={android.Manifest.permission.INSTALL_PACKAGES, "com.android.permission.USE_INSTALLER_V2"}) public void setDataLoaderParams(@NonNull android.content.pm.DataLoaderParams); + method public void setDontKillApp(boolean); + method public void setEnableRollback(boolean); + method public void setEnableRollback(boolean, int); + method @RequiresPermission(android.Manifest.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS) public void setGrantedRuntimePermissions(String[]); + method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void setInstallAsApex(); + method public void setInstallAsInstantApp(boolean); + method public void setInstallAsVirtualPreload(); + method public void setRequestDowngrade(boolean); + method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void setStaged(); + } + + public class PackageItemInfo { + method public static void forceSafeLabels(); + method @Deprecated @NonNull public CharSequence loadSafeLabel(@NonNull android.content.pm.PackageManager); + method @NonNull public CharSequence loadSafeLabel(@NonNull android.content.pm.PackageManager, @FloatRange(from=0) float, int); + } + + public abstract class PackageManager { + method @RequiresPermission("android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS") public abstract void addOnPermissionsChangeListener(@NonNull android.content.pm.PackageManager.OnPermissionsChangedListener); + method public abstract boolean arePermissionsIndividuallyControlled(); + method @NonNull public abstract java.util.List<android.content.IntentFilter> getAllIntentFilters(@NonNull String); + method @NonNull @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public android.content.pm.ApplicationInfo getApplicationInfoAsUser(@NonNull String, int, @NonNull android.os.UserHandle) throws android.content.pm.PackageManager.NameNotFoundException; + method @NonNull public android.content.pm.dex.ArtManager getArtManager(); + method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_SHARED_LIBRARIES) public java.util.List<android.content.pm.SharedLibraryInfo> getDeclaredSharedLibraries(@NonNull String, int); + method @Nullable @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public abstract String getDefaultBrowserPackageNameAsUser(int); + method @Nullable @RequiresPermission(android.Manifest.permission.SET_HARMFUL_APP_WARNINGS) public CharSequence getHarmfulAppWarning(@NonNull String); + method @Nullable public String getIncidentReportApproverPackageName(); + method @NonNull @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public abstract java.util.List<android.content.pm.PackageInfo> getInstalledPackagesAsUser(int, int); + method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_INSTANT_APPS) public abstract android.graphics.drawable.Drawable getInstantAppIcon(String); + method @Nullable public abstract android.content.ComponentName getInstantAppInstallerComponent(); + method @Nullable public abstract android.content.ComponentName getInstantAppResolverSettingsComponent(); + method @NonNull @RequiresPermission(android.Manifest.permission.ACCESS_INSTANT_APPS) public abstract java.util.List<android.content.pm.InstantAppInfo> getInstantApps(); + method @NonNull public abstract java.util.List<android.content.pm.IntentFilterVerificationInfo> getIntentFilterVerifications(@NonNull String); + method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS_FULL) public abstract int getIntentVerificationStatusAsUser(@NonNull String, int); + method @android.content.pm.PackageManager.PermissionFlags @RequiresPermission(anyOf={android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS, android.Manifest.permission.REVOKE_RUNTIME_PERMISSIONS, android.Manifest.permission.GET_RUNTIME_PERMISSIONS}) public abstract int getPermissionFlags(@NonNull String, @NonNull String, @NonNull android.os.UserHandle); + method @NonNull @RequiresPermission(android.Manifest.permission.SUSPEND_APPS) public String[] getUnsuspendablePackages(@NonNull String[]); + method @RequiresPermission(android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS) public abstract void grantRuntimePermission(@NonNull String, @NonNull String, @NonNull android.os.UserHandle); + method @Deprecated public abstract int installExistingPackage(@NonNull String) throws android.content.pm.PackageManager.NameNotFoundException; + method @Deprecated public abstract int installExistingPackage(@NonNull String, int) throws android.content.pm.PackageManager.NameNotFoundException; + method @NonNull @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public java.util.List<android.content.pm.ResolveInfo> queryBroadcastReceiversAsUser(@NonNull android.content.Intent, int, android.os.UserHandle); + method @NonNull @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public java.util.List<android.content.pm.ResolveInfo> queryIntentActivitiesAsUser(@NonNull android.content.Intent, int, @NonNull android.os.UserHandle); + method @NonNull @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public java.util.List<android.content.pm.ResolveInfo> queryIntentContentProvidersAsUser(@NonNull android.content.Intent, int, @NonNull android.os.UserHandle); + method @NonNull @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public java.util.List<android.content.pm.ResolveInfo> queryIntentServicesAsUser(@NonNull android.content.Intent, int, @NonNull android.os.UserHandle); + method public abstract void registerDexModule(@NonNull String, @Nullable android.content.pm.PackageManager.DexModuleRegisterCallback); + method @RequiresPermission("android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS") public abstract void removeOnPermissionsChangeListener(@NonNull android.content.pm.PackageManager.OnPermissionsChangedListener); + method public void replacePreferredActivity(@NonNull android.content.IntentFilter, int, @NonNull java.util.List<android.content.ComponentName>, @NonNull android.content.ComponentName); + method @RequiresPermission(android.Manifest.permission.REVOKE_RUNTIME_PERMISSIONS) public abstract void revokeRuntimePermission(@NonNull String, @NonNull String, @NonNull android.os.UserHandle); + method @RequiresPermission(android.Manifest.permission.REVOKE_RUNTIME_PERMISSIONS) public void revokeRuntimePermission(@NonNull String, @NonNull String, @NonNull android.os.UserHandle, @NonNull String); + method public void sendDeviceCustomizationReadyBroadcast(); + method @RequiresPermission(allOf={android.Manifest.permission.SET_PREFERRED_APPLICATIONS, android.Manifest.permission.INTERACT_ACROSS_USERS_FULL}) public abstract boolean setDefaultBrowserPackageNameAsUser(@Nullable String, int); + method @NonNull @RequiresPermission(android.Manifest.permission.SUSPEND_APPS) public String[] setDistractingPackageRestrictions(@NonNull String[], int); + method @RequiresPermission(android.Manifest.permission.SET_HARMFUL_APP_WARNINGS) public void setHarmfulAppWarning(@NonNull String, @Nullable CharSequence); + method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.SUSPEND_APPS) public String[] setPackagesSuspended(@Nullable String[], boolean, @Nullable android.os.PersistableBundle, @Nullable android.os.PersistableBundle, @Nullable String); + method @Nullable @RequiresPermission(android.Manifest.permission.SUSPEND_APPS) public String[] setPackagesSuspended(@Nullable String[], boolean, @Nullable android.os.PersistableBundle, @Nullable android.os.PersistableBundle, @Nullable android.content.pm.SuspendDialogInfo); + method @RequiresPermission(value=android.Manifest.permission.CHANGE_COMPONENT_ENABLED_STATE, conditional=true) public void setSyntheticAppDetailsActivityEnabled(@NonNull String, boolean); + method public void setSystemAppState(@NonNull String, int); + method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public abstract void setUpdateAvailable(@NonNull String, boolean); + method @RequiresPermission(android.Manifest.permission.SET_PREFERRED_APPLICATIONS) public abstract boolean updateIntentVerificationStatusAsUser(@NonNull String, int, int); + method @RequiresPermission(anyOf={android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS, android.Manifest.permission.REVOKE_RUNTIME_PERMISSIONS}) public abstract void updatePermissionFlags(@NonNull String, @NonNull String, @android.content.pm.PackageManager.PermissionFlags int, @android.content.pm.PackageManager.PermissionFlags int, @NonNull android.os.UserHandle); + method @RequiresPermission(android.Manifest.permission.INTENT_FILTER_VERIFICATION_AGENT) public abstract void verifyIntentFilter(int, int, @NonNull java.util.List<java.lang.String>); + field public static final String ACTION_REQUEST_PERMISSIONS = "android.content.pm.action.REQUEST_PERMISSIONS"; + field public static final String EXTRA_REQUEST_PERMISSIONS_NAMES = "android.content.pm.extra.REQUEST_PERMISSIONS_NAMES"; + field public static final String EXTRA_REQUEST_PERMISSIONS_RESULTS = "android.content.pm.extra.REQUEST_PERMISSIONS_RESULTS"; + field public static final String FEATURE_BROADCAST_RADIO = "android.hardware.broadcastradio"; + field public static final String FEATURE_CONTEXT_HUB = "android.hardware.context_hub"; + field public static final String FEATURE_INCREMENTAL_DELIVERY = "android.software.incremental_delivery"; + field public static final String FEATURE_REBOOT_ESCROW = "android.hardware.reboot_escrow"; + field public static final String FEATURE_TELEPHONY_CARRIERLOCK = "android.hardware.telephony.carrierlock"; + field public static final int FLAGS_PERMISSION_RESERVED_PERMISSION_CONTROLLER = -268435456; // 0xf0000000 + field public static final int FLAG_PERMISSION_APPLY_RESTRICTION = 16384; // 0x4000 + field public static final int FLAG_PERMISSION_AUTO_REVOKED = 131072; // 0x20000 + field public static final int FLAG_PERMISSION_GRANTED_BY_DEFAULT = 32; // 0x20 + field public static final int FLAG_PERMISSION_GRANTED_BY_ROLE = 32768; // 0x8000 + field public static final int FLAG_PERMISSION_ONE_TIME = 65536; // 0x10000 + field public static final int FLAG_PERMISSION_POLICY_FIXED = 4; // 0x4 + field public static final int FLAG_PERMISSION_RESTRICTION_INSTALLER_EXEMPT = 2048; // 0x800 + field public static final int FLAG_PERMISSION_RESTRICTION_ROLE_EXEMPT = 262144; // 0x40000 + field public static final int FLAG_PERMISSION_RESTRICTION_SYSTEM_EXEMPT = 4096; // 0x1000 + field public static final int FLAG_PERMISSION_RESTRICTION_UPGRADE_EXEMPT = 8192; // 0x2000 + field public static final int FLAG_PERMISSION_REVIEW_REQUIRED = 64; // 0x40 + field public static final int FLAG_PERMISSION_REVOKED_COMPAT = 8; // 0x8 + field @Deprecated public static final int FLAG_PERMISSION_REVOKE_ON_UPGRADE = 8; // 0x8 + field public static final int FLAG_PERMISSION_SYSTEM_FIXED = 16; // 0x10 + field public static final int FLAG_PERMISSION_USER_FIXED = 2; // 0x2 + field public static final int FLAG_PERMISSION_USER_SENSITIVE_WHEN_DENIED = 512; // 0x200 + field public static final int FLAG_PERMISSION_USER_SENSITIVE_WHEN_GRANTED = 256; // 0x100 + field public static final int FLAG_PERMISSION_USER_SET = 1; // 0x1 + field public static final int INSTALL_FAILED_ALREADY_EXISTS = -1; // 0xffffffff + field public static final int INSTALL_FAILED_CONFLICTING_PROVIDER = -13; // 0xfffffff3 + field public static final int INSTALL_FAILED_CONTAINER_ERROR = -18; // 0xffffffee + field public static final int INSTALL_FAILED_CPU_ABI_INCOMPATIBLE = -16; // 0xfffffff0 + field public static final int INSTALL_FAILED_DEXOPT = -11; // 0xfffffff5 + field public static final int INSTALL_FAILED_DUPLICATE_PACKAGE = -5; // 0xfffffffb + field public static final int INSTALL_FAILED_INSUFFICIENT_STORAGE = -4; // 0xfffffffc + field public static final int INSTALL_FAILED_INTERNAL_ERROR = -110; // 0xffffff92 + field public static final int INSTALL_FAILED_INVALID_APK = -2; // 0xfffffffe + field public static final int INSTALL_FAILED_INVALID_INSTALL_LOCATION = -19; // 0xffffffed + field public static final int INSTALL_FAILED_INVALID_URI = -3; // 0xfffffffd + field public static final int INSTALL_FAILED_MEDIA_UNAVAILABLE = -20; // 0xffffffec + field public static final int INSTALL_FAILED_MISSING_FEATURE = -17; // 0xffffffef + field public static final int INSTALL_FAILED_MISSING_SHARED_LIBRARY = -9; // 0xfffffff7 + field public static final int INSTALL_FAILED_NEWER_SDK = -14; // 0xfffffff2 + field public static final int INSTALL_FAILED_NO_SHARED_USER = -6; // 0xfffffffa + field public static final int INSTALL_FAILED_OLDER_SDK = -12; // 0xfffffff4 + field public static final int INSTALL_FAILED_PACKAGE_CHANGED = -23; // 0xffffffe9 + field public static final int INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE = -26; // 0xffffffe6 + field public static final int INSTALL_FAILED_REPLACE_COULDNT_DELETE = -10; // 0xfffffff6 + field public static final int INSTALL_FAILED_SANDBOX_VERSION_DOWNGRADE = -27; // 0xffffffe5 + field public static final int INSTALL_FAILED_SHARED_USER_INCOMPATIBLE = -8; // 0xfffffff8 + field public static final int INSTALL_FAILED_TEST_ONLY = -15; // 0xfffffff1 + field public static final int INSTALL_FAILED_UPDATE_INCOMPATIBLE = -7; // 0xfffffff9 + field public static final int INSTALL_FAILED_VERIFICATION_FAILURE = -22; // 0xffffffea + field public static final int INSTALL_FAILED_VERIFICATION_TIMEOUT = -21; // 0xffffffeb + field public static final int INSTALL_PARSE_FAILED_BAD_MANIFEST = -101; // 0xffffff9b + field public static final int INSTALL_PARSE_FAILED_BAD_PACKAGE_NAME = -106; // 0xffffff96 + field public static final int INSTALL_PARSE_FAILED_BAD_SHARED_USER_ID = -107; // 0xffffff95 + field public static final int INSTALL_PARSE_FAILED_CERTIFICATE_ENCODING = -105; // 0xffffff97 + field public static final int INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES = -104; // 0xffffff98 + field public static final int INSTALL_PARSE_FAILED_MANIFEST_EMPTY = -109; // 0xffffff93 + field public static final int INSTALL_PARSE_FAILED_MANIFEST_MALFORMED = -108; // 0xffffff94 + field public static final int INSTALL_PARSE_FAILED_NOT_APK = -100; // 0xffffff9c + field public static final int INSTALL_PARSE_FAILED_NO_CERTIFICATES = -103; // 0xffffff99 + field public static final int INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION = -102; // 0xffffff9a + field public static final int INSTALL_SUCCEEDED = 1; // 0x1 + field public static final int INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS = 2; // 0x2 + field public static final int INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS_ASK = 4; // 0x4 + field public static final int INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ASK = 1; // 0x1 + field public static final int INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_NEVER = 3; // 0x3 + field public static final int INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED = 0; // 0x0 + field public static final int INTENT_FILTER_VERIFICATION_FAILURE = -1; // 0xffffffff + field public static final int INTENT_FILTER_VERIFICATION_SUCCESS = 1; // 0x1 + field @Deprecated public static final int MASK_PERMISSION_FLAGS = 255; // 0xff + field public static final int MATCH_ANY_USER = 4194304; // 0x400000 + field public static final int MATCH_FACTORY_ONLY = 2097152; // 0x200000 + field public static final int MATCH_HIDDEN_UNTIL_INSTALLED_COMPONENTS = 536870912; // 0x20000000 + field public static final int MATCH_INSTANT = 8388608; // 0x800000 + field public static final int MODULE_APEX_NAME = 1; // 0x1 + field public static final int RESTRICTION_HIDE_FROM_SUGGESTIONS = 1; // 0x1 + field public static final int RESTRICTION_HIDE_NOTIFICATIONS = 2; // 0x2 + field public static final int RESTRICTION_NONE = 0; // 0x0 + field public static final int SYSTEM_APP_STATE_HIDDEN_UNTIL_INSTALLED_HIDDEN = 0; // 0x0 + field public static final int SYSTEM_APP_STATE_HIDDEN_UNTIL_INSTALLED_VISIBLE = 1; // 0x1 + field public static final int SYSTEM_APP_STATE_INSTALLED = 2; // 0x2 + field public static final int SYSTEM_APP_STATE_UNINSTALLED = 3; // 0x3 + } + + public abstract static class PackageManager.DexModuleRegisterCallback { + ctor public PackageManager.DexModuleRegisterCallback(); + method public abstract void onDexModuleRegistered(String, boolean, String); + } + + public static interface PackageManager.OnPermissionsChangedListener { + method public void onPermissionsChanged(int); + } + + @IntDef(prefix={"FLAG_PERMISSION_"}, value={android.content.pm.PackageManager.FLAG_PERMISSION_USER_SET, android.content.pm.PackageManager.FLAG_PERMISSION_USER_FIXED, android.content.pm.PackageManager.FLAG_PERMISSION_POLICY_FIXED, android.content.pm.PackageManager.FLAG_PERMISSION_REVOKE_ON_UPGRADE, android.content.pm.PackageManager.FLAG_PERMISSION_SYSTEM_FIXED, android.content.pm.PackageManager.FLAG_PERMISSION_GRANTED_BY_DEFAULT, android.content.pm.PackageManager.FLAG_PERMISSION_USER_SENSITIVE_WHEN_GRANTED, android.content.pm.PackageManager.FLAG_PERMISSION_USER_SENSITIVE_WHEN_DENIED, android.content.pm.PackageManager.FLAG_PERMISSION_RESTRICTION_UPGRADE_EXEMPT, android.content.pm.PackageManager.FLAG_PERMISSION_RESTRICTION_SYSTEM_EXEMPT, android.content.pm.PackageManager.FLAG_PERMISSION_RESTRICTION_INSTALLER_EXEMPT, android.content.pm.PackageManager.FLAG_PERMISSION_APPLY_RESTRICTION, android.content.pm.PackageManager.FLAG_PERMISSION_GRANTED_BY_ROLE, android.content.pm.PackageManager.FLAG_PERMISSION_REVOKED_COMPAT, android.content.pm.PackageManager.FLAG_PERMISSION_ONE_TIME, android.content.pm.PackageManager.FLAG_PERMISSION_AUTO_REVOKED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface PackageManager.PermissionFlags { + } + + public class PermissionGroupInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable { + field @StringRes public final int backgroundRequestDetailResourceId; + field @StringRes public final int backgroundRequestResourceId; + field @StringRes public final int requestDetailResourceId; + field @StringRes public int requestRes; + } + + public class PermissionInfo extends android.content.pm.PackageItemInfo implements android.os.Parcelable { + field public static final int FLAG_REMOVED = 2; // 0x2 + field public static final int PROTECTION_FLAG_APP_PREDICTOR = 2097152; // 0x200000 + field public static final int PROTECTION_FLAG_COMPANION = 8388608; // 0x800000 + field public static final int PROTECTION_FLAG_CONFIGURATOR = 524288; // 0x80000 + field public static final int PROTECTION_FLAG_DOCUMENTER = 262144; // 0x40000 + field public static final int PROTECTION_FLAG_INCIDENT_REPORT_APPROVER = 1048576; // 0x100000 + field public static final int PROTECTION_FLAG_OEM = 16384; // 0x4000 + field public static final int PROTECTION_FLAG_RETAIL_DEMO = 16777216; // 0x1000000 + field public static final int PROTECTION_FLAG_SYSTEM_TEXT_CLASSIFIER = 65536; // 0x10000 + field public static final int PROTECTION_FLAG_WELLBEING = 131072; // 0x20000 + field @Nullable public final String backgroundPermission; + field @StringRes public int requestRes; + } + + public class ResolveInfo implements android.os.Parcelable { + field public boolean handleAllWebDataURI; + } + + public final class ShortcutInfo implements android.os.Parcelable { + method @Nullable public android.app.Person[] getPersons(); + } + + public class ShortcutManager { + method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_APP_PREDICTIONS) public java.util.List<android.content.pm.ShortcutManager.ShareShortcutInfo> getShareTargets(@NonNull android.content.IntentFilter); + method public boolean hasShareTargets(@NonNull String); + } + + public static final class ShortcutManager.ShareShortcutInfo implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public android.content.pm.ShortcutInfo getShortcutInfo(); + method @NonNull public android.content.ComponentName getTargetComponent(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.ShortcutManager.ShareShortcutInfo> CREATOR; + } + + public final class SuspendDialogInfo implements android.os.Parcelable { + method public int describeContents(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int BUTTON_ACTION_MORE_DETAILS = 0; // 0x0 + field public static final int BUTTON_ACTION_UNSUSPEND = 1; // 0x1 + field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.SuspendDialogInfo> CREATOR; + } + + public static final class SuspendDialogInfo.Builder { + ctor public SuspendDialogInfo.Builder(); + method @NonNull public android.content.pm.SuspendDialogInfo build(); + method @NonNull public android.content.pm.SuspendDialogInfo.Builder setIcon(@DrawableRes int); + method @NonNull public android.content.pm.SuspendDialogInfo.Builder setMessage(@NonNull String); + method @NonNull public android.content.pm.SuspendDialogInfo.Builder setMessage(@StringRes int); + method @NonNull public android.content.pm.SuspendDialogInfo.Builder setNeutralButtonAction(int); + method @NonNull public android.content.pm.SuspendDialogInfo.Builder setNeutralButtonText(@StringRes int); + method @NonNull public android.content.pm.SuspendDialogInfo.Builder setTitle(@StringRes int); + } + +} + +package android.content.pm.dex { + + public class ArtManager { + method @RequiresPermission(allOf={android.Manifest.permission.READ_RUNTIME_PROFILES, android.Manifest.permission.PACKAGE_USAGE_STATS}) public boolean isRuntimeProfilingEnabled(int); + method @RequiresPermission(allOf={android.Manifest.permission.READ_RUNTIME_PROFILES, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void snapshotRuntimeProfile(int, @Nullable String, @Nullable String, @NonNull java.util.concurrent.Executor, @NonNull android.content.pm.dex.ArtManager.SnapshotRuntimeProfileCallback); + field public static final int PROFILE_APPS = 0; // 0x0 + field public static final int PROFILE_BOOT_IMAGE = 1; // 0x1 + field public static final int SNAPSHOT_FAILED_CODE_PATH_NOT_FOUND = 1; // 0x1 + field public static final int SNAPSHOT_FAILED_INTERNAL_ERROR = 2; // 0x2 + field public static final int SNAPSHOT_FAILED_PACKAGE_NOT_FOUND = 0; // 0x0 + } + + public abstract static class ArtManager.SnapshotRuntimeProfileCallback { + ctor public ArtManager.SnapshotRuntimeProfileCallback(); + method public abstract void onError(int); + method public abstract void onSuccess(android.os.ParcelFileDescriptor); + } + +} + +package android.content.pm.permission { + + @Deprecated public final class RuntimePermissionPresentationInfo implements android.os.Parcelable { + ctor @Deprecated public RuntimePermissionPresentationInfo(CharSequence, boolean, boolean); + method @Deprecated public int describeContents(); + method @Deprecated @NonNull public CharSequence getLabel(); + method @Deprecated public boolean isGranted(); + method @Deprecated public boolean isStandard(); + method @Deprecated public void writeToParcel(android.os.Parcel, int); + field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.content.pm.permission.RuntimePermissionPresentationInfo> CREATOR; + } + +} + +package android.content.rollback { + + public final class PackageRollbackInfo implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public String getPackageName(); + method @NonNull public android.content.pm.VersionedPackage getVersionRolledBackFrom(); + method @NonNull public android.content.pm.VersionedPackage getVersionRolledBackTo(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.content.rollback.PackageRollbackInfo> CREATOR; + } + + public final class RollbackInfo implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public java.util.List<android.content.pm.VersionedPackage> getCausePackages(); + method public int getCommittedSessionId(); + method @NonNull public java.util.List<android.content.rollback.PackageRollbackInfo> getPackages(); + method public int getRollbackId(); + method public boolean isStaged(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.content.rollback.RollbackInfo> CREATOR; + } + + public final class RollbackManager { + method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_ROLLBACKS, "android.permission.TEST_MANAGE_ROLLBACKS"}) public void commitRollback(int, @NonNull java.util.List<android.content.pm.VersionedPackage>, @NonNull android.content.IntentSender); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_ROLLBACKS, "android.permission.TEST_MANAGE_ROLLBACKS"}) public java.util.List<android.content.rollback.RollbackInfo> getAvailableRollbacks(); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_ROLLBACKS, "android.permission.TEST_MANAGE_ROLLBACKS"}) public java.util.List<android.content.rollback.RollbackInfo> getRecentlyCommittedRollbacks(); + field public static final String EXTRA_STATUS = "android.content.rollback.extra.STATUS"; + field public static final String EXTRA_STATUS_MESSAGE = "android.content.rollback.extra.STATUS_MESSAGE"; + field public static final int STATUS_FAILURE = 1; // 0x1 + field public static final int STATUS_FAILURE_INSTALL = 3; // 0x3 + field public static final int STATUS_FAILURE_ROLLBACK_UNAVAILABLE = 2; // 0x2 + field public static final int STATUS_SUCCESS = 0; // 0x0 + } + +} + +package android.debug { + + public class AdbManager { + method @RequiresPermission(android.Manifest.permission.MANAGE_DEBUGGING) public boolean isAdbWifiQrSupported(); + method @RequiresPermission(android.Manifest.permission.MANAGE_DEBUGGING) public boolean isAdbWifiSupported(); + } + +} + +package android.hardware { + + public final class Sensor { + method public java.util.UUID getUuid(); + method public boolean isDataInjectionSupported(); + field public static final String STRING_TYPE_DYNAMIC_SENSOR_META = "android.sensor.dynamic_sensor_meta"; + field public static final String STRING_TYPE_WRIST_TILT_GESTURE = "android.sensor.wrist_tilt_gesture"; + field public static final int TYPE_DYNAMIC_SENSOR_META = 32; // 0x20 + field public static final int TYPE_WRIST_TILT_GESTURE = 26; // 0x1a + } + + public abstract class SensorManager { + method public boolean initDataInjection(boolean); + method public boolean injectSensorData(android.hardware.Sensor, float[], int, long); + } + +} + +package android.hardware.biometrics { + + public static interface BiometricManager.Authenticators { + field @RequiresPermission(android.Manifest.permission.WRITE_DEVICE_CONFIG) public static final int BIOMETRIC_CONVENIENCE = 4095; // 0xfff + field @RequiresPermission(android.Manifest.permission.WRITE_DEVICE_CONFIG) public static final int EMPTY_SET = 0; // 0x0 + } + +} + +package android.hardware.camera2 { + + public abstract class CameraDevice implements java.lang.AutoCloseable { + method @Deprecated public abstract void createCustomCaptureSession(android.hardware.camera2.params.InputConfiguration, @NonNull java.util.List<android.hardware.camera2.params.OutputConfiguration>, int, @NonNull android.hardware.camera2.CameraCaptureSession.StateCallback, @Nullable android.os.Handler) throws android.hardware.camera2.CameraAccessException; + field public static final int SESSION_OPERATION_MODE_CONSTRAINED_HIGH_SPEED = 1; // 0x1 + field public static final int SESSION_OPERATION_MODE_NORMAL = 0; // 0x0 + field public static final int SESSION_OPERATION_MODE_VENDOR_START = 32768; // 0x8000 + } + +} + +package android.hardware.camera2.params { + + public final class OutputConfiguration implements android.os.Parcelable { + ctor public OutputConfiguration(@NonNull android.view.Surface, int); + ctor public OutputConfiguration(int, @NonNull android.view.Surface, int); + method public int getRotation(); + 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 + } + +} + +package android.hardware.display { + + public final class AmbientBrightnessDayStats implements android.os.Parcelable { + method public int describeContents(); + method public float[] getBucketBoundaries(); + method public java.time.LocalDate getLocalDate(); + method public float[] getStats(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.display.AmbientBrightnessDayStats> CREATOR; + } + + public final class BrightnessChangeEvent implements android.os.Parcelable { + method public int describeContents(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.display.BrightnessChangeEvent> CREATOR; + field public final float batteryLevel; + field public final float brightness; + field public final long colorSampleDuration; + field public final int colorTemperature; + field @Nullable public final long[] colorValueBuckets; + field public final boolean isDefaultBrightnessConfig; + field public final boolean isUserSetBrightness; + field public final float lastBrightness; + field public final long[] luxTimestamps; + field public final float[] luxValues; + field public final boolean nightMode; + field public final String packageName; + field public final float powerBrightnessFactor; + field public final long timeStamp; + } + + public final class BrightnessConfiguration implements android.os.Parcelable { + method public int describeContents(); + method @Nullable public android.hardware.display.BrightnessCorrection getCorrectionByCategory(int); + method @Nullable public android.hardware.display.BrightnessCorrection getCorrectionByPackageName(@NonNull String); + method public android.util.Pair<float[],float[]> getCurve(); + method public float getShortTermModelLowerLuxMultiplier(); + method public long getShortTermModelTimeoutMillis(); + method public float getShortTermModelUpperLuxMultiplier(); + method public boolean shouldCollectColorSamples(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.display.BrightnessConfiguration> CREATOR; + field public static final long SHORT_TERM_TIMEOUT_UNSET = -1L; // 0xffffffffffffffffL + } + + public static class BrightnessConfiguration.Builder { + ctor public BrightnessConfiguration.Builder(float[], float[]); + method @NonNull public android.hardware.display.BrightnessConfiguration.Builder addCorrectionByCategory(int, @NonNull android.hardware.display.BrightnessCorrection); + method @NonNull public android.hardware.display.BrightnessConfiguration.Builder addCorrectionByPackageName(@NonNull String, @NonNull android.hardware.display.BrightnessCorrection); + method @NonNull public android.hardware.display.BrightnessConfiguration build(); + method public int getMaxCorrectionsByCategory(); + method public int getMaxCorrectionsByPackageName(); + method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setDescription(@Nullable String); + method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setShortTermModelLowerLuxMultiplier(@FloatRange(from=0.0f) float); + method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setShortTermModelTimeoutMillis(long); + method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setShortTermModelUpperLuxMultiplier(@FloatRange(from=0.0f) float); + method @NonNull public android.hardware.display.BrightnessConfiguration.Builder setShouldCollectColorSamples(boolean); + } + + public final class BrightnessCorrection implements android.os.Parcelable { + method @FloatRange(from=0.0) public float apply(@FloatRange(from=0.0) float); + method @NonNull public static android.hardware.display.BrightnessCorrection createScaleAndTranslateLog(float, float); + method public int describeContents(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.display.BrightnessCorrection> CREATOR; + } + + public final class ColorDisplayManager { + method @RequiresPermission(android.Manifest.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS) public int getNightDisplayAutoMode(); + method @RequiresPermission(android.Manifest.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS) public int getTransformCapabilities(); + method @RequiresPermission(android.Manifest.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS) public boolean setAppSaturationLevel(@NonNull String, @IntRange(from=0, to=100) int); + method @RequiresPermission(android.Manifest.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS) public boolean setNightDisplayAutoMode(int); + method @RequiresPermission(android.Manifest.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS) public boolean setNightDisplayCustomEndTime(@NonNull java.time.LocalTime); + method @RequiresPermission(android.Manifest.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS) public boolean setNightDisplayCustomStartTime(@NonNull java.time.LocalTime); + method @RequiresPermission(android.Manifest.permission.CONTROL_DISPLAY_COLOR_TRANSFORMS) public boolean setSaturationLevel(@IntRange(from=0, to=100) int); + field public static final int AUTO_MODE_CUSTOM_TIME = 1; // 0x1 + field public static final int AUTO_MODE_DISABLED = 0; // 0x0 + field public static final int AUTO_MODE_TWILIGHT = 2; // 0x2 + field public static final int CAPABILITY_HARDWARE_ACCELERATION_GLOBAL = 2; // 0x2 + field public static final int CAPABILITY_HARDWARE_ACCELERATION_PER_APP = 4; // 0x4 + field public static final int CAPABILITY_NONE = 0; // 0x0 + field public static final int CAPABILITY_PROTECTED_CONTENT = 1; // 0x1 + } + + public final class DisplayManager { + method @RequiresPermission(android.Manifest.permission.ACCESS_AMBIENT_LIGHT_STATS) public java.util.List<android.hardware.display.AmbientBrightnessDayStats> getAmbientBrightnessStats(); + method @RequiresPermission(android.Manifest.permission.CONFIGURE_DISPLAY_BRIGHTNESS) public android.hardware.display.BrightnessConfiguration getBrightnessConfiguration(); + method @RequiresPermission(android.Manifest.permission.BRIGHTNESS_SLIDER_USAGE) public java.util.List<android.hardware.display.BrightnessChangeEvent> getBrightnessEvents(); + method @Nullable @RequiresPermission(android.Manifest.permission.CONFIGURE_DISPLAY_BRIGHTNESS) public android.hardware.display.BrightnessConfiguration getDefaultBrightnessConfiguration(); + method public android.util.Pair<float[],float[]> getMinimumBrightnessCurve(); + method public android.graphics.Point getStableDisplaySize(); + method @RequiresPermission(android.Manifest.permission.CONFIGURE_DISPLAY_BRIGHTNESS) public void setBrightnessConfiguration(android.hardware.display.BrightnessConfiguration); + method @Deprecated @RequiresPermission(android.Manifest.permission.CONTROL_DISPLAY_SATURATION) public void setSaturationLevel(float); + } + +} + +package android.hardware.hdmi { + + public abstract class HdmiClient { + method public android.hardware.hdmi.HdmiDeviceInfo getActiveSource(); + method public void sendKeyEvent(int, boolean); + method public void sendVendorCommand(int, byte[], boolean); + method public void setVendorCommandListener(@NonNull android.hardware.hdmi.HdmiControlManager.VendorCommandListener); + } + + public final class HdmiControlManager { + method @RequiresPermission(android.Manifest.permission.HDMI_CEC) public void addHotplugEventListener(android.hardware.hdmi.HdmiControlManager.HotplugEventListener); + method @RequiresPermission(android.Manifest.permission.HDMI_CEC) public void addHotplugEventListener(@NonNull java.util.concurrent.Executor, @NonNull android.hardware.hdmi.HdmiControlManager.HotplugEventListener); + method @Nullable public android.hardware.hdmi.HdmiClient getClient(int); + method @NonNull public java.util.List<android.hardware.hdmi.HdmiDeviceInfo> getConnectedDevices(); + method public int getPhysicalAddress(); + method @Nullable public android.hardware.hdmi.HdmiPlaybackClient getPlaybackClient(); + method @Nullable public android.hardware.hdmi.HdmiSwitchClient getSwitchClient(); + method @Nullable public android.hardware.hdmi.HdmiTvClient getTvClient(); + method public boolean isDeviceConnected(@NonNull android.hardware.hdmi.HdmiDeviceInfo); + method public void powerOffDevice(@NonNull android.hardware.hdmi.HdmiDeviceInfo); + method @RequiresPermission(android.Manifest.permission.HDMI_CEC) public void removeHotplugEventListener(android.hardware.hdmi.HdmiControlManager.HotplugEventListener); + method public void setActiveSource(@NonNull android.hardware.hdmi.HdmiDeviceInfo); + method @RequiresPermission(android.Manifest.permission.HDMI_CEC) public void setStandbyMode(boolean); + field public static final String ACTION_OSD_MESSAGE = "android.hardware.hdmi.action.OSD_MESSAGE"; + field public static final int AVR_VOLUME_MUTED = 101; // 0x65 + field public static final int CLEAR_TIMER_STATUS_CEC_DISABLE = 162; // 0xa2 + field public static final int CLEAR_TIMER_STATUS_CHECK_RECORDER_CONNECTION = 160; // 0xa0 + field public static final int CLEAR_TIMER_STATUS_FAIL_TO_CLEAR_SELECTED_SOURCE = 161; // 0xa1 + field public static final int CLEAR_TIMER_STATUS_TIMER_CLEARED = 128; // 0x80 + field public static final int CLEAR_TIMER_STATUS_TIMER_NOT_CLEARED_NO_INFO_AVAILABLE = 2; // 0x2 + field public static final int CLEAR_TIMER_STATUS_TIMER_NOT_CLEARED_NO_MATCHING = 1; // 0x1 + field public static final int CLEAR_TIMER_STATUS_TIMER_NOT_CLEARED_RECORDING = 0; // 0x0 + field public static final int CONTROL_STATE_CHANGED_REASON_SETTING = 1; // 0x1 + field public static final int CONTROL_STATE_CHANGED_REASON_STANDBY = 3; // 0x3 + field public static final int CONTROL_STATE_CHANGED_REASON_START = 0; // 0x0 + field public static final int CONTROL_STATE_CHANGED_REASON_WAKEUP = 2; // 0x2 + field public static final int DEVICE_EVENT_ADD_DEVICE = 1; // 0x1 + field public static final int DEVICE_EVENT_REMOVE_DEVICE = 2; // 0x2 + field public static final int DEVICE_EVENT_UPDATE_DEVICE = 3; // 0x3 + field public static final String EXTRA_MESSAGE_EXTRA_PARAM1 = "android.hardware.hdmi.extra.MESSAGE_EXTRA_PARAM1"; + field public static final String EXTRA_MESSAGE_ID = "android.hardware.hdmi.extra.MESSAGE_ID"; + field public static final int ONE_TOUCH_RECORD_ALREADY_RECORDING = 18; // 0x12 + field public static final int ONE_TOUCH_RECORD_CEC_DISABLED = 51; // 0x33 + field public static final int ONE_TOUCH_RECORD_CHECK_RECORDER_CONNECTION = 49; // 0x31 + field public static final int ONE_TOUCH_RECORD_DISALLOW_TO_COPY = 13; // 0xd + field public static final int ONE_TOUCH_RECORD_DISALLOW_TO_FUTHER_COPIES = 14; // 0xe + field public static final int ONE_TOUCH_RECORD_FAIL_TO_RECORD_DISPLAYED_SCREEN = 50; // 0x32 + field public static final int ONE_TOUCH_RECORD_INVALID_EXTERNAL_PHYSICAL_ADDRESS = 10; // 0xa + field public static final int ONE_TOUCH_RECORD_INVALID_EXTERNAL_PLUG_NUMBER = 9; // 0x9 + field public static final int ONE_TOUCH_RECORD_MEDIA_PROBLEM = 21; // 0x15 + field public static final int ONE_TOUCH_RECORD_MEDIA_PROTECTED = 19; // 0x13 + field public static final int ONE_TOUCH_RECORD_NOT_ENOUGH_SPACE = 22; // 0x16 + field public static final int ONE_TOUCH_RECORD_NO_MEDIA = 16; // 0x10 + field public static final int ONE_TOUCH_RECORD_NO_OR_INSUFFICIENT_CA_ENTITLEMENTS = 12; // 0xc + field public static final int ONE_TOUCH_RECORD_NO_SOURCE_SIGNAL = 20; // 0x14 + field public static final int ONE_TOUCH_RECORD_OTHER_REASON = 31; // 0x1f + field public static final int ONE_TOUCH_RECORD_PARENT_LOCK_ON = 23; // 0x17 + field public static final int ONE_TOUCH_RECORD_PLAYING = 17; // 0x11 + field public static final int ONE_TOUCH_RECORD_PREVIOUS_RECORDING_IN_PROGRESS = 48; // 0x30 + field public static final int ONE_TOUCH_RECORD_RECORDING_ALREADY_TERMINATED = 27; // 0x1b + field public static final int ONE_TOUCH_RECORD_RECORDING_ANALOGUE_SERVICE = 3; // 0x3 + field public static final int ONE_TOUCH_RECORD_RECORDING_CURRENTLY_SELECTED_SOURCE = 1; // 0x1 + field public static final int ONE_TOUCH_RECORD_RECORDING_DIGITAL_SERVICE = 2; // 0x2 + field public static final int ONE_TOUCH_RECORD_RECORDING_EXTERNAL_INPUT = 4; // 0x4 + field public static final int ONE_TOUCH_RECORD_RECORDING_TERMINATED_NORMALLY = 26; // 0x1a + field public static final int ONE_TOUCH_RECORD_UNABLE_ANALOGUE_SERVICE = 6; // 0x6 + field public static final int ONE_TOUCH_RECORD_UNABLE_DIGITAL_SERVICE = 5; // 0x5 + field public static final int ONE_TOUCH_RECORD_UNABLE_SELECTED_SERVICE = 7; // 0x7 + field public static final int ONE_TOUCH_RECORD_UNSUPPORTED_CA = 11; // 0xb + field public static final int OSD_MESSAGE_ARC_CONNECTED_INVALID_PORT = 1; // 0x1 + field public static final int OSD_MESSAGE_AVR_VOLUME_CHANGED = 2; // 0x2 + field public static final int POWER_STATUS_ON = 0; // 0x0 + field public static final int POWER_STATUS_STANDBY = 1; // 0x1 + field public static final int POWER_STATUS_TRANSIENT_TO_ON = 2; // 0x2 + field public static final int POWER_STATUS_TRANSIENT_TO_STANDBY = 3; // 0x3 + field public static final int POWER_STATUS_UNKNOWN = -1; // 0xffffffff + field @Deprecated public static final int RESULT_ALREADY_IN_PROGRESS = 4; // 0x4 + field public static final int RESULT_COMMUNICATION_FAILED = 7; // 0x7 + field public static final int RESULT_EXCEPTION = 5; // 0x5 + field public static final int RESULT_INCORRECT_MODE = 6; // 0x6 + field public static final int RESULT_SOURCE_NOT_AVAILABLE = 2; // 0x2 + field public static final int RESULT_SUCCESS = 0; // 0x0 + field public static final int RESULT_TARGET_NOT_AVAILABLE = 3; // 0x3 + field public static final int RESULT_TIMEOUT = 1; // 0x1 + field public static final int TIMER_RECORDING_RESULT_EXTRA_CEC_DISABLED = 3; // 0x3 + field public static final int TIMER_RECORDING_RESULT_EXTRA_CHECK_RECORDER_CONNECTION = 1; // 0x1 + field public static final int TIMER_RECORDING_RESULT_EXTRA_FAIL_TO_RECORD_SELECTED_SOURCE = 2; // 0x2 + field public static final int TIMER_RECORDING_RESULT_EXTRA_NO_ERROR = 0; // 0x0 + field public static final int TIMER_RECORDING_TYPE_ANALOGUE = 2; // 0x2 + field public static final int TIMER_RECORDING_TYPE_DIGITAL = 1; // 0x1 + field public static final int TIMER_RECORDING_TYPE_EXTERNAL = 3; // 0x3 + field public static final int TIMER_STATUS_MEDIA_INFO_NOT_PRESENT = 2; // 0x2 + field public static final int TIMER_STATUS_MEDIA_INFO_PRESENT_NOT_PROTECTED = 0; // 0x0 + field public static final int TIMER_STATUS_MEDIA_INFO_PRESENT_PROTECTED = 1; // 0x1 + field public static final int TIMER_STATUS_NOT_PROGRAMMED_CA_NOT_SUPPORTED = 6; // 0x6 + field public static final int TIMER_STATUS_NOT_PROGRAMMED_CLOCK_FAILURE = 10; // 0xa + field public static final int TIMER_STATUS_NOT_PROGRAMMED_DATE_OUT_OF_RANGE = 2; // 0x2 + field public static final int TIMER_STATUS_NOT_PROGRAMMED_DUPLICATED = 14; // 0xe + field public static final int TIMER_STATUS_NOT_PROGRAMMED_INVALID_EXTERNAL_PHYSICAL_NUMBER = 5; // 0x5 + field public static final int TIMER_STATUS_NOT_PROGRAMMED_INVALID_EXTERNAL_PLUG_NUMBER = 4; // 0x4 + field public static final int TIMER_STATUS_NOT_PROGRAMMED_INVALID_SEQUENCE = 3; // 0x3 + field public static final int TIMER_STATUS_NOT_PROGRAMMED_NO_CA_ENTITLEMENTS = 7; // 0x7 + field public static final int TIMER_STATUS_NOT_PROGRAMMED_NO_FREE_TIME = 1; // 0x1 + field public static final int TIMER_STATUS_NOT_PROGRAMMED_PARENTAL_LOCK_ON = 9; // 0x9 + field public static final int TIMER_STATUS_NOT_PROGRAMMED_UNSUPPORTED_RESOLUTION = 8; // 0x8 + field public static final int TIMER_STATUS_PROGRAMMED_INFO_ENOUGH_SPACE = 8; // 0x8 + field public static final int TIMER_STATUS_PROGRAMMED_INFO_MIGHT_NOT_ENOUGH_SPACE = 11; // 0xb + field public static final int TIMER_STATUS_PROGRAMMED_INFO_NOT_ENOUGH_SPACE = 9; // 0x9 + field public static final int TIMER_STATUS_PROGRAMMED_INFO_NO_MEDIA_INFO = 10; // 0xa + } + + @IntDef({android.hardware.hdmi.HdmiControlManager.RESULT_SUCCESS, android.hardware.hdmi.HdmiControlManager.RESULT_TIMEOUT, android.hardware.hdmi.HdmiControlManager.RESULT_SOURCE_NOT_AVAILABLE, android.hardware.hdmi.HdmiControlManager.RESULT_TARGET_NOT_AVAILABLE, android.hardware.hdmi.HdmiControlManager.RESULT_ALREADY_IN_PROGRESS, android.hardware.hdmi.HdmiControlManager.RESULT_EXCEPTION, android.hardware.hdmi.HdmiControlManager.RESULT_INCORRECT_MODE, android.hardware.hdmi.HdmiControlManager.RESULT_COMMUNICATION_FAILED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS) public static @interface HdmiControlManager.ControlCallbackResult { + } + + public static interface HdmiControlManager.HotplugEventListener { + method public void onReceived(android.hardware.hdmi.HdmiHotplugEvent); + } + + public static interface HdmiControlManager.VendorCommandListener { + method public void onControlStateChanged(boolean, int); + method public void onReceived(int, int, byte[], boolean); + } + + public class HdmiDeviceInfo implements android.os.Parcelable { + ctor public HdmiDeviceInfo(); + method public int describeContents(); + method public int getAdopterId(); + method public int getDeviceId(); + method public int getDevicePowerStatus(); + method public int getDeviceType(); + method public String getDisplayName(); + method public int getId(); + method public int getLogicalAddress(); + method public int getPhysicalAddress(); + method public int getPortId(); + method public int getVendorId(); + method public static int idForCecDevice(int); + method public static int idForHardware(int); + method public static int idForMhlDevice(int); + method public boolean isCecDevice(); + method public boolean isInactivated(); + method public boolean isMhlDevice(); + method public boolean isSourceType(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int ADDR_INTERNAL = 0; // 0x0 + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.hdmi.HdmiDeviceInfo> CREATOR; + field public static final int DEVICE_AUDIO_SYSTEM = 5; // 0x5 + field public static final int DEVICE_INACTIVE = -1; // 0xffffffff + field public static final int DEVICE_PLAYBACK = 4; // 0x4 + field public static final int DEVICE_RECORDER = 1; // 0x1 + field public static final int DEVICE_RESERVED = 2; // 0x2 + field public static final int DEVICE_TUNER = 3; // 0x3 + field public static final int DEVICE_TV = 0; // 0x0 + field public static final int ID_INVALID = 65535; // 0xffff + field public static final android.hardware.hdmi.HdmiDeviceInfo INACTIVE_DEVICE; + field public static final int PATH_INTERNAL = 0; // 0x0 + field public static final int PATH_INVALID = 65535; // 0xffff + field public static final int PORT_INVALID = -1; // 0xffffffff + } + + public final class HdmiHotplugEvent implements android.os.Parcelable { + method public int describeContents(); + method public int getPort(); + method public boolean isConnected(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.hdmi.HdmiHotplugEvent> CREATOR; + } + + public final class HdmiPlaybackClient extends android.hardware.hdmi.HdmiClient { + method public int getDeviceType(); + method public void oneTouchPlay(android.hardware.hdmi.HdmiPlaybackClient.OneTouchPlayCallback); + method public void queryDisplayStatus(android.hardware.hdmi.HdmiPlaybackClient.DisplayStatusCallback); + method public void sendStandby(); + } + + public static interface HdmiPlaybackClient.DisplayStatusCallback { + method public void onComplete(int); + } + + public static interface HdmiPlaybackClient.OneTouchPlayCallback { + method public void onComplete(int); + } + + public final class HdmiPortInfo implements android.os.Parcelable { + ctor public HdmiPortInfo(int, int, int, boolean, boolean, boolean); + method public int describeContents(); + method public int getAddress(); + method public int getId(); + method public int getType(); + method public boolean isArcSupported(); + method public boolean isCecSupported(); + method public boolean isMhlSupported(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.hdmi.HdmiPortInfo> CREATOR; + field public static final int PORT_INPUT = 0; // 0x0 + field public static final int PORT_OUTPUT = 1; // 0x1 + } + + public abstract class HdmiRecordListener { + ctor public HdmiRecordListener(); + method public void onClearTimerRecordingResult(int, int); + method public void onOneTouchRecordResult(int, int); + method public abstract android.hardware.hdmi.HdmiRecordSources.RecordSource onOneTouchRecordSourceRequested(int); + method public void onTimerRecordingResult(int, android.hardware.hdmi.HdmiRecordListener.TimerStatusData); + } + + public static class HdmiRecordListener.TimerStatusData { + method public int getDurationHour(); + method public int getDurationMinute(); + method public int getExtraError(); + method public int getMediaInfo(); + method public int getNotProgammedError(); + method public int getProgrammedInfo(); + method public boolean isOverlapped(); + method public boolean isProgrammed(); + } + + public final class HdmiRecordSources { + method public static boolean checkRecordSource(byte[]); + method public static android.hardware.hdmi.HdmiRecordSources.OwnSource ofOwnSource(); + } + + public static final class HdmiRecordSources.AnalogueServiceSource extends android.hardware.hdmi.HdmiRecordSources.RecordSource { + } + + public static final class HdmiRecordSources.DigitalServiceSource extends android.hardware.hdmi.HdmiRecordSources.RecordSource { + } + + public static final class HdmiRecordSources.ExternalPhysicalAddress extends android.hardware.hdmi.HdmiRecordSources.RecordSource { + } + + public static final class HdmiRecordSources.ExternalPlugData extends android.hardware.hdmi.HdmiRecordSources.RecordSource { + } + + public static final class HdmiRecordSources.OwnSource extends android.hardware.hdmi.HdmiRecordSources.RecordSource { + } + + public abstract static class HdmiRecordSources.RecordSource { + } + + public class HdmiSwitchClient extends android.hardware.hdmi.HdmiClient { + method public int getDeviceType(); + method @NonNull public java.util.List<android.hardware.hdmi.HdmiPortInfo> getPortInfo(); + method public void selectPort(int, @NonNull android.hardware.hdmi.HdmiSwitchClient.OnSelectListener); + method public void selectPort(int, @NonNull java.util.concurrent.Executor, @NonNull android.hardware.hdmi.HdmiSwitchClient.OnSelectListener); + } + + public static interface HdmiSwitchClient.OnSelectListener { + method public void onSelect(@android.hardware.hdmi.HdmiControlManager.ControlCallbackResult int); + } + + public class HdmiTimerRecordSources { + method public static boolean checkTimerRecordSource(int, byte[]); + method public static android.hardware.hdmi.HdmiTimerRecordSources.Duration durationOf(int, int); + method public static android.hardware.hdmi.HdmiTimerRecordSources.TimerRecordSource ofAnalogueSource(android.hardware.hdmi.HdmiTimerRecordSources.TimerInfo, android.hardware.hdmi.HdmiRecordSources.AnalogueServiceSource); + method public static android.hardware.hdmi.HdmiTimerRecordSources.TimerRecordSource ofDigitalSource(android.hardware.hdmi.HdmiTimerRecordSources.TimerInfo, android.hardware.hdmi.HdmiRecordSources.DigitalServiceSource); + method public static android.hardware.hdmi.HdmiTimerRecordSources.TimerRecordSource ofExternalPhysicalAddress(android.hardware.hdmi.HdmiTimerRecordSources.TimerInfo, android.hardware.hdmi.HdmiRecordSources.ExternalPhysicalAddress); + method public static android.hardware.hdmi.HdmiTimerRecordSources.TimerRecordSource ofExternalPlug(android.hardware.hdmi.HdmiTimerRecordSources.TimerInfo, android.hardware.hdmi.HdmiRecordSources.ExternalPlugData); + method public static android.hardware.hdmi.HdmiTimerRecordSources.Time timeOf(int, int); + method public static android.hardware.hdmi.HdmiTimerRecordSources.TimerInfo timerInfoOf(int, int, android.hardware.hdmi.HdmiTimerRecordSources.Time, android.hardware.hdmi.HdmiTimerRecordSources.Duration, int); + field public static final int RECORDING_SEQUENCE_REPEAT_FRIDAY = 32; // 0x20 + field public static final int RECORDING_SEQUENCE_REPEAT_MONDAY = 2; // 0x2 + field public static final int RECORDING_SEQUENCE_REPEAT_ONCE_ONLY = 0; // 0x0 + field public static final int RECORDING_SEQUENCE_REPEAT_SATUREDAY = 64; // 0x40 + field public static final int RECORDING_SEQUENCE_REPEAT_SUNDAY = 1; // 0x1 + field public static final int RECORDING_SEQUENCE_REPEAT_THURSDAY = 16; // 0x10 + field public static final int RECORDING_SEQUENCE_REPEAT_TUESDAY = 4; // 0x4 + field public static final int RECORDING_SEQUENCE_REPEAT_WEDNESDAY = 8; // 0x8 + } + + public static final class HdmiTimerRecordSources.Duration { + } + + public static final class HdmiTimerRecordSources.Time { + } + + public static final class HdmiTimerRecordSources.TimerInfo { + } + + public static final class HdmiTimerRecordSources.TimerRecordSource { + } + + public final class HdmiTvClient extends android.hardware.hdmi.HdmiClient { + method public void clearTimerRecording(int, int, android.hardware.hdmi.HdmiTimerRecordSources.TimerRecordSource); + method public void deviceSelect(int, @NonNull android.hardware.hdmi.HdmiTvClient.SelectCallback); + method public java.util.List<android.hardware.hdmi.HdmiDeviceInfo> getDeviceList(); + method public int getDeviceType(); + method public void portSelect(int, @NonNull android.hardware.hdmi.HdmiTvClient.SelectCallback); + method public void sendMhlVendorCommand(int, int, int, byte[]); + method public void sendStandby(int); + method public void setHdmiMhlVendorCommandListener(android.hardware.hdmi.HdmiTvClient.HdmiMhlVendorCommandListener); + method public void setInputChangeListener(android.hardware.hdmi.HdmiTvClient.InputChangeListener); + method public void setRecordListener(@NonNull android.hardware.hdmi.HdmiRecordListener); + method public void setSystemAudioMode(boolean, android.hardware.hdmi.HdmiTvClient.SelectCallback); + method public void setSystemAudioMute(boolean); + method public void setSystemAudioVolume(int, int, int); + method public void startOneTouchRecord(int, @NonNull android.hardware.hdmi.HdmiRecordSources.RecordSource); + method public void startTimerRecording(int, int, android.hardware.hdmi.HdmiTimerRecordSources.TimerRecordSource); + method public void stopOneTouchRecord(int); + field public static final int VENDOR_DATA_SIZE = 16; // 0x10 + } + + public static interface HdmiTvClient.HdmiMhlVendorCommandListener { + method public void onReceived(int, int, int, byte[]); + } + + public static interface HdmiTvClient.InputChangeListener { + method public void onChanged(android.hardware.hdmi.HdmiDeviceInfo); + } + + public static interface HdmiTvClient.SelectCallback { + method public void onComplete(int); + } + +} + +package android.hardware.lights { + + public final class Light implements android.os.Parcelable { + method public int describeContents(); + method public int getId(); + method public int getOrdinal(); + method public int getType(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.lights.Light> CREATOR; + } + + public final class LightState implements android.os.Parcelable { + ctor public LightState(@ColorInt int); + method public int describeContents(); + method @ColorInt public int getColor(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.lights.LightState> CREATOR; + } + + public final class LightsManager { + method @NonNull @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public java.util.List<android.hardware.lights.Light> getLights(); + method @NonNull @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public android.hardware.lights.LightsManager.LightsSession openSession(); + field public static final int LIGHT_TYPE_MICROPHONE = 8; // 0x8 + } + + public final class LightsManager.LightsSession implements java.lang.AutoCloseable { + method @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public void close(); + method @RequiresPermission(android.Manifest.permission.CONTROL_DEVICE_LIGHTS) public void requestLights(@NonNull android.hardware.lights.LightsRequest); + } + + public final class LightsRequest { + } + + public static final class LightsRequest.Builder { + ctor public LightsRequest.Builder(); + method @NonNull public android.hardware.lights.LightsRequest build(); + method @NonNull public android.hardware.lights.LightsRequest.Builder clearLight(@NonNull android.hardware.lights.Light); + method @NonNull public android.hardware.lights.LightsRequest.Builder setLight(@NonNull android.hardware.lights.Light, @NonNull android.hardware.lights.LightState); + } + +} + +package android.hardware.location { + + public class ContextHubClient implements java.io.Closeable { + method public void close(); + method @NonNull public android.hardware.location.ContextHubInfo getAttachedHub(); + method @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public int sendMessageToNanoApp(@NonNull android.hardware.location.NanoAppMessage); + } + + public class ContextHubClientCallback { + ctor public ContextHubClientCallback(); + method public void onHubReset(android.hardware.location.ContextHubClient); + method public void onMessageFromNanoApp(android.hardware.location.ContextHubClient, android.hardware.location.NanoAppMessage); + method public void onNanoAppAborted(android.hardware.location.ContextHubClient, long, int); + method public void onNanoAppDisabled(android.hardware.location.ContextHubClient, long); + method public void onNanoAppEnabled(android.hardware.location.ContextHubClient, long); + method public void onNanoAppLoaded(android.hardware.location.ContextHubClient, long); + method public void onNanoAppUnloaded(android.hardware.location.ContextHubClient, long); + } + + public class ContextHubInfo implements android.os.Parcelable { + ctor public ContextHubInfo(); + method public int describeContents(); + method public byte getChreApiMajorVersion(); + method public byte getChreApiMinorVersion(); + method public short getChrePatchVersion(); + method public long getChrePlatformId(); + method public int getId(); + method public int getMaxPacketLengthBytes(); + method public android.hardware.location.MemoryRegion[] getMemoryRegions(); + method public String getName(); + method public float getPeakMips(); + method public float getPeakPowerDrawMw(); + method public int getPlatformVersion(); + method public float getSleepPowerDrawMw(); + method public int getStaticSwVersion(); + method public float getStoppedPowerDrawMw(); + method public int[] getSupportedSensors(); + method public String getToolchain(); + method public int getToolchainVersion(); + method public String getVendor(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.location.ContextHubInfo> CREATOR; + } + + public class ContextHubIntentEvent { + method @NonNull public static android.hardware.location.ContextHubIntentEvent fromIntent(@NonNull android.content.Intent); + method @NonNull public android.hardware.location.ContextHubInfo getContextHubInfo(); + method public int getEventType(); + method public int getNanoAppAbortCode(); + method public long getNanoAppId(); + method @NonNull public android.hardware.location.NanoAppMessage getNanoAppMessage(); + } + + public final class ContextHubManager { + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public android.hardware.location.ContextHubClient createClient(@NonNull android.hardware.location.ContextHubInfo, @NonNull android.hardware.location.ContextHubClientCallback, @NonNull java.util.concurrent.Executor); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public android.hardware.location.ContextHubClient createClient(@NonNull android.hardware.location.ContextHubInfo, @NonNull android.hardware.location.ContextHubClientCallback); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public android.hardware.location.ContextHubClient createClient(@NonNull android.hardware.location.ContextHubInfo, @NonNull android.app.PendingIntent, long); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public android.hardware.location.ContextHubTransaction<java.lang.Void> disableNanoApp(@NonNull android.hardware.location.ContextHubInfo, long); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public android.hardware.location.ContextHubTransaction<java.lang.Void> enableNanoApp(@NonNull android.hardware.location.ContextHubInfo, long); + method @Deprecated @NonNull @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public int[] findNanoAppOnHub(int, @NonNull android.hardware.location.NanoAppFilter); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public int[] getContextHubHandles(); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public android.hardware.location.ContextHubInfo getContextHubInfo(int); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public java.util.List<android.hardware.location.ContextHubInfo> getContextHubs(); + method @Deprecated @Nullable @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public android.hardware.location.NanoAppInstanceInfo getNanoAppInstanceInfo(int); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public int loadNanoApp(int, @NonNull android.hardware.location.NanoApp); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public android.hardware.location.ContextHubTransaction<java.lang.Void> loadNanoApp(@NonNull android.hardware.location.ContextHubInfo, @NonNull android.hardware.location.NanoAppBinary); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public android.hardware.location.ContextHubTransaction<java.util.List<android.hardware.location.NanoAppState>> queryNanoApps(@NonNull android.hardware.location.ContextHubInfo); + method @Deprecated public int registerCallback(@NonNull android.hardware.location.ContextHubManager.Callback); + method @Deprecated public int registerCallback(android.hardware.location.ContextHubManager.Callback, android.os.Handler); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public int sendMessage(int, int, @NonNull android.hardware.location.ContextHubMessage); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public int unloadNanoApp(int); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_CONTEXT_HUB}) public android.hardware.location.ContextHubTransaction<java.lang.Void> unloadNanoApp(@NonNull android.hardware.location.ContextHubInfo, long); + method @Deprecated public int unregisterCallback(@NonNull android.hardware.location.ContextHubManager.Callback); + field public static final int EVENT_HUB_RESET = 6; // 0x6 + field public static final int EVENT_NANOAPP_ABORTED = 4; // 0x4 + field public static final int EVENT_NANOAPP_DISABLED = 3; // 0x3 + field public static final int EVENT_NANOAPP_ENABLED = 2; // 0x2 + field public static final int EVENT_NANOAPP_LOADED = 0; // 0x0 + field public static final int EVENT_NANOAPP_MESSAGE = 5; // 0x5 + field public static final int EVENT_NANOAPP_UNLOADED = 1; // 0x1 + field public static final String EXTRA_CONTEXT_HUB_INFO = "android.hardware.location.extra.CONTEXT_HUB_INFO"; + field public static final String EXTRA_EVENT_TYPE = "android.hardware.location.extra.EVENT_TYPE"; + field public static final String EXTRA_MESSAGE = "android.hardware.location.extra.MESSAGE"; + field public static final String EXTRA_NANOAPP_ABORT_CODE = "android.hardware.location.extra.NANOAPP_ABORT_CODE"; + field public static final String EXTRA_NANOAPP_ID = "android.hardware.location.extra.NANOAPP_ID"; + } + + @Deprecated public abstract static class ContextHubManager.Callback { + ctor @Deprecated protected ContextHubManager.Callback(); + method @Deprecated public abstract void onMessageReceipt(int, int, @NonNull android.hardware.location.ContextHubMessage); + } + + @Deprecated public class ContextHubMessage implements android.os.Parcelable { + ctor @Deprecated public ContextHubMessage(int, int, byte[]); + method @Deprecated public int describeContents(); + method @Deprecated public byte[] getData(); + method @Deprecated public int getMsgType(); + method @Deprecated public int getVersion(); + method @Deprecated public void setMsgData(byte[]); + method @Deprecated public void setMsgType(int); + method @Deprecated public void setVersion(int); + method @Deprecated public void writeToParcel(android.os.Parcel, int); + field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.hardware.location.ContextHubMessage> CREATOR; + } + + public class ContextHubTransaction<T> { + method public int getType(); + method public void setOnCompleteListener(@NonNull android.hardware.location.ContextHubTransaction.OnCompleteListener<T>, @NonNull java.util.concurrent.Executor); + method public void setOnCompleteListener(@NonNull android.hardware.location.ContextHubTransaction.OnCompleteListener<T>); + method public static String typeToString(int, boolean); + method public android.hardware.location.ContextHubTransaction.Response<T> waitForResponse(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException; + field public static final int RESULT_FAILED_AT_HUB = 5; // 0x5 + field public static final int RESULT_FAILED_BAD_PARAMS = 2; // 0x2 + field public static final int RESULT_FAILED_BUSY = 4; // 0x4 + field public static final int RESULT_FAILED_HAL_UNAVAILABLE = 8; // 0x8 + field public static final int RESULT_FAILED_SERVICE_INTERNAL_FAILURE = 7; // 0x7 + field public static final int RESULT_FAILED_TIMEOUT = 6; // 0x6 + field public static final int RESULT_FAILED_UNINITIALIZED = 3; // 0x3 + field public static final int RESULT_FAILED_UNKNOWN = 1; // 0x1 + field public static final int RESULT_SUCCESS = 0; // 0x0 + field public static final int TYPE_DISABLE_NANOAPP = 3; // 0x3 + field public static final int TYPE_ENABLE_NANOAPP = 2; // 0x2 + field public static final int TYPE_LOAD_NANOAPP = 0; // 0x0 + field public static final int TYPE_QUERY_NANOAPPS = 4; // 0x4 + field public static final int TYPE_UNLOAD_NANOAPP = 1; // 0x1 + } + + @java.lang.FunctionalInterface public static interface ContextHubTransaction.OnCompleteListener<L> { + method public void onComplete(android.hardware.location.ContextHubTransaction<L>, android.hardware.location.ContextHubTransaction.Response<L>); + } + + public static class ContextHubTransaction.Response<R> { + method public R getContents(); + method public int getResult(); + } + + public final class GeofenceHardware { + method public boolean addGeofence(int, int, android.hardware.location.GeofenceHardwareRequest, android.hardware.location.GeofenceHardwareCallback); + method public int[] getMonitoringTypes(); + method public int getStatusOfMonitoringType(int); + method public boolean pauseGeofence(int, int); + method public boolean registerForMonitorStateChangeCallback(int, android.hardware.location.GeofenceHardwareMonitorCallback); + method public boolean removeGeofence(int, int); + method public boolean resumeGeofence(int, int, int); + method public boolean unregisterForMonitorStateChangeCallback(int, android.hardware.location.GeofenceHardwareMonitorCallback); + field public static final int GEOFENCE_ENTERED = 1; // 0x1 + field public static final int GEOFENCE_ERROR_ID_EXISTS = 2; // 0x2 + field public static final int GEOFENCE_ERROR_ID_UNKNOWN = 3; // 0x3 + field public static final int GEOFENCE_ERROR_INSUFFICIENT_MEMORY = 6; // 0x6 + field public static final int GEOFENCE_ERROR_INVALID_TRANSITION = 4; // 0x4 + field public static final int GEOFENCE_ERROR_TOO_MANY_GEOFENCES = 1; // 0x1 + field public static final int GEOFENCE_EXITED = 2; // 0x2 + field public static final int GEOFENCE_FAILURE = 5; // 0x5 + field public static final int GEOFENCE_SUCCESS = 0; // 0x0 + field public static final int GEOFENCE_UNCERTAIN = 4; // 0x4 + field public static final int MONITORING_TYPE_FUSED_HARDWARE = 1; // 0x1 + field public static final int MONITORING_TYPE_GPS_HARDWARE = 0; // 0x0 + field public static final int MONITOR_CURRENTLY_AVAILABLE = 0; // 0x0 + field public static final int MONITOR_CURRENTLY_UNAVAILABLE = 1; // 0x1 + field public static final int MONITOR_UNSUPPORTED = 2; // 0x2 + field public static final int SOURCE_TECHNOLOGY_BLUETOOTH = 16; // 0x10 + field public static final int SOURCE_TECHNOLOGY_CELL = 8; // 0x8 + field public static final int SOURCE_TECHNOLOGY_GNSS = 1; // 0x1 + field public static final int SOURCE_TECHNOLOGY_SENSORS = 4; // 0x4 + field public static final int SOURCE_TECHNOLOGY_WIFI = 2; // 0x2 + } + + public abstract class GeofenceHardwareCallback { + ctor public GeofenceHardwareCallback(); + method public void onGeofenceAdd(int, int); + method public void onGeofencePause(int, int); + method public void onGeofenceRemove(int, int); + method public void onGeofenceResume(int, int); + method public void onGeofenceTransition(int, int, android.location.Location, long, int); + } + + public abstract class GeofenceHardwareMonitorCallback { + ctor public GeofenceHardwareMonitorCallback(); + method @Deprecated public void onMonitoringSystemChange(int, boolean, android.location.Location); + method public void onMonitoringSystemChange(android.hardware.location.GeofenceHardwareMonitorEvent); + } + + public class GeofenceHardwareMonitorEvent implements android.os.Parcelable { + ctor public GeofenceHardwareMonitorEvent(int, int, int, android.location.Location); + method public int describeContents(); + method public android.location.Location getLocation(); + method public int getMonitoringStatus(); + method public int getMonitoringType(); + method public int getSourceTechnologies(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.location.GeofenceHardwareMonitorEvent> CREATOR; + } + + public final class GeofenceHardwareRequest { + ctor public GeofenceHardwareRequest(); + method public static android.hardware.location.GeofenceHardwareRequest createCircularGeofence(double, double, double); + method public int getLastTransition(); + method public double getLatitude(); + method public double getLongitude(); + method public int getMonitorTransitions(); + method public int getNotificationResponsiveness(); + method public double getRadius(); + method public int getSourceTechnologies(); + method public int getUnknownTimer(); + method public void setLastTransition(int); + method public void setMonitorTransitions(int); + method public void setNotificationResponsiveness(int); + method public void setSourceTechnologies(int); + method public void setUnknownTimer(int); + } + + public class MemoryRegion implements android.os.Parcelable { + ctor public MemoryRegion(android.os.Parcel); + method public int describeContents(); + method public int getCapacityBytes(); + method public int getFreeCapacityBytes(); + method public boolean isExecutable(); + method public boolean isReadable(); + method public boolean isWritable(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.location.MemoryRegion> CREATOR; + } + + @Deprecated public class NanoApp implements android.os.Parcelable { + ctor @Deprecated public NanoApp(); + ctor @Deprecated public NanoApp(int, byte[]); + ctor @Deprecated public NanoApp(long, byte[]); + method @Deprecated public int describeContents(); + method @Deprecated public byte[] getAppBinary(); + method @Deprecated public long getAppId(); + method @Deprecated public int getAppVersion(); + method @Deprecated public String getName(); + method @Deprecated public int getNeededExecMemBytes(); + method @Deprecated public int getNeededReadMemBytes(); + method @Deprecated public int[] getNeededSensors(); + method @Deprecated public int getNeededWriteMemBytes(); + method @Deprecated public int[] getOutputEvents(); + method @Deprecated public String getPublisher(); + method @Deprecated public void setAppBinary(byte[]); + method @Deprecated public void setAppId(long); + method @Deprecated public void setAppVersion(int); + method @Deprecated public void setName(String); + method @Deprecated public void setNeededExecMemBytes(int); + method @Deprecated public void setNeededReadMemBytes(int); + method @Deprecated public void setNeededSensors(int[]); + method @Deprecated public void setNeededWriteMemBytes(int); + method @Deprecated public void setOutputEvents(int[]); + method @Deprecated public void setPublisher(String); + method @Deprecated public void writeToParcel(android.os.Parcel, int); + field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.hardware.location.NanoApp> CREATOR; + } + + public final class NanoAppBinary implements android.os.Parcelable { + ctor public NanoAppBinary(byte[]); + method public int describeContents(); + method public byte[] getBinary(); + method public byte[] getBinaryNoHeader(); + method public int getFlags(); + method public int getHeaderVersion(); + method public long getHwHubType(); + method public long getNanoAppId(); + method public int getNanoAppVersion(); + method public byte getTargetChreApiMajorVersion(); + method public byte getTargetChreApiMinorVersion(); + method public boolean hasValidHeader(); + method public boolean isEncrypted(); + method public boolean isSigned(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.location.NanoAppBinary> CREATOR; + } + + @Deprecated public class NanoAppFilter implements android.os.Parcelable { + ctor @Deprecated public NanoAppFilter(long, int, int, long); + method @Deprecated public int describeContents(); + method @Deprecated public boolean testMatch(android.hardware.location.NanoAppInstanceInfo); + method @Deprecated public void writeToParcel(android.os.Parcel, int); + field @Deprecated public static final int APP_ANY = -1; // 0xffffffff + field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.hardware.location.NanoAppFilter> CREATOR; + field @Deprecated public static final int FLAGS_VERSION_ANY = -1; // 0xffffffff + field @Deprecated public static final int FLAGS_VERSION_GREAT_THAN = 2; // 0x2 + field @Deprecated public static final int FLAGS_VERSION_LESS_THAN = 4; // 0x4 + field @Deprecated public static final int FLAGS_VERSION_STRICTLY_EQUAL = 8; // 0x8 + field @Deprecated public static final int HUB_ANY = -1; // 0xffffffff + field @Deprecated public static final int VENDOR_ANY = -1; // 0xffffffff + } + + @Deprecated public class NanoAppInstanceInfo implements android.os.Parcelable { + ctor @Deprecated public NanoAppInstanceInfo(); + method @Deprecated public int describeContents(); + method @Deprecated public long getAppId(); + method @Deprecated public int getAppVersion(); + method @Deprecated public int getContexthubId(); + method @Deprecated public int getHandle(); + method @Deprecated public String getName(); + method @Deprecated public int getNeededExecMemBytes(); + method @Deprecated public int getNeededReadMemBytes(); + method @Deprecated @NonNull public int[] getNeededSensors(); + method @Deprecated public int getNeededWriteMemBytes(); + method @Deprecated @NonNull public int[] getOutputEvents(); + method @Deprecated public String getPublisher(); + method @Deprecated public void writeToParcel(android.os.Parcel, int); + field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.hardware.location.NanoAppInstanceInfo> CREATOR; + } + + public final class NanoAppMessage implements android.os.Parcelable { + method public static android.hardware.location.NanoAppMessage createMessageFromNanoApp(long, int, byte[], boolean); + method public static android.hardware.location.NanoAppMessage createMessageToNanoApp(long, int, byte[]); + method public int describeContents(); + method public byte[] getMessageBody(); + method public int getMessageType(); + method public long getNanoAppId(); + method public boolean isBroadcastMessage(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.location.NanoAppMessage> CREATOR; + } + + public final class NanoAppState implements android.os.Parcelable { + ctor public NanoAppState(long, int, boolean); + method public int describeContents(); + method public long getNanoAppId(); + method public long getNanoAppVersion(); + method public boolean isEnabled(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.location.NanoAppState> CREATOR; + } + +} + +package android.hardware.radio { + + public final class Announcement implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public android.hardware.radio.ProgramSelector getSelector(); + method public int getType(); + method @NonNull public java.util.Map<java.lang.String,java.lang.String> getVendorInfo(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.Announcement> CREATOR; + field public static final int TYPE_EMERGENCY = 1; // 0x1 + field public static final int TYPE_EVENT = 6; // 0x6 + field public static final int TYPE_MISC = 8; // 0x8 + field public static final int TYPE_NEWS = 5; // 0x5 + field public static final int TYPE_SPORT = 7; // 0x7 + field public static final int TYPE_TRAFFIC = 3; // 0x3 + field public static final int TYPE_WARNING = 2; // 0x2 + field public static final int TYPE_WEATHER = 4; // 0x4 + } + + public static interface Announcement.OnListUpdatedListener { + method public void onListUpdated(java.util.Collection<android.hardware.radio.Announcement>); + } + + public final class ProgramList implements java.lang.AutoCloseable { + method public void addOnCompleteListener(@NonNull java.util.concurrent.Executor, @NonNull android.hardware.radio.ProgramList.OnCompleteListener); + method public void addOnCompleteListener(@NonNull android.hardware.radio.ProgramList.OnCompleteListener); + method public void close(); + method @Nullable public android.hardware.radio.RadioManager.ProgramInfo get(@NonNull android.hardware.radio.ProgramSelector.Identifier); + method public void registerListCallback(@NonNull java.util.concurrent.Executor, @NonNull android.hardware.radio.ProgramList.ListCallback); + method public void registerListCallback(@NonNull android.hardware.radio.ProgramList.ListCallback); + method public void removeOnCompleteListener(@NonNull android.hardware.radio.ProgramList.OnCompleteListener); + method @NonNull public java.util.List<android.hardware.radio.RadioManager.ProgramInfo> toList(); + method public void unregisterListCallback(@NonNull android.hardware.radio.ProgramList.ListCallback); + } + + public static final class ProgramList.Filter implements android.os.Parcelable { + ctor public ProgramList.Filter(@NonNull java.util.Set<java.lang.Integer>, @NonNull java.util.Set<android.hardware.radio.ProgramSelector.Identifier>, boolean, boolean); + method public boolean areCategoriesIncluded(); + method public boolean areModificationsExcluded(); + method public int describeContents(); + method @NonNull public java.util.Set<java.lang.Integer> getIdentifierTypes(); + method @NonNull public java.util.Set<android.hardware.radio.ProgramSelector.Identifier> getIdentifiers(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.ProgramList.Filter> CREATOR; + } + + public abstract static class ProgramList.ListCallback { + ctor public ProgramList.ListCallback(); + method public void onItemChanged(@NonNull android.hardware.radio.ProgramSelector.Identifier); + method public void onItemRemoved(@NonNull android.hardware.radio.ProgramSelector.Identifier); + } + + public static interface ProgramList.OnCompleteListener { + method public void onComplete(); + } + + public final class ProgramSelector implements android.os.Parcelable { + ctor public ProgramSelector(@android.hardware.radio.ProgramSelector.ProgramType int, @NonNull android.hardware.radio.ProgramSelector.Identifier, @Nullable android.hardware.radio.ProgramSelector.Identifier[], @Nullable long[]); + method @NonNull public static android.hardware.radio.ProgramSelector createAmFmSelector(@android.hardware.radio.RadioManager.Band int, int); + method @NonNull public static android.hardware.radio.ProgramSelector createAmFmSelector(@android.hardware.radio.RadioManager.Band int, int, int); + method public int describeContents(); + method @NonNull public android.hardware.radio.ProgramSelector.Identifier[] getAllIds(@android.hardware.radio.ProgramSelector.IdentifierType int); + method public long getFirstId(@android.hardware.radio.ProgramSelector.IdentifierType int); + method @NonNull public android.hardware.radio.ProgramSelector.Identifier getPrimaryId(); + method @Deprecated @android.hardware.radio.ProgramSelector.ProgramType public int getProgramType(); + method @NonNull public android.hardware.radio.ProgramSelector.Identifier[] getSecondaryIds(); + method @Deprecated @NonNull public long[] getVendorIds(); + method @NonNull public android.hardware.radio.ProgramSelector withSecondaryPreferred(@NonNull android.hardware.radio.ProgramSelector.Identifier); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.ProgramSelector> CREATOR; + field public static final int IDENTIFIER_TYPE_AMFM_FREQUENCY = 1; // 0x1 + field public static final int IDENTIFIER_TYPE_DAB_ENSEMBLE = 6; // 0x6 + field public static final int IDENTIFIER_TYPE_DAB_FREQUENCY = 8; // 0x8 + field public static final int IDENTIFIER_TYPE_DAB_SCID = 7; // 0x7 + field public static final int IDENTIFIER_TYPE_DAB_SIDECC = 5; // 0x5 + field public static final int IDENTIFIER_TYPE_DAB_SID_EXT = 5; // 0x5 + field public static final int IDENTIFIER_TYPE_DRMO_FREQUENCY = 10; // 0xa + field @Deprecated public static final int IDENTIFIER_TYPE_DRMO_MODULATION = 11; // 0xb + field public static final int IDENTIFIER_TYPE_DRMO_SERVICE_ID = 9; // 0x9 + field public static final int IDENTIFIER_TYPE_HD_STATION_ID_EXT = 3; // 0x3 + field public static final int IDENTIFIER_TYPE_HD_STATION_NAME = 10004; // 0x2714 + field @Deprecated public static final int IDENTIFIER_TYPE_HD_SUBCHANNEL = 4; // 0x4 + field public static final int IDENTIFIER_TYPE_INVALID = 0; // 0x0 + field public static final int IDENTIFIER_TYPE_RDS_PI = 2; // 0x2 + field public static final int IDENTIFIER_TYPE_SXM_CHANNEL = 13; // 0xd + field public static final int IDENTIFIER_TYPE_SXM_SERVICE_ID = 12; // 0xc + field public static final int IDENTIFIER_TYPE_VENDOR_END = 1999; // 0x7cf + field @Deprecated public static final int IDENTIFIER_TYPE_VENDOR_PRIMARY_END = 1999; // 0x7cf + field @Deprecated public static final int IDENTIFIER_TYPE_VENDOR_PRIMARY_START = 1000; // 0x3e8 + field public static final int IDENTIFIER_TYPE_VENDOR_START = 1000; // 0x3e8 + field @Deprecated public static final int PROGRAM_TYPE_AM = 1; // 0x1 + field @Deprecated public static final int PROGRAM_TYPE_AM_HD = 3; // 0x3 + field @Deprecated public static final int PROGRAM_TYPE_DAB = 5; // 0x5 + field @Deprecated public static final int PROGRAM_TYPE_DRMO = 6; // 0x6 + field @Deprecated public static final int PROGRAM_TYPE_FM = 2; // 0x2 + field @Deprecated public static final int PROGRAM_TYPE_FM_HD = 4; // 0x4 + field @Deprecated public static final int PROGRAM_TYPE_INVALID = 0; // 0x0 + field @Deprecated public static final int PROGRAM_TYPE_SXM = 7; // 0x7 + field @Deprecated public static final int PROGRAM_TYPE_VENDOR_END = 1999; // 0x7cf + field @Deprecated public static final int PROGRAM_TYPE_VENDOR_START = 1000; // 0x3e8 + } + + public static final class ProgramSelector.Identifier implements android.os.Parcelable { + ctor public ProgramSelector.Identifier(@android.hardware.radio.ProgramSelector.IdentifierType int, long); + method public int describeContents(); + method @android.hardware.radio.ProgramSelector.IdentifierType public int getType(); + method public long getValue(); + method public boolean isCategoryType(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.ProgramSelector.Identifier> CREATOR; + } + + @IntDef(prefix={"IDENTIFIER_TYPE_"}, value={android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_INVALID, android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_AMFM_FREQUENCY, android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_RDS_PI, android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_HD_STATION_ID_EXT, android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_HD_SUBCHANNEL, android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_HD_STATION_NAME, android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_DAB_SID_EXT, android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_DAB_SIDECC, android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_DAB_ENSEMBLE, android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_DAB_SCID, android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_DAB_FREQUENCY, android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_DRMO_SERVICE_ID, android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_DRMO_FREQUENCY, android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_DRMO_MODULATION, android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_SXM_SERVICE_ID, android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_SXM_CHANNEL}) @IntRange(from=android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_VENDOR_START, to=android.hardware.radio.ProgramSelector.IDENTIFIER_TYPE_VENDOR_END) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface ProgramSelector.IdentifierType { + } + + @Deprecated @IntDef(prefix={"PROGRAM_TYPE_"}, value={android.hardware.radio.ProgramSelector.PROGRAM_TYPE_INVALID, android.hardware.radio.ProgramSelector.PROGRAM_TYPE_AM, android.hardware.radio.ProgramSelector.PROGRAM_TYPE_FM, android.hardware.radio.ProgramSelector.PROGRAM_TYPE_AM_HD, android.hardware.radio.ProgramSelector.PROGRAM_TYPE_FM_HD, android.hardware.radio.ProgramSelector.PROGRAM_TYPE_DAB, android.hardware.radio.ProgramSelector.PROGRAM_TYPE_DRMO, android.hardware.radio.ProgramSelector.PROGRAM_TYPE_SXM}) @IntRange(from=android.hardware.radio.ProgramSelector.PROGRAM_TYPE_VENDOR_START, to=android.hardware.radio.ProgramSelector.PROGRAM_TYPE_VENDOR_END) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface ProgramSelector.ProgramType { + } + + public class RadioManager { + method @RequiresPermission(android.Manifest.permission.ACCESS_BROADCAST_RADIO) public void addAnnouncementListener(@NonNull java.util.Set<java.lang.Integer>, @NonNull android.hardware.radio.Announcement.OnListUpdatedListener); + method @RequiresPermission(android.Manifest.permission.ACCESS_BROADCAST_RADIO) public void addAnnouncementListener(@NonNull java.util.concurrent.Executor, @NonNull java.util.Set<java.lang.Integer>, @NonNull android.hardware.radio.Announcement.OnListUpdatedListener); + method @RequiresPermission(android.Manifest.permission.ACCESS_BROADCAST_RADIO) public int listModules(java.util.List<android.hardware.radio.RadioManager.ModuleProperties>); + method @RequiresPermission(android.Manifest.permission.ACCESS_BROADCAST_RADIO) public android.hardware.radio.RadioTuner openTuner(int, android.hardware.radio.RadioManager.BandConfig, boolean, android.hardware.radio.RadioTuner.Callback, android.os.Handler); + method @RequiresPermission(android.Manifest.permission.ACCESS_BROADCAST_RADIO) public void removeAnnouncementListener(@NonNull android.hardware.radio.Announcement.OnListUpdatedListener); + field public static final int BAND_AM = 0; // 0x0 + field public static final int BAND_AM_HD = 3; // 0x3 + field public static final int BAND_FM = 1; // 0x1 + field public static final int BAND_FM_HD = 2; // 0x2 + field public static final int BAND_INVALID = -1; // 0xffffffff + field public static final int CLASS_AM_FM = 0; // 0x0 + field public static final int CLASS_DT = 2; // 0x2 + field public static final int CLASS_SAT = 1; // 0x1 + field public static final int CONFIG_DAB_DAB_LINKING = 6; // 0x6 + field public static final int CONFIG_DAB_DAB_SOFT_LINKING = 8; // 0x8 + field public static final int CONFIG_DAB_FM_LINKING = 7; // 0x7 + field public static final int CONFIG_DAB_FM_SOFT_LINKING = 9; // 0x9 + field public static final int CONFIG_FORCE_ANALOG = 2; // 0x2 + field public static final int CONFIG_FORCE_DIGITAL = 3; // 0x3 + field public static final int CONFIG_FORCE_MONO = 1; // 0x1 + field public static final int CONFIG_RDS_AF = 4; // 0x4 + field public static final int CONFIG_RDS_REG = 5; // 0x5 + field public static final int REGION_ITU_1 = 0; // 0x0 + field public static final int REGION_ITU_2 = 1; // 0x1 + field public static final int REGION_JAPAN = 3; // 0x3 + field public static final int REGION_KOREA = 4; // 0x4 + field public static final int REGION_OIRT = 2; // 0x2 + field public static final int STATUS_BAD_VALUE = -22; // 0xffffffea + field public static final int STATUS_DEAD_OBJECT = -32; // 0xffffffe0 + field public static final int STATUS_ERROR = -2147483648; // 0x80000000 + field public static final int STATUS_INVALID_OPERATION = -38; // 0xffffffda + field public static final int STATUS_NO_INIT = -19; // 0xffffffed + field public static final int STATUS_OK = 0; // 0x0 + field public static final int STATUS_PERMISSION_DENIED = -1; // 0xffffffff + field public static final int STATUS_TIMED_OUT = -110; // 0xffffff92 + } + + public static class RadioManager.AmBandConfig extends android.hardware.radio.RadioManager.BandConfig { + method public boolean getStereo(); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.RadioManager.AmBandConfig> CREATOR; + } + + public static class RadioManager.AmBandConfig.Builder { + ctor public RadioManager.AmBandConfig.Builder(android.hardware.radio.RadioManager.AmBandDescriptor); + ctor public RadioManager.AmBandConfig.Builder(android.hardware.radio.RadioManager.AmBandConfig); + method public android.hardware.radio.RadioManager.AmBandConfig build(); + method public android.hardware.radio.RadioManager.AmBandConfig.Builder setStereo(boolean); + } + + public static class RadioManager.AmBandDescriptor extends android.hardware.radio.RadioManager.BandDescriptor { + method public boolean isStereoSupported(); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.RadioManager.AmBandDescriptor> CREATOR; + } + + @IntDef(prefix={"BAND_"}, value={android.hardware.radio.RadioManager.BAND_INVALID, android.hardware.radio.RadioManager.BAND_AM, android.hardware.radio.RadioManager.BAND_FM, android.hardware.radio.RadioManager.BAND_AM_HD, android.hardware.radio.RadioManager.BAND_FM_HD}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface RadioManager.Band { + } + + public static class RadioManager.BandConfig implements android.os.Parcelable { + method public int describeContents(); + method public int getLowerLimit(); + method public int getRegion(); + method public int getSpacing(); + method public int getType(); + method public int getUpperLimit(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.RadioManager.BandConfig> CREATOR; + } + + public static class RadioManager.BandDescriptor implements android.os.Parcelable { + method public int describeContents(); + method public int getLowerLimit(); + method public int getRegion(); + method public int getSpacing(); + method public int getType(); + method public int getUpperLimit(); + method public boolean isAmBand(); + method public boolean isFmBand(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.RadioManager.BandDescriptor> CREATOR; + } + + public static class RadioManager.FmBandConfig extends android.hardware.radio.RadioManager.BandConfig { + method public boolean getAf(); + method public boolean getEa(); + method public boolean getRds(); + method public boolean getStereo(); + method public boolean getTa(); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.RadioManager.FmBandConfig> CREATOR; + } + + public static class RadioManager.FmBandConfig.Builder { + ctor public RadioManager.FmBandConfig.Builder(android.hardware.radio.RadioManager.FmBandDescriptor); + ctor public RadioManager.FmBandConfig.Builder(android.hardware.radio.RadioManager.FmBandConfig); + method public android.hardware.radio.RadioManager.FmBandConfig build(); + method public android.hardware.radio.RadioManager.FmBandConfig.Builder setAf(boolean); + method public android.hardware.radio.RadioManager.FmBandConfig.Builder setEa(boolean); + method public android.hardware.radio.RadioManager.FmBandConfig.Builder setRds(boolean); + method public android.hardware.radio.RadioManager.FmBandConfig.Builder setStereo(boolean); + method public android.hardware.radio.RadioManager.FmBandConfig.Builder setTa(boolean); + } + + public static class RadioManager.FmBandDescriptor extends android.hardware.radio.RadioManager.BandDescriptor { + method public boolean isAfSupported(); + method public boolean isEaSupported(); + method public boolean isRdsSupported(); + method public boolean isStereoSupported(); + method public boolean isTaSupported(); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.RadioManager.FmBandDescriptor> CREATOR; + } + + public static class RadioManager.ModuleProperties implements android.os.Parcelable { + method public int describeContents(); + method public android.hardware.radio.RadioManager.BandDescriptor[] getBands(); + method public int getClassId(); + method @Nullable public java.util.Map<java.lang.String,java.lang.Integer> getDabFrequencyTable(); + method public int getId(); + method public String getImplementor(); + method public int getNumAudioSources(); + method public int getNumTuners(); + method public String getProduct(); + method public String getSerial(); + method @NonNull public String getServiceName(); + method @NonNull public java.util.Map<java.lang.String,java.lang.String> getVendorInfo(); + method public String getVersion(); + method public boolean isBackgroundScanningSupported(); + method public boolean isCaptureSupported(); + method public boolean isInitializationRequired(); + method public boolean isProgramIdentifierSupported(@android.hardware.radio.ProgramSelector.IdentifierType int); + method public boolean isProgramTypeSupported(@android.hardware.radio.ProgramSelector.ProgramType int); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.RadioManager.ModuleProperties> CREATOR; + } + + public static class RadioManager.ProgramInfo implements android.os.Parcelable { + method public int describeContents(); + method @Deprecated public int getChannel(); + method @Nullable public android.hardware.radio.ProgramSelector.Identifier getLogicallyTunedTo(); + method public android.hardware.radio.RadioMetadata getMetadata(); + method @Nullable public android.hardware.radio.ProgramSelector.Identifier getPhysicallyTunedTo(); + method @Nullable public java.util.Collection<android.hardware.radio.ProgramSelector.Identifier> getRelatedContent(); + method @NonNull public android.hardware.radio.ProgramSelector getSelector(); + method public int getSignalStrength(); + method @Deprecated public int getSubChannel(); + method @NonNull public java.util.Map<java.lang.String,java.lang.String> getVendorInfo(); + method @Deprecated public boolean isDigital(); + method public boolean isLive(); + method public boolean isMuted(); + method public boolean isStereo(); + method public boolean isTrafficAnnouncementActive(); + method public boolean isTrafficProgram(); + method public boolean isTuned(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.RadioManager.ProgramInfo> CREATOR; + } + + public final class RadioMetadata implements android.os.Parcelable { + method public boolean containsKey(String); + method public int describeContents(); + method @Deprecated public android.graphics.Bitmap getBitmap(String); + method public android.hardware.radio.RadioMetadata.Clock getClock(String); + method public int getInt(String); + method public String getString(String); + method public java.util.Set<java.lang.String> keySet(); + method public int size(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.RadioMetadata> CREATOR; + field public static final String METADATA_KEY_ALBUM = "android.hardware.radio.metadata.ALBUM"; + field public static final String METADATA_KEY_ART = "android.hardware.radio.metadata.ART"; + field public static final String METADATA_KEY_ARTIST = "android.hardware.radio.metadata.ARTIST"; + field public static final String METADATA_KEY_CLOCK = "android.hardware.radio.metadata.CLOCK"; + field public static final String METADATA_KEY_DAB_COMPONENT_NAME = "android.hardware.radio.metadata.DAB_COMPONENT_NAME"; + field public static final String METADATA_KEY_DAB_COMPONENT_NAME_SHORT = "android.hardware.radio.metadata.DAB_COMPONENT_NAME_SHORT"; + field public static final String METADATA_KEY_DAB_ENSEMBLE_NAME = "android.hardware.radio.metadata.DAB_ENSEMBLE_NAME"; + field public static final String METADATA_KEY_DAB_ENSEMBLE_NAME_SHORT = "android.hardware.radio.metadata.DAB_ENSEMBLE_NAME_SHORT"; + field public static final String METADATA_KEY_DAB_SERVICE_NAME = "android.hardware.radio.metadata.DAB_SERVICE_NAME"; + field public static final String METADATA_KEY_DAB_SERVICE_NAME_SHORT = "android.hardware.radio.metadata.DAB_SERVICE_NAME_SHORT"; + field public static final String METADATA_KEY_GENRE = "android.hardware.radio.metadata.GENRE"; + field public static final String METADATA_KEY_ICON = "android.hardware.radio.metadata.ICON"; + field public static final String METADATA_KEY_PROGRAM_NAME = "android.hardware.radio.metadata.PROGRAM_NAME"; + field public static final String METADATA_KEY_RBDS_PTY = "android.hardware.radio.metadata.RBDS_PTY"; + field public static final String METADATA_KEY_RDS_PI = "android.hardware.radio.metadata.RDS_PI"; + field public static final String METADATA_KEY_RDS_PS = "android.hardware.radio.metadata.RDS_PS"; + field public static final String METADATA_KEY_RDS_PTY = "android.hardware.radio.metadata.RDS_PTY"; + field public static final String METADATA_KEY_RDS_RT = "android.hardware.radio.metadata.RDS_RT"; + field public static final String METADATA_KEY_TITLE = "android.hardware.radio.metadata.TITLE"; + } + + public static final class RadioMetadata.Builder { + ctor public RadioMetadata.Builder(); + ctor public RadioMetadata.Builder(android.hardware.radio.RadioMetadata); + method public android.hardware.radio.RadioMetadata build(); + method public android.hardware.radio.RadioMetadata.Builder putBitmap(String, android.graphics.Bitmap); + method public android.hardware.radio.RadioMetadata.Builder putClock(String, long, int); + method public android.hardware.radio.RadioMetadata.Builder putInt(String, int); + method public android.hardware.radio.RadioMetadata.Builder putString(String, String); + } + + public static final class RadioMetadata.Clock implements android.os.Parcelable { + ctor public RadioMetadata.Clock(long, int); + method public int describeContents(); + method public int getTimezoneOffsetMinutes(); + method public long getUtcEpochSeconds(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.radio.RadioMetadata.Clock> CREATOR; + } + + public abstract class RadioTuner { + ctor public RadioTuner(); + method public abstract int cancel(); + method public abstract void cancelAnnouncement(); + method public abstract void close(); + method @Deprecated public abstract int getConfiguration(android.hardware.radio.RadioManager.BandConfig[]); + method @Nullable public android.hardware.radio.ProgramList getDynamicProgramList(@Nullable android.hardware.radio.ProgramList.Filter); + method public abstract boolean getMute(); + method @NonNull public java.util.Map<java.lang.String,java.lang.String> getParameters(@NonNull java.util.List<java.lang.String>); + method @Deprecated public abstract int getProgramInformation(android.hardware.radio.RadioManager.ProgramInfo[]); + method @Deprecated @NonNull public abstract java.util.List<android.hardware.radio.RadioManager.ProgramInfo> getProgramList(@Nullable java.util.Map<java.lang.String,java.lang.String>); + method public abstract boolean hasControl(); + method @Deprecated public abstract boolean isAnalogForced(); + method @Deprecated public abstract boolean isAntennaConnected(); + method public boolean isConfigFlagSet(int); + method public boolean isConfigFlagSupported(int); + method public abstract int scan(int, boolean); + method @Deprecated public abstract void setAnalogForced(boolean); + method public void setConfigFlag(int, boolean); + method @Deprecated public abstract int setConfiguration(android.hardware.radio.RadioManager.BandConfig); + method public abstract int setMute(boolean); + method @NonNull public java.util.Map<java.lang.String,java.lang.String> setParameters(@NonNull java.util.Map<java.lang.String,java.lang.String>); + method public abstract boolean startBackgroundScan(); + method public abstract int step(int, boolean); + method @Deprecated public abstract int tune(int, int); + method public abstract void tune(@NonNull android.hardware.radio.ProgramSelector); + field public static final int DIRECTION_DOWN = 1; // 0x1 + field public static final int DIRECTION_UP = 0; // 0x0 + field @Deprecated public static final int ERROR_BACKGROUND_SCAN_FAILED = 6; // 0x6 + field @Deprecated public static final int ERROR_BACKGROUND_SCAN_UNAVAILABLE = 5; // 0x5 + field @Deprecated public static final int ERROR_CANCELLED = 2; // 0x2 + field @Deprecated public static final int ERROR_CONFIG = 4; // 0x4 + field @Deprecated public static final int ERROR_HARDWARE_FAILURE = 0; // 0x0 + field @Deprecated public static final int ERROR_SCAN_TIMEOUT = 3; // 0x3 + field @Deprecated public static final int ERROR_SERVER_DIED = 1; // 0x1 + } + + public abstract static class RadioTuner.Callback { + ctor public RadioTuner.Callback(); + method public void onAntennaState(boolean); + method public void onBackgroundScanAvailabilityChange(boolean); + method public void onBackgroundScanComplete(); + method @Deprecated public void onConfigurationChanged(android.hardware.radio.RadioManager.BandConfig); + method public void onControlChanged(boolean); + method public void onEmergencyAnnouncement(boolean); + method @Deprecated public void onError(int); + method @Deprecated public void onMetadataChanged(android.hardware.radio.RadioMetadata); + method public void onParametersUpdated(@NonNull java.util.Map<java.lang.String,java.lang.String>); + method public void onProgramInfoChanged(android.hardware.radio.RadioManager.ProgramInfo); + method public void onProgramListChanged(); + method public void onTrafficAnnouncement(boolean); + method public void onTuneFailed(int, @Nullable android.hardware.radio.ProgramSelector); + } + +} + +package android.hardware.soundtrigger { + + public class SoundTrigger { + field public static final int RECOGNITION_MODE_GENERIC = 8; // 0x8 + field public static final int RECOGNITION_MODE_USER_AUTHENTICATION = 4; // 0x4 + 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 STATUS_OK = 0; // 0x0 + } + + public static final class SoundTrigger.Keyphrase implements android.os.Parcelable { + ctor public SoundTrigger.Keyphrase(int, int, @NonNull java.util.Locale, @NonNull String, @Nullable int[]); + method public int getId(); + method @NonNull public java.util.Locale getLocale(); + method public int getRecognitionModes(); + method @NonNull public String getText(); + method @NonNull public int[] getUsers(); + method @NonNull public static android.hardware.soundtrigger.SoundTrigger.Keyphrase readFromParcel(@NonNull android.os.Parcel); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.soundtrigger.SoundTrigger.Keyphrase> CREATOR; + } + + public static final class SoundTrigger.KeyphraseSoundModel extends android.hardware.soundtrigger.SoundTrigger.SoundModel implements android.os.Parcelable { + ctor public SoundTrigger.KeyphraseSoundModel(@NonNull java.util.UUID, @NonNull java.util.UUID, @Nullable byte[], @Nullable android.hardware.soundtrigger.SoundTrigger.Keyphrase[], int); + ctor public SoundTrigger.KeyphraseSoundModel(@NonNull java.util.UUID, @NonNull java.util.UUID, @Nullable byte[], @Nullable android.hardware.soundtrigger.SoundTrigger.Keyphrase[]); + method @NonNull public android.hardware.soundtrigger.SoundTrigger.Keyphrase[] getKeyphrases(); + method @NonNull public static android.hardware.soundtrigger.SoundTrigger.KeyphraseSoundModel readFromParcel(@NonNull android.os.Parcel); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.soundtrigger.SoundTrigger.KeyphraseSoundModel> CREATOR; + } + + public static final class SoundTrigger.ModelParamRange implements android.os.Parcelable { + method public int getEnd(); + method public int getStart(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.soundtrigger.SoundTrigger.ModelParamRange> CREATOR; + } + + public static final class SoundTrigger.ModuleProperties implements android.os.Parcelable { + method public int describeContents(); + method public int getAudioCapabilities(); + method @NonNull public String getDescription(); + method public int getId(); + method @NonNull public String getImplementor(); + method public int getMaxBufferMillis(); + method public int getMaxKeyphrases(); + method public int getMaxSoundModels(); + method public int getMaxUsers(); + method public int getPowerConsumptionMw(); + method public int getRecognitionModes(); + method @NonNull public String getSupportedModelArch(); + method @NonNull public java.util.UUID getUuid(); + method public int getVersion(); + method public boolean isCaptureTransitionSupported(); + method public boolean isConcurrentCaptureSupported(); + method public boolean isTriggerReturnedInEvent(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int AUDIO_CAPABILITY_ECHO_CANCELLATION = 1; // 0x1 + field public static final int AUDIO_CAPABILITY_NOISE_SUPPRESSION = 2; // 0x2 + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.soundtrigger.SoundTrigger.ModuleProperties> CREATOR; + } + + public static class SoundTrigger.RecognitionEvent { + method @Nullable public android.media.AudioFormat getCaptureFormat(); + method public int getCaptureSession(); + method public byte[] getData(); + method public boolean isCaptureAvailable(); + } + + public static class SoundTrigger.SoundModel { + method @NonNull public byte[] getData(); + method public int getType(); + method @NonNull public java.util.UUID getUuid(); + method @NonNull public java.util.UUID getVendorUuid(); + method public int getVersion(); + field public static final int TYPE_GENERIC_SOUND = 1; // 0x1 + field public static final int TYPE_KEYPHRASE = 0; // 0x0 + } + +} + +package android.hardware.usb { + + public class UsbDeviceConnection { + method public boolean resetDevice(); + } + + public class UsbManager { + method @RequiresPermission(android.Manifest.permission.MANAGE_USB) public long getCurrentFunctions(); + method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_USB) public java.util.List<android.hardware.usb.UsbPort> getPorts(); + method @RequiresPermission(android.Manifest.permission.MANAGE_USB) public void grantPermission(android.hardware.usb.UsbDevice, String); + method @RequiresPermission(android.Manifest.permission.MANAGE_USB) public void resetUsbGadget(); + method @RequiresPermission(android.Manifest.permission.MANAGE_USB) public void setCurrentFunctions(long); + field @RequiresPermission(android.Manifest.permission.MANAGE_USB) public static final String ACTION_USB_ACCESSORY_HANDSHAKE = "android.hardware.usb.action.USB_ACCESSORY_HANDSHAKE"; + field @RequiresPermission(android.Manifest.permission.MANAGE_USB) public static final String ACTION_USB_PORT_CHANGED = "android.hardware.usb.action.USB_PORT_CHANGED"; + field public static final String ACTION_USB_STATE = "android.hardware.usb.action.USB_STATE"; + field public static final String EXTRA_ACCESSORY_HANDSHAKE_END = "android.hardware.usb.extra.ACCESSORY_HANDSHAKE_END"; + field public static final String EXTRA_ACCESSORY_START = "android.hardware.usb.extra.ACCESSORY_START"; + field public static final String EXTRA_ACCESSORY_STRING_COUNT = "android.hardware.usb.extra.ACCESSORY_STRING_COUNT"; + field public static final String EXTRA_ACCESSORY_UEVENT_TIME = "android.hardware.usb.extra.ACCESSORY_UEVENT_TIME"; + field public static final long FUNCTION_ACCESSORY = 2L; // 0x2L + field public static final long FUNCTION_ADB = 1L; // 0x1L + field public static final long FUNCTION_AUDIO_SOURCE = 64L; // 0x40L + field public static final long FUNCTION_MIDI = 8L; // 0x8L + field public static final long FUNCTION_MTP = 4L; // 0x4L + field public static final long FUNCTION_NCM = 1024L; // 0x400L + field public static final long FUNCTION_NONE = 0L; // 0x0L + field public static final long FUNCTION_PTP = 16L; // 0x10L + field public static final long FUNCTION_RNDIS = 32L; // 0x20L + field public static final String USB_CONFIGURED = "configured"; + field public static final String USB_CONNECTED = "connected"; + field public static final String USB_FUNCTION_NCM = "ncm"; + field public static final String USB_FUNCTION_RNDIS = "rndis"; + } + + public final class UsbPort { + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_USB) public android.hardware.usb.UsbPortStatus getStatus(); + method @RequiresPermission(android.Manifest.permission.MANAGE_USB) public void setRoles(int, int); + } + + public final class UsbPortStatus implements android.os.Parcelable { + method public int describeContents(); + method public int getCurrentDataRole(); + method public int getCurrentMode(); + method public int getCurrentPowerRole(); + method public int getSupportedRoleCombinations(); + method public boolean isConnected(); + method public boolean isRoleCombinationSupported(int, int); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.hardware.usb.UsbPortStatus> CREATOR; + field public static final int DATA_ROLE_DEVICE = 2; // 0x2 + field public static final int DATA_ROLE_HOST = 1; // 0x1 + field public static final int DATA_ROLE_NONE = 0; // 0x0 + field public static final int MODE_AUDIO_ACCESSORY = 4; // 0x4 + field public static final int MODE_DEBUG_ACCESSORY = 8; // 0x8 + field public static final int MODE_DFP = 2; // 0x2 + field public static final int MODE_NONE = 0; // 0x0 + field public static final int MODE_UFP = 1; // 0x1 + field public static final int POWER_ROLE_NONE = 0; // 0x0 + field public static final int POWER_ROLE_SINK = 2; // 0x2 + field public static final int POWER_ROLE_SOURCE = 1; // 0x1 + } + +} + +package android.location { + + public abstract class BatchedLocationCallback { + ctor public BatchedLocationCallback(); + method public void onLocationBatch(java.util.List<android.location.Location>); + } + + public final class GnssCapabilities { + method public boolean hasGeofencing(); + method public boolean hasLowPowerMode(); + method public boolean hasMeasurementCorrections(); + method public boolean hasMeasurementCorrectionsExcessPathLength(); + method public boolean hasMeasurementCorrectionsLosSats(); + method public boolean hasMeasurementCorrectionsReflectingPane(); + method public boolean hasMeasurements(); + method public boolean hasNavMessages(); + method public boolean hasSatelliteBlacklist(); + } + + public final class GnssMeasurementCorrections implements android.os.Parcelable { + method public int describeContents(); + method @FloatRange(from=-1000.0F, to=10000.0f) public double getAltitudeMeters(); + method @FloatRange(from=0.0f, to=360.0f) public float getEnvironmentBearingDegrees(); + method @FloatRange(from=0.0f, to=180.0f) public float getEnvironmentBearingUncertaintyDegrees(); + method @FloatRange(from=0.0f) public double getHorizontalPositionUncertaintyMeters(); + method @FloatRange(from=-90.0F, to=90.0f) public double getLatitudeDegrees(); + method @FloatRange(from=-180.0F, to=180.0f) public double getLongitudeDegrees(); + method @NonNull public java.util.List<android.location.GnssSingleSatCorrection> getSingleSatelliteCorrectionList(); + method @IntRange(from=0) public long getToaGpsNanosecondsOfWeek(); + method @FloatRange(from=0.0f) public double getVerticalPositionUncertaintyMeters(); + method public boolean hasEnvironmentBearing(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field public static final android.os.Parcelable.Creator<android.location.GnssMeasurementCorrections> CREATOR; + } + + public static final class GnssMeasurementCorrections.Builder { + ctor public GnssMeasurementCorrections.Builder(); + method @NonNull public android.location.GnssMeasurementCorrections build(); + method @NonNull public android.location.GnssMeasurementCorrections.Builder setAltitudeMeters(@FloatRange(from=-1000.0F, to=10000.0f) double); + method @NonNull public android.location.GnssMeasurementCorrections.Builder setEnvironmentBearingDegrees(@FloatRange(from=0.0f, to=360.0f) float); + method @NonNull public android.location.GnssMeasurementCorrections.Builder setEnvironmentBearingUncertaintyDegrees(@FloatRange(from=0.0f, to=180.0f) float); + method @NonNull public android.location.GnssMeasurementCorrections.Builder setHorizontalPositionUncertaintyMeters(@FloatRange(from=0.0f) double); + method @NonNull public android.location.GnssMeasurementCorrections.Builder setLatitudeDegrees(@FloatRange(from=-90.0F, to=90.0f) double); + method @NonNull public android.location.GnssMeasurementCorrections.Builder setLongitudeDegrees(@FloatRange(from=-180.0F, to=180.0f) double); + method @NonNull public android.location.GnssMeasurementCorrections.Builder setSingleSatelliteCorrectionList(@NonNull java.util.List<android.location.GnssSingleSatCorrection>); + method @NonNull public android.location.GnssMeasurementCorrections.Builder setToaGpsNanosecondsOfWeek(@IntRange(from=0) long); + method @NonNull public android.location.GnssMeasurementCorrections.Builder setVerticalPositionUncertaintyMeters(@FloatRange(from=0.0f) double); + } + + public final class GnssReflectingPlane implements android.os.Parcelable { + method public int describeContents(); + method @FloatRange(from=-1000.0F, to=10000.0f) public double getAltitudeMeters(); + method @FloatRange(from=0.0f, to=360.0f) public double getAzimuthDegrees(); + method @FloatRange(from=-90.0F, to=90.0f) public double getLatitudeDegrees(); + method @FloatRange(from=-180.0F, to=180.0f) public double getLongitudeDegrees(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field public static final android.os.Parcelable.Creator<android.location.GnssReflectingPlane> CREATOR; + } + + public static final class GnssReflectingPlane.Builder { + ctor public GnssReflectingPlane.Builder(); + method @NonNull public android.location.GnssReflectingPlane build(); + method @NonNull public android.location.GnssReflectingPlane.Builder setAltitudeMeters(@FloatRange(from=-1000.0F, to=10000.0f) double); + method @NonNull public android.location.GnssReflectingPlane.Builder setAzimuthDegrees(@FloatRange(from=0.0f, to=360.0f) double); + method @NonNull public android.location.GnssReflectingPlane.Builder setLatitudeDegrees(@FloatRange(from=-90.0F, to=90.0f) double); + method @NonNull public android.location.GnssReflectingPlane.Builder setLongitudeDegrees(@FloatRange(from=-180.0F, to=180.0f) double); + } + + public final class GnssRequest implements android.os.Parcelable { + method public int describeContents(); + method public boolean isFullTracking(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.location.GnssRequest> CREATOR; + } + + public static final class GnssRequest.Builder { + ctor public GnssRequest.Builder(); + ctor public GnssRequest.Builder(@NonNull android.location.GnssRequest); + method @NonNull public android.location.GnssRequest build(); + method @NonNull public android.location.GnssRequest.Builder setFullTracking(boolean); + } + + public final class GnssSingleSatCorrection implements android.os.Parcelable { + method public int describeContents(); + method @FloatRange(from=0.0f, fromInclusive=false) public float getCarrierFrequencyHz(); + method public int getConstellationType(); + method @FloatRange(from=0.0f) public float getExcessPathLengthMeters(); + method @FloatRange(from=0.0f) public float getExcessPathLengthUncertaintyMeters(); + method @FloatRange(from=0.0f, to=1.0f) public float getProbabilityLineOfSight(); + method @Nullable public android.location.GnssReflectingPlane getReflectingPlane(); + method @IntRange(from=0) public int getSatelliteId(); + method public boolean hasExcessPathLength(); + method public boolean hasExcessPathLengthUncertainty(); + method public boolean hasReflectingPlane(); + method public boolean hasValidSatelliteLineOfSight(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field public static final android.os.Parcelable.Creator<android.location.GnssSingleSatCorrection> CREATOR; + } + + public static final class GnssSingleSatCorrection.Builder { + ctor public GnssSingleSatCorrection.Builder(); + method @NonNull public android.location.GnssSingleSatCorrection build(); + method @NonNull public android.location.GnssSingleSatCorrection.Builder setCarrierFrequencyHz(@FloatRange(from=0.0f, fromInclusive=false) float); + method @NonNull public android.location.GnssSingleSatCorrection.Builder setConstellationType(int); + method @NonNull public android.location.GnssSingleSatCorrection.Builder setExcessPathLengthMeters(@FloatRange(from=0.0f) float); + method @NonNull public android.location.GnssSingleSatCorrection.Builder setExcessPathLengthUncertaintyMeters(@FloatRange(from=0.0f) float); + method @NonNull public android.location.GnssSingleSatCorrection.Builder setProbabilityLineOfSight(@FloatRange(from=0.0f, to=1.0f) float); + method @NonNull public android.location.GnssSingleSatCorrection.Builder setReflectingPlane(@Nullable android.location.GnssReflectingPlane); + method @NonNull public android.location.GnssSingleSatCorrection.Builder setSatelliteId(@IntRange(from=0) int); + } + + @Deprecated public class GpsClock implements android.os.Parcelable { + method @Deprecated public int describeContents(); + method @Deprecated public double getBiasInNs(); + method @Deprecated public double getBiasUncertaintyInNs(); + method @Deprecated public double getDriftInNsPerSec(); + method @Deprecated public double getDriftUncertaintyInNsPerSec(); + method @Deprecated public long getFullBiasInNs(); + method @Deprecated public short getLeapSecond(); + method @Deprecated public long getTimeInNs(); + method @Deprecated public double getTimeUncertaintyInNs(); + method @Deprecated public byte getType(); + method @Deprecated public boolean hasBiasInNs(); + method @Deprecated public boolean hasBiasUncertaintyInNs(); + method @Deprecated public boolean hasDriftInNsPerSec(); + method @Deprecated public boolean hasDriftUncertaintyInNsPerSec(); + method @Deprecated public boolean hasFullBiasInNs(); + method @Deprecated public boolean hasLeapSecond(); + method @Deprecated public boolean hasTimeUncertaintyInNs(); + method @Deprecated public void reset(); + method @Deprecated public void resetBiasInNs(); + method @Deprecated public void resetBiasUncertaintyInNs(); + method @Deprecated public void resetDriftInNsPerSec(); + method @Deprecated public void resetDriftUncertaintyInNsPerSec(); + method @Deprecated public void resetFullBiasInNs(); + method @Deprecated public void resetLeapSecond(); + method @Deprecated public void resetTimeUncertaintyInNs(); + method @Deprecated public void set(android.location.GpsClock); + method @Deprecated public void setBiasInNs(double); + method @Deprecated public void setBiasUncertaintyInNs(double); + method @Deprecated public void setDriftInNsPerSec(double); + method @Deprecated public void setDriftUncertaintyInNsPerSec(double); + method @Deprecated public void setFullBiasInNs(long); + method @Deprecated public void setLeapSecond(short); + method @Deprecated public void setTimeInNs(long); + method @Deprecated public void setTimeUncertaintyInNs(double); + method @Deprecated public void setType(byte); + method @Deprecated public void writeToParcel(android.os.Parcel, int); + field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.location.GpsClock> CREATOR; + field @Deprecated public static final byte TYPE_GPS_TIME = 2; // 0x2 + field @Deprecated public static final byte TYPE_LOCAL_HW_TIME = 1; // 0x1 + field @Deprecated public static final byte TYPE_UNKNOWN = 0; // 0x0 + } + + @Deprecated public class GpsMeasurement implements android.os.Parcelable { + method @Deprecated public int describeContents(); + method @Deprecated public double getAccumulatedDeltaRangeInMeters(); + method @Deprecated public short getAccumulatedDeltaRangeState(); + method @Deprecated public double getAccumulatedDeltaRangeUncertaintyInMeters(); + method @Deprecated public double getAzimuthInDeg(); + method @Deprecated public double getAzimuthUncertaintyInDeg(); + method @Deprecated public int getBitNumber(); + method @Deprecated public long getCarrierCycles(); + method @Deprecated public float getCarrierFrequencyInHz(); + method @Deprecated public double getCarrierPhase(); + method @Deprecated public double getCarrierPhaseUncertainty(); + method @Deprecated public double getCn0InDbHz(); + method @Deprecated public double getCodePhaseInChips(); + method @Deprecated public double getCodePhaseUncertaintyInChips(); + method @Deprecated public double getDopplerShiftInHz(); + method @Deprecated public double getDopplerShiftUncertaintyInHz(); + method @Deprecated public double getElevationInDeg(); + method @Deprecated public double getElevationUncertaintyInDeg(); + method @Deprecated public byte getLossOfLock(); + method @Deprecated public byte getMultipathIndicator(); + method @Deprecated public byte getPrn(); + method @Deprecated public double getPseudorangeInMeters(); + method @Deprecated public double getPseudorangeRateInMetersPerSec(); + method @Deprecated public double getPseudorangeRateUncertaintyInMetersPerSec(); + method @Deprecated public double getPseudorangeUncertaintyInMeters(); + method @Deprecated public long getReceivedGpsTowInNs(); + method @Deprecated public long getReceivedGpsTowUncertaintyInNs(); + method @Deprecated public double getSnrInDb(); + method @Deprecated public short getState(); + method @Deprecated public short getTimeFromLastBitInMs(); + method @Deprecated public double getTimeOffsetInNs(); + method @Deprecated public boolean hasAzimuthInDeg(); + method @Deprecated public boolean hasAzimuthUncertaintyInDeg(); + method @Deprecated public boolean hasBitNumber(); + method @Deprecated public boolean hasCarrierCycles(); + method @Deprecated public boolean hasCarrierFrequencyInHz(); + method @Deprecated public boolean hasCarrierPhase(); + method @Deprecated public boolean hasCarrierPhaseUncertainty(); + method @Deprecated public boolean hasCodePhaseInChips(); + method @Deprecated public boolean hasCodePhaseUncertaintyInChips(); + method @Deprecated public boolean hasDopplerShiftInHz(); + method @Deprecated public boolean hasDopplerShiftUncertaintyInHz(); + method @Deprecated public boolean hasElevationInDeg(); + method @Deprecated public boolean hasElevationUncertaintyInDeg(); + method @Deprecated public boolean hasPseudorangeInMeters(); + method @Deprecated public boolean hasPseudorangeUncertaintyInMeters(); + method @Deprecated public boolean hasSnrInDb(); + method @Deprecated public boolean hasTimeFromLastBitInMs(); + method @Deprecated public boolean isPseudorangeRateCorrected(); + method @Deprecated public boolean isUsedInFix(); + method @Deprecated public void reset(); + method @Deprecated public void resetAzimuthInDeg(); + method @Deprecated public void resetAzimuthUncertaintyInDeg(); + method @Deprecated public void resetBitNumber(); + method @Deprecated public void resetCarrierCycles(); + method @Deprecated public void resetCarrierFrequencyInHz(); + method @Deprecated public void resetCarrierPhase(); + method @Deprecated public void resetCarrierPhaseUncertainty(); + method @Deprecated public void resetCodePhaseInChips(); + method @Deprecated public void resetCodePhaseUncertaintyInChips(); + method @Deprecated public void resetDopplerShiftInHz(); + method @Deprecated public void resetDopplerShiftUncertaintyInHz(); + method @Deprecated public void resetElevationInDeg(); + method @Deprecated public void resetElevationUncertaintyInDeg(); + method @Deprecated public void resetPseudorangeInMeters(); + method @Deprecated public void resetPseudorangeUncertaintyInMeters(); + method @Deprecated public void resetSnrInDb(); + method @Deprecated public void resetTimeFromLastBitInMs(); + method @Deprecated public void set(android.location.GpsMeasurement); + method @Deprecated public void setAccumulatedDeltaRangeInMeters(double); + method @Deprecated public void setAccumulatedDeltaRangeState(short); + method @Deprecated public void setAccumulatedDeltaRangeUncertaintyInMeters(double); + method @Deprecated public void setAzimuthInDeg(double); + method @Deprecated public void setAzimuthUncertaintyInDeg(double); + method @Deprecated public void setBitNumber(int); + method @Deprecated public void setCarrierCycles(long); + method @Deprecated public void setCarrierFrequencyInHz(float); + method @Deprecated public void setCarrierPhase(double); + method @Deprecated public void setCarrierPhaseUncertainty(double); + method @Deprecated public void setCn0InDbHz(double); + method @Deprecated public void setCodePhaseInChips(double); + method @Deprecated public void setCodePhaseUncertaintyInChips(double); + method @Deprecated public void setDopplerShiftInHz(double); + method @Deprecated public void setDopplerShiftUncertaintyInHz(double); + method @Deprecated public void setElevationInDeg(double); + method @Deprecated public void setElevationUncertaintyInDeg(double); + method @Deprecated public void setLossOfLock(byte); + method @Deprecated public void setMultipathIndicator(byte); + method @Deprecated public void setPrn(byte); + method @Deprecated public void setPseudorangeInMeters(double); + method @Deprecated public void setPseudorangeRateInMetersPerSec(double); + method @Deprecated public void setPseudorangeRateUncertaintyInMetersPerSec(double); + method @Deprecated public void setPseudorangeUncertaintyInMeters(double); + method @Deprecated public void setReceivedGpsTowInNs(long); + method @Deprecated public void setReceivedGpsTowUncertaintyInNs(long); + method @Deprecated public void setSnrInDb(double); + method @Deprecated public void setState(short); + method @Deprecated public void setTimeFromLastBitInMs(short); + method @Deprecated public void setTimeOffsetInNs(double); + method @Deprecated public void setUsedInFix(boolean); + method @Deprecated public void writeToParcel(android.os.Parcel, int); + field @Deprecated public static final short ADR_STATE_CYCLE_SLIP = 4; // 0x4 + field @Deprecated public static final short ADR_STATE_RESET = 2; // 0x2 + field @Deprecated public static final short ADR_STATE_UNKNOWN = 0; // 0x0 + field @Deprecated public static final short ADR_STATE_VALID = 1; // 0x1 + field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.location.GpsMeasurement> CREATOR; + field @Deprecated public static final byte LOSS_OF_LOCK_CYCLE_SLIP = 2; // 0x2 + field @Deprecated public static final byte LOSS_OF_LOCK_OK = 1; // 0x1 + field @Deprecated public static final byte LOSS_OF_LOCK_UNKNOWN = 0; // 0x0 + field @Deprecated public static final byte MULTIPATH_INDICATOR_DETECTED = 1; // 0x1 + field @Deprecated public static final byte MULTIPATH_INDICATOR_NOT_USED = 2; // 0x2 + field @Deprecated public static final byte MULTIPATH_INDICATOR_UNKNOWN = 0; // 0x0 + field @Deprecated public static final short STATE_BIT_SYNC = 2; // 0x2 + field @Deprecated public static final short STATE_CODE_LOCK = 1; // 0x1 + field @Deprecated public static final short STATE_MSEC_AMBIGUOUS = 16; // 0x10 + field @Deprecated public static final short STATE_SUBFRAME_SYNC = 4; // 0x4 + field @Deprecated public static final short STATE_TOW_DECODED = 8; // 0x8 + field @Deprecated public static final short STATE_UNKNOWN = 0; // 0x0 + } + + @Deprecated public class GpsMeasurementsEvent implements android.os.Parcelable { + ctor @Deprecated public GpsMeasurementsEvent(android.location.GpsClock, android.location.GpsMeasurement[]); + method @Deprecated public int describeContents(); + method @Deprecated @NonNull public android.location.GpsClock getClock(); + method @Deprecated @NonNull public java.util.Collection<android.location.GpsMeasurement> getMeasurements(); + method @Deprecated public void writeToParcel(android.os.Parcel, int); + field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.location.GpsMeasurementsEvent> CREATOR; + field @Deprecated public static final int STATUS_GPS_LOCATION_DISABLED = 2; // 0x2 + field @Deprecated public static final int STATUS_NOT_SUPPORTED = 0; // 0x0 + field @Deprecated public static final int STATUS_READY = 1; // 0x1 + } + + @Deprecated public static interface GpsMeasurementsEvent.Listener { + method @Deprecated public void onGpsMeasurementsReceived(android.location.GpsMeasurementsEvent); + method @Deprecated public void onStatusChanged(int); + } + + @Deprecated public class GpsNavigationMessage implements android.os.Parcelable { + method @Deprecated public int describeContents(); + method @Deprecated @NonNull public byte[] getData(); + method @Deprecated public short getMessageId(); + method @Deprecated public byte getPrn(); + method @Deprecated public short getStatus(); + method @Deprecated public short getSubmessageId(); + method @Deprecated public byte getType(); + method @Deprecated public void reset(); + method @Deprecated public void set(android.location.GpsNavigationMessage); + method @Deprecated public void setData(byte[]); + method @Deprecated public void setMessageId(short); + method @Deprecated public void setPrn(byte); + method @Deprecated public void setStatus(short); + method @Deprecated public void setSubmessageId(short); + method @Deprecated public void setType(byte); + method @Deprecated public void writeToParcel(android.os.Parcel, int); + field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.location.GpsNavigationMessage> CREATOR; + field @Deprecated public static final short STATUS_PARITY_PASSED = 1; // 0x1 + field @Deprecated public static final short STATUS_PARITY_REBUILT = 2; // 0x2 + field @Deprecated public static final short STATUS_UNKNOWN = 0; // 0x0 + field @Deprecated public static final byte TYPE_CNAV2 = 4; // 0x4 + field @Deprecated public static final byte TYPE_L1CA = 1; // 0x1 + field @Deprecated public static final byte TYPE_L2CNAV = 2; // 0x2 + field @Deprecated public static final byte TYPE_L5CNAV = 3; // 0x3 + field @Deprecated public static final byte TYPE_UNKNOWN = 0; // 0x0 + } + + @Deprecated public class GpsNavigationMessageEvent implements android.os.Parcelable { + ctor @Deprecated public GpsNavigationMessageEvent(android.location.GpsNavigationMessage); + method @Deprecated public int describeContents(); + method @Deprecated @NonNull public android.location.GpsNavigationMessage getNavigationMessage(); + method @Deprecated public void writeToParcel(android.os.Parcel, int); + field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.location.GpsNavigationMessageEvent> CREATOR; + field @Deprecated public static int STATUS_GPS_LOCATION_DISABLED; + field @Deprecated public static int STATUS_NOT_SUPPORTED; + field @Deprecated public static int STATUS_READY; + } + + @Deprecated public static interface GpsNavigationMessageEvent.Listener { + method @Deprecated public void onGpsNavigationMessageReceived(android.location.GpsNavigationMessageEvent); + method @Deprecated public void onStatusChanged(int); + } + + public class Location implements android.os.Parcelable { + method public boolean isComplete(); + method public void makeComplete(); + method public void setIsFromMockProvider(boolean); + field @Deprecated public static final String EXTRA_NO_GPS_LOCATION = "noGPSLocation"; + } + + public class LocationManager { + method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void flushGnssBatch(); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_COARSE_LOCATION, android.Manifest.permission.ACCESS_FINE_LOCATION}) public void getCurrentLocation(@NonNull android.location.LocationRequest, @Nullable android.os.CancellationSignal, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<android.location.Location>); + method @Nullable public String getExtraLocationControllerPackage(); + method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public int getGnssBatchSize(); + method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void injectGnssMeasurementCorrections(@NonNull android.location.GnssMeasurementCorrections); + method public boolean isExtraLocationControllerPackageEnabled(); + method public boolean isLocationEnabledForUser(@NonNull android.os.UserHandle); + method public boolean isProviderEnabledForUser(@NonNull String, @NonNull android.os.UserHandle); + method @Deprecated @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public boolean isProviderPackage(@NonNull String); + method @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public boolean isProviderPackage(@Nullable String, @NonNull String); + method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public boolean registerGnssBatchedLocationCallback(long, boolean, @NonNull android.location.BatchedLocationCallback, @Nullable android.os.Handler); + method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.LOCATION_HARDWARE}) public boolean registerGnssMeasurementsCallback(@NonNull android.location.GnssRequest, @NonNull java.util.concurrent.Executor, @NonNull android.location.GnssMeasurementsEvent.Callback); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_COARSE_LOCATION, android.Manifest.permission.ACCESS_FINE_LOCATION}) public void requestLocationUpdates(@Nullable android.location.LocationRequest, @NonNull android.location.LocationListener, @Nullable android.os.Looper); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_COARSE_LOCATION, android.Manifest.permission.ACCESS_FINE_LOCATION}) public void requestLocationUpdates(@Nullable android.location.LocationRequest, @NonNull java.util.concurrent.Executor, @NonNull android.location.LocationListener); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_COARSE_LOCATION, android.Manifest.permission.ACCESS_FINE_LOCATION}) public void requestLocationUpdates(@Nullable android.location.LocationRequest, @NonNull android.app.PendingIntent); + method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void setExtraLocationControllerPackage(@Nullable String); + method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void setExtraLocationControllerPackageEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public void setLocationEnabledForUser(boolean, @NonNull android.os.UserHandle); + method @Deprecated @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean setProviderEnabledForUser(@NonNull String, boolean, @NonNull android.os.UserHandle); + method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public boolean unregisterGnssBatchedLocationCallback(@NonNull android.location.BatchedLocationCallback); + } + + public final class LocationRequest implements android.os.Parcelable { + method @Deprecated @NonNull public static android.location.LocationRequest create(); + method @Deprecated @NonNull public static android.location.LocationRequest createFromDeprecatedCriteria(@NonNull android.location.Criteria, long, float, boolean); + method @Deprecated @NonNull public static android.location.LocationRequest createFromDeprecatedProvider(@NonNull String, long, float, boolean); + method @Deprecated public long getExpireAt(); + method @Deprecated public long getExpireIn(); + method @Deprecated public long getFastestInterval(); + method @Deprecated public boolean getHideFromAppOps(); + method @Deprecated public long getInterval(); + method @Deprecated public int getNumUpdates(); + method @Deprecated @NonNull public String getProvider(); + method @Deprecated public float getSmallestDisplacement(); + method @NonNull public android.os.WorkSource getWorkSource(); + method public boolean isHiddenFromAppOps(); + method public boolean isLocationSettingsIgnored(); + method public boolean isLowPower(); + method @Deprecated public boolean isLowPowerMode(); + method @Deprecated @NonNull public android.location.LocationRequest setExpireAt(long); + method @Deprecated @NonNull public android.location.LocationRequest setExpireIn(long); + method @Deprecated @NonNull public android.location.LocationRequest setFastestInterval(long); + method @Deprecated public void setHideFromAppOps(boolean); + method @Deprecated @NonNull public android.location.LocationRequest setInterval(long); + method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public android.location.LocationRequest setLocationSettingsIgnored(boolean); + method @Deprecated @NonNull public android.location.LocationRequest setLowPowerMode(boolean); + method @Deprecated @NonNull public android.location.LocationRequest setNumUpdates(int); + method @Deprecated @NonNull public android.location.LocationRequest setProvider(@NonNull String); + method @Deprecated @NonNull public android.location.LocationRequest setQuality(int); + method @Deprecated @NonNull public android.location.LocationRequest setSmallestDisplacement(float); + method @Deprecated public void setWorkSource(@Nullable android.os.WorkSource); + field @Deprecated public static final int ACCURACY_BLOCK = 102; // 0x66 + field @Deprecated public static final int ACCURACY_CITY = 104; // 0x68 + field @Deprecated public static final int ACCURACY_FINE = 100; // 0x64 + field @Deprecated public static final int POWER_HIGH = 203; // 0xcb + field @Deprecated public static final int POWER_LOW = 201; // 0xc9 + field @Deprecated public static final int POWER_NONE = 200; // 0xc8 + } + + public static final class LocationRequest.Builder { + method @NonNull @RequiresPermission(android.Manifest.permission.UPDATE_APP_OPS_STATS) public android.location.LocationRequest.Builder setHiddenFromAppOps(boolean); + method @NonNull @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public android.location.LocationRequest.Builder setLocationSettingsIgnored(boolean); + method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public android.location.LocationRequest.Builder setLowPower(boolean); + method @NonNull @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public android.location.LocationRequest.Builder setWorkSource(@Nullable android.os.WorkSource); + } + +} + +package android.media { + + public final class AudioAttributes implements android.os.Parcelable { + method public int getAllFlags(); + method public android.os.Bundle getBundle(); + method public int getCapturePreset(); + method public int getSystemUsage(); + method public static boolean isSystemUsage(int); + field public static final int FLAG_BEACON = 8; // 0x8 + field public static final int FLAG_BYPASS_INTERRUPTION_POLICY = 64; // 0x40 + field public static final int FLAG_BYPASS_MUTE = 128; // 0x80 + field public static final int FLAG_HW_HOTWORD = 32; // 0x20 + field @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public static final int USAGE_ANNOUNCEMENT = 1003; // 0x3eb + field @RequiresPermission(allOf={android.Manifest.permission.MODIFY_PHONE_STATE, android.Manifest.permission.MODIFY_AUDIO_ROUTING}) public static final int USAGE_CALL_ASSISTANT = 17; // 0x11 + field @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public static final int USAGE_EMERGENCY = 1000; // 0x3e8 + field @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public static final int USAGE_SAFETY = 1001; // 0x3e9 + field @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public static final int USAGE_VEHICLE_STATUS = 1002; // 0x3ea + } + + public static class AudioAttributes.Builder { + method public android.media.AudioAttributes.Builder addBundle(@NonNull android.os.Bundle); + method public android.media.AudioAttributes.Builder setCapturePreset(int); + method public android.media.AudioAttributes.Builder setInternalCapturePreset(int); + method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public android.media.AudioAttributes.Builder setSystemUsage(int); + } + + public final class AudioDeviceAttributes implements android.os.Parcelable { + ctor public AudioDeviceAttributes(@NonNull android.media.AudioDeviceInfo); + ctor public AudioDeviceAttributes(int, int, @NonNull String); + method public int describeContents(); + method @NonNull public String getAddress(); + method public int getRole(); + method public int getType(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.media.AudioDeviceAttributes> CREATOR; + field public static final int ROLE_INPUT = 1; // 0x1 + field public static final int ROLE_OUTPUT = 2; // 0x2 + } + + public final class AudioFocusInfo implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public android.media.AudioAttributes getAttributes(); + method @NonNull public String getClientId(); + method public int getClientUid(); + method public int getFlags(); + method public int getGainRequest(); + method public int getLossReceived(); + method @NonNull public String getPackageName(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.media.AudioFocusInfo> CREATOR; + } + + public final class AudioFocusRequest { + method public boolean locksFocus(); + } + + public static final class AudioFocusRequest.Builder { + method @NonNull public android.media.AudioFocusRequest.Builder setLocksFocus(boolean); + } + + public class AudioManager { + method @Deprecated public int abandonAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener, android.media.AudioAttributes); + method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void addOnPreferredDeviceForStrategyChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.AudioManager.OnPreferredDeviceForStrategyChangedListener) throws java.lang.SecurityException; + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void addOnPreferredDevicesForCapturePresetChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.AudioManager.OnPreferredDevicesForCapturePresetChangedListener) throws java.lang.SecurityException; + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void addOnPreferredDevicesForStrategyChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.AudioManager.OnPreferredDevicesForStrategyChangedListener) throws java.lang.SecurityException; + method public void clearAudioServerStateCallback(); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public boolean clearPreferredDevicesForCapturePreset(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int dispatchAudioFocusChange(@NonNull android.media.AudioFocusInfo, int, @NonNull android.media.audiopolicy.AudioPolicy); + method @IntRange(from=0) public long getAdditionalOutputDeviceDelay(@NonNull android.media.AudioDeviceInfo); + method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public static java.util.List<android.media.audiopolicy.AudioProductStrategy> getAudioProductStrategies(); + method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public static java.util.List<android.media.audiopolicy.AudioVolumeGroup> getAudioVolumeGroups(); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int getDeviceVolumeBehavior(@NonNull android.media.AudioDeviceAttributes); + method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public java.util.List<android.media.AudioDeviceAttributes> getDevicesForAttributes(@NonNull android.media.AudioAttributes); + method @IntRange(from=0) public long getMaxAdditionalOutputDeviceDelay(@NonNull android.media.AudioDeviceInfo); + method @IntRange(from=0) @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int getMaxVolumeIndexForAttributes(@NonNull android.media.AudioAttributes); + method @IntRange(from=0) @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int getMinVolumeIndexForAttributes(@NonNull android.media.AudioAttributes); + method @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public android.media.AudioDeviceAttributes getPreferredDeviceForStrategy(@NonNull android.media.audiopolicy.AudioProductStrategy); + method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public java.util.List<android.media.AudioDeviceAttributes> getPreferredDevicesForCapturePreset(int); + method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public java.util.List<android.media.AudioDeviceAttributes> getPreferredDevicesForStrategy(@NonNull android.media.audiopolicy.AudioProductStrategy); + method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int[] getSupportedSystemUsages(); + method @IntRange(from=0) @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int getVolumeIndexForAttributes(@NonNull android.media.AudioAttributes); + method public boolean isAudioServerRunning(); + method public boolean isHdmiSystemAudioSupported(); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int registerAudioPolicy(@NonNull android.media.audiopolicy.AudioPolicy); + method public void registerVolumeGroupCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.AudioManager.VolumeGroupCallback); + method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void removeOnPreferredDeviceForStrategyChangedListener(@NonNull android.media.AudioManager.OnPreferredDeviceForStrategyChangedListener); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void removeOnPreferredDevicesForCapturePresetChangedListener(@NonNull android.media.AudioManager.OnPreferredDevicesForCapturePresetChangedListener); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void removeOnPreferredDevicesForStrategyChangedListener(@NonNull android.media.AudioManager.OnPreferredDevicesForStrategyChangedListener); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public boolean removePreferredDeviceForStrategy(@NonNull android.media.audiopolicy.AudioProductStrategy); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int requestAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener, @NonNull android.media.AudioAttributes, int, int) throws java.lang.IllegalArgumentException; + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.MODIFY_PHONE_STATE, android.Manifest.permission.MODIFY_AUDIO_ROUTING}) public int requestAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener, @NonNull android.media.AudioAttributes, int, int, android.media.audiopolicy.AudioPolicy) throws java.lang.IllegalArgumentException; + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int requestAudioFocus(@NonNull android.media.AudioFocusRequest, @Nullable android.media.audiopolicy.AudioPolicy); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public boolean setAdditionalOutputDeviceDelay(@NonNull android.media.AudioDeviceInfo, @IntRange(from=0) long); + method public void setAudioServerStateCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.AudioManager.AudioServerStateCallback); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void setDeviceVolumeBehavior(@NonNull android.media.AudioDeviceAttributes, int); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void setFocusRequestResult(@NonNull android.media.AudioFocusInfo, int, @NonNull android.media.audiopolicy.AudioPolicy); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public boolean setPreferredDeviceForCapturePreset(int, @NonNull android.media.AudioDeviceAttributes); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public boolean setPreferredDeviceForStrategy(@NonNull android.media.audiopolicy.AudioProductStrategy, @NonNull android.media.AudioDeviceAttributes); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public boolean setPreferredDevicesForStrategy(@NonNull android.media.audiopolicy.AudioProductStrategy, @NonNull java.util.List<android.media.AudioDeviceAttributes>); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void setSupportedSystemUsages(@NonNull int[]); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void setVolumeIndexForAttributes(@NonNull android.media.AudioAttributes, int, int); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void unregisterAudioPolicy(@NonNull android.media.audiopolicy.AudioPolicy); + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public void unregisterAudioPolicyAsync(@NonNull android.media.audiopolicy.AudioPolicy); + method public void unregisterVolumeGroupCallback(@NonNull android.media.AudioManager.VolumeGroupCallback); + field public static final int AUDIOFOCUS_FLAG_DELAY_OK = 1; // 0x1 + field public static final int AUDIOFOCUS_FLAG_LOCK = 4; // 0x4 + field public static final int AUDIOFOCUS_FLAG_PAUSES_ON_DUCKABLE_LOSS = 2; // 0x2 + field public static final int DEVICE_VOLUME_BEHAVIOR_ABSOLUTE = 3; // 0x3 + field public static final int DEVICE_VOLUME_BEHAVIOR_ABSOLUTE_MULTI_MODE = 4; // 0x4 + field public static final int DEVICE_VOLUME_BEHAVIOR_FIXED = 2; // 0x2 + field public static final int DEVICE_VOLUME_BEHAVIOR_FULL = 1; // 0x1 + field public static final int DEVICE_VOLUME_BEHAVIOR_VARIABLE = 0; // 0x0 + field @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public static final int STREAM_ASSISTANT = 11; // 0xb + field public static final int SUCCESS = 0; // 0x0 + } + + public abstract static class AudioManager.AudioServerStateCallback { + ctor public AudioManager.AudioServerStateCallback(); + method public void onAudioServerDown(); + method public void onAudioServerUp(); + } + + @Deprecated public static interface AudioManager.OnPreferredDeviceForStrategyChangedListener { + method @Deprecated public void onPreferredDeviceForStrategyChanged(@NonNull android.media.audiopolicy.AudioProductStrategy, @Nullable android.media.AudioDeviceAttributes); + } + + public static interface AudioManager.OnPreferredDevicesForCapturePresetChangedListener { + method public void onPreferredDevicesForCapturePresetChanged(int, @NonNull java.util.List<android.media.AudioDeviceAttributes>); + } + + public static interface AudioManager.OnPreferredDevicesForStrategyChangedListener { + method public void onPreferredDevicesForStrategyChanged(@NonNull android.media.audiopolicy.AudioProductStrategy, @NonNull java.util.List<android.media.AudioDeviceAttributes>); + } + + public abstract static class AudioManager.VolumeGroupCallback { + ctor public AudioManager.VolumeGroupCallback(); + method public void onAudioVolumeGroupChanged(int, int); + } + + public final class AudioPlaybackConfiguration implements android.os.Parcelable { + method public int getClientPid(); + method public int getClientUid(); + method public int getPlayerInterfaceId(); + method public android.media.PlayerProxy getPlayerProxy(); + method public int getPlayerState(); + method public int getPlayerType(); + method public boolean isActive(); + field public static final int PLAYER_STATE_IDLE = 1; // 0x1 + field public static final int PLAYER_STATE_PAUSED = 3; // 0x3 + field public static final int PLAYER_STATE_RELEASED = 0; // 0x0 + field public static final int PLAYER_STATE_STARTED = 2; // 0x2 + field public static final int PLAYER_STATE_STOPPED = 4; // 0x4 + field public static final int PLAYER_STATE_UNKNOWN = -1; // 0xffffffff + field public static final int PLAYER_TYPE_JAM_AUDIOTRACK = 1; // 0x1 + field public static final int PLAYER_TYPE_JAM_MEDIAPLAYER = 2; // 0x2 + field public static final int PLAYER_TYPE_JAM_SOUNDPOOL = 3; // 0x3 + field public static final int PLAYER_TYPE_SLES_AUDIOPLAYER_BUFFERQUEUE = 11; // 0xb + field public static final int PLAYER_TYPE_SLES_AUDIOPLAYER_URI_FD = 12; // 0xc + field public static final int PLAYER_TYPE_UNKNOWN = -1; // 0xffffffff + } + + public class AudioRecord implements android.media.AudioRecordingMonitor android.media.AudioRouting android.media.MicrophoneDirection { + ctor public AudioRecord(android.media.AudioAttributes, android.media.AudioFormat, int, int) throws java.lang.IllegalArgumentException; + } + + public static class AudioRecord.Builder { + method public android.media.AudioRecord.Builder setAudioAttributes(@NonNull android.media.AudioAttributes) throws java.lang.IllegalArgumentException; + method public android.media.AudioRecord.Builder setSessionId(int) throws java.lang.IllegalArgumentException; + } + + public final class AudioRecordingConfiguration implements android.os.Parcelable { + method @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int getClientUid(); + } + + public class AudioTrack implements android.media.AudioRouting android.media.VolumeAutomation { + field @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public static final int ENCAPSULATION_MODE_HANDLE = 2; // 0x2 + } + + public static class AudioTrack.Builder { + method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public android.media.AudioTrack.Builder setTunerConfiguration(@NonNull android.media.AudioTrack.TunerConfiguration); + } + + public static class AudioTrack.TunerConfiguration { + ctor @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public AudioTrack.TunerConfiguration(@IntRange(from=1) int, @IntRange(from=1) int); + method @IntRange(from=1) @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int getContentId(); + method @IntRange(from=1) @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public int getSyncId(); + } + + public class HwAudioSource { + method public boolean isPlaying(); + method public void start(); + method public void stop(); + } + + public static final class HwAudioSource.Builder { + ctor public HwAudioSource.Builder(); + method @NonNull public android.media.HwAudioSource build(); + method @NonNull public android.media.HwAudioSource.Builder setAudioAttributes(@NonNull android.media.AudioAttributes); + method @NonNull public android.media.HwAudioSource.Builder setAudioDeviceInfo(@NonNull android.media.AudioDeviceInfo); + } + + public class MediaPlayer implements android.media.AudioRouting android.media.VolumeAutomation { + method @RequiresPermission("android.permission.BIND_IMS_SERVICE") public void setOnImsRxNoticeListener(@Nullable android.media.MediaPlayer.OnImsRxNoticeListener, @Nullable android.os.Handler); + } + + public static interface MediaPlayer.OnImsRxNoticeListener { + method public void onImsRxNotice(@NonNull android.media.MediaPlayer, @NonNull byte[]); + } + + public final class MediaRecorder.AudioSource { + field @RequiresPermission(android.Manifest.permission.CAPTURE_AUDIO_OUTPUT) public static final int ECHO_REFERENCE = 1997; // 0x7cd + field @RequiresPermission(android.Manifest.permission.CAPTURE_AUDIO_HOTWORD) public static final int HOTWORD = 1999; // 0x7cf + field @RequiresPermission(android.Manifest.permission.CAPTURE_AUDIO_OUTPUT) public static final int RADIO_TUNER = 1998; // 0x7ce + } + + public final class MediaTranscodeManager { + method @NonNull public android.media.MediaTranscodeManager.TranscodingSession enqueueRequest(@NonNull android.media.MediaTranscodeManager.TranscodingRequest, @NonNull java.util.concurrent.Executor, @NonNull android.media.MediaTranscodeManager.OnTranscodingFinishedListener) throws java.io.FileNotFoundException, android.media.MediaTranscodingException.ServiceNotAvailableException; + field public static final int PRIORITY_REALTIME = 1; // 0x1 + field public static final int TRANSCODING_TYPE_VIDEO = 1; // 0x1 + } + + @java.lang.FunctionalInterface public static interface MediaTranscodeManager.OnTranscodingFinishedListener { + method public void onTranscodingFinished(@NonNull android.media.MediaTranscodeManager.TranscodingSession); + } + + public static final class MediaTranscodeManager.TranscodingRequest { + method public int getClientPid(); + method public int getClientUid(); + method @NonNull public android.net.Uri getDestinationUri(); + method public int getPriority(); + method @NonNull public android.net.Uri getSourceUri(); + method public int getType(); + method @Nullable public android.media.MediaFormat getVideoTrackFormat(); + } + + public static final class MediaTranscodeManager.TranscodingRequest.Builder { + ctor public MediaTranscodeManager.TranscodingRequest.Builder(); + method @NonNull public android.media.MediaTranscodeManager.TranscodingRequest build(); + method @NonNull public android.media.MediaTranscodeManager.TranscodingRequest.Builder setClientPid(int); + method @NonNull public android.media.MediaTranscodeManager.TranscodingRequest.Builder setClientUid(int); + method @NonNull public android.media.MediaTranscodeManager.TranscodingRequest.Builder setDestinationUri(@NonNull android.net.Uri); + method @NonNull public android.media.MediaTranscodeManager.TranscodingRequest.Builder setPriority(int); + method @NonNull public android.media.MediaTranscodeManager.TranscodingRequest.Builder setSourceUri(@NonNull android.net.Uri); + method @NonNull public android.media.MediaTranscodeManager.TranscodingRequest.Builder setType(int); + method @NonNull public android.media.MediaTranscodeManager.TranscodingRequest.Builder setVideoTrackFormat(@NonNull android.media.MediaFormat); + } + + public static class MediaTranscodeManager.TranscodingRequest.MediaFormatResolver { + ctor public MediaTranscodeManager.TranscodingRequest.MediaFormatResolver(); + method @Nullable public android.media.MediaFormat resolveVideoFormat(); + method @NonNull public android.media.MediaTranscodeManager.TranscodingRequest.MediaFormatResolver setSourceVideoFormatHint(@NonNull android.media.MediaFormat); + method public boolean shouldTranscode(); + field public static final String CAPS_SUPPORTS_HEVC = "support-hevc"; + } + + public static final class MediaTranscodeManager.TranscodingSession { + method public void cancel(); + method @IntRange(from=0, to=100) public int getProgress(); + method public int getResult(); + method public int getSessionId(); + method public int getStatus(); + method public void setOnProgressUpdateListener(@NonNull java.util.concurrent.Executor, @Nullable android.media.MediaTranscodeManager.TranscodingSession.OnProgressUpdateListener); + method public void setOnProgressUpdateListener(int, @NonNull java.util.concurrent.Executor, @Nullable android.media.MediaTranscodeManager.TranscodingSession.OnProgressUpdateListener); + field public static final int RESULT_CANCELED = 4; // 0x4 + field public static final int RESULT_ERROR = 3; // 0x3 + field public static final int RESULT_NONE = 1; // 0x1 + field public static final int RESULT_SUCCESS = 2; // 0x2 + field public static final int STATUS_FINISHED = 3; // 0x3 + 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 + } + + @java.lang.FunctionalInterface public static interface MediaTranscodeManager.TranscodingSession.OnProgressUpdateListener { + method public void onProgressUpdate(@NonNull android.media.MediaTranscodeManager.TranscodingSession, @IntRange(from=0, to=100) int); + } + + public class PlayerProxy { + method public void pause(); + method public void setPan(float); + method public void setStartDelayMs(int); + method public void setVolume(float); + method public void start(); + method public void stop(); + } + + public class RingtoneManager { + method @RequiresPermission(android.Manifest.permission.WRITE_SETTINGS) public static void ensureDefaultRingtones(@NonNull android.content.Context); + } + +} + +package android.media.audiofx { + + public class AudioEffect { + ctor @RequiresPermission("android.permission.MODIFY_DEFAULT_AUDIO_EFFECTS") public AudioEffect(@NonNull java.util.UUID, @NonNull android.media.AudioDeviceAttributes); + method @RequiresPermission("android.permission.MODIFY_DEFAULT_AUDIO_EFFECTS") public static boolean isEffectSupportedForDevice(@NonNull java.util.UUID, @NonNull android.media.AudioDeviceAttributes); + } + +} + +package android.media.audiopolicy { + + public class AudioMix { + method public int getMixState(); + field public static final int MIX_STATE_DISABLED = -1; // 0xffffffff + field public static final int MIX_STATE_IDLE = 0; // 0x0 + field public static final int MIX_STATE_MIXING = 1; // 0x1 + field public static final int ROUTE_FLAG_LOOP_BACK = 2; // 0x2 + field public static final int ROUTE_FLAG_RENDER = 1; // 0x1 + } + + public static class AudioMix.Builder { + ctor public AudioMix.Builder(android.media.audiopolicy.AudioMixingRule) throws java.lang.IllegalArgumentException; + method public android.media.audiopolicy.AudioMix build() throws java.lang.IllegalArgumentException; + method public android.media.audiopolicy.AudioMix.Builder setDevice(@NonNull android.media.AudioDeviceInfo) throws java.lang.IllegalArgumentException; + method public android.media.audiopolicy.AudioMix.Builder setFormat(android.media.AudioFormat) throws java.lang.IllegalArgumentException; + method public android.media.audiopolicy.AudioMix.Builder setRouteFlags(int) throws java.lang.IllegalArgumentException; + } + + public class AudioMixingRule { + field public static final int RULE_MATCH_ATTRIBUTE_CAPTURE_PRESET = 2; // 0x2 + field public static final int RULE_MATCH_ATTRIBUTE_USAGE = 1; // 0x1 + field public static final int RULE_MATCH_UID = 4; // 0x4 + field public static final int RULE_MATCH_USERID = 8; // 0x8 + } + + public static class AudioMixingRule.Builder { + ctor public AudioMixingRule.Builder(); + method public android.media.audiopolicy.AudioMixingRule.Builder addMixRule(int, Object) throws java.lang.IllegalArgumentException; + method public android.media.audiopolicy.AudioMixingRule.Builder addRule(android.media.AudioAttributes, int) throws java.lang.IllegalArgumentException; + method @NonNull public android.media.audiopolicy.AudioMixingRule.Builder allowPrivilegedPlaybackCapture(boolean); + method public android.media.audiopolicy.AudioMixingRule build(); + method public android.media.audiopolicy.AudioMixingRule.Builder excludeMixRule(int, Object) throws java.lang.IllegalArgumentException; + method public android.media.audiopolicy.AudioMixingRule.Builder excludeRule(android.media.AudioAttributes, int) throws java.lang.IllegalArgumentException; + } + + public class AudioPolicy { + method public int attachMixes(@NonNull java.util.List<android.media.audiopolicy.AudioMix>); + method public android.media.AudioRecord createAudioRecordSink(android.media.audiopolicy.AudioMix) throws java.lang.IllegalArgumentException; + method public android.media.AudioTrack createAudioTrackSource(android.media.audiopolicy.AudioMix) throws java.lang.IllegalArgumentException; + method public int detachMixes(@NonNull java.util.List<android.media.audiopolicy.AudioMix>); + method public int getFocusDuckingBehavior(); + method public int getStatus(); + method public boolean removeUidDeviceAffinity(int); + method public boolean removeUserIdDeviceAffinity(int); + method public int setFocusDuckingBehavior(int) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException; + method public void setRegistration(String); + method public boolean setUidDeviceAffinity(int, @NonNull java.util.List<android.media.AudioDeviceInfo>); + method public boolean setUserIdDeviceAffinity(int, @NonNull java.util.List<android.media.AudioDeviceInfo>); + method public String toLogFriendlyString(); + field public static final int FOCUS_POLICY_DUCKING_DEFAULT = 0; // 0x0 + field public static final int FOCUS_POLICY_DUCKING_IN_APP = 0; // 0x0 + field public static final int FOCUS_POLICY_DUCKING_IN_POLICY = 1; // 0x1 + field public static final int POLICY_STATUS_REGISTERED = 2; // 0x2 + field public static final int POLICY_STATUS_UNREGISTERED = 1; // 0x1 + } + + public abstract static class AudioPolicy.AudioPolicyFocusListener { + ctor public AudioPolicy.AudioPolicyFocusListener(); + method public void onAudioFocusAbandon(android.media.AudioFocusInfo); + method public void onAudioFocusGrant(android.media.AudioFocusInfo, int); + method public void onAudioFocusLoss(android.media.AudioFocusInfo, boolean); + method public void onAudioFocusRequest(android.media.AudioFocusInfo, int); + } + + public abstract static class AudioPolicy.AudioPolicyStatusListener { + ctor public AudioPolicy.AudioPolicyStatusListener(); + method public void onMixStateUpdate(android.media.audiopolicy.AudioMix); + method public void onStatusChange(); + } + + public abstract static class AudioPolicy.AudioPolicyVolumeCallback { + ctor public AudioPolicy.AudioPolicyVolumeCallback(); + method public void onVolumeAdjustment(int); + } + + public static class AudioPolicy.Builder { + ctor public AudioPolicy.Builder(android.content.Context); + method @NonNull public android.media.audiopolicy.AudioPolicy.Builder addMix(@NonNull android.media.audiopolicy.AudioMix) throws java.lang.IllegalArgumentException; + method @NonNull public android.media.audiopolicy.AudioPolicy build(); + method public void setAudioPolicyFocusListener(android.media.audiopolicy.AudioPolicy.AudioPolicyFocusListener); + method public void setAudioPolicyStatusListener(android.media.audiopolicy.AudioPolicy.AudioPolicyStatusListener); + method @NonNull public android.media.audiopolicy.AudioPolicy.Builder setAudioPolicyVolumeCallback(@NonNull android.media.audiopolicy.AudioPolicy.AudioPolicyVolumeCallback); + method @NonNull public android.media.audiopolicy.AudioPolicy.Builder setIsAudioFocusPolicy(boolean); + method @NonNull public android.media.audiopolicy.AudioPolicy.Builder setLooper(@NonNull android.os.Looper) throws java.lang.IllegalArgumentException; + } + + public final class AudioProductStrategy implements android.os.Parcelable { + method @NonNull public static android.media.audiopolicy.AudioProductStrategy createInvalidAudioProductStrategy(int); + method public int describeContents(); + method @NonNull public android.media.AudioAttributes getAudioAttributes(); + method public int getId(); + method public boolean supportsAudioAttributes(@NonNull android.media.AudioAttributes); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.media.audiopolicy.AudioProductStrategy> CREATOR; + } + + public final class AudioVolumeGroup implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public java.util.List<android.media.AudioAttributes> getAudioAttributes(); + method public int getId(); + method @NonNull public int[] getLegacyStreamTypes(); + method @NonNull public String name(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field public static final android.os.Parcelable.Creator<android.media.audiopolicy.AudioVolumeGroup> CREATOR; + field public static final int DEFAULT_VOLUME_GROUP = -1; // 0xffffffff + } + +} + +package android.media.musicrecognition { + + public class MusicRecognitionManager { + method @RequiresPermission(android.Manifest.permission.MANAGE_MUSIC_RECOGNITION) public void beginStreamingSearch(@NonNull android.media.musicrecognition.RecognitionRequest, @NonNull java.util.concurrent.Executor, @NonNull android.media.musicrecognition.MusicRecognitionManager.RecognitionCallback); + field public static final int RECOGNITION_FAILED_AUDIO_UNAVAILABLE = 7; // 0x7 + field public static final int RECOGNITION_FAILED_NOT_FOUND = 1; // 0x1 + field public static final int RECOGNITION_FAILED_NO_CONNECTIVITY = 2; // 0x2 + field public static final int RECOGNITION_FAILED_SERVICE_KILLED = 5; // 0x5 + field public static final int RECOGNITION_FAILED_SERVICE_UNAVAILABLE = 3; // 0x3 + field public static final int RECOGNITION_FAILED_TIMEOUT = 6; // 0x6 + field public static final int RECOGNITION_FAILED_UNKNOWN = -1; // 0xffffffff + } + + public static interface MusicRecognitionManager.RecognitionCallback { + method public void onAudioStreamClosed(); + method public void onRecognitionFailed(@NonNull android.media.musicrecognition.RecognitionRequest, int); + method public void onRecognitionSucceeded(@NonNull android.media.musicrecognition.RecognitionRequest, @NonNull android.media.MediaMetadata, @Nullable android.os.Bundle); + } + + public abstract class MusicRecognitionService extends android.app.Service { + ctor public MusicRecognitionService(); + method public abstract void onRecognize(@NonNull android.os.ParcelFileDescriptor, @NonNull android.media.AudioFormat, @NonNull android.media.musicrecognition.MusicRecognitionService.Callback); + } + + public static interface MusicRecognitionService.Callback { + method public void onRecognitionFailed(int); + method public void onRecognitionSucceeded(@NonNull android.media.MediaMetadata, @Nullable android.os.Bundle); + } + + public final class RecognitionRequest implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public android.media.AudioAttributes getAudioAttributes(); + method @NonNull public android.media.AudioFormat getAudioFormat(); + method public int getCaptureSession(); + method public int getIgnoreBeginningFrames(); + method public int getMaxAudioLengthSeconds(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.media.musicrecognition.RecognitionRequest> CREATOR; + } + + public static final class RecognitionRequest.Builder { + ctor public RecognitionRequest.Builder(); + method @NonNull public android.media.musicrecognition.RecognitionRequest build(); + method @NonNull public android.media.musicrecognition.RecognitionRequest.Builder setAudioAttributes(@NonNull android.media.AudioAttributes); + method @NonNull public android.media.musicrecognition.RecognitionRequest.Builder setAudioFormat(@NonNull android.media.AudioFormat); + method @NonNull public android.media.musicrecognition.RecognitionRequest.Builder setCaptureSession(int); + method @NonNull public android.media.musicrecognition.RecognitionRequest.Builder setIgnoreBeginningFrames(int); + method @NonNull public android.media.musicrecognition.RecognitionRequest.Builder setMaxAudioLengthSeconds(int); + } + +} + +package android.media.session { + + public final class MediaSessionManager { + method @RequiresPermission(android.Manifest.permission.MEDIA_CONTENT_CONTROL) public void addOnMediaKeyEventDispatchedListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.session.MediaSessionManager.OnMediaKeyEventDispatchedListener); + method @RequiresPermission(android.Manifest.permission.MEDIA_CONTENT_CONTROL) public void addOnMediaKeyEventSessionChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.session.MediaSessionManager.OnMediaKeyEventSessionChangedListener); + method @RequiresPermission(android.Manifest.permission.MEDIA_CONTENT_CONTROL) public void removeOnMediaKeyEventDispatchedListener(@NonNull android.media.session.MediaSessionManager.OnMediaKeyEventDispatchedListener); + method @RequiresPermission(android.Manifest.permission.MEDIA_CONTENT_CONTROL) public void removeOnMediaKeyEventSessionChangedListener(@NonNull android.media.session.MediaSessionManager.OnMediaKeyEventSessionChangedListener); + method @RequiresPermission(android.Manifest.permission.SET_MEDIA_KEY_LISTENER) public void setOnMediaKeyListener(android.media.session.MediaSessionManager.OnMediaKeyListener, @Nullable android.os.Handler); + method @RequiresPermission(android.Manifest.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER) public void setOnVolumeKeyLongPressListener(android.media.session.MediaSessionManager.OnVolumeKeyLongPressListener, @Nullable android.os.Handler); + } + + public static interface MediaSessionManager.OnMediaKeyEventDispatchedListener { + method public void onMediaKeyEventDispatched(@NonNull android.view.KeyEvent, @NonNull String, @Nullable android.media.session.MediaSession.Token); + } + + public static interface MediaSessionManager.OnMediaKeyEventSessionChangedListener { + method public void onMediaKeyEventSessionChanged(@NonNull String, @Nullable android.media.session.MediaSession.Token); + } + + public static interface MediaSessionManager.OnMediaKeyListener { + method public boolean onMediaKey(android.view.KeyEvent); + } + + public static interface MediaSessionManager.OnVolumeKeyLongPressListener { + method public void onVolumeKeyLongPress(android.view.KeyEvent); + } + +} + +package android.media.soundtrigger { + + public abstract class SoundTriggerDetectionService extends android.app.Service { + ctor public SoundTriggerDetectionService(); + method @MainThread public void onConnected(@NonNull java.util.UUID, @Nullable android.os.Bundle); + method @MainThread public void onDisconnected(@NonNull java.util.UUID, @Nullable android.os.Bundle); + method @MainThread public void onError(@NonNull java.util.UUID, @Nullable android.os.Bundle, int, int); + method @MainThread public void onGenericRecognitionEvent(@NonNull java.util.UUID, @Nullable android.os.Bundle, int, @NonNull android.hardware.soundtrigger.SoundTrigger.RecognitionEvent); + method @MainThread public abstract void onStopOperation(@NonNull java.util.UUID, @Nullable android.os.Bundle, int); + method public final void operationFinished(@Nullable java.util.UUID, int); + } + + public final class SoundTriggerDetector { + method @RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER) public boolean startRecognition(int); + method @RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER) 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_FLAG_ENABLE_AUDIO_ECHO_CANCELLATION = 4; // 0x4 + field public static final int RECOGNITION_FLAG_ENABLE_AUDIO_NOISE_SUPPRESSION = 8; // 0x8 + } + + public abstract static class SoundTriggerDetector.Callback { + ctor public SoundTriggerDetector.Callback(); + method public abstract void onAvailabilityChanged(int); + method public abstract void onDetected(@NonNull android.media.soundtrigger.SoundTriggerDetector.EventPayload); + method public abstract void onError(); + method public abstract void onRecognitionPaused(); + method public abstract void onRecognitionResumed(); + } + + public static class SoundTriggerDetector.EventPayload { + method @Nullable public android.media.AudioFormat getCaptureAudioFormat(); + method @Nullable public byte[] getTriggerAudio(); + } + + public final class SoundTriggerManager { + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER) public android.media.soundtrigger.SoundTriggerDetector createSoundTriggerDetector(java.util.UUID, @NonNull android.media.soundtrigger.SoundTriggerDetector.Callback, @Nullable android.os.Handler); + method @RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER) public void deleteModel(java.util.UUID); + method public int getDetectionServiceOperationsTimeout(); + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER) public android.media.soundtrigger.SoundTriggerManager.Model getModel(java.util.UUID); + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER) public android.hardware.soundtrigger.SoundTrigger.ModuleProperties getModuleProperties(); + method @RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER) public int getParameter(@NonNull java.util.UUID, int); + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER) public android.hardware.soundtrigger.SoundTrigger.ModelParamRange queryParameter(@Nullable java.util.UUID, int); + method @RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER) public int setParameter(@Nullable java.util.UUID, int, int); + method @RequiresPermission(android.Manifest.permission.MANAGE_SOUND_TRIGGER) public void updateModel(android.media.soundtrigger.SoundTriggerManager.Model); + } + + public static class SoundTriggerManager.Model { + method @NonNull public static android.media.soundtrigger.SoundTriggerManager.Model create(@NonNull java.util.UUID, @NonNull java.util.UUID, @Nullable byte[], int); + method @NonNull public static android.media.soundtrigger.SoundTriggerManager.Model create(@NonNull java.util.UUID, @NonNull java.util.UUID, @Nullable byte[]); + method @Nullable public byte[] getModelData(); + method @NonNull public java.util.UUID getModelUuid(); + method @NonNull public java.util.UUID getVendorUuid(); + method public int getVersion(); + } + +} + +package android.media.tv { + + public final class DvbDeviceInfo implements android.os.Parcelable { + ctor public DvbDeviceInfo(int, int); + method public int describeContents(); + method @IntRange(from=0) public int getAdapterId(); + method @IntRange(from=0) public int getDeviceId(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.DvbDeviceInfo> CREATOR; + } + + public final class TunedInfo implements android.os.Parcelable { + method public int describeContents(); + method public int getAppTag(); + method public int getAppType(); + method @Nullable public android.net.Uri getChannelUri(); + method @NonNull public String getInputId(); + method public boolean isForeground(); + method public boolean isRecordingSession(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field public static final int APP_TAG_SELF = 0; // 0x0 + field public static final int APP_TYPE_NON_SYSTEM = 3; // 0x3 + field public static final int APP_TYPE_SELF = 1; // 0x1 + field public static final int APP_TYPE_SYSTEM = 2; // 0x2 + field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.TunedInfo> CREATOR; + } + + public final class TvContentRatingSystemInfo implements android.os.Parcelable { + method public static android.media.tv.TvContentRatingSystemInfo createTvContentRatingSystemInfo(int, android.content.pm.ApplicationInfo); + method public int describeContents(); + method public android.net.Uri getXmlUri(); + method public boolean isSystemDefined(); + method public void writeToParcel(android.os.Parcel, int); + } + + public final class TvContract { + method public static android.net.Uri buildChannelsUriForInput(@Nullable String, boolean); + method public static android.net.Uri buildChannelsUriForInput(@Nullable String, @Nullable String, boolean); + field public static final String ACTION_CHANNEL_BROWSABLE_REQUESTED = "android.media.tv.action.CHANNEL_BROWSABLE_REQUESTED"; + field public static final String EXTRA_BLOCKED_PACKAGES = "android.media.tv.extra.BLOCKED_PACKAGES"; + field public static final String EXTRA_COLUMN_NAME = "android.media.tv.extra.COLUMN_NAME"; + field public static final String EXTRA_DATA_TYPE = "android.media.tv.extra.DATA_TYPE"; + field public static final String EXTRA_DEFAULT_VALUE = "android.media.tv.extra.DEFAULT_VALUE"; + field public static final String EXTRA_EXISTING_COLUMN_NAMES = "android.media.tv.extra.EXISTING_COLUMN_NAMES"; + field public static final String EXTRA_PACKAGE_NAME = "android.media.tv.extra.PACKAGE_NAME"; + field public static final String EXTRA_RESULT_CODE = "android.media.tv.extra.RESULT_CODE"; + field public static final String METHOD_ADD_COLUMN = "add_column"; + field public static final String METHOD_BLOCK_PACKAGE = "block_package"; + field public static final String METHOD_GET_BLOCKED_PACKAGES = "get_blocked_packages"; + field public static final String METHOD_GET_COLUMNS = "get_columns"; + field public static final String METHOD_UNBLOCK_PACKAGE = "unblock_package"; + field public static final int RESULT_ERROR_INVALID_ARGUMENT = 2; // 0x2 + field public static final int RESULT_ERROR_IO = 1; // 0x1 + field public static final int RESULT_OK = 0; // 0x0 + } + + public static final class TvContract.WatchedPrograms implements android.media.tv.TvContract.BaseTvColumns { + field public static final String COLUMN_CHANNEL_ID = "channel_id"; + field public static final String COLUMN_DESCRIPTION = "description"; + field public static final String COLUMN_END_TIME_UTC_MILLIS = "end_time_utc_millis"; + field public static final String COLUMN_INTERNAL_SESSION_TOKEN = "session_token"; + field public static final String COLUMN_INTERNAL_TUNE_PARAMS = "tune_params"; + field public static final String COLUMN_START_TIME_UTC_MILLIS = "start_time_utc_millis"; + field public static final String COLUMN_TITLE = "title"; + field public static final String COLUMN_WATCH_END_TIME_UTC_MILLIS = "watch_end_time_utc_millis"; + field public static final String COLUMN_WATCH_START_TIME_UTC_MILLIS = "watch_start_time_utc_millis"; + field public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/watched_program"; + field public static final String CONTENT_TYPE = "vnd.android.cursor.dir/watched_program"; + field public static final android.net.Uri CONTENT_URI; + } + + public final class TvInputHardwareInfo implements android.os.Parcelable { + method public int describeContents(); + method public String getAudioAddress(); + method public int getAudioType(); + method public int getCableConnectionStatus(); + method public int getDeviceId(); + method public int getHdmiPortId(); + method public int getType(); + method public void readFromParcel(android.os.Parcel); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CABLE_CONNECTION_STATUS_CONNECTED = 1; // 0x1 + field public static final int CABLE_CONNECTION_STATUS_DISCONNECTED = 2; // 0x2 + field public static final int CABLE_CONNECTION_STATUS_UNKNOWN = 0; // 0x0 + field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.TvInputHardwareInfo> CREATOR; + field public static final int TV_INPUT_TYPE_COMPONENT = 6; // 0x6 + field public static final int TV_INPUT_TYPE_COMPOSITE = 3; // 0x3 + field public static final int TV_INPUT_TYPE_DISPLAY_PORT = 10; // 0xa + field public static final int TV_INPUT_TYPE_DVI = 8; // 0x8 + field public static final int TV_INPUT_TYPE_HDMI = 9; // 0x9 + field public static final int TV_INPUT_TYPE_OTHER_HARDWARE = 1; // 0x1 + field public static final int TV_INPUT_TYPE_SCART = 5; // 0x5 + field public static final int TV_INPUT_TYPE_SVIDEO = 4; // 0x4 + field public static final int TV_INPUT_TYPE_TUNER = 2; // 0x2 + field public static final int TV_INPUT_TYPE_VGA = 7; // 0x7 + } + + public static final class TvInputHardwareInfo.Builder { + ctor public TvInputHardwareInfo.Builder(); + method public android.media.tv.TvInputHardwareInfo.Builder audioAddress(String); + method public android.media.tv.TvInputHardwareInfo.Builder audioType(int); + method public android.media.tv.TvInputHardwareInfo build(); + method public android.media.tv.TvInputHardwareInfo.Builder cableConnectionStatus(int); + method public android.media.tv.TvInputHardwareInfo.Builder deviceId(int); + method public android.media.tv.TvInputHardwareInfo.Builder hdmiPortId(int); + method public android.media.tv.TvInputHardwareInfo.Builder type(int); + } + + public final class TvInputInfo implements android.os.Parcelable { + method @Deprecated public static android.media.tv.TvInputInfo createTvInputInfo(android.content.Context, android.content.pm.ResolveInfo, android.hardware.hdmi.HdmiDeviceInfo, String, String, android.net.Uri) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; + method @Deprecated public static android.media.tv.TvInputInfo createTvInputInfo(android.content.Context, android.content.pm.ResolveInfo, android.hardware.hdmi.HdmiDeviceInfo, String, int, android.graphics.drawable.Icon) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; + method @Deprecated public static android.media.tv.TvInputInfo createTvInputInfo(android.content.Context, android.content.pm.ResolveInfo, android.media.tv.TvInputHardwareInfo, String, android.net.Uri) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; + method @Deprecated public static android.media.tv.TvInputInfo createTvInputInfo(android.content.Context, android.content.pm.ResolveInfo, android.media.tv.TvInputHardwareInfo, int, android.graphics.drawable.Icon) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException; + method public android.hardware.hdmi.HdmiDeviceInfo getHdmiDeviceInfo(); + method public boolean isConnectedToHdmiSwitch(); + method public boolean isHardwareInput(); + method public android.graphics.drawable.Drawable loadIcon(@NonNull android.content.Context, int); + } + + public static final class TvInputInfo.Builder { + method public android.media.tv.TvInputInfo.Builder setHdmiDeviceInfo(android.hardware.hdmi.HdmiDeviceInfo); + method public android.media.tv.TvInputInfo.Builder setIcon(android.graphics.drawable.Icon); + method public android.media.tv.TvInputInfo.Builder setIcon(android.graphics.drawable.Icon, int); + method public android.media.tv.TvInputInfo.Builder setLabel(CharSequence); + method public android.media.tv.TvInputInfo.Builder setLabel(@StringRes int); + method public android.media.tv.TvInputInfo.Builder setParentId(String); + method public android.media.tv.TvInputInfo.Builder setTvInputHardwareInfo(android.media.tv.TvInputHardwareInfo); + } + + public static final class TvInputInfo.TvInputSettings { + method public static java.util.Map<java.lang.String,java.lang.String> getCustomLabels(android.content.Context, int); + method public static java.util.Set<java.lang.String> getHiddenTvInputIds(android.content.Context, int); + method public static void putCustomLabels(android.content.Context, java.util.Map<java.lang.String,java.lang.String>, int); + method public static void putHiddenTvInputs(android.content.Context, java.util.Set<java.lang.String>, int); + } + + public final class TvInputManager { + method @RequiresPermission(android.Manifest.permission.TV_INPUT_HARDWARE) public android.media.tv.TvInputManager.Hardware acquireTvInputHardware(int, @NonNull android.media.tv.TvInputInfo, @NonNull android.media.tv.TvInputManager.HardwareCallback); + method @Nullable @RequiresPermission(android.Manifest.permission.TV_INPUT_HARDWARE) public android.media.tv.TvInputManager.Hardware acquireTvInputHardware(int, @NonNull android.media.tv.TvInputInfo, @Nullable String, int, @NonNull java.util.concurrent.Executor, @NonNull android.media.tv.TvInputManager.HardwareCallback); + method @RequiresPermission(android.Manifest.permission.MODIFY_PARENTAL_CONTROLS) public void addBlockedRating(@NonNull android.media.tv.TvContentRating); + method @RequiresPermission(android.Manifest.permission.CAPTURE_TV_INPUT) public boolean captureFrame(String, android.view.Surface, android.media.tv.TvStreamConfig); + method @RequiresPermission(android.Manifest.permission.CAPTURE_TV_INPUT) public java.util.List<android.media.tv.TvStreamConfig> getAvailableTvStreamConfigList(String); + method @NonNull @RequiresPermission("com.android.providers.tv.permission.ACCESS_WATCHED_PROGRAMS") public java.util.List<android.media.tv.TunedInfo> getCurrentTunedInfos(); + method @NonNull @RequiresPermission("android.permission.DVB_DEVICE") public java.util.List<android.media.tv.DvbDeviceInfo> getDvbDeviceList(); + method @RequiresPermission(android.Manifest.permission.TV_INPUT_HARDWARE) public java.util.List<android.media.tv.TvInputHardwareInfo> getHardwareList(); + method @RequiresPermission(android.Manifest.permission.READ_CONTENT_RATING_SYSTEMS) public java.util.List<android.media.tv.TvContentRatingSystemInfo> getTvContentRatingSystemList(); + method @RequiresPermission(android.Manifest.permission.CAPTURE_TV_INPUT) public boolean isSingleSessionActive(); + method @RequiresPermission(android.Manifest.permission.NOTIFY_TV_INPUTS) public void notifyPreviewProgramAddedToWatchNext(String, long, long); + method @RequiresPermission(android.Manifest.permission.NOTIFY_TV_INPUTS) public void notifyPreviewProgramBrowsableDisabled(String, long); + method @RequiresPermission(android.Manifest.permission.NOTIFY_TV_INPUTS) public void notifyWatchNextProgramBrowsableDisabled(String, long); + method @Nullable @RequiresPermission("android.permission.DVB_DEVICE") public android.os.ParcelFileDescriptor openDvbDevice(@NonNull android.media.tv.DvbDeviceInfo, int); + method @RequiresPermission(android.Manifest.permission.TV_INPUT_HARDWARE) public void releaseTvInputHardware(int, android.media.tv.TvInputManager.Hardware); + method @RequiresPermission(android.Manifest.permission.MODIFY_PARENTAL_CONTROLS) public void removeBlockedRating(@NonNull android.media.tv.TvContentRating); + method @RequiresPermission(android.Manifest.permission.MODIFY_PARENTAL_CONTROLS) public void setParentalControlsEnabled(boolean); + } + + public static final class TvInputManager.Hardware { + method public void overrideAudioSink(int, String, int, int, int); + method public void setStreamVolume(float); + method public boolean setSurface(android.view.Surface, android.media.tv.TvStreamConfig); + } + + public abstract static class TvInputManager.HardwareCallback { + ctor public TvInputManager.HardwareCallback(); + method public abstract void onReleased(); + method public abstract void onStreamConfigChanged(android.media.tv.TvStreamConfig[]); + } + + public abstract static class TvInputManager.TvInputCallback { + method public void onCurrentTunedInfosUpdated(@NonNull java.util.List<android.media.tv.TunedInfo>); + } + + public abstract class TvInputService extends android.app.Service { + method @Nullable public android.os.IBinder createExtension(); + method @Nullable public android.media.tv.TvInputInfo onHardwareAdded(android.media.tv.TvInputHardwareInfo); + method @Nullable public String onHardwareRemoved(android.media.tv.TvInputHardwareInfo); + method @Nullable public android.media.tv.TvInputInfo onHdmiDeviceAdded(android.hardware.hdmi.HdmiDeviceInfo); + method @Nullable public String onHdmiDeviceRemoved(android.hardware.hdmi.HdmiDeviceInfo); + method public void onHdmiDeviceUpdated(@NonNull android.hardware.hdmi.HdmiDeviceInfo); + } + + public abstract static class TvInputService.RecordingSession { + method public void notifySessionEvent(@NonNull String, android.os.Bundle); + } + + public abstract static class TvInputService.Session implements android.view.KeyEvent.Callback { + method public void notifySessionEvent(@NonNull String, android.os.Bundle); + method public void onSetMain(boolean); + } + + public abstract static class TvRecordingClient.RecordingCallback { + method public void onEvent(String, String, android.os.Bundle); + } + + public class TvStreamConfig implements android.os.Parcelable { + method public int describeContents(); + method public int getGeneration(); + method public int getMaxHeight(); + method public int getMaxWidth(); + method public int getStreamId(); + method public int getType(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.media.tv.TvStreamConfig> CREATOR; + field public static final int STREAM_TYPE_BUFFER_PRODUCER = 2; // 0x2 + field public static final int STREAM_TYPE_INDEPENDENT_VIDEO_SOURCE = 1; // 0x1 + } + + public static final class TvStreamConfig.Builder { + ctor public TvStreamConfig.Builder(); + method public android.media.tv.TvStreamConfig build(); + method public android.media.tv.TvStreamConfig.Builder generation(int); + method public android.media.tv.TvStreamConfig.Builder maxHeight(int); + method public android.media.tv.TvStreamConfig.Builder maxWidth(int); + method public android.media.tv.TvStreamConfig.Builder streamId(int); + method public android.media.tv.TvStreamConfig.Builder type(int); + } + + public class TvView extends android.view.ViewGroup { + method @RequiresPermission("android.permission.CHANGE_HDMI_CEC_ACTIVE_SOURCE") public void setMain(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PARENTAL_CONTROLS) public void unblockContent(android.media.tv.TvContentRating); + } + + public abstract static class TvView.TvInputCallback { + method public void onEvent(String, String, android.os.Bundle); + } + +} + +package android.media.tv.tuner { + + public class DemuxCapabilities { + method public int getAudioFilterCount(); + method public int getDemuxCount(); + method public int getFilterCapabilities(); + method @NonNull @Size(5) public int[] getLinkCapabilities(); + method public int getPcrFilterCount(); + method public int getPesFilterCount(); + method public int getPlaybackCount(); + method public int getRecordCount(); + method public int getSectionFilterCount(); + method public long getSectionFilterLength(); + method public int getTsFilterCount(); + method public int getVideoFilterCount(); + method public boolean isTimeFilterSupported(); + } + + public class Descrambler implements java.lang.AutoCloseable { + method public int addPid(int, int, @Nullable android.media.tv.tuner.filter.Filter); + method public void close(); + method public int removePid(int, int, @Nullable android.media.tv.tuner.filter.Filter); + method public int setKeyToken(@NonNull byte[]); + field public static final int PID_TYPE_MMTP = 2; // 0x2 + field public static final int PID_TYPE_T = 1; // 0x1 + } + + public class Lnb implements java.lang.AutoCloseable { + method public void close(); + method public int sendDiseqcMessage(@NonNull byte[]); + method public int setSatellitePosition(int); + method public int setTone(int); + method public int setVoltage(int); + field public static final int EVENT_TYPE_DISEQC_RX_OVERFLOW = 0; // 0x0 + field public static final int EVENT_TYPE_DISEQC_RX_PARITY_ERROR = 2; // 0x2 + field public static final int EVENT_TYPE_DISEQC_RX_TIMEOUT = 1; // 0x1 + field public static final int EVENT_TYPE_LNB_OVERLOAD = 3; // 0x3 + field public static final int POSITION_A = 1; // 0x1 + field public static final int POSITION_B = 2; // 0x2 + field public static final int POSITION_UNDEFINED = 0; // 0x0 + field public static final int TONE_CONTINUOUS = 1; // 0x1 + field public static final int TONE_NONE = 0; // 0x0 + field public static final int VOLTAGE_11V = 2; // 0x2 + field public static final int VOLTAGE_12V = 3; // 0x3 + field public static final int VOLTAGE_13V = 4; // 0x4 + field public static final int VOLTAGE_14V = 5; // 0x5 + field public static final int VOLTAGE_15V = 6; // 0x6 + field public static final int VOLTAGE_18V = 7; // 0x7 + field public static final int VOLTAGE_19V = 8; // 0x8 + field public static final int VOLTAGE_5V = 1; // 0x1 + field public static final int VOLTAGE_NONE = 0; // 0x0 + } + + public interface LnbCallback { + method public void onDiseqcMessage(@NonNull byte[]); + method public void onEvent(int); + } + + public class Tuner implements java.lang.AutoCloseable { + ctor @RequiresPermission(android.Manifest.permission.ACCESS_TV_TUNER) public Tuner(@NonNull android.content.Context, @Nullable String, int); + method public int cancelScanning(); + method public int cancelTuning(); + method public void clearOnTuneEventListener(); + method public void clearResourceLostListener(); + method public void close(); + method public int connectCiCam(int); + method public int disconnectCiCam(); + method public int getAvSyncHwId(@NonNull android.media.tv.tuner.filter.Filter); + method public long getAvSyncTime(int); + method @Nullable public android.media.tv.tuner.DemuxCapabilities getDemuxCapabilities(); + method @Nullable public android.media.tv.tuner.frontend.FrontendInfo getFrontendInfo(); + method @Nullable public android.media.tv.tuner.frontend.FrontendStatus getFrontendStatus(@NonNull int[]); + method public int linkFrontendToCiCam(int); + method @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_TV_DESCRAMBLER) public android.media.tv.tuner.Descrambler openDescrambler(); + method @Nullable public android.media.tv.tuner.dvr.DvrPlayback openDvrPlayback(long, @NonNull java.util.concurrent.Executor, @NonNull android.media.tv.tuner.dvr.OnPlaybackStatusChangedListener); + method @Nullable public android.media.tv.tuner.dvr.DvrRecorder openDvrRecorder(long, @NonNull java.util.concurrent.Executor, @NonNull android.media.tv.tuner.dvr.OnRecordStatusChangedListener); + method @Nullable public android.media.tv.tuner.filter.Filter openFilter(int, int, long, @Nullable java.util.concurrent.Executor, @Nullable android.media.tv.tuner.filter.FilterCallback); + method @Nullable public android.media.tv.tuner.Lnb openLnb(@NonNull java.util.concurrent.Executor, @NonNull android.media.tv.tuner.LnbCallback); + method @Nullable public android.media.tv.tuner.Lnb openLnbByName(@NonNull String, @NonNull java.util.concurrent.Executor, @NonNull android.media.tv.tuner.LnbCallback); + method @Nullable public android.media.tv.tuner.filter.TimeFilter openTimeFilter(); + method public int scan(@NonNull android.media.tv.tuner.frontend.FrontendSettings, int, @NonNull java.util.concurrent.Executor, @NonNull android.media.tv.tuner.frontend.ScanCallback); + method public int setLnaEnabled(boolean); + method public void setOnTuneEventListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.tv.tuner.frontend.OnTuneEventListener); + method public void setResourceLostListener(@NonNull java.util.concurrent.Executor, @NonNull android.media.tv.tuner.Tuner.OnResourceLostListener); + method public void shareFrontendFromTuner(@NonNull android.media.tv.tuner.Tuner); + method public int tune(@NonNull android.media.tv.tuner.frontend.FrontendSettings); + method public int unlinkFrontendToCiCam(int); + method public void updateResourcePriority(int, int); + field public static final int INVALID_AV_SYNC_ID = -1; // 0xffffffff + field public static final int INVALID_FILTER_ID = -1; // 0xffffffff + field public static final long INVALID_FILTER_ID_64BIT = -1L; // 0xffffffffffffffffL + field public static final int INVALID_FIRST_MACROBLOCK_IN_SLICE = -1; // 0xffffffff + field public static final int INVALID_FRONTEND_SETTING_FREQUENCY = -1; // 0xffffffff + field public static final int INVALID_LTS_ID = -1; // 0xffffffff + field public static final int INVALID_MMTP_RECORD_EVENT_MPT_SEQUENCE_NUM = -1; // 0xffffffff + field public static final int INVALID_STREAM_ID = 65535; // 0xffff + field public static final long INVALID_TIMESTAMP = -1L; // 0xffffffffffffffffL + field public static final int INVALID_TS_PID = 65535; // 0xffff + field public static final int RESULT_INVALID_ARGUMENT = 4; // 0x4 + field public static final int RESULT_INVALID_STATE = 3; // 0x3 + field public static final int RESULT_NOT_INITIALIZED = 2; // 0x2 + field public static final int RESULT_OUT_OF_MEMORY = 5; // 0x5 + field public static final int RESULT_SUCCESS = 0; // 0x0 + field public static final int RESULT_UNAVAILABLE = 1; // 0x1 + field public static final int RESULT_UNKNOWN_ERROR = 6; // 0x6 + field public static final int SCAN_TYPE_AUTO = 1; // 0x1 + field public static final int SCAN_TYPE_BLIND = 2; // 0x2 + field public static final int SCAN_TYPE_UNDEFINED = 0; // 0x0 + } + + public static interface Tuner.OnResourceLostListener { + method public void onResourceLost(@NonNull android.media.tv.tuner.Tuner); + } + + public final class TunerVersionChecker { + method public static int getTunerVersion(); + field public static final int TUNER_VERSION_1_0 = 65536; // 0x10000 + field public static final int TUNER_VERSION_1_1 = 65537; // 0x10001 + field public static final int TUNER_VERSION_UNKNOWN = 0; // 0x0 + } + +} + +package android.media.tv.tuner.dvr { + + public class DvrPlayback implements java.lang.AutoCloseable { + method @Deprecated public int attachFilter(@NonNull android.media.tv.tuner.filter.Filter); + method public void close(); + method public int configure(@NonNull android.media.tv.tuner.dvr.DvrSettings); + method @Deprecated public int detachFilter(@NonNull android.media.tv.tuner.filter.Filter); + method public int flush(); + method public long read(long); + method public long read(@NonNull byte[], long, long); + method public void setFileDescriptor(@NonNull android.os.ParcelFileDescriptor); + method public int start(); + method public int stop(); + field public static final int PLAYBACK_STATUS_ALMOST_EMPTY = 2; // 0x2 + field public static final int PLAYBACK_STATUS_ALMOST_FULL = 4; // 0x4 + field public static final int PLAYBACK_STATUS_EMPTY = 1; // 0x1 + field public static final int PLAYBACK_STATUS_FULL = 8; // 0x8 + } + + public class DvrRecorder implements java.lang.AutoCloseable { + method public int attachFilter(@NonNull android.media.tv.tuner.filter.Filter); + method public void close(); + method public int configure(@NonNull android.media.tv.tuner.dvr.DvrSettings); + method public int detachFilter(@NonNull android.media.tv.tuner.filter.Filter); + method public int flush(); + method public void setFileDescriptor(@NonNull android.os.ParcelFileDescriptor); + method public int start(); + method public int stop(); + method public long write(long); + method public long write(@NonNull byte[], long, long); + } + + public class DvrSettings { + method @NonNull public static android.media.tv.tuner.dvr.DvrSettings.Builder builder(); + method public int getDataFormat(); + method public long getHighThreshold(); + method public long getLowThreshold(); + method public long getPacketSize(); + method public int getStatusMask(); + field public static final int DATA_FORMAT_ES = 2; // 0x2 + field public static final int DATA_FORMAT_PES = 1; // 0x1 + field public static final int DATA_FORMAT_SHV_TLV = 3; // 0x3 + field public static final int DATA_FORMAT_TS = 0; // 0x0 + } + + public static final class DvrSettings.Builder { + ctor public DvrSettings.Builder(); + method @NonNull public android.media.tv.tuner.dvr.DvrSettings build(); + method @NonNull public android.media.tv.tuner.dvr.DvrSettings.Builder setDataFormat(int); + method @NonNull public android.media.tv.tuner.dvr.DvrSettings.Builder setHighThreshold(long); + method @NonNull public android.media.tv.tuner.dvr.DvrSettings.Builder setLowThreshold(long); + method @NonNull public android.media.tv.tuner.dvr.DvrSettings.Builder setPacketSize(long); + method @NonNull public android.media.tv.tuner.dvr.DvrSettings.Builder setStatusMask(int); + } + + public interface OnPlaybackStatusChangedListener { + method public void onPlaybackStatusChanged(int); + } + + public interface OnRecordStatusChangedListener { + method public void onRecordStatusChanged(int); + } + +} + +package android.media.tv.tuner.filter { + + public final class AlpFilterConfiguration extends android.media.tv.tuner.filter.FilterConfiguration { + method @NonNull public static android.media.tv.tuner.filter.AlpFilterConfiguration.Builder builder(); + method public int getLengthType(); + method public int getPacketType(); + method public int getType(); + field public static final int LENGTH_TYPE_UNDEFINED = 0; // 0x0 + field public static final int LENGTH_TYPE_WITHOUT_ADDITIONAL_HEADER = 1; // 0x1 + field public static final int LENGTH_TYPE_WITH_ADDITIONAL_HEADER = 2; // 0x2 + field public static final int PACKET_TYPE_COMPRESSED = 2; // 0x2 + field public static final int PACKET_TYPE_EXTENSION = 6; // 0x6 + field public static final int PACKET_TYPE_IPV4 = 0; // 0x0 + field public static final int PACKET_TYPE_MPEG2_TS = 7; // 0x7 + field public static final int PACKET_TYPE_SIGNALING = 4; // 0x4 + } + + public static final class AlpFilterConfiguration.Builder { + method @NonNull public android.media.tv.tuner.filter.AlpFilterConfiguration build(); + method @NonNull public android.media.tv.tuner.filter.AlpFilterConfiguration.Builder setLengthType(int); + method @NonNull public android.media.tv.tuner.filter.AlpFilterConfiguration.Builder setPacketType(int); + method @NonNull public android.media.tv.tuner.filter.AlpFilterConfiguration.Builder setSettings(@Nullable android.media.tv.tuner.filter.Settings); + } + + public class AudioDescriptor { + method public byte getAdFade(); + method public byte getAdGainCenter(); + method public byte getAdGainFront(); + method public byte getAdGainSurround(); + method public byte getAdPan(); + method public char getAdVersionTextTag(); + } + + public class AvSettings extends android.media.tv.tuner.filter.Settings { + method @NonNull public static android.media.tv.tuner.filter.AvSettings.Builder builder(int, boolean); + method public int getAudioStreamType(); + method public int getVideoStreamType(); + method public boolean isPassthrough(); + field public static final int AUDIO_STREAM_TYPE_AAC = 6; // 0x6 + field public static final int AUDIO_STREAM_TYPE_AC3 = 7; // 0x7 + field public static final int AUDIO_STREAM_TYPE_AC4 = 9; // 0x9 + field public static final int AUDIO_STREAM_TYPE_DRA = 15; // 0xf + field public static final int AUDIO_STREAM_TYPE_DTS = 10; // 0xa + field public static final int AUDIO_STREAM_TYPE_DTS_HD = 11; // 0xb + field public static final int AUDIO_STREAM_TYPE_EAC3 = 8; // 0x8 + field public static final int AUDIO_STREAM_TYPE_MP3 = 2; // 0x2 + field public static final int AUDIO_STREAM_TYPE_MPEG1 = 3; // 0x3 + field public static final int AUDIO_STREAM_TYPE_MPEG2 = 4; // 0x4 + field public static final int AUDIO_STREAM_TYPE_MPEGH = 5; // 0x5 + field public static final int AUDIO_STREAM_TYPE_OPUS = 13; // 0xd + field public static final int AUDIO_STREAM_TYPE_PCM = 1; // 0x1 + field public static final int AUDIO_STREAM_TYPE_UNDEFINED = 0; // 0x0 + field public static final int AUDIO_STREAM_TYPE_VORBIS = 14; // 0xe + field public static final int AUDIO_STREAM_TYPE_WMA = 12; // 0xc + field public static final int VIDEO_STREAM_TYPE_AV1 = 10; // 0xa + field public static final int VIDEO_STREAM_TYPE_AVC = 5; // 0x5 + field public static final int VIDEO_STREAM_TYPE_AVS = 11; // 0xb + field public static final int VIDEO_STREAM_TYPE_AVS2 = 12; // 0xc + field public static final int VIDEO_STREAM_TYPE_HEVC = 6; // 0x6 + field public static final int VIDEO_STREAM_TYPE_MPEG1 = 2; // 0x2 + field public static final int VIDEO_STREAM_TYPE_MPEG2 = 3; // 0x3 + field public static final int VIDEO_STREAM_TYPE_MPEG4P2 = 4; // 0x4 + field public static final int VIDEO_STREAM_TYPE_RESERVED = 1; // 0x1 + field public static final int VIDEO_STREAM_TYPE_UNDEFINED = 0; // 0x0 + field public static final int VIDEO_STREAM_TYPE_VC1 = 7; // 0x7 + field public static final int VIDEO_STREAM_TYPE_VP8 = 8; // 0x8 + field public static final int VIDEO_STREAM_TYPE_VP9 = 9; // 0x9 + } + + public static class AvSettings.Builder { + method @NonNull public android.media.tv.tuner.filter.AvSettings build(); + method @NonNull public android.media.tv.tuner.filter.AvSettings.Builder setAudioStreamType(int); + method @NonNull public android.media.tv.tuner.filter.AvSettings.Builder setPassthrough(boolean); + method @NonNull public android.media.tv.tuner.filter.AvSettings.Builder setVideoStreamType(int); + } + + public class DownloadEvent extends android.media.tv.tuner.filter.FilterEvent { + method public int getDataLength(); + method public int getItemFragmentIndex(); + method public int getItemId(); + method public int getLastItemFragmentIndex(); + method public int getMpuSequenceNumber(); + } + + public class DownloadSettings extends android.media.tv.tuner.filter.Settings { + method @NonNull public static android.media.tv.tuner.filter.DownloadSettings.Builder builder(int); + method public int getDownloadId(); + } + + public static class DownloadSettings.Builder { + method @NonNull public android.media.tv.tuner.filter.DownloadSettings build(); + method @NonNull public android.media.tv.tuner.filter.DownloadSettings.Builder setDownloadId(int); + } + + public class Filter implements java.lang.AutoCloseable { + method public void close(); + method public int configure(@NonNull android.media.tv.tuner.filter.FilterConfiguration); + method public int flush(); + method public int getId(); + method public long getId64Bit(); + method public int read(@NonNull byte[], long, long); + method public int setDataSource(@Nullable android.media.tv.tuner.filter.Filter); + method public int start(); + method public int stop(); + field public static final int STATUS_DATA_READY = 1; // 0x1 + field public static final int STATUS_HIGH_WATER = 4; // 0x4 + field public static final int STATUS_LOW_WATER = 2; // 0x2 + field public static final int STATUS_OVERFLOW = 8; // 0x8 + field public static final int SUBTYPE_AUDIO = 3; // 0x3 + field public static final int SUBTYPE_DOWNLOAD = 5; // 0x5 + field public static final int SUBTYPE_IP = 13; // 0xd + field public static final int SUBTYPE_IP_PAYLOAD = 12; // 0xc + field public static final int SUBTYPE_MMTP = 10; // 0xa + field public static final int SUBTYPE_NTP = 11; // 0xb + field public static final int SUBTYPE_PAYLOAD_THROUGH = 14; // 0xe + field public static final int SUBTYPE_PCR = 8; // 0x8 + field public static final int SUBTYPE_PES = 2; // 0x2 + field public static final int SUBTYPE_PTP = 16; // 0x10 + field public static final int SUBTYPE_RECORD = 6; // 0x6 + field public static final int SUBTYPE_SECTION = 1; // 0x1 + field public static final int SUBTYPE_TEMI = 9; // 0x9 + field public static final int SUBTYPE_TLV = 15; // 0xf + field public static final int SUBTYPE_TS = 7; // 0x7 + field public static final int SUBTYPE_UNDEFINED = 0; // 0x0 + field public static final int SUBTYPE_VIDEO = 4; // 0x4 + field public static final int TYPE_ALP = 16; // 0x10 + field public static final int TYPE_IP = 4; // 0x4 + field public static final int TYPE_MMTP = 2; // 0x2 + field public static final int TYPE_TLV = 8; // 0x8 + field public static final int TYPE_TS = 1; // 0x1 + field public static final int TYPE_UNDEFINED = 0; // 0x0 + } + + public interface FilterCallback { + method public void onFilterEvent(@NonNull android.media.tv.tuner.filter.Filter, @NonNull android.media.tv.tuner.filter.FilterEvent[]); + method public void onFilterStatusChanged(@NonNull android.media.tv.tuner.filter.Filter, int); + } + + public abstract class FilterConfiguration { + method @Nullable public android.media.tv.tuner.filter.Settings getSettings(); + method public abstract int getType(); + } + + public abstract class FilterEvent { + ctor public FilterEvent(); + } + + public final class IpFilterConfiguration extends android.media.tv.tuner.filter.FilterConfiguration { + method @NonNull public static android.media.tv.tuner.filter.IpFilterConfiguration.Builder builder(); + method @NonNull @Size(min=4, max=16) public byte[] getDstIpAddress(); + method public int getDstPort(); + method @IntRange(from=0, to=61439) public int getIpFilterContextId(); + method @NonNull @Size(min=4, max=16) public byte[] getSrcIpAddress(); + method public int getSrcPort(); + method public int getType(); + method public boolean isPassthrough(); + field public static final int INVALID_IP_FILTER_CONTEXT_ID = -1; // 0xffffffff + } + + public static final class IpFilterConfiguration.Builder { + method @NonNull public android.media.tv.tuner.filter.IpFilterConfiguration build(); + method @NonNull public android.media.tv.tuner.filter.IpFilterConfiguration.Builder setDstIpAddress(@NonNull byte[]); + method @NonNull public android.media.tv.tuner.filter.IpFilterConfiguration.Builder setDstPort(int); + method @NonNull public android.media.tv.tuner.filter.IpFilterConfiguration.Builder setIpFilterContextId(int); + method @NonNull public android.media.tv.tuner.filter.IpFilterConfiguration.Builder setPassthrough(boolean); + method @NonNull public android.media.tv.tuner.filter.IpFilterConfiguration.Builder setSettings(@Nullable android.media.tv.tuner.filter.Settings); + method @NonNull public android.media.tv.tuner.filter.IpFilterConfiguration.Builder setSrcIpAddress(@NonNull byte[]); + method @NonNull public android.media.tv.tuner.filter.IpFilterConfiguration.Builder setSrcPort(int); + } + + public class IpPayloadEvent extends android.media.tv.tuner.filter.FilterEvent { + method public int getDataLength(); + } + + public class MediaEvent extends android.media.tv.tuner.filter.FilterEvent { + method public long getAudioHandle(); + method public long getAvDataId(); + method public long getDataLength(); + method @Nullable public android.media.tv.tuner.filter.AudioDescriptor getExtraMetaData(); + method @Nullable public android.media.MediaCodec.LinearBlock getLinearBlock(); + method public int getMpuSequenceNumber(); + method public long getOffset(); + method public long getPts(); + method public int getStreamId(); + method public boolean isPrivateData(); + method public boolean isPtsPresent(); + method public boolean isSecureMemory(); + method public void release(); + } + + public final class MmtpFilterConfiguration extends android.media.tv.tuner.filter.FilterConfiguration { + method @NonNull public static android.media.tv.tuner.filter.MmtpFilterConfiguration.Builder builder(); + method public int getMmtpPacketId(); + method public int getType(); + } + + public static final class MmtpFilterConfiguration.Builder { + method @NonNull public android.media.tv.tuner.filter.MmtpFilterConfiguration build(); + method @NonNull public android.media.tv.tuner.filter.MmtpFilterConfiguration.Builder setMmtpPacketId(int); + method @NonNull public android.media.tv.tuner.filter.MmtpFilterConfiguration.Builder setSettings(@Nullable android.media.tv.tuner.filter.Settings); + } + + public class MmtpRecordEvent extends android.media.tv.tuner.filter.FilterEvent { + method public long getDataLength(); + method public int getFirstMbInSlice(); + method public int getMpuSequenceNumber(); + method public long getPts(); + method public int getScHevcIndexMask(); + } + + public class PesEvent extends android.media.tv.tuner.filter.FilterEvent { + method public int getDataLength(); + method public int getMpuSequenceNumber(); + method public int getStreamId(); + } + + public class PesSettings extends android.media.tv.tuner.filter.Settings { + method @NonNull public static android.media.tv.tuner.filter.PesSettings.Builder builder(int); + method public int getStreamId(); + method public boolean isRaw(); + } + + public static class PesSettings.Builder { + method @NonNull public android.media.tv.tuner.filter.PesSettings build(); + method @NonNull public android.media.tv.tuner.filter.PesSettings.Builder setRaw(boolean); + method @NonNull public android.media.tv.tuner.filter.PesSettings.Builder setStreamId(int); + } + + public class RecordSettings extends android.media.tv.tuner.filter.Settings { + method @NonNull public static android.media.tv.tuner.filter.RecordSettings.Builder builder(int); + method public int getScIndexMask(); + method public int getScIndexType(); + method public int getTsIndexMask(); + field public static final int INDEX_TYPE_NONE = 0; // 0x0 + field public static final int INDEX_TYPE_SC = 1; // 0x1 + field public static final int INDEX_TYPE_SC_HEVC = 2; // 0x2 + field public static final int SC_HEVC_INDEX_AUD = 2; // 0x2 + field public static final int SC_HEVC_INDEX_SLICE_BLA_N_LP = 16; // 0x10 + field public static final int SC_HEVC_INDEX_SLICE_BLA_W_RADL = 8; // 0x8 + field public static final int SC_HEVC_INDEX_SLICE_CE_BLA_W_LP = 4; // 0x4 + field public static final int SC_HEVC_INDEX_SLICE_IDR_N_LP = 64; // 0x40 + field public static final int SC_HEVC_INDEX_SLICE_IDR_W_RADL = 32; // 0x20 + field public static final int SC_HEVC_INDEX_SLICE_TRAIL_CRA = 128; // 0x80 + field public static final int SC_HEVC_INDEX_SPS = 1; // 0x1 + field public static final int SC_INDEX_B_FRAME = 4; // 0x4 + field public static final int SC_INDEX_B_SLICE = 64; // 0x40 + field public static final int SC_INDEX_I_FRAME = 1; // 0x1 + field public static final int SC_INDEX_I_SLICE = 16; // 0x10 + field public static final int SC_INDEX_P_FRAME = 2; // 0x2 + field public static final int SC_INDEX_P_SLICE = 32; // 0x20 + field public static final int SC_INDEX_SEQUENCE = 8; // 0x8 + field public static final int SC_INDEX_SI_SLICE = 128; // 0x80 + field public static final int SC_INDEX_SP_SLICE = 256; // 0x100 + field public static final int TS_INDEX_ADAPTATION_EXTENSION_FLAG = 4096; // 0x1000 + field public static final int TS_INDEX_CHANGE_TO_EVEN_SCRAMBLED = 8; // 0x8 + field public static final int TS_INDEX_CHANGE_TO_NOT_SCRAMBLED = 4; // 0x4 + field public static final int TS_INDEX_CHANGE_TO_ODD_SCRAMBLED = 16; // 0x10 + field public static final int TS_INDEX_DISCONTINUITY_INDICATOR = 32; // 0x20 + field public static final int TS_INDEX_FIRST_PACKET = 1; // 0x1 + field public static final int TS_INDEX_OPCR_FLAG = 512; // 0x200 + field public static final int TS_INDEX_PAYLOAD_UNIT_START_INDICATOR = 2; // 0x2 + field public static final int TS_INDEX_PCR_FLAG = 256; // 0x100 + field public static final int TS_INDEX_PRIORITY_INDICATOR = 128; // 0x80 + field public static final int TS_INDEX_PRIVATE_DATA = 2048; // 0x800 + field public static final int TS_INDEX_RANDOM_ACCESS_INDICATOR = 64; // 0x40 + field public static final int TS_INDEX_SPLICING_POINT_FLAG = 1024; // 0x400 + } + + public static class RecordSettings.Builder { + method @NonNull public android.media.tv.tuner.filter.RecordSettings build(); + method @NonNull public android.media.tv.tuner.filter.RecordSettings.Builder setScIndexMask(int); + method @NonNull public android.media.tv.tuner.filter.RecordSettings.Builder setScIndexType(int); + method @NonNull public android.media.tv.tuner.filter.RecordSettings.Builder setTsIndexMask(int); + } + + public class SectionEvent extends android.media.tv.tuner.filter.FilterEvent { + method public int getDataLength(); + method public int getSectionNumber(); + method public int getTableId(); + method public int getVersion(); + } + + public abstract class SectionSettings extends android.media.tv.tuner.filter.Settings { + method public boolean isCrcEnabled(); + method public boolean isRaw(); + method public boolean isRepeat(); + } + + public abstract static class SectionSettings.Builder<T extends android.media.tv.tuner.filter.SectionSettings.Builder<T>> { + method @NonNull public T setCrcEnabled(boolean); + method @NonNull public T setRaw(boolean); + method @NonNull public T setRepeat(boolean); + } + + public class SectionSettingsWithSectionBits extends android.media.tv.tuner.filter.SectionSettings { + method @NonNull public static android.media.tv.tuner.filter.SectionSettingsWithSectionBits.Builder builder(int); + method @NonNull public byte[] getFilterBytes(); + method @NonNull public byte[] getMask(); + method @NonNull public byte[] getMode(); + } + + public static class SectionSettingsWithSectionBits.Builder extends android.media.tv.tuner.filter.SectionSettings.Builder<android.media.tv.tuner.filter.SectionSettingsWithSectionBits.Builder> { + method @NonNull public android.media.tv.tuner.filter.SectionSettingsWithSectionBits build(); + method @NonNull public android.media.tv.tuner.filter.SectionSettingsWithSectionBits.Builder setFilter(@NonNull byte[]); + method @NonNull public android.media.tv.tuner.filter.SectionSettingsWithSectionBits.Builder setMask(@NonNull byte[]); + method @NonNull public android.media.tv.tuner.filter.SectionSettingsWithSectionBits.Builder setMode(@NonNull byte[]); + } + + public class SectionSettingsWithTableInfo extends android.media.tv.tuner.filter.SectionSettings { + method @NonNull public static android.media.tv.tuner.filter.SectionSettingsWithTableInfo.Builder builder(int); + method public int getTableId(); + method public int getVersion(); + } + + public static class SectionSettingsWithTableInfo.Builder extends android.media.tv.tuner.filter.SectionSettings.Builder<android.media.tv.tuner.filter.SectionSettingsWithTableInfo.Builder> { + method @NonNull public android.media.tv.tuner.filter.SectionSettingsWithTableInfo build(); + method @NonNull public android.media.tv.tuner.filter.SectionSettingsWithTableInfo.Builder setTableId(int); + method @NonNull public android.media.tv.tuner.filter.SectionSettingsWithTableInfo.Builder setVersion(int); + } + + public abstract class Settings { + method public int getType(); + } + + public class TemiEvent extends android.media.tv.tuner.filter.FilterEvent { + method @NonNull public byte[] getDescriptorData(); + method public byte getDescriptorTag(); + method public long getPts(); + } + + public class TimeFilter implements java.lang.AutoCloseable { + method public int clearTimestamp(); + method public void close(); + method public long getSourceTime(); + method public long getTimeStamp(); + method public int setCurrentTimestamp(long); + } + + public final class TlvFilterConfiguration extends android.media.tv.tuner.filter.FilterConfiguration { + method @NonNull public static android.media.tv.tuner.filter.TlvFilterConfiguration.Builder builder(); + method public int getPacketType(); + method public int getType(); + method public boolean isCompressedIpPacket(); + method public boolean isPassthrough(); + field public static final int PACKET_TYPE_COMPRESSED = 3; // 0x3 + field public static final int PACKET_TYPE_IPV4 = 1; // 0x1 + field public static final int PACKET_TYPE_IPV6 = 2; // 0x2 + field public static final int PACKET_TYPE_NULL = 255; // 0xff + field public static final int PACKET_TYPE_SIGNALING = 254; // 0xfe + } + + public static final class TlvFilterConfiguration.Builder { + method @NonNull public android.media.tv.tuner.filter.TlvFilterConfiguration build(); + method @NonNull public android.media.tv.tuner.filter.TlvFilterConfiguration.Builder setCompressedIpPacket(boolean); + method @NonNull public android.media.tv.tuner.filter.TlvFilterConfiguration.Builder setPacketType(int); + method @NonNull public android.media.tv.tuner.filter.TlvFilterConfiguration.Builder setPassthrough(boolean); + method @NonNull public android.media.tv.tuner.filter.TlvFilterConfiguration.Builder setSettings(@Nullable android.media.tv.tuner.filter.Settings); + } + + public final class TsFilterConfiguration extends android.media.tv.tuner.filter.FilterConfiguration { + method @NonNull public static android.media.tv.tuner.filter.TsFilterConfiguration.Builder builder(); + method public int getTpid(); + method public int getType(); + } + + public static final class TsFilterConfiguration.Builder { + method @NonNull public android.media.tv.tuner.filter.TsFilterConfiguration build(); + method @NonNull public android.media.tv.tuner.filter.TsFilterConfiguration.Builder setSettings(@Nullable android.media.tv.tuner.filter.Settings); + method @NonNull public android.media.tv.tuner.filter.TsFilterConfiguration.Builder setTpid(int); + } + + public class TsRecordEvent extends android.media.tv.tuner.filter.FilterEvent { + method public long getDataLength(); + method public int getFirstMbInSlice(); + method public int getPacketId(); + method public long getPts(); + method public int getScIndexMask(); + method public int getTsIndexMask(); + } + +} + +package android.media.tv.tuner.frontend { + + public class AnalogFrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getSifStandardCapability(); + method public int getSignalTypeCapability(); + } + + public class AnalogFrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull public static android.media.tv.tuner.frontend.AnalogFrontendSettings.Builder builder(); + method public int getAftFlag(); + method public int getSifStandard(); + method public int getSignalType(); + method public int getType(); + field public static final int AFT_FLAG_FALSE = 2; // 0x2 + field public static final int AFT_FLAG_TRUE = 1; // 0x1 + field public static final int AFT_FLAG_UNDEFINED = 0; // 0x0 + field public static final int SIF_AUTO = 1; // 0x1 + field public static final int SIF_BG = 2; // 0x2 + field public static final int SIF_BG_A2 = 4; // 0x4 + field public static final int SIF_BG_NICAM = 8; // 0x8 + field public static final int SIF_DK = 32; // 0x20 + field public static final int SIF_DK1_A2 = 64; // 0x40 + field public static final int SIF_DK2_A2 = 128; // 0x80 + field public static final int SIF_DK3_A2 = 256; // 0x100 + field public static final int SIF_DK_NICAM = 512; // 0x200 + field public static final int SIF_I = 16; // 0x10 + field public static final int SIF_I_NICAM = 32768; // 0x8000 + field public static final int SIF_L = 1024; // 0x400 + field public static final int SIF_L_NICAM = 65536; // 0x10000 + field public static final int SIF_L_PRIME = 131072; // 0x20000 + field public static final int SIF_M = 2048; // 0x800 + field public static final int SIF_M_A2 = 8192; // 0x2000 + field public static final int SIF_M_BTSC = 4096; // 0x1000 + field public static final int SIF_M_EIAJ = 16384; // 0x4000 + field public static final int SIF_UNDEFINED = 0; // 0x0 + field public static final int SIGNAL_TYPE_AUTO = 1; // 0x1 + field public static final int SIGNAL_TYPE_NTSC = 32; // 0x20 + field public static final int SIGNAL_TYPE_NTSC_443 = 64; // 0x40 + field public static final int SIGNAL_TYPE_PAL = 2; // 0x2 + field public static final int SIGNAL_TYPE_PAL_60 = 16; // 0x10 + field public static final int SIGNAL_TYPE_PAL_M = 4; // 0x4 + field public static final int SIGNAL_TYPE_PAL_N = 8; // 0x8 + field public static final int SIGNAL_TYPE_SECAM = 128; // 0x80 + field public static final int SIGNAL_TYPE_UNDEFINED = 0; // 0x0 + } + + public static class AnalogFrontendSettings.Builder { + method @NonNull public android.media.tv.tuner.frontend.AnalogFrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.AnalogFrontendSettings.Builder setAftFlag(int); + method @IntRange(from=1) @NonNull public android.media.tv.tuner.frontend.AnalogFrontendSettings.Builder setFrequency(int); + method @NonNull public android.media.tv.tuner.frontend.AnalogFrontendSettings.Builder setSifStandard(int); + method @NonNull public android.media.tv.tuner.frontend.AnalogFrontendSettings.Builder setSignalType(int); + } + + public class Atsc3FrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getBandwidthCapability(); + method public int getDemodOutputFormatCapability(); + method public int getFecCapability(); + method public int getModulationCapability(); + method public int getPlpCodeRateCapability(); + method public int getTimeInterleaveModeCapability(); + } + + public class Atsc3FrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull public static android.media.tv.tuner.frontend.Atsc3FrontendSettings.Builder builder(); + method public int getBandwidth(); + method public int getDemodOutputFormat(); + method @NonNull public android.media.tv.tuner.frontend.Atsc3PlpSettings[] getPlpSettings(); + method public int getType(); + field public static final int BANDWIDTH_AUTO = 1; // 0x1 + field public static final int BANDWIDTH_BANDWIDTH_6MHZ = 2; // 0x2 + field public static final int BANDWIDTH_BANDWIDTH_7MHZ = 4; // 0x4 + field public static final int BANDWIDTH_BANDWIDTH_8MHZ = 8; // 0x8 + field public static final int BANDWIDTH_UNDEFINED = 0; // 0x0 + field public static final int CODERATE_10_15 = 512; // 0x200 + field public static final int CODERATE_11_15 = 1024; // 0x400 + field public static final int CODERATE_12_15 = 2048; // 0x800 + field public static final int CODERATE_13_15 = 4096; // 0x1000 + field public static final int CODERATE_2_15 = 2; // 0x2 + field public static final int CODERATE_3_15 = 4; // 0x4 + field public static final int CODERATE_4_15 = 8; // 0x8 + field public static final int CODERATE_5_15 = 16; // 0x10 + field public static final int CODERATE_6_15 = 32; // 0x20 + field public static final int CODERATE_7_15 = 64; // 0x40 + field public static final int CODERATE_8_15 = 128; // 0x80 + field public static final int CODERATE_9_15 = 256; // 0x100 + field public static final int CODERATE_AUTO = 1; // 0x1 + field public static final int CODERATE_UNDEFINED = 0; // 0x0 + field public static final int DEMOD_OUTPUT_FORMAT_ATSC3_LINKLAYER_PACKET = 1; // 0x1 + field public static final int DEMOD_OUTPUT_FORMAT_BASEBAND_PACKET = 2; // 0x2 + field public static final int DEMOD_OUTPUT_FORMAT_UNDEFINED = 0; // 0x0 + field public static final int FEC_AUTO = 1; // 0x1 + field public static final int FEC_BCH_LDPC_16K = 2; // 0x2 + field public static final int FEC_BCH_LDPC_64K = 4; // 0x4 + field public static final int FEC_CRC_LDPC_16K = 8; // 0x8 + field public static final int FEC_CRC_LDPC_64K = 16; // 0x10 + field public static final int FEC_LDPC_16K = 32; // 0x20 + field public static final int FEC_LDPC_64K = 64; // 0x40 + field public static final int FEC_UNDEFINED = 0; // 0x0 + field public static final int MODULATION_AUTO = 1; // 0x1 + field public static final int MODULATION_MOD_1024QAM = 32; // 0x20 + field public static final int MODULATION_MOD_16QAM = 4; // 0x4 + field public static final int MODULATION_MOD_256QAM = 16; // 0x10 + field public static final int MODULATION_MOD_4096QAM = 64; // 0x40 + field public static final int MODULATION_MOD_64QAM = 8; // 0x8 + field public static final int MODULATION_MOD_QPSK = 2; // 0x2 + field public static final int MODULATION_UNDEFINED = 0; // 0x0 + field public static final int TIME_INTERLEAVE_MODE_AUTO = 1; // 0x1 + field public static final int TIME_INTERLEAVE_MODE_CTI = 2; // 0x2 + field public static final int TIME_INTERLEAVE_MODE_HTI = 4; // 0x4 + field public static final int TIME_INTERLEAVE_MODE_UNDEFINED = 0; // 0x0 + } + + public static class Atsc3FrontendSettings.Builder { + method @NonNull public android.media.tv.tuner.frontend.Atsc3FrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.Atsc3FrontendSettings.Builder setBandwidth(int); + method @NonNull public android.media.tv.tuner.frontend.Atsc3FrontendSettings.Builder setDemodOutputFormat(int); + method @IntRange(from=1) @NonNull public android.media.tv.tuner.frontend.Atsc3FrontendSettings.Builder setFrequency(int); + method @NonNull public android.media.tv.tuner.frontend.Atsc3FrontendSettings.Builder setPlpSettings(@NonNull android.media.tv.tuner.frontend.Atsc3PlpSettings[]); + } + + public class Atsc3PlpInfo { + method public boolean getLlsFlag(); + method public int getPlpId(); + } + + public class Atsc3PlpSettings { + method @NonNull public static android.media.tv.tuner.frontend.Atsc3PlpSettings.Builder builder(); + method public int getCodeRate(); + method public int getFec(); + method public int getInterleaveMode(); + method public int getModulation(); + method public int getPlpId(); + } + + public static class Atsc3PlpSettings.Builder { + method @NonNull public android.media.tv.tuner.frontend.Atsc3PlpSettings build(); + method @NonNull public android.media.tv.tuner.frontend.Atsc3PlpSettings.Builder setCodeRate(int); + method @NonNull public android.media.tv.tuner.frontend.Atsc3PlpSettings.Builder setFec(int); + method @NonNull public android.media.tv.tuner.frontend.Atsc3PlpSettings.Builder setInterleaveMode(int); + method @NonNull public android.media.tv.tuner.frontend.Atsc3PlpSettings.Builder setModulation(int); + method @NonNull public android.media.tv.tuner.frontend.Atsc3PlpSettings.Builder setPlpId(int); + } + + public class AtscFrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getModulationCapability(); + } + + public class AtscFrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull public static android.media.tv.tuner.frontend.AtscFrontendSettings.Builder builder(); + method public int getModulation(); + method public int getType(); + field public static final int MODULATION_AUTO = 1; // 0x1 + field public static final int MODULATION_MOD_16VSB = 8; // 0x8 + field public static final int MODULATION_MOD_8VSB = 4; // 0x4 + field public static final int MODULATION_UNDEFINED = 0; // 0x0 + } + + public static class AtscFrontendSettings.Builder { + method @NonNull public android.media.tv.tuner.frontend.AtscFrontendSettings build(); + method @IntRange(from=1) @NonNull public android.media.tv.tuner.frontend.AtscFrontendSettings.Builder setFrequency(int); + method @NonNull public android.media.tv.tuner.frontend.AtscFrontendSettings.Builder setModulation(int); + } + + public final class DtmbFrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getBandwidthCapability(); + method public int getCodeRateCapability(); + method public int getGuardIntervalCapability(); + method public int getModulationCapability(); + method public int getTimeInterleaveModeCapability(); + method public int getTransmissionModeCapability(); + } + + public final class DtmbFrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull public static android.media.tv.tuner.frontend.DtmbFrontendSettings.Builder builder(); + method public int getBandwidth(); + method public int getCodeRate(); + method public int getGuardInterval(); + method public int getModulation(); + method public int getTimeInterleaveMode(); + method public int getTransmissionMode(); + method public int getType(); + field public static final int BANDWIDTH_6MHZ = 4; // 0x4 + field public static final int BANDWIDTH_8MHZ = 2; // 0x2 + field public static final int BANDWIDTH_AUTO = 1; // 0x1 + field public static final int BANDWIDTH_UNDEFINED = 0; // 0x0 + field public static final int CODERATE_2_5 = 2; // 0x2 + field public static final int CODERATE_3_5 = 4; // 0x4 + field public static final int CODERATE_4_5 = 8; // 0x8 + field public static final int CODERATE_AUTO = 1; // 0x1 + field public static final int CODERATE_UNDEFINED = 0; // 0x0 + field public static final int GUARD_INTERVAL_AUTO = 1; // 0x1 + field public static final int GUARD_INTERVAL_PN_420_CONST = 16; // 0x10 + field public static final int GUARD_INTERVAL_PN_420_VARIOUS = 2; // 0x2 + field public static final int GUARD_INTERVAL_PN_595_CONST = 4; // 0x4 + field public static final int GUARD_INTERVAL_PN_945_CONST = 32; // 0x20 + field public static final int GUARD_INTERVAL_PN_945_VARIOUS = 8; // 0x8 + field public static final int GUARD_INTERVAL_PN_RESERVED = 64; // 0x40 + field public static final int GUARD_INTERVAL_UNDEFINED = 0; // 0x0 + field public static final int MODULATION_CONSTELLATION_16QAM = 8; // 0x8 + field public static final int MODULATION_CONSTELLATION_32QAM = 16; // 0x10 + field public static final int MODULATION_CONSTELLATION_4QAM = 2; // 0x2 + field public static final int MODULATION_CONSTELLATION_4QAM_NR = 4; // 0x4 + field public static final int MODULATION_CONSTELLATION_64QAM = 32; // 0x20 + field public static final int MODULATION_CONSTELLATION_AUTO = 1; // 0x1 + field public static final int MODULATION_CONSTELLATION_UNDEFINED = 0; // 0x0 + field public static final int TIME_INTERLEAVE_MODE_AUTO = 1; // 0x1 + field public static final int TIME_INTERLEAVE_MODE_TIMER_INT_240 = 2; // 0x2 + field public static final int TIME_INTERLEAVE_MODE_TIMER_INT_720 = 4; // 0x4 + field public static final int TIME_INTERLEAVE_MODE_UNDEFINED = 0; // 0x0 + field public static final int TRANSMISSION_MODE_AUTO = 1; // 0x1 + field public static final int TRANSMISSION_MODE_C1 = 2; // 0x2 + field public static final int TRANSMISSION_MODE_C3780 = 4; // 0x4 + field public static final int TRANSMISSION_MODE_UNDEFINED = 0; // 0x0 + } + + public static final class DtmbFrontendSettings.Builder { + method @NonNull public android.media.tv.tuner.frontend.DtmbFrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.DtmbFrontendSettings.Builder setBandwidth(int); + method @NonNull public android.media.tv.tuner.frontend.DtmbFrontendSettings.Builder setCodeRate(int); + method @IntRange(from=1) @NonNull public android.media.tv.tuner.frontend.DtmbFrontendSettings.Builder setFrequency(int); + method @NonNull public android.media.tv.tuner.frontend.DtmbFrontendSettings.Builder setGuardInterval(int); + method @NonNull public android.media.tv.tuner.frontend.DtmbFrontendSettings.Builder setModulation(int); + method @NonNull public android.media.tv.tuner.frontend.DtmbFrontendSettings.Builder setTimeInterleaveMode(int); + method @NonNull public android.media.tv.tuner.frontend.DtmbFrontendSettings.Builder setTransmissionMode(int); + } + + public class DvbcFrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getAnnexCapability(); + method public int getFecCapability(); + method public int getModulationCapability(); + } + + public class DvbcFrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull public static android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder builder(); + method public int getAnnex(); + method public int getBandwidth(); + method public long getInnerFec(); + method public int getModulation(); + method public int getOuterFec(); + method public int getSpectralInversion(); + method public int getSymbolRate(); + method public int getTimeInterleaveMode(); + method public int getType(); + field public static final int ANNEX_A = 1; // 0x1 + field public static final int ANNEX_B = 2; // 0x2 + field public static final int ANNEX_C = 4; // 0x4 + field public static final int ANNEX_UNDEFINED = 0; // 0x0 + field public static final int BANDWIDTH_5MHZ = 1; // 0x1 + field public static final int BANDWIDTH_6MHZ = 2; // 0x2 + field public static final int BANDWIDTH_7MHZ = 4; // 0x4 + field public static final int BANDWIDTH_8MHZ = 8; // 0x8 + field public static final int BANDWIDTH_UNDEFINED = 0; // 0x0 + field public static final int MODULATION_AUTO = 1; // 0x1 + field public static final int MODULATION_MOD_128QAM = 16; // 0x10 + field public static final int MODULATION_MOD_16QAM = 2; // 0x2 + field public static final int MODULATION_MOD_256QAM = 32; // 0x20 + field public static final int MODULATION_MOD_32QAM = 4; // 0x4 + field public static final int MODULATION_MOD_64QAM = 8; // 0x8 + field public static final int MODULATION_UNDEFINED = 0; // 0x0 + field public static final int OUTER_FEC_OUTER_FEC_NONE = 1; // 0x1 + field public static final int OUTER_FEC_OUTER_FEC_RS = 2; // 0x2 + field public static final int OUTER_FEC_UNDEFINED = 0; // 0x0 + field @Deprecated public static final int SPECTRAL_INVERSION_INVERTED = 2; // 0x2 + field @Deprecated public static final int SPECTRAL_INVERSION_NORMAL = 1; // 0x1 + field @Deprecated public static final int SPECTRAL_INVERSION_UNDEFINED = 0; // 0x0 + field public static final int TIME_INTERLEAVE_MODE_128_1_0 = 2; // 0x2 + field public static final int TIME_INTERLEAVE_MODE_128_1_1 = 4; // 0x4 + field public static final int TIME_INTERLEAVE_MODE_128_2 = 128; // 0x80 + field public static final int TIME_INTERLEAVE_MODE_128_3 = 256; // 0x100 + field public static final int TIME_INTERLEAVE_MODE_128_4 = 512; // 0x200 + field public static final int TIME_INTERLEAVE_MODE_16_8 = 32; // 0x20 + field public static final int TIME_INTERLEAVE_MODE_32_4 = 16; // 0x10 + field public static final int TIME_INTERLEAVE_MODE_64_2 = 8; // 0x8 + field public static final int TIME_INTERLEAVE_MODE_8_16 = 64; // 0x40 + field public static final int TIME_INTERLEAVE_MODE_AUTO = 1; // 0x1 + field public static final int TIME_INTERLEAVE_MODE_UNDEFINED = 0; // 0x0 + } + + public static class DvbcFrontendSettings.Builder { + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder setAnnex(int); + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder setBandwidth(int); + method @IntRange(from=1) @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder setFrequency(int); + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder setInnerFec(long); + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder setModulation(int); + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder setOuterFec(int); + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder setSpectralInversion(int); + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder setSymbolRate(int); + method @NonNull public android.media.tv.tuner.frontend.DvbcFrontendSettings.Builder setTimeInterleaveMode(int); + } + + public class DvbsCodeRate { + method @NonNull public static android.media.tv.tuner.frontend.DvbsCodeRate.Builder builder(); + method public int getBitsPer1000Symbol(); + method public long getInnerFec(); + method public boolean isLinear(); + method public boolean isShortFrameEnabled(); + } + + public static class DvbsCodeRate.Builder { + method @NonNull public android.media.tv.tuner.frontend.DvbsCodeRate build(); + method @NonNull public android.media.tv.tuner.frontend.DvbsCodeRate.Builder setBitsPer1000Symbol(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsCodeRate.Builder setInnerFec(long); + method @NonNull public android.media.tv.tuner.frontend.DvbsCodeRate.Builder setLinear(boolean); + method @NonNull public android.media.tv.tuner.frontend.DvbsCodeRate.Builder setShortFrameEnabled(boolean); + } + + public class DvbsFrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public long getInnerFecCapability(); + method public int getModulationCapability(); + method public int getStandardCapability(); + } + + public class DvbsFrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull public static android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder builder(); + method @Nullable public android.media.tv.tuner.frontend.DvbsCodeRate getCodeRate(); + method public boolean getCouldHandleDiseqcRxMessage(); + method public int getInputStreamId(); + method public int getModulation(); + method public int getPilot(); + method public int getRolloff(); + method public int getScanType(); + method public int getStandard(); + method public int getSymbolRate(); + method public int getType(); + method public int getVcmMode(); + field public static final int MODULATION_AUTO = 1; // 0x1 + field public static final int MODULATION_MOD_128APSK = 2048; // 0x800 + field public static final int MODULATION_MOD_16APSK = 256; // 0x100 + field public static final int MODULATION_MOD_16PSK = 16; // 0x10 + field public static final int MODULATION_MOD_16QAM = 8; // 0x8 + field public static final int MODULATION_MOD_256APSK = 4096; // 0x1000 + field public static final int MODULATION_MOD_32APSK = 512; // 0x200 + field public static final int MODULATION_MOD_32PSK = 32; // 0x20 + field public static final int MODULATION_MOD_64APSK = 1024; // 0x400 + field public static final int MODULATION_MOD_8APSK = 128; // 0x80 + field public static final int MODULATION_MOD_8PSK = 4; // 0x4 + field public static final int MODULATION_MOD_ACM = 64; // 0x40 + field public static final int MODULATION_MOD_QPSK = 2; // 0x2 + field public static final int MODULATION_MOD_RESERVED = 8192; // 0x2000 + field public static final int MODULATION_UNDEFINED = 0; // 0x0 + field public static final int PILOT_AUTO = 3; // 0x3 + field public static final int PILOT_OFF = 2; // 0x2 + field public static final int PILOT_ON = 1; // 0x1 + field public static final int PILOT_UNDEFINED = 0; // 0x0 + field public static final int ROLLOFF_0_10 = 5; // 0x5 + field public static final int ROLLOFF_0_15 = 4; // 0x4 + field public static final int ROLLOFF_0_20 = 3; // 0x3 + field public static final int ROLLOFF_0_25 = 2; // 0x2 + field public static final int ROLLOFF_0_35 = 1; // 0x1 + field public static final int ROLLOFF_0_5 = 6; // 0x6 + field public static final int ROLLOFF_UNDEFINED = 0; // 0x0 + field public static final int SCAN_TYPE_DIRECT = 1; // 0x1 + field public static final int SCAN_TYPE_DISEQC = 2; // 0x2 + field public static final int SCAN_TYPE_JESS = 4; // 0x4 + field public static final int SCAN_TYPE_UNDEFINED = 0; // 0x0 + field public static final int SCAN_TYPE_UNICABLE = 3; // 0x3 + field public static final int STANDARD_AUTO = 1; // 0x1 + field public static final int STANDARD_S = 2; // 0x2 + field public static final int STANDARD_S2 = 4; // 0x4 + field public static final int STANDARD_S2X = 8; // 0x8 + field public static final int VCM_MODE_AUTO = 1; // 0x1 + field public static final int VCM_MODE_MANUAL = 2; // 0x2 + field public static final int VCM_MODE_UNDEFINED = 0; // 0x0 + } + + public static class DvbsFrontendSettings.Builder { + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setCodeRate(@Nullable android.media.tv.tuner.frontend.DvbsCodeRate); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setCouldHandleDiseqcRxMessage(boolean); + method @IntRange(from=1) @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setFrequency(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setInputStreamId(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setModulation(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setPilot(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setRolloff(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setScanType(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setStandard(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setSymbolRate(int); + method @NonNull public android.media.tv.tuner.frontend.DvbsFrontendSettings.Builder setVcmMode(int); + } + + public class DvbtFrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getBandwidthCapability(); + method public int getCodeRateCapability(); + method public int getConstellationCapability(); + method public int getGuardIntervalCapability(); + method public int getHierarchyCapability(); + method public int getTransmissionModeCapability(); + method public boolean isMisoSupported(); + method public boolean isT2Supported(); + } + + public class DvbtFrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull public static android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder builder(); + method public int getBandwidth(); + method public int getConstellation(); + method public int getGuardInterval(); + method public int getHierarchy(); + method public int getHighPriorityCodeRate(); + method public int getLowPriorityCodeRate(); + method public int getPlpGroupId(); + method public int getPlpId(); + method public int getPlpMode(); + method public int getStandard(); + method public int getTransmissionMode(); + method public int getType(); + method public boolean isHighPriority(); + method public boolean isMiso(); + field public static final int BANDWIDTH_10MHZ = 64; // 0x40 + field public static final int BANDWIDTH_1_7MHZ = 32; // 0x20 + field public static final int BANDWIDTH_5MHZ = 16; // 0x10 + field public static final int BANDWIDTH_6MHZ = 8; // 0x8 + field public static final int BANDWIDTH_7MHZ = 4; // 0x4 + field public static final int BANDWIDTH_8MHZ = 2; // 0x2 + field public static final int BANDWIDTH_AUTO = 1; // 0x1 + field public static final int BANDWIDTH_UNDEFINED = 0; // 0x0 + field public static final int CODERATE_1_2 = 2; // 0x2 + field public static final int CODERATE_2_3 = 4; // 0x4 + field public static final int CODERATE_3_4 = 8; // 0x8 + field public static final int CODERATE_3_5 = 64; // 0x40 + field public static final int CODERATE_4_5 = 128; // 0x80 + field public static final int CODERATE_5_6 = 16; // 0x10 + field public static final int CODERATE_6_7 = 256; // 0x100 + field public static final int CODERATE_7_8 = 32; // 0x20 + field public static final int CODERATE_8_9 = 512; // 0x200 + field public static final int CODERATE_AUTO = 1; // 0x1 + field public static final int CODERATE_UNDEFINED = 0; // 0x0 + field public static final int CONSTELLATION_16QAM = 4; // 0x4 + field public static final int CONSTELLATION_16QAM_R = 64; // 0x40 + field public static final int CONSTELLATION_256QAM = 16; // 0x10 + field public static final int CONSTELLATION_256QAM_R = 256; // 0x100 + field public static final int CONSTELLATION_64QAM = 8; // 0x8 + field public static final int CONSTELLATION_64QAM_R = 128; // 0x80 + field public static final int CONSTELLATION_AUTO = 1; // 0x1 + field public static final int CONSTELLATION_QPSK = 2; // 0x2 + field public static final int CONSTELLATION_QPSK_R = 32; // 0x20 + field public static final int CONSTELLATION_UNDEFINED = 0; // 0x0 + field public static final int GUARD_INTERVAL_19_128 = 64; // 0x40 + field public static final int GUARD_INTERVAL_19_256 = 128; // 0x80 + field public static final int GUARD_INTERVAL_1_128 = 32; // 0x20 + field public static final int GUARD_INTERVAL_1_16 = 4; // 0x4 + field public static final int GUARD_INTERVAL_1_32 = 2; // 0x2 + field public static final int GUARD_INTERVAL_1_4 = 16; // 0x10 + field public static final int GUARD_INTERVAL_1_8 = 8; // 0x8 + field public static final int GUARD_INTERVAL_AUTO = 1; // 0x1 + field public static final int GUARD_INTERVAL_UNDEFINED = 0; // 0x0 + field public static final int HIERARCHY_1_INDEPTH = 64; // 0x40 + field public static final int HIERARCHY_1_NATIVE = 4; // 0x4 + field public static final int HIERARCHY_2_INDEPTH = 128; // 0x80 + field public static final int HIERARCHY_2_NATIVE = 8; // 0x8 + field public static final int HIERARCHY_4_INDEPTH = 256; // 0x100 + field public static final int HIERARCHY_4_NATIVE = 16; // 0x10 + field public static final int HIERARCHY_AUTO = 1; // 0x1 + field public static final int HIERARCHY_NON_INDEPTH = 32; // 0x20 + field public static final int HIERARCHY_NON_NATIVE = 2; // 0x2 + field public static final int HIERARCHY_UNDEFINED = 0; // 0x0 + field public static final int PLP_MODE_AUTO = 1; // 0x1 + field public static final int PLP_MODE_MANUAL = 2; // 0x2 + field public static final int PLP_MODE_UNDEFINED = 0; // 0x0 + field public static final int STANDARD_AUTO = 1; // 0x1 + field public static final int STANDARD_T = 2; // 0x2 + field public static final int STANDARD_T2 = 4; // 0x4 + field public static final int TRANSMISSION_MODE_16K = 32; // 0x20 + field public static final int TRANSMISSION_MODE_1K = 16; // 0x10 + field public static final int TRANSMISSION_MODE_2K = 2; // 0x2 + field public static final int TRANSMISSION_MODE_32K = 64; // 0x40 + field public static final int TRANSMISSION_MODE_4K = 8; // 0x8 + field public static final int TRANSMISSION_MODE_8K = 4; // 0x4 + field public static final int TRANSMISSION_MODE_AUTO = 1; // 0x1 + field public static final int TRANSMISSION_MODE_EXTENDED_16K = 256; // 0x100 + field public static final int TRANSMISSION_MODE_EXTENDED_32K = 512; // 0x200 + field public static final int TRANSMISSION_MODE_EXTENDED_8K = 128; // 0x80 + field public static final int TRANSMISSION_MODE_UNDEFINED = 0; // 0x0 + } + + public static class DvbtFrontendSettings.Builder { + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setBandwidth(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setConstellation(int); + method @IntRange(from=1) @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setFrequency(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setGuardInterval(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setHierarchy(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setHighPriority(boolean); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setHighPriorityCodeRate(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setLowPriorityCodeRate(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setMiso(boolean); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setPlpGroupId(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setPlpId(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setPlpMode(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setStandard(int); + method @NonNull public android.media.tv.tuner.frontend.DvbtFrontendSettings.Builder setTransmissionMode(int); + } + + public abstract class FrontendCapabilities { + ctor public FrontendCapabilities(); + } + + public class FrontendInfo { + method public int getAcquireRange(); + method public int getExclusiveGroupId(); + method @NonNull public android.util.Range<java.lang.Integer> getFrequencyRange(); + method @NonNull public android.media.tv.tuner.frontend.FrontendCapabilities getFrontendCapabilities(); + method public int getId(); + method @NonNull public int[] getStatusCapabilities(); + method @NonNull public android.util.Range<java.lang.Integer> getSymbolRateRange(); + method public int getType(); + } + + public abstract class FrontendSettings { + method @IntRange(from=1) public int getEndFrequency(); + method public int getFrequency(); + method public int getFrontendSpectralInversion(); + method public abstract int getType(); + method @IntRange(from=1) public void setEndFrequency(int); + method public void setSpectralInversion(int); + field public static final long FEC_11_15 = 4194304L; // 0x400000L + field public static final long FEC_11_20 = 8388608L; // 0x800000L + field public static final long FEC_11_45 = 16777216L; // 0x1000000L + field public static final long FEC_13_18 = 33554432L; // 0x2000000L + field public static final long FEC_13_45 = 67108864L; // 0x4000000L + field public static final long FEC_14_45 = 134217728L; // 0x8000000L + field public static final long FEC_1_2 = 2L; // 0x2L + field public static final long FEC_1_3 = 4L; // 0x4L + field public static final long FEC_1_4 = 8L; // 0x8L + field public static final long FEC_1_5 = 16L; // 0x10L + field public static final long FEC_23_36 = 268435456L; // 0x10000000L + field public static final long FEC_25_36 = 536870912L; // 0x20000000L + field public static final long FEC_26_45 = 1073741824L; // 0x40000000L + field public static final long FEC_28_45 = -2147483648L; // 0xffffffff80000000L + field public static final long FEC_29_45 = 1L; // 0x1L + field public static final long FEC_2_3 = 32L; // 0x20L + field public static final long FEC_2_5 = 64L; // 0x40L + field public static final long FEC_2_9 = 128L; // 0x80L + field public static final long FEC_31_45 = 2L; // 0x2L + field public static final long FEC_32_45 = 4L; // 0x4L + field public static final long FEC_3_4 = 256L; // 0x100L + field public static final long FEC_3_5 = 512L; // 0x200L + field public static final long FEC_4_15 = 2048L; // 0x800L + field public static final long FEC_4_5 = 1024L; // 0x400L + field public static final long FEC_5_6 = 4096L; // 0x1000L + field public static final long FEC_5_9 = 8192L; // 0x2000L + field public static final long FEC_6_7 = 16384L; // 0x4000L + field public static final long FEC_77_90 = 8L; // 0x8L + field public static final long FEC_7_15 = 131072L; // 0x20000L + field public static final long FEC_7_8 = 32768L; // 0x8000L + field public static final long FEC_7_9 = 65536L; // 0x10000L + field public static final long FEC_8_15 = 524288L; // 0x80000L + field public static final long FEC_8_9 = 262144L; // 0x40000L + field public static final long FEC_9_10 = 1048576L; // 0x100000L + field public static final long FEC_9_20 = 2097152L; // 0x200000L + field public static final long FEC_AUTO = 1L; // 0x1L + field public static final long FEC_UNDEFINED = 0L; // 0x0L + field public static final int FRONTEND_SPECTRAL_INVERSION_INVERTED = 2; // 0x2 + field public static final int FRONTEND_SPECTRAL_INVERSION_NORMAL = 1; // 0x1 + field public static final int FRONTEND_SPECTRAL_INVERSION_UNDEFINED = 0; // 0x0 + field public static final int TYPE_ANALOG = 1; // 0x1 + field public static final int TYPE_ATSC = 2; // 0x2 + field public static final int TYPE_ATSC3 = 3; // 0x3 + field public static final int TYPE_DTMB = 10; // 0xa + field public static final int TYPE_DVBC = 4; // 0x4 + field public static final int TYPE_DVBS = 5; // 0x5 + field public static final int TYPE_DVBT = 6; // 0x6 + field public static final int TYPE_ISDBS = 7; // 0x7 + field public static final int TYPE_ISDBS3 = 8; // 0x8 + field public static final int TYPE_ISDBT = 9; // 0x9 + field public static final int TYPE_UNDEFINED = 0; // 0x0 + } + + public class FrontendStatus { + method public int getAgc(); + method @NonNull public android.media.tv.tuner.frontend.FrontendStatus.Atsc3PlpTuningInfo[] getAtsc3PlpTuningInfo(); + method public int getBandwidth(); + method public int getBer(); + method @NonNull public int[] getBers(); + method @NonNull public int[] getCodeRates(); + method @NonNull public int[] getExtendedModulations(); + method public int getFreqOffset(); + method public int getGuardInterval(); + method public int getHierarchy(); + method public long getInnerFec(); + method @NonNull public int[] getInterleaving(); + method @IntRange(from=0, to=255) @NonNull public int[] getIsdbtSegment(); + method @NonNull public boolean[] getLayerErrors(); + method public int getLnbVoltage(); + method public int getMer(); + method public int getModulation(); + method public int getPer(); + method public int getPerBer(); + method public int getPlpId(); + method public int getSignalQuality(); + method public int getSignalStrength(); + method public int getSnr(); + method public int getSpectralInversion(); + method public int getSymbolRate(); + method @IntRange(from=0, to=65535) public int getSystemId(); + method public int getTransmissionMode(); + method @NonNull public int[] getTsDataRate(); + method public int getUec(); + method public boolean isDemodLocked(); + method public boolean isEwbs(); + method public boolean isLnaOn(); + method public boolean isRfLocked(); + field public static final int FRONTEND_STATUS_TYPE_AGC = 14; // 0xe + field public static final int FRONTEND_STATUS_TYPE_ATSC3_PLP_INFO = 21; // 0x15 + field public static final int FRONTEND_STATUS_TYPE_BANDWIDTH = 25; // 0x19 + field public static final int FRONTEND_STATUS_TYPE_BER = 2; // 0x2 + field public static final int FRONTEND_STATUS_TYPE_BERS = 23; // 0x17 + field public static final int FRONTEND_STATUS_TYPE_CODERATES = 24; // 0x18 + field public static final int FRONTEND_STATUS_TYPE_DEMOD_LOCK = 0; // 0x0 + field public static final int FRONTEND_STATUS_TYPE_EWBS = 13; // 0xd + field public static final int FRONTEND_STATUS_TYPE_FEC = 8; // 0x8 + field public static final int FRONTEND_STATUS_TYPE_FREQ_OFFSET = 18; // 0x12 + field public static final int FRONTEND_STATUS_TYPE_GUARD_INTERVAL = 26; // 0x1a + field public static final int FRONTEND_STATUS_TYPE_HIERARCHY = 19; // 0x13 + field public static final int FRONTEND_STATUS_TYPE_INTERLEAVINGS = 30; // 0x1e + field public static final int FRONTEND_STATUS_TYPE_ISDBT_SEGMENTS = 31; // 0x1f + field public static final int FRONTEND_STATUS_TYPE_LAYER_ERROR = 16; // 0x10 + field public static final int FRONTEND_STATUS_TYPE_LNA = 15; // 0xf + field public static final int FRONTEND_STATUS_TYPE_LNB_VOLTAGE = 11; // 0xb + field public static final int FRONTEND_STATUS_TYPE_MER = 17; // 0x11 + field public static final int FRONTEND_STATUS_TYPE_MODULATION = 9; // 0x9 + field public static final int FRONTEND_STATUS_TYPE_MODULATIONS_EXT = 22; // 0x16 + field public static final int FRONTEND_STATUS_TYPE_PER = 3; // 0x3 + field public static final int FRONTEND_STATUS_TYPE_PLP_ID = 12; // 0xc + field public static final int FRONTEND_STATUS_TYPE_PRE_BER = 4; // 0x4 + field public static final int FRONTEND_STATUS_TYPE_RF_LOCK = 20; // 0x14 + field public static final int FRONTEND_STATUS_TYPE_SIGNAL_QUALITY = 5; // 0x5 + field public static final int FRONTEND_STATUS_TYPE_SIGNAL_STRENGTH = 6; // 0x6 + field public static final int FRONTEND_STATUS_TYPE_SNR = 1; // 0x1 + field public static final int FRONTEND_STATUS_TYPE_SPECTRAL = 10; // 0xa + field public static final int FRONTEND_STATUS_TYPE_SYMBOL_RATE = 7; // 0x7 + field public static final int FRONTEND_STATUS_TYPE_T2_SYSTEM_ID = 29; // 0x1d + field public static final int FRONTEND_STATUS_TYPE_TRANSMISSION_MODE = 27; // 0x1b + field public static final int FRONTEND_STATUS_TYPE_TS_DATA_RATES = 32; // 0x20 + field public static final int FRONTEND_STATUS_TYPE_UEC = 28; // 0x1c + } + + public static class FrontendStatus.Atsc3PlpTuningInfo { + method public int getPlpId(); + method public int getUec(); + method public boolean isLocked(); + } + + public class Isdbs3FrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getCodeRateCapability(); + method public int getModulationCapability(); + } + + public class Isdbs3FrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull public static android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder builder(); + method public int getCodeRate(); + method public int getModulation(); + method public int getRolloff(); + method public int getStreamId(); + method public int getStreamIdType(); + method public int getSymbolRate(); + method public int getType(); + field public static final int CODERATE_1_2 = 8; // 0x8 + field public static final int CODERATE_1_3 = 2; // 0x2 + field public static final int CODERATE_2_3 = 32; // 0x20 + field public static final int CODERATE_2_5 = 4; // 0x4 + field public static final int CODERATE_3_4 = 64; // 0x40 + field public static final int CODERATE_3_5 = 16; // 0x10 + field public static final int CODERATE_4_5 = 256; // 0x100 + field public static final int CODERATE_5_6 = 512; // 0x200 + field public static final int CODERATE_7_8 = 1024; // 0x400 + field public static final int CODERATE_7_9 = 128; // 0x80 + field public static final int CODERATE_9_10 = 2048; // 0x800 + field public static final int CODERATE_AUTO = 1; // 0x1 + field public static final int CODERATE_UNDEFINED = 0; // 0x0 + field public static final int MODULATION_AUTO = 1; // 0x1 + field public static final int MODULATION_MOD_16APSK = 16; // 0x10 + field public static final int MODULATION_MOD_32APSK = 32; // 0x20 + field public static final int MODULATION_MOD_8PSK = 8; // 0x8 + field public static final int MODULATION_MOD_BPSK = 2; // 0x2 + field public static final int MODULATION_MOD_QPSK = 4; // 0x4 + field public static final int MODULATION_UNDEFINED = 0; // 0x0 + field public static final int ROLLOFF_0_03 = 1; // 0x1 + field public static final int ROLLOFF_UNDEFINED = 0; // 0x0 + } + + public static class Isdbs3FrontendSettings.Builder { + method @NonNull public android.media.tv.tuner.frontend.Isdbs3FrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder setCodeRate(int); + method @IntRange(from=1) @NonNull public android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder setFrequency(int); + method @NonNull public android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder setModulation(int); + method @NonNull public android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder setRolloff(int); + method @NonNull public android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder setStreamId(int); + method @NonNull public android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder setStreamIdType(int); + method @NonNull public android.media.tv.tuner.frontend.Isdbs3FrontendSettings.Builder setSymbolRate(int); + } + + public class IsdbsFrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getCodeRateCapability(); + method public int getModulationCapability(); + } + + public class IsdbsFrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull public static android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder builder(); + method public int getCodeRate(); + method public int getModulation(); + method public int getRolloff(); + method public int getStreamId(); + method public int getStreamIdType(); + method public int getSymbolRate(); + method public int getType(); + field public static final int CODERATE_1_2 = 2; // 0x2 + field public static final int CODERATE_2_3 = 4; // 0x4 + field public static final int CODERATE_3_4 = 8; // 0x8 + field public static final int CODERATE_5_6 = 16; // 0x10 + field public static final int CODERATE_7_8 = 32; // 0x20 + field public static final int CODERATE_AUTO = 1; // 0x1 + field public static final int CODERATE_UNDEFINED = 0; // 0x0 + field public static final int MODULATION_AUTO = 1; // 0x1 + field public static final int MODULATION_MOD_BPSK = 2; // 0x2 + field public static final int MODULATION_MOD_QPSK = 4; // 0x4 + field public static final int MODULATION_MOD_TC8PSK = 8; // 0x8 + field public static final int MODULATION_UNDEFINED = 0; // 0x0 + field public static final int ROLLOFF_0_35 = 1; // 0x1 + field public static final int ROLLOFF_UNDEFINED = 0; // 0x0 + field public static final int STREAM_ID_TYPE_ID = 0; // 0x0 + field public static final int STREAM_ID_TYPE_RELATIVE_NUMBER = 1; // 0x1 + } + + public static class IsdbsFrontendSettings.Builder { + method @NonNull public android.media.tv.tuner.frontend.IsdbsFrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder setCodeRate(int); + method @IntRange(from=1) @NonNull public android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder setFrequency(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder setModulation(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder setRolloff(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder setStreamId(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder setStreamIdType(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbsFrontendSettings.Builder setSymbolRate(int); + } + + public class IsdbtFrontendCapabilities extends android.media.tv.tuner.frontend.FrontendCapabilities { + method public int getBandwidthCapability(); + method public int getCodeRateCapability(); + method public int getGuardIntervalCapability(); + method public int getModeCapability(); + method public int getModulationCapability(); + } + + public class IsdbtFrontendSettings extends android.media.tv.tuner.frontend.FrontendSettings { + method @NonNull public static android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder builder(); + method public int getBandwidth(); + method public int getCodeRate(); + method public int getGuardInterval(); + method public int getMode(); + method public int getModulation(); + method public int getServiceAreaId(); + method public int getType(); + field public static final int BANDWIDTH_6MHZ = 8; // 0x8 + field public static final int BANDWIDTH_7MHZ = 4; // 0x4 + field public static final int BANDWIDTH_8MHZ = 2; // 0x2 + field public static final int BANDWIDTH_AUTO = 1; // 0x1 + field public static final int BANDWIDTH_UNDEFINED = 0; // 0x0 + field public static final int MODE_1 = 2; // 0x2 + field public static final int MODE_2 = 4; // 0x4 + field public static final int MODE_3 = 8; // 0x8 + field public static final int MODE_AUTO = 1; // 0x1 + field public static final int MODE_UNDEFINED = 0; // 0x0 + field public static final int MODULATION_AUTO = 1; // 0x1 + field public static final int MODULATION_MOD_16QAM = 8; // 0x8 + field public static final int MODULATION_MOD_64QAM = 16; // 0x10 + field public static final int MODULATION_MOD_DQPSK = 2; // 0x2 + field public static final int MODULATION_MOD_QPSK = 4; // 0x4 + field public static final int MODULATION_UNDEFINED = 0; // 0x0 + } + + public static class IsdbtFrontendSettings.Builder { + method @NonNull public android.media.tv.tuner.frontend.IsdbtFrontendSettings build(); + method @NonNull public android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder setBandwidth(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder setCodeRate(int); + method @IntRange(from=1) @NonNull public android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder setFrequency(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder setGuardInterval(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder setMode(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder setModulation(int); + method @NonNull public android.media.tv.tuner.frontend.IsdbtFrontendSettings.Builder setServiceAreaId(int); + } + + public interface OnTuneEventListener { + method public void onTuneEvent(int); + field public static final int SIGNAL_LOCKED = 0; // 0x0 + field public static final int SIGNAL_LOST_LOCK = 2; // 0x2 + field public static final int SIGNAL_NO_SIGNAL = 1; // 0x1 + } + + public interface ScanCallback { + method public void onAnalogSifStandardReported(int); + method public void onAtsc3PlpInfosReported(@NonNull android.media.tv.tuner.frontend.Atsc3PlpInfo[]); + method public default void onDvbcAnnexReported(int); + method public void onDvbsStandardReported(int); + method public void onDvbtStandardReported(int); + method public void onFrequenciesReported(@NonNull int[]); + method public void onGroupIdsReported(@NonNull int[]); + method public void onHierarchyReported(int); + method public void onInputStreamIdsReported(@NonNull int[]); + method public void onLocked(); + method public default void onModulationReported(int); + method public void onPlpIdsReported(@NonNull int[]); + method public default void onPriorityReported(boolean); + method public void onProgress(@IntRange(from=0, to=100) int); + method public void onScanStopped(); + method public void onSignalTypeReported(int); + method public void onSymbolRatesReported(@NonNull int[]); + } + +} + +package android.media.voice { + + public final class KeyphraseModelManager { + method @RequiresPermission("android.permission.MANAGE_VOICE_KEYPHRASES") public void deleteKeyphraseSoundModel(int, @NonNull java.util.Locale); + method @Nullable @RequiresPermission("android.permission.MANAGE_VOICE_KEYPHRASES") public android.hardware.soundtrigger.SoundTrigger.KeyphraseSoundModel getKeyphraseSoundModel(int, @NonNull java.util.Locale); + method @RequiresPermission("android.permission.MANAGE_VOICE_KEYPHRASES") public void updateKeyphraseSoundModel(@NonNull android.hardware.soundtrigger.SoundTrigger.KeyphraseSoundModel); + } + +} + +package android.metrics { + + public class LogMaker { + ctor public LogMaker(int); + ctor public LogMaker(Object[]); + method public android.metrics.LogMaker addTaggedData(int, Object); + method public android.metrics.LogMaker clearCategory(); + method public android.metrics.LogMaker clearPackageName(); + method public android.metrics.LogMaker clearSubtype(); + method public android.metrics.LogMaker clearTaggedData(int); + method public android.metrics.LogMaker clearType(); + method public void deserialize(Object[]); + method public int getCategory(); + method public long getCounterBucket(); + method public String getCounterName(); + method public int getCounterValue(); + method public String getPackageName(); + method public int getProcessId(); + method public int getSubtype(); + method public Object getTaggedData(int); + method public long getTimestamp(); + method public int getType(); + method public int getUid(); + method public boolean isLongCounterBucket(); + method public boolean isSubsetOf(android.metrics.LogMaker); + method public boolean isValidValue(Object); + method public Object[] serialize(); + method public android.metrics.LogMaker setCategory(int); + method public android.metrics.LogMaker setPackageName(String); + method public android.metrics.LogMaker setSubtype(int); + method public android.metrics.LogMaker setType(int); + } + + public class MetricsReader { + ctor public MetricsReader(); + method public void checkpoint(); + method public boolean hasNext(); + method public android.metrics.LogMaker next(); + method public void read(long); + method public void reset(); + } + +} + +package android.net { + + public class CaptivePortal implements android.os.Parcelable { + method public void logEvent(int, @NonNull String); + method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void reevaluateNetwork(); + method public void useNetwork(); + field public static final int APP_REQUEST_REEVALUATION_REQUIRED = 100; // 0x64 + field public static final int APP_RETURN_DISMISSED = 0; // 0x0 + field public static final int APP_RETURN_UNWANTED = 1; // 0x1 + field public static final int APP_RETURN_WANTED_AS_IS = 2; // 0x2 + } + + public final class CaptivePortalData implements android.os.Parcelable { + method public int describeContents(); + method public long getByteLimit(); + method public long getExpiryTimeMillis(); + method public long getRefreshTimeMillis(); + method @Nullable public android.net.Uri getUserPortalUrl(); + method @Nullable public android.net.Uri getVenueInfoUrl(); + method public boolean isCaptive(); + method public boolean isSessionExtendable(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.CaptivePortalData> CREATOR; + } + + public static class CaptivePortalData.Builder { + ctor public CaptivePortalData.Builder(); + ctor public CaptivePortalData.Builder(@Nullable android.net.CaptivePortalData); + method @NonNull public android.net.CaptivePortalData build(); + method @NonNull public android.net.CaptivePortalData.Builder setBytesRemaining(long); + method @NonNull public android.net.CaptivePortalData.Builder setCaptive(boolean); + method @NonNull public android.net.CaptivePortalData.Builder setExpiryTime(long); + method @NonNull public android.net.CaptivePortalData.Builder setRefreshTime(long); + method @NonNull public android.net.CaptivePortalData.Builder setSessionExtendable(boolean); + method @NonNull public android.net.CaptivePortalData.Builder setUserPortalUrl(@Nullable android.net.Uri); + method @NonNull public android.net.CaptivePortalData.Builder setVenueInfoUrl(@Nullable android.net.Uri); + } + + public class ConnectivityManager { + method @NonNull @RequiresPermission(android.Manifest.permission.PACKET_KEEPALIVE_OFFLOAD) public android.net.SocketKeepalive createNattKeepalive(@NonNull android.net.Network, @NonNull android.os.ParcelFileDescriptor, @NonNull java.net.InetAddress, @NonNull java.net.InetAddress, @NonNull java.util.concurrent.Executor, @NonNull android.net.SocketKeepalive.Callback); + method @NonNull @RequiresPermission(android.Manifest.permission.PACKET_KEEPALIVE_OFFLOAD) public android.net.SocketKeepalive createSocketKeepalive(@NonNull android.net.Network, @NonNull java.net.Socket, @NonNull java.util.concurrent.Executor, @NonNull android.net.SocketKeepalive.Callback); + method @Deprecated @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public String getCaptivePortalServerUrl(); + method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void getLatestTetheringEntitlementResult(int, boolean, @NonNull java.util.concurrent.Executor, @NonNull android.net.ConnectivityManager.OnTetheringEntitlementResultListener); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.TETHER_PRIVILEGED, android.Manifest.permission.WRITE_SETTINGS}) public boolean isTetheringSupported(); + method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_FACTORY}) public int registerNetworkProvider(@NonNull android.net.NetworkProvider); + method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void registerTetheringEventCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.ConnectivityManager.OnTetheringEventCallback); + method @RequiresPermission(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK) public void requestNetwork(@NonNull android.net.NetworkRequest, int, int, @NonNull android.os.Handler, @NonNull android.net.ConnectivityManager.NetworkCallback); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_AIRPLANE_MODE, android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void setAirplaneMode(boolean); + method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_STACK}) public boolean shouldAvoidBadWifi(); + method @RequiresPermission(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK) public void startCaptivePortalApp(@NonNull android.net.Network, @NonNull android.os.Bundle); + method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void startTethering(int, boolean, android.net.ConnectivityManager.OnStartTetheringCallback); + method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void startTethering(int, boolean, android.net.ConnectivityManager.OnStartTetheringCallback, android.os.Handler); + method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void stopTethering(int); + method @RequiresPermission(anyOf={android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, android.Manifest.permission.NETWORK_FACTORY}) public void unregisterNetworkProvider(@NonNull android.net.NetworkProvider); + method @Deprecated @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public void unregisterTetheringEventCallback(@NonNull android.net.ConnectivityManager.OnTetheringEventCallback); + field public static final String EXTRA_CAPTIVE_PORTAL_PROBE_SPEC = "android.net.extra.CAPTIVE_PORTAL_PROBE_SPEC"; + field public static final String EXTRA_CAPTIVE_PORTAL_USER_AGENT = "android.net.extra.CAPTIVE_PORTAL_USER_AGENT"; + field public static final int TETHERING_BLUETOOTH = 2; // 0x2 + field public static final int TETHERING_USB = 1; // 0x1 + field public static final int TETHERING_WIFI = 0; // 0x0 + field @Deprecated public static final int TETHER_ERROR_ENTITLEMENT_UNKONWN = 13; // 0xd + field @Deprecated public static final int TETHER_ERROR_NO_ERROR = 0; // 0x0 + field @Deprecated public static final int TETHER_ERROR_PROVISION_FAILED = 11; // 0xb + field public static final int TYPE_NONE = -1; // 0xffffffff + field @Deprecated public static final int TYPE_WIFI_P2P = 13; // 0xd + } + + @Deprecated public abstract static class ConnectivityManager.OnStartTetheringCallback { + ctor @Deprecated public ConnectivityManager.OnStartTetheringCallback(); + method @Deprecated public void onTetheringFailed(); + method @Deprecated public void onTetheringStarted(); + } + + @Deprecated public static interface ConnectivityManager.OnTetheringEntitlementResultListener { + method @Deprecated public void onTetheringEntitlementResult(int); + } + + @Deprecated public abstract static class ConnectivityManager.OnTetheringEventCallback { + ctor @Deprecated public ConnectivityManager.OnTetheringEventCallback(); + method @Deprecated public void onUpstreamChanged(@Nullable android.net.Network); + } + + public class EthernetManager { + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public android.net.EthernetManager.TetheredInterfaceRequest requestTetheredInterface(@NonNull java.util.concurrent.Executor, @NonNull android.net.EthernetManager.TetheredInterfaceCallback); + } + + public static interface EthernetManager.TetheredInterfaceCallback { + method public void onAvailable(@NonNull String); + method public void onUnavailable(); + } + + public static class EthernetManager.TetheredInterfaceRequest { + method public void release(); + } + + public final class InvalidPacketException extends java.lang.Exception { + ctor public InvalidPacketException(int); + method public int getError(); + field public static final int ERROR_INVALID_IP_ADDRESS = -21; // 0xffffffeb + field public static final int ERROR_INVALID_LENGTH = -23; // 0xffffffe9 + field public static final int ERROR_INVALID_PORT = -22; // 0xffffffea + } + + public final class IpConfiguration implements android.os.Parcelable { + ctor public IpConfiguration(); + ctor public IpConfiguration(@NonNull android.net.IpConfiguration); + method public int describeContents(); + method @Nullable public android.net.ProxyInfo getHttpProxy(); + method @NonNull public android.net.IpConfiguration.IpAssignment getIpAssignment(); + method @NonNull public android.net.IpConfiguration.ProxySettings getProxySettings(); + method @Nullable public android.net.StaticIpConfiguration getStaticIpConfiguration(); + method public void setHttpProxy(@Nullable android.net.ProxyInfo); + method public void setIpAssignment(@NonNull android.net.IpConfiguration.IpAssignment); + method public void setProxySettings(@NonNull android.net.IpConfiguration.ProxySettings); + method public void setStaticIpConfiguration(@Nullable android.net.StaticIpConfiguration); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.IpConfiguration> CREATOR; + } + + public enum IpConfiguration.IpAssignment { + enum_constant public static final android.net.IpConfiguration.IpAssignment DHCP; + enum_constant public static final android.net.IpConfiguration.IpAssignment STATIC; + enum_constant public static final android.net.IpConfiguration.IpAssignment UNASSIGNED; + } + + public enum IpConfiguration.ProxySettings { + enum_constant public static final android.net.IpConfiguration.ProxySettings NONE; + enum_constant public static final android.net.IpConfiguration.ProxySettings PAC; + enum_constant public static final android.net.IpConfiguration.ProxySettings STATIC; + enum_constant public static final android.net.IpConfiguration.ProxySettings UNASSIGNED; + } + + public final class IpPrefix implements android.os.Parcelable { + ctor public IpPrefix(@NonNull java.net.InetAddress, @IntRange(from=0, to=128) int); + ctor public IpPrefix(@NonNull String); + } + + public final class IpSecManager { + method @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public void applyTunnelModeTransform(@NonNull android.net.IpSecManager.IpSecTunnelInterface, int, @NonNull android.net.IpSecTransform) throws java.io.IOException; + method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public android.net.IpSecManager.IpSecTunnelInterface createIpSecTunnelInterface(@NonNull java.net.InetAddress, @NonNull java.net.InetAddress, @NonNull android.net.Network) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException; + } + + public static final class IpSecManager.IpSecTunnelInterface implements java.lang.AutoCloseable { + method @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public void addAddress(@NonNull java.net.InetAddress, int) throws java.io.IOException; + method public void close(); + method @NonNull public String getInterfaceName(); + method @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public void removeAddress(@NonNull java.net.InetAddress, int) throws java.io.IOException; + } + + public static class IpSecTransform.Builder { + method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_IPSEC_TUNNELS) public android.net.IpSecTransform buildTunnelModeTransform(@NonNull java.net.InetAddress, @NonNull android.net.IpSecManager.SecurityParameterIndex) throws java.io.IOException, android.net.IpSecManager.ResourceUnavailableException, android.net.IpSecManager.SpiUnavailableException; + } + + public class KeepalivePacketData { + ctor protected KeepalivePacketData(@NonNull java.net.InetAddress, @IntRange(from=0, to=65535) int, @NonNull java.net.InetAddress, @IntRange(from=0, to=65535) int, @NonNull byte[]) throws android.net.InvalidPacketException; + method @NonNull public java.net.InetAddress getDstAddress(); + method public int getDstPort(); + method @NonNull public byte[] getPacket(); + method @NonNull public java.net.InetAddress getSrcAddress(); + method public int getSrcPort(); + } + + public class LinkAddress implements android.os.Parcelable { + ctor public LinkAddress(@NonNull java.net.InetAddress, @IntRange(from=0, to=128) int, int, int); + ctor public LinkAddress(@NonNull java.net.InetAddress, @IntRange(from=0, to=128) int, int, int, long, long); + ctor public LinkAddress(@NonNull java.net.InetAddress, @IntRange(from=0, to=128) int); + ctor public LinkAddress(@NonNull String); + ctor public LinkAddress(@NonNull String, int, int); + method public long getDeprecationTime(); + method public long getExpirationTime(); + method public boolean isGlobalPreferred(); + method public boolean isIpv4(); + method public boolean isIpv6(); + method public boolean isSameAddressAs(@Nullable android.net.LinkAddress); + field public static final long LIFETIME_PERMANENT = 9223372036854775807L; // 0x7fffffffffffffffL + field public static final long LIFETIME_UNKNOWN = -1L; // 0xffffffffffffffffL + } + + public final class LinkProperties implements android.os.Parcelable { + ctor public LinkProperties(@Nullable android.net.LinkProperties); + ctor public LinkProperties(@Nullable android.net.LinkProperties, boolean); + method public boolean addDnsServer(@NonNull java.net.InetAddress); + method public boolean addLinkAddress(@NonNull android.net.LinkAddress); + method public boolean addPcscfServer(@NonNull java.net.InetAddress); + method @NonNull public java.util.List<java.net.InetAddress> getAddresses(); + method @NonNull public java.util.List<java.lang.String> getAllInterfaceNames(); + method @NonNull public java.util.List<android.net.LinkAddress> getAllLinkAddresses(); + method @NonNull public java.util.List<android.net.RouteInfo> getAllRoutes(); + method @Nullable public android.net.Uri getCaptivePortalApiUrl(); + method @Nullable public android.net.CaptivePortalData getCaptivePortalData(); + method @NonNull public java.util.List<java.net.InetAddress> getPcscfServers(); + method @Nullable public String getTcpBufferSizes(); + method @NonNull public java.util.List<java.net.InetAddress> getValidatedPrivateDnsServers(); + method public boolean hasGlobalIpv6Address(); + method public boolean hasIpv4Address(); + method public boolean hasIpv4DefaultRoute(); + method public boolean hasIpv4DnsServer(); + method public boolean hasIpv6DefaultRoute(); + method public boolean hasIpv6DnsServer(); + method public boolean isIpv4Provisioned(); + method public boolean isIpv6Provisioned(); + method public boolean isProvisioned(); + method public boolean isReachable(@NonNull java.net.InetAddress); + method public boolean removeDnsServer(@NonNull java.net.InetAddress); + method public boolean removeLinkAddress(@NonNull android.net.LinkAddress); + method public boolean removeRoute(@NonNull android.net.RouteInfo); + method public void setCaptivePortalApiUrl(@Nullable android.net.Uri); + method public void setCaptivePortalData(@Nullable android.net.CaptivePortalData); + method public void setPcscfServers(@NonNull java.util.Collection<java.net.InetAddress>); + method public void setPrivateDnsServerName(@Nullable String); + method public void setTcpBufferSizes(@Nullable String); + method public void setUsePrivateDns(boolean); + method public void setValidatedPrivateDnsServers(@NonNull java.util.Collection<java.net.InetAddress>); + } + + public final class MatchAllNetworkSpecifier extends android.net.NetworkSpecifier implements android.os.Parcelable { + ctor public MatchAllNetworkSpecifier(); + method public int describeContents(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.MatchAllNetworkSpecifier> CREATOR; + } + + public final class NattKeepalivePacketData extends android.net.KeepalivePacketData implements android.os.Parcelable { + ctor public NattKeepalivePacketData(@NonNull java.net.InetAddress, int, @NonNull java.net.InetAddress, int, @NonNull byte[]) throws android.net.InvalidPacketException; + method public int describeContents(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.NattKeepalivePacketData> CREATOR; + } + + public class Network implements android.os.Parcelable { + ctor public Network(@NonNull android.net.Network); + method public int getNetId(); + method @NonNull public android.net.Network getPrivateDnsBypassingCopy(); + } + + public abstract class NetworkAgent { + ctor public NetworkAgent(@NonNull android.content.Context, @NonNull android.os.Looper, @NonNull String, @NonNull android.net.NetworkCapabilities, @NonNull android.net.LinkProperties, int, @NonNull android.net.NetworkAgentConfig, @Nullable android.net.NetworkProvider); + method @Nullable public android.net.Network getNetwork(); + method public void markConnected(); + method public void onAddKeepalivePacketFilter(int, @NonNull android.net.KeepalivePacketData); + method public void onAutomaticReconnectDisabled(); + method public void onNetworkUnwanted(); + method public void onRemoveKeepalivePacketFilter(int); + method public void onSaveAcceptUnvalidated(boolean); + method public void onSignalStrengthThresholdsUpdated(@NonNull int[]); + method public void onStartSocketKeepalive(int, @NonNull java.time.Duration, @NonNull android.net.KeepalivePacketData); + method public void onStopSocketKeepalive(int); + method public void onValidationStatus(int, @Nullable android.net.Uri); + method @NonNull public android.net.Network register(); + method public final void sendLinkProperties(@NonNull android.net.LinkProperties); + method public final void sendNetworkCapabilities(@NonNull android.net.NetworkCapabilities); + method public final void sendNetworkScore(@IntRange(from=0, to=99) int); + method public final void sendSocketKeepaliveEvent(int, int); + method public void unregister(); + field public static final int VALIDATION_STATUS_NOT_VALID = 2; // 0x2 + field public static final int VALIDATION_STATUS_VALID = 1; // 0x1 + } + + public final class NetworkAgentConfig implements android.os.Parcelable { + method public int describeContents(); + method public int getLegacyType(); + method @NonNull public String getLegacyTypeName(); + method public boolean isExplicitlySelected(); + method public boolean isPartialConnectivityAcceptable(); + method public boolean isUnvalidatedConnectivityAcceptable(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkAgentConfig> CREATOR; + } + + public static final class NetworkAgentConfig.Builder { + ctor public NetworkAgentConfig.Builder(); + method @NonNull public android.net.NetworkAgentConfig build(); + method @NonNull public android.net.NetworkAgentConfig.Builder setExplicitlySelected(boolean); + method @NonNull public android.net.NetworkAgentConfig.Builder setLegacyType(int); + method @NonNull public android.net.NetworkAgentConfig.Builder setLegacyTypeName(@NonNull String); + method @NonNull public android.net.NetworkAgentConfig.Builder setPartialConnectivityAcceptable(boolean); + method @NonNull public android.net.NetworkAgentConfig.Builder setUnvalidatedConnectivityAcceptable(boolean); + } + + public final class NetworkCapabilities implements android.os.Parcelable { + method @NonNull public int[] getAdministratorUids(); + method @Nullable public String getSsid(); + method @NonNull public int[] getTransportTypes(); + method public boolean satisfiedByNetworkCapabilities(@Nullable android.net.NetworkCapabilities); + field public static final int NET_CAPABILITY_OEM_PAID = 22; // 0x16 + field public static final int NET_CAPABILITY_OEM_PRIVATE = 26; // 0x1a + field public static final int NET_CAPABILITY_PARTIAL_CONNECTIVITY = 24; // 0x18 + } + + public static final class NetworkCapabilities.Builder { + ctor public NetworkCapabilities.Builder(); + ctor public NetworkCapabilities.Builder(@NonNull android.net.NetworkCapabilities); + method @NonNull public android.net.NetworkCapabilities.Builder addCapability(int); + method @NonNull public android.net.NetworkCapabilities.Builder addTransportType(int); + method @NonNull public android.net.NetworkCapabilities build(); + method @NonNull public android.net.NetworkCapabilities.Builder removeCapability(int); + method @NonNull public android.net.NetworkCapabilities.Builder removeTransportType(int); + method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setAdministratorUids(@NonNull int[]); + method @NonNull public android.net.NetworkCapabilities.Builder setLinkDownstreamBandwidthKbps(int); + method @NonNull public android.net.NetworkCapabilities.Builder setLinkUpstreamBandwidthKbps(int); + method @NonNull public android.net.NetworkCapabilities.Builder setNetworkSpecifier(@Nullable android.net.NetworkSpecifier); + method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setOwnerUid(int); + method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setRequestorPackageName(@Nullable String); + method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setRequestorUid(int); + method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SIGNAL_STRENGTH_WAKEUP) public android.net.NetworkCapabilities.Builder setSignalStrength(int); + method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public android.net.NetworkCapabilities.Builder setSsid(@Nullable String); + method @NonNull public android.net.NetworkCapabilities.Builder setTransportInfo(@Nullable android.net.TransportInfo); + } + + public class NetworkKey implements android.os.Parcelable { + ctor public NetworkKey(android.net.WifiKey); + method @Nullable public static android.net.NetworkKey createFromScanResult(@NonNull android.net.wifi.ScanResult); + method public int describeContents(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkKey> CREATOR; + field public static final int TYPE_WIFI = 1; // 0x1 + field public final int type; + field public final android.net.WifiKey wifiKey; + } + + public class NetworkProvider { + ctor public NetworkProvider(@NonNull android.content.Context, @NonNull android.os.Looper, @NonNull String); + method @RequiresPermission(android.Manifest.permission.NETWORK_FACTORY) public void declareNetworkRequestUnfulfillable(@NonNull android.net.NetworkRequest); + method public int getProviderId(); + method public void onNetworkRequestWithdrawn(@NonNull android.net.NetworkRequest); + method public void onNetworkRequested(@NonNull android.net.NetworkRequest, @IntRange(from=0, to=99) int, int); + field public static final int ID_NONE = -1; // 0xffffffff + } + + public abstract class NetworkRecommendationProvider { + ctor public NetworkRecommendationProvider(android.content.Context, java.util.concurrent.Executor); + method public final android.os.IBinder getBinder(); + method public abstract void onRequestScores(android.net.NetworkKey[]); + } + + public class NetworkRequest implements android.os.Parcelable { + method @Nullable public String getRequestorPackageName(); + method public int getRequestorUid(); + } + + public static class NetworkRequest.Builder { + method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SIGNAL_STRENGTH_WAKEUP) public android.net.NetworkRequest.Builder setSignalStrength(int); + } + + public class NetworkScoreManager { + method @RequiresPermission(anyOf={android.Manifest.permission.SCORE_NETWORKS, android.Manifest.permission.REQUEST_NETWORK_SCORES}) public boolean clearScores() throws java.lang.SecurityException; + method @RequiresPermission(anyOf={android.Manifest.permission.SCORE_NETWORKS, android.Manifest.permission.REQUEST_NETWORK_SCORES}) public void disableScoring() throws java.lang.SecurityException; + method @RequiresPermission(anyOf={android.Manifest.permission.SCORE_NETWORKS, android.Manifest.permission.REQUEST_NETWORK_SCORES}) public String getActiveScorerPackage(); + method @RequiresPermission(android.Manifest.permission.REQUEST_NETWORK_SCORES) public void registerNetworkScoreCallback(int, int, @NonNull java.util.concurrent.Executor, @NonNull android.net.NetworkScoreManager.NetworkScoreCallback) throws java.lang.SecurityException; + method @RequiresPermission(android.Manifest.permission.REQUEST_NETWORK_SCORES) public boolean requestScores(@NonNull java.util.Collection<android.net.NetworkKey>) throws java.lang.SecurityException; + method @RequiresPermission(anyOf={android.Manifest.permission.SCORE_NETWORKS, android.Manifest.permission.REQUEST_NETWORK_SCORES}) public boolean setActiveScorer(String) throws java.lang.SecurityException; + method @RequiresPermission(android.Manifest.permission.SCORE_NETWORKS) public boolean updateScores(@NonNull android.net.ScoredNetwork[]) throws java.lang.SecurityException; + field @Deprecated public static final String ACTION_CHANGE_ACTIVE = "android.net.scoring.CHANGE_ACTIVE"; + field public static final String ACTION_CUSTOM_ENABLE = "android.net.scoring.CUSTOM_ENABLE"; + field public static final String ACTION_RECOMMEND_NETWORKS = "android.net.action.RECOMMEND_NETWORKS"; + field public static final String ACTION_SCORER_CHANGED = "android.net.scoring.SCORER_CHANGED"; + field @Deprecated public static final String ACTION_SCORE_NETWORKS = "android.net.scoring.SCORE_NETWORKS"; + field @Deprecated public static final String EXTRA_NETWORKS_TO_SCORE = "networksToScore"; + field public static final String EXTRA_NEW_SCORER = "newScorer"; + field @Deprecated public static final String EXTRA_PACKAGE_NAME = "packageName"; + field public static final int SCORE_FILTER_CURRENT_NETWORK = 1; // 0x1 + field public static final int SCORE_FILTER_NONE = 0; // 0x0 + field public static final int SCORE_FILTER_SCAN_RESULTS = 2; // 0x2 + } + + public abstract static class NetworkScoreManager.NetworkScoreCallback { + ctor public NetworkScoreManager.NetworkScoreCallback(); + method public abstract void onScoresInvalidated(); + method public abstract void onScoresUpdated(@NonNull java.util.Collection<android.net.ScoredNetwork>); + } + + public abstract class NetworkSpecifier { + method public boolean canBeSatisfiedBy(@Nullable android.net.NetworkSpecifier); + method @Nullable public android.net.NetworkSpecifier redact(); + } + + public class NetworkStack { + method @Nullable public static android.os.IBinder getService(); + field public static final String PERMISSION_MAINLINE_NETWORK_STACK = "android.permission.MAINLINE_NETWORK_STACK"; + } + + public final class NetworkStats implements android.os.Parcelable { + ctor public NetworkStats(long, int); + method @NonNull public android.net.NetworkStats add(@NonNull android.net.NetworkStats); + method @NonNull public android.net.NetworkStats addEntry(@NonNull android.net.NetworkStats.Entry); + method public int describeContents(); + method @NonNull public android.net.NetworkStats subtract(@NonNull android.net.NetworkStats); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkStats> CREATOR; + field public static final int DEFAULT_NETWORK_NO = 0; // 0x0 + field public static final int DEFAULT_NETWORK_YES = 1; // 0x1 + field public static final String IFACE_VT = "vt_data0"; + field public static final int METERED_NO = 0; // 0x0 + field public static final int METERED_YES = 1; // 0x1 + field public static final int ROAMING_NO = 0; // 0x0 + field public static final int ROAMING_YES = 1; // 0x1 + field public static final int SET_DEFAULT = 0; // 0x0 + field public static final int SET_FOREGROUND = 1; // 0x1 + field public static final int TAG_NONE = 0; // 0x0 + field public static final int UID_ALL = -1; // 0xffffffff + field public static final int UID_TETHERING = -5; // 0xfffffffb + } + + public static class NetworkStats.Entry { + ctor public NetworkStats.Entry(@Nullable String, int, int, int, int, int, int, long, long, long, long, long); + } + + public final class RouteInfo implements android.os.Parcelable { + ctor public RouteInfo(@Nullable android.net.IpPrefix, @Nullable java.net.InetAddress, @Nullable String, int); + ctor public RouteInfo(@Nullable android.net.IpPrefix, @Nullable java.net.InetAddress, @Nullable String, int, int); + method public int getMtu(); + method public int getType(); + field public static final int RTN_THROW = 9; // 0x9 + field public static final int RTN_UNICAST = 1; // 0x1 + field public static final int RTN_UNREACHABLE = 7; // 0x7 + } + + public class RssiCurve implements android.os.Parcelable { + ctor public RssiCurve(int, int, byte[]); + ctor public RssiCurve(int, int, byte[], int); + method public int describeContents(); + method public byte lookupScore(int); + method public byte lookupScore(int, boolean); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.RssiCurve> CREATOR; + field public final int activeNetworkRssiBoost; + field public final int bucketWidth; + field public final byte[] rssiBuckets; + field public final int start; + } + + public class ScoredNetwork implements android.os.Parcelable { + ctor public ScoredNetwork(android.net.NetworkKey, android.net.RssiCurve); + ctor public ScoredNetwork(android.net.NetworkKey, android.net.RssiCurve, boolean); + ctor public ScoredNetwork(android.net.NetworkKey, android.net.RssiCurve, boolean, @Nullable android.os.Bundle); + method public int calculateBadge(int); + method public int describeContents(); + method public void writeToParcel(android.os.Parcel, int); + field public static final String ATTRIBUTES_KEY_BADGING_CURVE = "android.net.attributes.key.BADGING_CURVE"; + field public static final String ATTRIBUTES_KEY_HAS_CAPTIVE_PORTAL = "android.net.attributes.key.HAS_CAPTIVE_PORTAL"; + field public static final String ATTRIBUTES_KEY_RANKING_SCORE_OFFSET = "android.net.attributes.key.RANKING_SCORE_OFFSET"; + field @NonNull public static final android.os.Parcelable.Creator<android.net.ScoredNetwork> CREATOR; + field @Nullable public final android.os.Bundle attributes; + field public final boolean meteredHint; + field public final android.net.NetworkKey networkKey; + field public final android.net.RssiCurve rssiCurve; + } + + public abstract class SocketKeepalive implements java.lang.AutoCloseable { + field public static final int SUCCESS = 0; // 0x0 + } + + public final class StaticIpConfiguration implements android.os.Parcelable { + ctor public StaticIpConfiguration(); + ctor public StaticIpConfiguration(@Nullable android.net.StaticIpConfiguration); + method public void addDnsServer(@NonNull java.net.InetAddress); + method public void clear(); + method public int describeContents(); + method @NonNull public java.util.List<java.net.InetAddress> getDnsServers(); + method @Nullable public String getDomains(); + method @Nullable public java.net.InetAddress getGateway(); + method @Nullable public android.net.LinkAddress getIpAddress(); + method @NonNull public java.util.List<android.net.RouteInfo> getRoutes(@Nullable String); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.StaticIpConfiguration> CREATOR; + } + + public static final class StaticIpConfiguration.Builder { + ctor public StaticIpConfiguration.Builder(); + method @NonNull public android.net.StaticIpConfiguration build(); + method @NonNull public android.net.StaticIpConfiguration.Builder setDnsServers(@NonNull Iterable<java.net.InetAddress>); + method @NonNull public android.net.StaticIpConfiguration.Builder setDomains(@Nullable String); + method @NonNull public android.net.StaticIpConfiguration.Builder setGateway(@Nullable java.net.InetAddress); + method @NonNull public android.net.StaticIpConfiguration.Builder setIpAddress(@Nullable android.net.LinkAddress); + } + + public final class TetheredClient implements android.os.Parcelable { + ctor public TetheredClient(@NonNull android.net.MacAddress, @NonNull java.util.Collection<android.net.TetheredClient.AddressInfo>, int); + method public int describeContents(); + method @NonNull public java.util.List<android.net.TetheredClient.AddressInfo> getAddresses(); + method @NonNull public android.net.MacAddress getMacAddress(); + method public int getTetheringType(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.TetheredClient> CREATOR; + } + + public static final class TetheredClient.AddressInfo implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public android.net.LinkAddress getAddress(); + method @Nullable public String getHostname(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.TetheredClient.AddressInfo> CREATOR; + } + + public class TetheringManager { + method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void registerTetheringEventCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.TetheringManager.TetheringEventCallback); + method @RequiresPermission(anyOf={android.Manifest.permission.TETHER_PRIVILEGED, android.Manifest.permission.WRITE_SETTINGS}) public void requestLatestTetheringEntitlementResult(int, boolean, @NonNull java.util.concurrent.Executor, @NonNull android.net.TetheringManager.OnTetheringEntitlementResultListener); + method @RequiresPermission(anyOf={android.Manifest.permission.TETHER_PRIVILEGED, android.Manifest.permission.WRITE_SETTINGS}) public void startTethering(@NonNull android.net.TetheringManager.TetheringRequest, @NonNull java.util.concurrent.Executor, @NonNull android.net.TetheringManager.StartTetheringCallback); + method @RequiresPermission(anyOf={android.Manifest.permission.TETHER_PRIVILEGED, android.Manifest.permission.WRITE_SETTINGS}) public void stopAllTethering(); + method @RequiresPermission(anyOf={android.Manifest.permission.TETHER_PRIVILEGED, android.Manifest.permission.WRITE_SETTINGS}) public void stopTethering(int); + method @RequiresPermission(anyOf={android.Manifest.permission.TETHER_PRIVILEGED, android.Manifest.permission.ACCESS_NETWORK_STATE}) public void unregisterTetheringEventCallback(@NonNull android.net.TetheringManager.TetheringEventCallback); + field public static final String ACTION_TETHER_STATE_CHANGED = "android.net.conn.TETHER_STATE_CHANGED"; + field public static final String EXTRA_ACTIVE_LOCAL_ONLY = "android.net.extra.ACTIVE_LOCAL_ONLY"; + field public static final String EXTRA_ACTIVE_TETHER = "tetherArray"; + field public static final String EXTRA_AVAILABLE_TETHER = "availableArray"; + field public static final String EXTRA_ERRORED_TETHER = "erroredArray"; + field public static final int TETHERING_BLUETOOTH = 2; // 0x2 + field public static final int TETHERING_ETHERNET = 5; // 0x5 + field public static final int TETHERING_INVALID = -1; // 0xffffffff + field public static final int TETHERING_NCM = 4; // 0x4 + field public static final int TETHERING_USB = 1; // 0x1 + field public static final int TETHERING_WIFI = 0; // 0x0 + field public static final int TETHERING_WIFI_P2P = 3; // 0x3 + field public static final int TETHER_ERROR_DHCPSERVER_ERROR = 12; // 0xc + field public static final int TETHER_ERROR_DISABLE_FORWARDING_ERROR = 9; // 0x9 + field public static final int TETHER_ERROR_ENABLE_FORWARDING_ERROR = 8; // 0x8 + field public static final int TETHER_ERROR_ENTITLEMENT_UNKNOWN = 13; // 0xd + field public static final int TETHER_ERROR_IFACE_CFG_ERROR = 10; // 0xa + field public static final int TETHER_ERROR_INTERNAL_ERROR = 5; // 0x5 + field public static final int TETHER_ERROR_NO_ACCESS_TETHERING_PERMISSION = 15; // 0xf + field public static final int TETHER_ERROR_NO_CHANGE_TETHERING_PERMISSION = 14; // 0xe + field public static final int TETHER_ERROR_NO_ERROR = 0; // 0x0 + field public static final int TETHER_ERROR_PROVISIONING_FAILED = 11; // 0xb + field public static final int TETHER_ERROR_SERVICE_UNAVAIL = 2; // 0x2 + field public static final int TETHER_ERROR_TETHER_IFACE_ERROR = 6; // 0x6 + field public static final int TETHER_ERROR_UNAVAIL_IFACE = 4; // 0x4 + field public static final int TETHER_ERROR_UNKNOWN_IFACE = 1; // 0x1 + field public static final int TETHER_ERROR_UNKNOWN_TYPE = 16; // 0x10 + field public static final int TETHER_ERROR_UNSUPPORTED = 3; // 0x3 + field public static final int TETHER_ERROR_UNTETHER_IFACE_ERROR = 7; // 0x7 + field public static final int TETHER_HARDWARE_OFFLOAD_FAILED = 2; // 0x2 + field public static final int TETHER_HARDWARE_OFFLOAD_STARTED = 1; // 0x1 + field public static final int TETHER_HARDWARE_OFFLOAD_STOPPED = 0; // 0x0 + } + + public static interface TetheringManager.OnTetheringEntitlementResultListener { + method public void onTetheringEntitlementResult(int); + } + + public static interface TetheringManager.StartTetheringCallback { + method public default void onTetheringFailed(int); + method public default void onTetheringStarted(); + } + + public static interface TetheringManager.TetheringEventCallback { + method public default void onClientsChanged(@NonNull java.util.Collection<android.net.TetheredClient>); + method public default void onError(@NonNull String, int); + method public default void onOffloadStatusChanged(int); + method public default void onTetherableInterfacesChanged(@NonNull java.util.List<java.lang.String>); + method public default void onTetheredInterfacesChanged(@NonNull java.util.List<java.lang.String>); + method public default void onTetheringSupported(boolean); + method public default void onUpstreamChanged(@Nullable android.net.Network); + } + + public static class TetheringManager.TetheringRequest { + method @Nullable public android.net.LinkAddress getClientStaticIpv4Address(); + method @Nullable public android.net.LinkAddress getLocalIpv4Address(); + method public boolean getShouldShowEntitlementUi(); + method public int getTetheringType(); + method public boolean isExemptFromEntitlementCheck(); + } + + public static class TetheringManager.TetheringRequest.Builder { + ctor public TetheringManager.TetheringRequest.Builder(int); + method @NonNull public android.net.TetheringManager.TetheringRequest build(); + method @NonNull @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public android.net.TetheringManager.TetheringRequest.Builder setExemptFromEntitlementCheck(boolean); + method @NonNull @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public android.net.TetheringManager.TetheringRequest.Builder setShouldShowEntitlementUi(boolean); + method @NonNull @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public android.net.TetheringManager.TetheringRequest.Builder setStaticIpv4Addresses(@NonNull android.net.LinkAddress, @NonNull android.net.LinkAddress); + } + + public class TrafficStats { + method public static void setThreadStatsTagApp(); + method public static void setThreadStatsTagBackup(); + method public static void setThreadStatsTagRestore(); + field public static final int TAG_NETWORK_STACK_IMPERSONATION_RANGE_END = -113; // 0xffffff8f + field public static final int TAG_NETWORK_STACK_IMPERSONATION_RANGE_START = -128; // 0xffffff80 + field public static final int TAG_NETWORK_STACK_RANGE_END = -257; // 0xfffffeff + field public static final int TAG_NETWORK_STACK_RANGE_START = -768; // 0xfffffd00 + field public static final int TAG_SYSTEM_IMPERSONATION_RANGE_END = -241; // 0xffffff0f + field public static final int TAG_SYSTEM_IMPERSONATION_RANGE_START = -256; // 0xffffff00 + } + + public abstract class Uri implements java.lang.Comparable<android.net.Uri> android.os.Parcelable { + method @NonNull public String toSafeString(); + } + + public class VpnService extends android.app.Service { + method @RequiresPermission(android.Manifest.permission.CONTROL_VPN) public static void prepareAndAuthorize(android.content.Context); + } + + public class WebAddress { + ctor public WebAddress(String) throws android.net.ParseException; + } + + public class WifiKey implements android.os.Parcelable { + ctor public WifiKey(String, String); + method public int describeContents(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.WifiKey> CREATOR; + field public final String bssid; + field public final String ssid; + } + +} + +package android.net.apf { + + public final class ApfCapabilities implements android.os.Parcelable { + ctor public ApfCapabilities(int, int, int); + method public int describeContents(); + method public static boolean getApfDrop8023Frames(); + method @NonNull public static int[] getApfEtherTypeBlackList(); + method public boolean hasDataAccess(); + method public void writeToParcel(android.os.Parcel, int); + field public static final android.os.Parcelable.Creator<android.net.apf.ApfCapabilities> CREATOR; + field public final int apfPacketFormat; + field public final int apfVersionSupported; + field public final int maximumApfProgramSize; + } + +} + +package android.net.metrics { + + public final class ApfProgramEvent implements android.net.metrics.IpConnectivityLog.Event { + } + + public static final class ApfProgramEvent.Builder { + ctor public ApfProgramEvent.Builder(); + method @NonNull public android.net.metrics.ApfProgramEvent build(); + method @NonNull public android.net.metrics.ApfProgramEvent.Builder setActualLifetime(long); + method @NonNull public android.net.metrics.ApfProgramEvent.Builder setCurrentRas(int); + method @NonNull public android.net.metrics.ApfProgramEvent.Builder setFilteredRas(int); + method @NonNull public android.net.metrics.ApfProgramEvent.Builder setFlags(boolean, boolean); + method @NonNull public android.net.metrics.ApfProgramEvent.Builder setLifetime(long); + method @NonNull public android.net.metrics.ApfProgramEvent.Builder setProgramLength(int); + } + + public final class ApfStats implements android.net.metrics.IpConnectivityLog.Event { + } + + public static final class ApfStats.Builder { + ctor public ApfStats.Builder(); + method @NonNull public android.net.metrics.ApfStats build(); + method @NonNull public android.net.metrics.ApfStats.Builder setDroppedRas(int); + method @NonNull public android.net.metrics.ApfStats.Builder setDurationMs(long); + method @NonNull public android.net.metrics.ApfStats.Builder setMatchingRas(int); + method @NonNull public android.net.metrics.ApfStats.Builder setMaxProgramSize(int); + method @NonNull public android.net.metrics.ApfStats.Builder setParseErrors(int); + method @NonNull public android.net.metrics.ApfStats.Builder setProgramUpdates(int); + method @NonNull public android.net.metrics.ApfStats.Builder setProgramUpdatesAll(int); + method @NonNull public android.net.metrics.ApfStats.Builder setProgramUpdatesAllowingMulticast(int); + method @NonNull public android.net.metrics.ApfStats.Builder setReceivedRas(int); + method @NonNull public android.net.metrics.ApfStats.Builder setZeroLifetimeRas(int); + } + + public final class DhcpClientEvent implements android.net.metrics.IpConnectivityLog.Event { + } + + public static final class DhcpClientEvent.Builder { + ctor public DhcpClientEvent.Builder(); + method @NonNull public android.net.metrics.DhcpClientEvent build(); + method @NonNull public android.net.metrics.DhcpClientEvent.Builder setDurationMs(int); + method @NonNull public android.net.metrics.DhcpClientEvent.Builder setMsg(String); + } + + public final class DhcpErrorEvent implements android.net.metrics.IpConnectivityLog.Event { + ctor public DhcpErrorEvent(int); + method public static int errorCodeWithOption(int, int); + field public static final int BOOTP_TOO_SHORT = 67174400; // 0x4010000 + field public static final int BUFFER_UNDERFLOW = 83951616; // 0x5010000 + field public static final int DHCP_BAD_MAGIC_COOKIE = 67239936; // 0x4020000 + field public static final int DHCP_ERROR = 4; // 0x4 + field public static final int DHCP_INVALID_OPTION_LENGTH = 67305472; // 0x4030000 + field public static final int DHCP_NO_COOKIE = 67502080; // 0x4060000 + field public static final int DHCP_NO_MSG_TYPE = 67371008; // 0x4040000 + field public static final int DHCP_UNKNOWN_MSG_TYPE = 67436544; // 0x4050000 + field public static final int L2_ERROR = 1; // 0x1 + field public static final int L2_TOO_SHORT = 16842752; // 0x1010000 + field public static final int L2_WRONG_ETH_TYPE = 16908288; // 0x1020000 + field public static final int L3_ERROR = 2; // 0x2 + field public static final int L3_INVALID_IP = 33751040; // 0x2030000 + field public static final int L3_NOT_IPV4 = 33685504; // 0x2020000 + field public static final int L3_TOO_SHORT = 33619968; // 0x2010000 + field public static final int L4_ERROR = 3; // 0x3 + field public static final int L4_NOT_UDP = 50397184; // 0x3010000 + field public static final int L4_WRONG_PORT = 50462720; // 0x3020000 + field public static final int MISC_ERROR = 5; // 0x5 + field public static final int PARSING_ERROR = 84082688; // 0x5030000 + field public static final int RECEIVE_ERROR = 84017152; // 0x5020000 + } + + public class IpConnectivityLog { + ctor public IpConnectivityLog(); + method public boolean log(long, @NonNull android.net.metrics.IpConnectivityLog.Event); + method public boolean log(@NonNull String, @NonNull android.net.metrics.IpConnectivityLog.Event); + method public boolean log(@NonNull android.net.Network, @NonNull int[], @NonNull android.net.metrics.IpConnectivityLog.Event); + method public boolean log(int, @NonNull int[], @NonNull android.net.metrics.IpConnectivityLog.Event); + method public boolean log(@NonNull android.net.metrics.IpConnectivityLog.Event); + } + + public static interface IpConnectivityLog.Event extends android.os.Parcelable { + } + + public final class IpManagerEvent implements android.net.metrics.IpConnectivityLog.Event { + ctor public IpManagerEvent(int, long); + field public static final int COMPLETE_LIFECYCLE = 3; // 0x3 + field public static final int ERROR_INTERFACE_NOT_FOUND = 8; // 0x8 + field public static final int ERROR_INVALID_PROVISIONING = 7; // 0x7 + field public static final int ERROR_STARTING_IPREACHABILITYMONITOR = 6; // 0x6 + field public static final int ERROR_STARTING_IPV4 = 4; // 0x4 + field public static final int ERROR_STARTING_IPV6 = 5; // 0x5 + field public static final int PROVISIONING_FAIL = 2; // 0x2 + field public static final int PROVISIONING_OK = 1; // 0x1 + } + + public final class IpReachabilityEvent implements android.net.metrics.IpConnectivityLog.Event { + ctor public IpReachabilityEvent(int); + field public static final int NUD_FAILED = 512; // 0x200 + field public static final int NUD_FAILED_ORGANIC = 1024; // 0x400 + field public static final int PROBE = 256; // 0x100 + field public static final int PROVISIONING_LOST = 768; // 0x300 + field public static final int PROVISIONING_LOST_ORGANIC = 1280; // 0x500 + } + + public final class NetworkEvent implements android.net.metrics.IpConnectivityLog.Event { + ctor public NetworkEvent(int, long); + ctor public NetworkEvent(int); + field public static final int NETWORK_CAPTIVE_PORTAL_FOUND = 4; // 0x4 + field public static final int NETWORK_CONNECTED = 1; // 0x1 + field public static final int NETWORK_CONSECUTIVE_DNS_TIMEOUT_FOUND = 12; // 0xc + field public static final int NETWORK_DISCONNECTED = 7; // 0x7 + field public static final int NETWORK_FIRST_VALIDATION_PORTAL_FOUND = 10; // 0xa + field public static final int NETWORK_FIRST_VALIDATION_SUCCESS = 8; // 0x8 + field public static final int NETWORK_LINGER = 5; // 0x5 + field public static final int NETWORK_PARTIAL_CONNECTIVITY = 13; // 0xd + field public static final int NETWORK_REVALIDATION_PORTAL_FOUND = 11; // 0xb + field public static final int NETWORK_REVALIDATION_SUCCESS = 9; // 0x9 + field public static final int NETWORK_UNLINGER = 6; // 0x6 + field public static final int NETWORK_VALIDATED = 2; // 0x2 + field public static final int NETWORK_VALIDATION_FAILED = 3; // 0x3 + } + + public final class RaEvent implements android.net.metrics.IpConnectivityLog.Event { + } + + public static final class RaEvent.Builder { + ctor public RaEvent.Builder(); + method @NonNull public android.net.metrics.RaEvent build(); + method @NonNull public android.net.metrics.RaEvent.Builder updateDnsslLifetime(long); + method @NonNull public android.net.metrics.RaEvent.Builder updatePrefixPreferredLifetime(long); + method @NonNull public android.net.metrics.RaEvent.Builder updatePrefixValidLifetime(long); + method @NonNull public android.net.metrics.RaEvent.Builder updateRdnssLifetime(long); + method @NonNull public android.net.metrics.RaEvent.Builder updateRouteInfoLifetime(long); + method @NonNull public android.net.metrics.RaEvent.Builder updateRouterLifetime(long); + } + + public final class ValidationProbeEvent implements android.net.metrics.IpConnectivityLog.Event { + method @NonNull public static String getProbeName(int); + field public static final int DNS_FAILURE = 0; // 0x0 + field public static final int DNS_SUCCESS = 1; // 0x1 + field public static final int PROBE_DNS = 0; // 0x0 + field public static final int PROBE_FALLBACK = 4; // 0x4 + field public static final int PROBE_HTTP = 1; // 0x1 + field public static final int PROBE_HTTPS = 2; // 0x2 + field public static final int PROBE_PAC = 3; // 0x3 + field public static final int PROBE_PRIVDNS = 5; // 0x5 + } + + public static final class ValidationProbeEvent.Builder { + ctor public ValidationProbeEvent.Builder(); + method @NonNull public android.net.metrics.ValidationProbeEvent build(); + method @NonNull public android.net.metrics.ValidationProbeEvent.Builder setDurationMs(long); + method @NonNull public android.net.metrics.ValidationProbeEvent.Builder setProbeType(int, boolean); + method @NonNull public android.net.metrics.ValidationProbeEvent.Builder setReturnCode(int); + } + +} + +package android.net.netstats.provider { + + public abstract class NetworkStatsProvider { + ctor public NetworkStatsProvider(); + method public void notifyAlertReached(); + method public void notifyLimitReached(); + method public void notifyStatsUpdated(int, @NonNull android.net.NetworkStats, @NonNull android.net.NetworkStats); + method public abstract void onRequestStatsUpdate(int); + method public abstract void onSetAlert(long); + method public abstract void onSetLimit(@NonNull String, long); + field public static final int QUOTA_UNLIMITED = -1; // 0xffffffff + } + +} + +package android.net.sip { + + public class SipAudioCall { + method @Nullable public android.net.rtp.AudioGroup getAudioGroup(); + method public void setAudioGroup(@NonNull android.net.rtp.AudioGroup); + } + + public class SipManager { + method @NonNull public java.util.List<android.net.sip.SipProfile> getProfiles() throws android.net.sip.SipException; + field public static final String ACTION_SIP_CALL_OPTION_CHANGED = "android.net.sip.action.SIP_CALL_OPTION_CHANGED"; + field public static final String ACTION_SIP_INCOMING_CALL = "android.net.sip.action.SIP_INCOMING_CALL"; + field public static final String ACTION_SIP_REMOVE_PROFILE = "android.net.sip.action.SIP_REMOVE_PROFILE"; + field public static final String ACTION_SIP_SERVICE_UP = "android.net.sip.action.SIP_SERVICE_UP"; + field public static final String ACTION_START_SIP = "android.net.sip.action.START_SIP"; + } + + public class SipProfile implements java.lang.Cloneable android.os.Parcelable java.io.Serializable { + method public int getCallingUid(); + } + +} + +package android.net.util { + + public final class SocketUtils { + method public static void bindSocketToInterface(@NonNull java.io.FileDescriptor, @NonNull String) throws android.system.ErrnoException; + method public static void closeSocket(@Nullable java.io.FileDescriptor) throws java.io.IOException; + method @NonNull public static java.net.SocketAddress makeNetlinkSocketAddress(int, int); + method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, int); + method @Deprecated @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, @NonNull byte[]); + method @NonNull public static java.net.SocketAddress makePacketSocketAddress(int, int, @NonNull byte[]); + } + +} + +package android.net.wifi { + + public abstract class EasyConnectStatusCallback { + ctor public EasyConnectStatusCallback(); + method public abstract void onConfiguratorSuccess(int); + method public abstract void onEnrolleeSuccess(int); + method public void onFailure(int); + method public void onFailure(int, @Nullable String, @NonNull android.util.SparseArray<int[]>, @NonNull int[]); + method public abstract void onProgress(int); + field public static final int EASY_CONNECT_EVENT_PROGRESS_AUTHENTICATION_SUCCESS = 0; // 0x0 + field public static final int EASY_CONNECT_EVENT_PROGRESS_CONFIGURATION_ACCEPTED = 3; // 0x3 + field public static final int EASY_CONNECT_EVENT_PROGRESS_CONFIGURATION_SENT_WAITING_RESPONSE = 2; // 0x2 + field public static final int EASY_CONNECT_EVENT_PROGRESS_RESPONSE_PENDING = 1; // 0x1 + field public static final int EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_APPLIED = 1; // 0x1 + field public static final int EASY_CONNECT_EVENT_SUCCESS_CONFIGURATION_SENT = 0; // 0x0 + } + + @Deprecated public class RttManager { + method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void disableResponder(android.net.wifi.RttManager.ResponderCallback); + method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void enableResponder(android.net.wifi.RttManager.ResponderCallback); + method @Deprecated public android.net.wifi.RttManager.Capabilities getCapabilities(); + method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public android.net.wifi.RttManager.RttCapabilities getRttCapabilities(); + method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void startRanging(android.net.wifi.RttManager.RttParams[], android.net.wifi.RttManager.RttListener); + method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void stopRanging(android.net.wifi.RttManager.RttListener); + field @Deprecated public static final int BASE = 160256; // 0x27200 + field @Deprecated public static final int CMD_OP_ABORTED = 160260; // 0x27204 + field @Deprecated public static final int CMD_OP_DISABLE_RESPONDER = 160262; // 0x27206 + field @Deprecated public static final int CMD_OP_ENABLE_RESPONDER = 160261; // 0x27205 + field @Deprecated public static final int CMD_OP_ENALBE_RESPONDER_FAILED = 160264; // 0x27208 + field @Deprecated public static final int CMD_OP_ENALBE_RESPONDER_SUCCEEDED = 160263; // 0x27207 + field @Deprecated public static final int CMD_OP_FAILED = 160258; // 0x27202 + field @Deprecated public static final int CMD_OP_START_RANGING = 160256; // 0x27200 + field @Deprecated public static final int CMD_OP_STOP_RANGING = 160257; // 0x27201 + field @Deprecated public static final int CMD_OP_SUCCEEDED = 160259; // 0x27203 + field @Deprecated public static final String DESCRIPTION_KEY = "android.net.wifi.RttManager.Description"; + field @Deprecated public static final int PREAMBLE_HT = 2; // 0x2 + field @Deprecated public static final int PREAMBLE_LEGACY = 1; // 0x1 + field @Deprecated public static final int PREAMBLE_VHT = 4; // 0x4 + field @Deprecated public static final int REASON_INITIATOR_NOT_ALLOWED_WHEN_RESPONDER_ON = -6; // 0xfffffffa + field @Deprecated public static final int REASON_INVALID_LISTENER = -3; // 0xfffffffd + field @Deprecated public static final int REASON_INVALID_REQUEST = -4; // 0xfffffffc + field @Deprecated public static final int REASON_NOT_AVAILABLE = -2; // 0xfffffffe + field @Deprecated public static final int REASON_PERMISSION_DENIED = -5; // 0xfffffffb + field @Deprecated public static final int REASON_UNSPECIFIED = -1; // 0xffffffff + field @Deprecated public static final int RTT_BW_10_SUPPORT = 2; // 0x2 + field @Deprecated public static final int RTT_BW_160_SUPPORT = 32; // 0x20 + field @Deprecated public static final int RTT_BW_20_SUPPORT = 4; // 0x4 + field @Deprecated public static final int RTT_BW_40_SUPPORT = 8; // 0x8 + field @Deprecated public static final int RTT_BW_5_SUPPORT = 1; // 0x1 + field @Deprecated public static final int RTT_BW_80_SUPPORT = 16; // 0x10 + field @Deprecated public static final int RTT_CHANNEL_WIDTH_10 = 6; // 0x6 + field @Deprecated public static final int RTT_CHANNEL_WIDTH_160 = 3; // 0x3 + field @Deprecated public static final int RTT_CHANNEL_WIDTH_20 = 0; // 0x0 + field @Deprecated public static final int RTT_CHANNEL_WIDTH_40 = 1; // 0x1 + field @Deprecated public static final int RTT_CHANNEL_WIDTH_5 = 5; // 0x5 + field @Deprecated public static final int RTT_CHANNEL_WIDTH_80 = 2; // 0x2 + field @Deprecated public static final int RTT_CHANNEL_WIDTH_80P80 = 4; // 0x4 + field @Deprecated public static final int RTT_CHANNEL_WIDTH_UNSPECIFIED = -1; // 0xffffffff + field @Deprecated public static final int RTT_PEER_NAN = 5; // 0x5 + field @Deprecated public static final int RTT_PEER_P2P_CLIENT = 4; // 0x4 + field @Deprecated public static final int RTT_PEER_P2P_GO = 3; // 0x3 + field @Deprecated public static final int RTT_PEER_TYPE_AP = 1; // 0x1 + field @Deprecated public static final int RTT_PEER_TYPE_STA = 2; // 0x2 + field @Deprecated public static final int RTT_PEER_TYPE_UNSPECIFIED = 0; // 0x0 + field @Deprecated public static final int RTT_STATUS_ABORTED = 8; // 0x8 + field @Deprecated public static final int RTT_STATUS_FAILURE = 1; // 0x1 + field @Deprecated public static final int RTT_STATUS_FAIL_AP_ON_DIFF_CHANNEL = 6; // 0x6 + field @Deprecated public static final int RTT_STATUS_FAIL_BUSY_TRY_LATER = 12; // 0xc + field @Deprecated public static final int RTT_STATUS_FAIL_FTM_PARAM_OVERRIDE = 15; // 0xf + field @Deprecated public static final int RTT_STATUS_FAIL_INVALID_TS = 9; // 0x9 + field @Deprecated public static final int RTT_STATUS_FAIL_NOT_SCHEDULED_YET = 4; // 0x4 + field @Deprecated public static final int RTT_STATUS_FAIL_NO_CAPABILITY = 7; // 0x7 + field @Deprecated public static final int RTT_STATUS_FAIL_NO_RSP = 2; // 0x2 + field @Deprecated public static final int RTT_STATUS_FAIL_PROTOCOL = 10; // 0xa + field @Deprecated public static final int RTT_STATUS_FAIL_REJECTED = 3; // 0x3 + field @Deprecated public static final int RTT_STATUS_FAIL_SCHEDULE = 11; // 0xb + field @Deprecated public static final int RTT_STATUS_FAIL_TM_TIMEOUT = 5; // 0x5 + field @Deprecated public static final int RTT_STATUS_INVALID_REQ = 13; // 0xd + field @Deprecated public static final int RTT_STATUS_NO_WIFI = 14; // 0xe + field @Deprecated public static final int RTT_STATUS_SUCCESS = 0; // 0x0 + field @Deprecated public static final int RTT_TYPE_11_MC = 4; // 0x4 + field @Deprecated public static final int RTT_TYPE_11_V = 2; // 0x2 + field @Deprecated public static final int RTT_TYPE_ONE_SIDED = 1; // 0x1 + field @Deprecated public static final int RTT_TYPE_TWO_SIDED = 2; // 0x2 + field @Deprecated public static final int RTT_TYPE_UNSPECIFIED = 0; // 0x0 + } + + @Deprecated public class RttManager.Capabilities { + ctor @Deprecated public RttManager.Capabilities(); + field @Deprecated public int supportedPeerType; + field @Deprecated public int supportedType; + } + + @Deprecated public static class RttManager.ParcelableRttParams implements android.os.Parcelable { + field @Deprecated @NonNull public android.net.wifi.RttManager.RttParams[] mParams; + } + + @Deprecated public static class RttManager.ParcelableRttResults implements android.os.Parcelable { + ctor @Deprecated public RttManager.ParcelableRttResults(android.net.wifi.RttManager.RttResult[]); + field @Deprecated public android.net.wifi.RttManager.RttResult[] mResults; + } + + @Deprecated public abstract static class RttManager.ResponderCallback { + ctor @Deprecated public RttManager.ResponderCallback(); + method @Deprecated public abstract void onResponderEnableFailure(int); + method @Deprecated public abstract void onResponderEnabled(android.net.wifi.RttManager.ResponderConfig); + } + + @Deprecated public static class RttManager.ResponderConfig implements android.os.Parcelable { + ctor @Deprecated public RttManager.ResponderConfig(); + method @Deprecated public int describeContents(); + method @Deprecated public void writeToParcel(android.os.Parcel, int); + field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.RttManager.ResponderConfig> CREATOR; + field @Deprecated public int centerFreq0; + field @Deprecated public int centerFreq1; + field @Deprecated public int channelWidth; + field @Deprecated public int frequency; + field @Deprecated public String macAddress; + field @Deprecated public int preamble; + } + + @Deprecated public static class RttManager.RttCapabilities implements android.os.Parcelable { + ctor @Deprecated public RttManager.RttCapabilities(); + field @Deprecated public int bwSupported; + field @Deprecated public boolean lciSupported; + field @Deprecated public boolean lcrSupported; + field @Deprecated public int mcVersion; + field @Deprecated public boolean oneSidedRttSupported; + field @Deprecated public int preambleSupported; + field @Deprecated public boolean responderSupported; + field @Deprecated public boolean secureRttSupported; + field @Deprecated public boolean supportedPeerType; + field @Deprecated public boolean supportedType; + field @Deprecated public boolean twoSided11McRttSupported; + } + + @Deprecated public static interface RttManager.RttListener { + method @Deprecated public void onAborted(); + method @Deprecated public void onFailure(int, String); + method @Deprecated public void onSuccess(android.net.wifi.RttManager.RttResult[]); + } + + @Deprecated public static class RttManager.RttParams { + ctor @Deprecated public RttManager.RttParams(); + field @Deprecated public boolean LCIRequest; + field @Deprecated public boolean LCRRequest; + field @Deprecated public int bandwidth; + field @Deprecated public String bssid; + field @Deprecated public int burstTimeout; + field @Deprecated public int centerFreq0; + field @Deprecated public int centerFreq1; + field @Deprecated public int channelWidth; + field @Deprecated public int deviceType; + field @Deprecated public int frequency; + field @Deprecated public int interval; + field @Deprecated public int numRetriesPerFTMR; + field @Deprecated public int numRetriesPerMeasurementFrame; + field @Deprecated public int numSamplesPerBurst; + field @Deprecated public int num_retries; + field @Deprecated public int num_samples; + field @Deprecated public int numberBurst; + field @Deprecated public int preamble; + field @Deprecated public int requestType; + field @Deprecated public boolean secure; + } + + @Deprecated public static class RttManager.RttResult { + ctor @Deprecated public RttManager.RttResult(); + field @Deprecated public android.net.wifi.RttManager.WifiInformationElement LCI; + field @Deprecated public android.net.wifi.RttManager.WifiInformationElement LCR; + field @Deprecated public String bssid; + field @Deprecated public int burstDuration; + field @Deprecated public int burstNumber; + field @Deprecated public int distance; + field @Deprecated public int distanceSpread; + field @Deprecated public int distanceStandardDeviation; + field @Deprecated public int distance_cm; + field @Deprecated public int distance_sd_cm; + field @Deprecated public int distance_spread_cm; + field @Deprecated public int frameNumberPerBurstPeer; + field @Deprecated public int measurementFrameNumber; + field @Deprecated public int measurementType; + field @Deprecated public int negotiatedBurstNum; + field @Deprecated public int requestType; + field @Deprecated public int retryAfterDuration; + field @Deprecated public int rssi; + field @Deprecated public int rssiSpread; + field @Deprecated public int rssi_spread; + field @Deprecated public long rtt; + field @Deprecated public long rttSpread; + field @Deprecated public long rttStandardDeviation; + field @Deprecated public long rtt_ns; + field @Deprecated public long rtt_sd_ns; + field @Deprecated public long rtt_spread_ns; + field @Deprecated public int rxRate; + field @Deprecated public boolean secure; + field @Deprecated public int status; + field @Deprecated public int successMeasurementFrameNumber; + field @Deprecated public long ts; + field @Deprecated public int txRate; + field @Deprecated public int tx_rate; + } + + @Deprecated public static class RttManager.WifiInformationElement { + ctor @Deprecated public RttManager.WifiInformationElement(); + field @Deprecated public byte[] data; + field @Deprecated public byte id; + } + + public final class ScanResult implements android.os.Parcelable { + field public static final int CIPHER_CCMP = 3; // 0x3 + field public static final int CIPHER_GCMP_256 = 4; // 0x4 + field public static final int CIPHER_NONE = 0; // 0x0 + field public static final int CIPHER_NO_GROUP_ADDRESSED = 1; // 0x1 + field public static final int CIPHER_SMS4 = 5; // 0x5 + field public static final int CIPHER_TKIP = 2; // 0x2 + field public static final int KEY_MGMT_EAP = 2; // 0x2 + field public static final int KEY_MGMT_EAP_SHA256 = 6; // 0x6 + field public static final int KEY_MGMT_EAP_SUITE_B_192 = 10; // 0xa + field public static final int KEY_MGMT_FT_EAP = 4; // 0x4 + field public static final int KEY_MGMT_FT_PSK = 3; // 0x3 + field public static final int KEY_MGMT_FT_SAE = 11; // 0xb + field public static final int KEY_MGMT_NONE = 0; // 0x0 + field public static final int KEY_MGMT_OSEN = 7; // 0x7 + field public static final int KEY_MGMT_OWE = 9; // 0x9 + field public static final int KEY_MGMT_OWE_TRANSITION = 12; // 0xc + field public static final int KEY_MGMT_PSK = 1; // 0x1 + field public static final int KEY_MGMT_PSK_SHA256 = 5; // 0x5 + field public static final int KEY_MGMT_SAE = 8; // 0x8 + field public static final int KEY_MGMT_WAPI_CERT = 14; // 0xe + field public static final int KEY_MGMT_WAPI_PSK = 13; // 0xd + field public static final int PROTOCOL_NONE = 0; // 0x0 + field public static final int PROTOCOL_OSEN = 3; // 0x3 + field public static final int PROTOCOL_RSN = 2; // 0x2 + field public static final int PROTOCOL_WAPI = 4; // 0x4 + field public static final int PROTOCOL_WPA = 1; // 0x1 + } + + public final class SoftApCapability implements android.os.Parcelable { + method public boolean areFeaturesSupported(long); + method public int describeContents(); + method public int getMaxSupportedClients(); + method @NonNull public int[] getSupportedChannelList(int); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.SoftApCapability> CREATOR; + field public static final long SOFTAP_FEATURE_ACS_OFFLOAD = 1L; // 0x1L + field public static final long SOFTAP_FEATURE_CLIENT_FORCE_DISCONNECT = 2L; // 0x2L + field public static final long SOFTAP_FEATURE_MAC_ADDRESS_CUSTOMIZATION = 8L; // 0x8L + field public static final long SOFTAP_FEATURE_WPA3_SAE = 4L; // 0x4L + } + + public final class SoftApConfiguration implements android.os.Parcelable { + method @NonNull public java.util.List<android.net.MacAddress> getAllowedClientList(); + method public int getBand(); + method @NonNull public int[] getBands(); + method @NonNull public java.util.List<android.net.MacAddress> getBlockedClientList(); + method public int getChannel(); + method @NonNull public android.util.SparseIntArray getChannels(); + method public int getMacRandomizationSetting(); + method public int getMaxNumberOfClients(); + method public long getShutdownTimeoutMillis(); + method public boolean isAutoShutdownEnabled(); + method public boolean isClientControlByUserEnabled(); + method @Nullable public android.net.wifi.WifiConfiguration toWifiConfiguration(); + field public static final int BAND_2GHZ = 1; // 0x1 + field public static final int BAND_5GHZ = 2; // 0x2 + field public static final int BAND_6GHZ = 4; // 0x4 + field @Deprecated public static final int BAND_ANY = 7; // 0x7 + field public static final int RANDOMIZATION_NONE = 0; // 0x0 + field public static final int RANDOMIZATION_PERSISTENT = 1; // 0x1 + } + + public static final class SoftApConfiguration.Builder { + ctor public SoftApConfiguration.Builder(); + ctor public SoftApConfiguration.Builder(@NonNull android.net.wifi.SoftApConfiguration); + method @NonNull public android.net.wifi.SoftApConfiguration build(); + method @NonNull public android.net.wifi.SoftApConfiguration.Builder setAllowedClientList(@NonNull java.util.List<android.net.MacAddress>); + method @NonNull public android.net.wifi.SoftApConfiguration.Builder setAutoShutdownEnabled(boolean); + method @NonNull public android.net.wifi.SoftApConfiguration.Builder setBand(int); + method @NonNull public android.net.wifi.SoftApConfiguration.Builder setBands(@NonNull int[]); + method @NonNull public android.net.wifi.SoftApConfiguration.Builder setBlockedClientList(@NonNull java.util.List<android.net.MacAddress>); + method @NonNull public android.net.wifi.SoftApConfiguration.Builder setBssid(@Nullable android.net.MacAddress); + method @NonNull public android.net.wifi.SoftApConfiguration.Builder setChannel(int, int); + method @NonNull public android.net.wifi.SoftApConfiguration.Builder setChannels(@NonNull android.util.SparseIntArray); + method @NonNull public android.net.wifi.SoftApConfiguration.Builder setClientControlByUserEnabled(boolean); + method @NonNull public android.net.wifi.SoftApConfiguration.Builder setHiddenSsid(boolean); + method @NonNull public android.net.wifi.SoftApConfiguration.Builder setMacRandomizationSetting(int); + method @NonNull public android.net.wifi.SoftApConfiguration.Builder setMaxNumberOfClients(@IntRange(from=0) int); + method @NonNull public android.net.wifi.SoftApConfiguration.Builder setPassphrase(@Nullable String, int); + method @NonNull public android.net.wifi.SoftApConfiguration.Builder setShutdownTimeoutMillis(@IntRange(from=0) long); + method @NonNull public android.net.wifi.SoftApConfiguration.Builder setSsid(@Nullable String); + } + + public final class SoftApInfo implements android.os.Parcelable { + method public int describeContents(); + method public int getBandwidth(); + method @Nullable public android.net.MacAddress getBssid(); + method public int getFrequency(); + method public int getWifiStandard(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field public static final int CHANNEL_WIDTH_160MHZ = 6; // 0x6 + field public static final int CHANNEL_WIDTH_20MHZ = 2; // 0x2 + field public static final int CHANNEL_WIDTH_20MHZ_NOHT = 1; // 0x1 + field public static final int CHANNEL_WIDTH_40MHZ = 3; // 0x3 + field public static final int CHANNEL_WIDTH_80MHZ = 4; // 0x4 + field public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 5; // 0x5 + field public static final int CHANNEL_WIDTH_INVALID = 0; // 0x0 + field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.SoftApInfo> CREATOR; + } + + public final class WifiClient implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public android.net.MacAddress getMacAddress(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.WifiClient> CREATOR; + } + + @Deprecated public class WifiConfiguration implements android.os.Parcelable { + method @Deprecated public int getAuthType(); + method @Deprecated @NonNull public android.net.IpConfiguration getIpConfiguration(); + method @Deprecated @NonNull public android.net.wifi.WifiConfiguration.NetworkSelectionStatus getNetworkSelectionStatus(); + method @Deprecated @NonNull public String getPrintableSsid(); + method @Deprecated public int getRecentFailureReason(); + method @Deprecated public boolean hasNoInternetAccess(); + method @Deprecated public boolean isEphemeral(); + method @Deprecated public static boolean isMetered(@Nullable android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiInfo); + method @Deprecated public boolean isNoInternetAccessExpected(); + method @Deprecated public void setIpConfiguration(@Nullable android.net.IpConfiguration); + method @Deprecated public void setNetworkSelectionStatus(@NonNull android.net.wifi.WifiConfiguration.NetworkSelectionStatus); + field @Deprecated public static final int INVALID_NETWORK_ID = -1; // 0xffffffff + field @Deprecated public static final int METERED_OVERRIDE_METERED = 1; // 0x1 + field @Deprecated public static final int METERED_OVERRIDE_NONE = 0; // 0x0 + field @Deprecated public static final int METERED_OVERRIDE_NOT_METERED = 2; // 0x2 + field @Deprecated public static final int RANDOMIZATION_AUTO = 3; // 0x3 + field @Deprecated public static final int RANDOMIZATION_ENHANCED = 2; // 0x2 + field @Deprecated public static final int RANDOMIZATION_NONE = 0; // 0x0 + field @Deprecated public static final int RANDOMIZATION_PERSISTENT = 1; // 0x1 + field @Deprecated public static final int RECENT_FAILURE_AP_UNABLE_TO_HANDLE_NEW_STA = 17; // 0x11 + field @Deprecated public static final int RECENT_FAILURE_DISCONNECTION_AP_BUSY = 1004; // 0x3ec + field @Deprecated public static final int RECENT_FAILURE_MBO_OCE_DISCONNECT = 1001; // 0x3e9 + field @Deprecated public static final int RECENT_FAILURE_NONE = 0; // 0x0 + field @Deprecated public static final int RECENT_FAILURE_POOR_CHANNEL_CONDITIONS = 1003; // 0x3eb + field @Deprecated public static final int RECENT_FAILURE_REFUSED_TEMPORARILY = 1002; // 0x3ea + field @Deprecated public boolean allowAutojoin; + field @Deprecated public int carrierId; + field @Deprecated public String creatorName; + field @Deprecated public int creatorUid; + field @Deprecated public boolean fromWifiNetworkSpecifier; + field @Deprecated public boolean fromWifiNetworkSuggestion; + field @Deprecated public String lastUpdateName; + field @Deprecated public int lastUpdateUid; + field @Deprecated public int macRandomizationSetting; + field @Deprecated public boolean meteredHint; + field @Deprecated public int meteredOverride; + field @Deprecated public int numAssociation; + field @Deprecated public int numScorerOverride; + field @Deprecated public int numScorerOverrideAndSwitchedNetwork; + field @Deprecated public boolean requirePmf; + field @Deprecated public boolean shared; + field @Deprecated public int subscriptionId; + field @Deprecated public boolean useExternalScores; + } + + @Deprecated public static class WifiConfiguration.KeyMgmt { + field @Deprecated public static final int WAPI_CERT = 14; // 0xe + field @Deprecated public static final int WAPI_PSK = 13; // 0xd + field @Deprecated public static final int WPA2_PSK = 4; // 0x4 + } + + @Deprecated public static class WifiConfiguration.NetworkSelectionStatus { + method @Deprecated public int getDisableReasonCounter(int); + method @Deprecated public long getDisableTime(); + method @Deprecated public static int getMaxNetworkSelectionDisableReason(); + method @Deprecated public int getNetworkSelectionDisableReason(); + method @Deprecated @Nullable public static String getNetworkSelectionDisableReasonString(int); + method @Deprecated public int getNetworkSelectionStatus(); + method @Deprecated @NonNull public String getNetworkStatusString(); + method @Deprecated public boolean hasEverConnected(); + field @Deprecated public static final int DISABLED_ASSOCIATION_REJECTION = 1; // 0x1 + field @Deprecated public static final int DISABLED_AUTHENTICATION_FAILURE = 2; // 0x2 + field @Deprecated public static final int DISABLED_AUTHENTICATION_NO_CREDENTIALS = 5; // 0x5 + field @Deprecated public static final int DISABLED_AUTHENTICATION_NO_SUBSCRIPTION = 9; // 0x9 + field @Deprecated public static final int DISABLED_BY_WIFI_MANAGER = 7; // 0x7 + field @Deprecated public static final int DISABLED_BY_WRONG_PASSWORD = 8; // 0x8 + field @Deprecated public static final int DISABLED_DHCP_FAILURE = 3; // 0x3 + field @Deprecated public static final int DISABLED_NONE = 0; // 0x0 + field @Deprecated public static final int DISABLED_NO_INTERNET_PERMANENT = 6; // 0x6 + field @Deprecated public static final int DISABLED_NO_INTERNET_TEMPORARY = 4; // 0x4 + field @Deprecated public static final int NETWORK_SELECTION_ENABLED = 0; // 0x0 + field @Deprecated public static final int NETWORK_SELECTION_PERMANENTLY_DISABLED = 2; // 0x2 + field @Deprecated public static final int NETWORK_SELECTION_TEMPORARY_DISABLED = 1; // 0x1 + } + + @Deprecated public static final class WifiConfiguration.NetworkSelectionStatus.Builder { + ctor @Deprecated public WifiConfiguration.NetworkSelectionStatus.Builder(); + method @Deprecated @NonNull public android.net.wifi.WifiConfiguration.NetworkSelectionStatus build(); + method @Deprecated @NonNull public android.net.wifi.WifiConfiguration.NetworkSelectionStatus.Builder setNetworkSelectionDisableReason(int); + method @Deprecated @NonNull public android.net.wifi.WifiConfiguration.NetworkSelectionStatus.Builder setNetworkSelectionStatus(int); + } + + public class WifiEnterpriseConfig implements android.os.Parcelable { + method @Nullable public String[] getCaCertificateAliases(); + method @NonNull public String getCaPath(); + method @NonNull public String getClientCertificateAlias(); + method public int getOcsp(); + method @NonNull public String getWapiCertSuite(); + method public void setCaCertificateAliases(@Nullable String[]); + method public void setCaPath(@NonNull String); + method public void setClientCertificateAlias(@NonNull String); + method public void setOcsp(int); + method public void setWapiCertSuite(@NonNull String); + field public static final int OCSP_NONE = 0; // 0x0 + field public static final int OCSP_REQUEST_CERT_STATUS = 1; // 0x1 + field public static final int OCSP_REQUIRE_ALL_NON_TRUSTED_CERTS_STATUS = 3; // 0x3 + field public static final int OCSP_REQUIRE_CERT_STATUS = 2; // 0x2 + } + + public class WifiFrameworkInitializer { + method public static void registerServiceWrappers(); + } + + public class WifiInfo implements android.os.Parcelable { + method public double getLostTxPacketsPerSecond(); + method @Nullable public String getRequestingPackageName(); + method public double getRetriedTxPacketsPerSecond(); + method public int getScore(); + method public double getSuccessfulRxPacketsPerSecond(); + method public double getSuccessfulTxPacketsPerSecond(); + method public boolean isEphemeral(); + method public boolean isOemPaid(); + method public boolean isOemPrivate(); + method public boolean isOsuAp(); + method public boolean isPasspointAp(); + method public boolean isTrusted(); + method @Nullable public static String sanitizeSsid(@Nullable String); + field public static final String DEFAULT_MAC_ADDRESS = "02:00:00:00:00:00"; + field public static final int INVALID_RSSI = -127; // 0xffffff81 + } + + public class WifiManager { + method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public void addOnWifiUsabilityStatsListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.OnWifiUsabilityStatsListener); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void allowAutojoin(int, boolean); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void allowAutojoinGlobal(boolean); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void allowAutojoinPasspoint(@NonNull String, boolean); + method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public void clearWifiConnectedNetworkScorer(); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void connect(@NonNull android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiManager.ActionListener); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void connect(int, @Nullable android.net.wifi.WifiManager.ActionListener); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void disable(int, @Nullable android.net.wifi.WifiManager.ActionListener); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK}) public void disableEphemeralNetwork(@NonNull String); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void factoryReset(); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void forget(int, @Nullable android.net.wifi.WifiManager.ActionListener); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.List<android.util.Pair<android.net.wifi.WifiConfiguration,java.util.Map<java.lang.Integer,java.util.List<android.net.wifi.ScanResult>>>> getAllMatchingWifiConfigs(@NonNull java.util.List<android.net.wifi.ScanResult>); + method @Nullable @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public String getCountryCode(); + method @Nullable @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public android.net.Network getCurrentNetwork(); + method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public String[] getFactoryMacAddresses(); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.Map<android.net.wifi.hotspot2.OsuProvider,java.util.List<android.net.wifi.ScanResult>> getMatchingOsuProviders(@Nullable java.util.List<android.net.wifi.ScanResult>); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.Map<android.net.wifi.hotspot2.OsuProvider,android.net.wifi.hotspot2.PasspointConfiguration> getMatchingPasspointConfigsForOsuProviders(@NonNull java.util.Set<android.net.wifi.hotspot2.OsuProvider>); + method @NonNull @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_WIFI_STATE}) public java.util.Map<android.net.wifi.WifiNetworkSuggestion,java.util.List<android.net.wifi.ScanResult>> getMatchingScanResults(@NonNull java.util.List<android.net.wifi.WifiNetworkSuggestion>, @Nullable java.util.List<android.net.wifi.ScanResult>); + method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_WIFI_STATE, android.Manifest.permission.READ_WIFI_CREDENTIAL}) public java.util.List<android.net.wifi.WifiConfiguration> getPrivilegedConfiguredNetworks(); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public android.net.wifi.SoftApConfiguration getSoftApConfiguration(); + method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public void getWifiActivityEnergyInfoAsync(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.OnWifiActivityEnergyInfoListener); + method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public android.net.wifi.WifiConfiguration getWifiApConfiguration(); + method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public int getWifiApState(); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public java.util.List<android.net.wifi.WifiConfiguration> getWifiConfigForMatchedNetworkSuggestionsSharedWithUser(@NonNull java.util.List<android.net.wifi.ScanResult>); + method public boolean is60GHzBandSupported(); + method public boolean isApMacRandomizationSupported(); + method public boolean isConnectedMacRandomizationSupported(); + method @Deprecated public boolean isDeviceToDeviceRttSupported(); + method public boolean isPortableHotspotSupported(); + method public boolean isVerboseLoggingEnabled(); + method @RequiresPermission(android.Manifest.permission.ACCESS_WIFI_STATE) public boolean isWifiApEnabled(); + method public boolean isWifiScannerSupported(); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void registerNetworkRequestMatchCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.NetworkRequestMatchCallback); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void registerSoftApCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.SoftApCallback); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void registerTrafficStateCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.TrafficStateCallback); + method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public void removeOnWifiUsabilityStatsListener(@NonNull android.net.wifi.WifiManager.OnWifiUsabilityStatsListener); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void restoreBackupData(@NonNull byte[]); + method @Nullable @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public android.net.wifi.SoftApConfiguration restoreSoftApBackupData(@NonNull byte[]); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void restoreSupplicantBackupData(@NonNull byte[], @NonNull byte[]); + method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public byte[] retrieveBackupData(); + method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public byte[] retrieveSoftApBackupData(); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD, android.Manifest.permission.NETWORK_STACK}) public void save(@NonNull android.net.wifi.WifiConfiguration, @Nullable android.net.wifi.WifiManager.ActionListener); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setAutoWakeupEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.WIFI_SET_DEVICE_MOBILITY_STATE) public void setDeviceMobilityState(int); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setMacRandomizationSettingPasspointEnabled(@NonNull String, boolean); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setPasspointMeteredOverride(@NonNull String, int); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setScanAlwaysAvailable(boolean); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setScanThrottleEnabled(boolean); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public boolean setSoftApConfiguration(@NonNull android.net.wifi.SoftApConfiguration); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void setVerboseLoggingEnabled(boolean); + method @Deprecated @RequiresPermission(android.Manifest.permission.CHANGE_WIFI_STATE) public boolean setWifiApConfiguration(android.net.wifi.WifiConfiguration); + method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public boolean setWifiConnectedNetworkScorer(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiManager.WifiConnectedNetworkScorer); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startEasyConnectAsConfiguratorInitiator(@NonNull String, int, int, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.EasyConnectStatusCallback); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startEasyConnectAsEnrolleeInitiator(@NonNull String, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.EasyConnectStatusCallback); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startLocalOnlyHotspot(@NonNull android.net.wifi.SoftApConfiguration, @Nullable java.util.concurrent.Executor, @Nullable android.net.wifi.WifiManager.LocalOnlyHotspotCallback); + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public boolean startScan(android.os.WorkSource); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void startSubscriptionProvisioning(@NonNull android.net.wifi.hotspot2.OsuProvider, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.hotspot2.ProvisioningCallback); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public boolean startTetheredHotspot(@Nullable android.net.wifi.SoftApConfiguration); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_SETUP_WIZARD}) public void stopEasyConnectSession(); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public boolean stopSoftAp(); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void unregisterNetworkRequestMatchCallback(@NonNull android.net.wifi.WifiManager.NetworkRequestMatchCallback); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void unregisterSoftApCallback(@NonNull android.net.wifi.WifiManager.SoftApCallback); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void unregisterTrafficStateCallback(@NonNull android.net.wifi.WifiManager.TrafficStateCallback); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_STACK, android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK}) public void updateInterfaceIpState(@Nullable String, int); + method @RequiresPermission(android.Manifest.permission.WIFI_UPDATE_USABILITY_STATS_SCORE) public void updateWifiUsabilityScore(int, int, int); + field public static final String ACTION_LINK_CONFIGURATION_CHANGED = "android.net.wifi.LINK_CONFIGURATION_CHANGED"; + field @RequiresPermission(android.Manifest.permission.NETWORK_CARRIER_PROVISIONING) public static final String ACTION_NETWORK_SETTINGS_RESET = "android.net.wifi.action.NETWORK_SETTINGS_RESET"; + field public static final String ACTION_PASSPOINT_LAUNCH_OSU_VIEW = "android.net.wifi.action.PASSPOINT_LAUNCH_OSU_VIEW"; + field public static final String ACTION_REQUEST_DISABLE = "android.net.wifi.action.REQUEST_DISABLE"; + field public static final String ACTION_REQUEST_ENABLE = "android.net.wifi.action.REQUEST_ENABLE"; + field public static final int CHANGE_REASON_ADDED = 0; // 0x0 + field public static final int CHANGE_REASON_CONFIG_CHANGE = 2; // 0x2 + field public static final int CHANGE_REASON_REMOVED = 1; // 0x1 + field public static final String CONFIGURED_NETWORKS_CHANGED_ACTION = "android.net.wifi.CONFIGURED_NETWORKS_CHANGE"; + field public static final int DEVICE_MOBILITY_STATE_HIGH_MVMT = 1; // 0x1 + field public static final int DEVICE_MOBILITY_STATE_LOW_MVMT = 2; // 0x2 + field public static final int DEVICE_MOBILITY_STATE_STATIONARY = 3; // 0x3 + field public static final int DEVICE_MOBILITY_STATE_UNKNOWN = 0; // 0x0 + field public static final int EASY_CONNECT_NETWORK_ROLE_AP = 1; // 0x1 + field public static final int EASY_CONNECT_NETWORK_ROLE_STA = 0; // 0x0 + field public static final String EXTRA_CHANGE_REASON = "changeReason"; + field @Deprecated public static final String EXTRA_LINK_PROPERTIES = "android.net.wifi.extra.LINK_PROPERTIES"; + field @Deprecated public static final String EXTRA_MULTIPLE_NETWORKS_CHANGED = "multipleChanges"; + field public static final String EXTRA_OSU_NETWORK = "android.net.wifi.extra.OSU_NETWORK"; + field public static final String EXTRA_PREVIOUS_WIFI_AP_STATE = "previous_wifi_state"; + field public static final String EXTRA_URL = "android.net.wifi.extra.URL"; + field public static final String EXTRA_WIFI_AP_FAILURE_REASON = "android.net.wifi.extra.WIFI_AP_FAILURE_REASON"; + field public static final String EXTRA_WIFI_AP_INTERFACE_NAME = "android.net.wifi.extra.WIFI_AP_INTERFACE_NAME"; + field public static final String EXTRA_WIFI_AP_MODE = "android.net.wifi.extra.WIFI_AP_MODE"; + field public static final String EXTRA_WIFI_AP_STATE = "wifi_state"; + field @Deprecated public static final String EXTRA_WIFI_CONFIGURATION = "wifiConfiguration"; + field public static final String EXTRA_WIFI_CREDENTIAL_EVENT_TYPE = "et"; + field public static final String EXTRA_WIFI_CREDENTIAL_SSID = "ssid"; + field public static final int IFACE_IP_MODE_CONFIGURATION_ERROR = 0; // 0x0 + field public static final int IFACE_IP_MODE_LOCAL_ONLY = 2; // 0x2 + field public static final int IFACE_IP_MODE_TETHERED = 1; // 0x1 + field public static final int IFACE_IP_MODE_UNSPECIFIED = -1; // 0xffffffff + field public static final int PASSPOINT_HOME_NETWORK = 0; // 0x0 + field public static final int PASSPOINT_ROAMING_NETWORK = 1; // 0x1 + field public static final int SAP_CLIENT_BLOCK_REASON_CODE_BLOCKED_BY_USER = 0; // 0x0 + field public static final int SAP_CLIENT_BLOCK_REASON_CODE_NO_MORE_STAS = 1; // 0x1 + field public static final int SAP_START_FAILURE_GENERAL = 0; // 0x0 + field public static final int SAP_START_FAILURE_NO_CHANNEL = 1; // 0x1 + field public static final int SAP_START_FAILURE_UNSUPPORTED_CONFIGURATION = 2; // 0x2 + field public static final String WIFI_AP_STATE_CHANGED_ACTION = "android.net.wifi.WIFI_AP_STATE_CHANGED"; + field public static final int WIFI_AP_STATE_DISABLED = 11; // 0xb + field public static final int WIFI_AP_STATE_DISABLING = 10; // 0xa + field public static final int WIFI_AP_STATE_ENABLED = 13; // 0xd + field public static final int WIFI_AP_STATE_ENABLING = 12; // 0xc + field public static final int WIFI_AP_STATE_FAILED = 14; // 0xe + field public static final String WIFI_CREDENTIAL_CHANGED_ACTION = "android.net.wifi.WIFI_CREDENTIAL_CHANGED"; + field public static final int WIFI_CREDENTIAL_FORGOT = 1; // 0x1 + field public static final int WIFI_CREDENTIAL_SAVED = 0; // 0x0 + } + + public static interface WifiManager.ActionListener { + method public void onFailure(int); + method public void onSuccess(); + } + + public static interface WifiManager.NetworkRequestMatchCallback { + method public default void onAbort(); + method public default void onMatch(@NonNull java.util.List<android.net.wifi.ScanResult>); + method public default void onUserSelectionCallbackRegistration(@NonNull android.net.wifi.WifiManager.NetworkRequestUserSelectionCallback); + method public default void onUserSelectionConnectFailure(@NonNull android.net.wifi.WifiConfiguration); + method public default void onUserSelectionConnectSuccess(@NonNull android.net.wifi.WifiConfiguration); + } + + public static interface WifiManager.NetworkRequestUserSelectionCallback { + method public default void reject(); + method public default void select(@NonNull android.net.wifi.WifiConfiguration); + } + + public static interface WifiManager.OnWifiActivityEnergyInfoListener { + method public void onWifiActivityEnergyInfo(@Nullable android.os.connectivity.WifiActivityEnergyInfo); + } + + public static interface WifiManager.OnWifiUsabilityStatsListener { + method public void onWifiUsabilityStats(int, boolean, @NonNull android.net.wifi.WifiUsabilityStatsEntry); + } + + public static interface WifiManager.ScoreUpdateObserver { + method public void notifyScoreUpdate(int, int); + method public void triggerUpdateOfWifiUsabilityStats(int); + } + + public static interface WifiManager.SoftApCallback { + method public default void onBlockedClientConnecting(@NonNull android.net.wifi.WifiClient, int); + method public default void onCapabilityChanged(@NonNull android.net.wifi.SoftApCapability); + method public default void onConnectedClientsChanged(@NonNull java.util.List<android.net.wifi.WifiClient>); + method public default void onInfoChanged(@NonNull android.net.wifi.SoftApInfo); + method public default void onStateChanged(int, int); + } + + public static interface WifiManager.TrafficStateCallback { + method public void onStateChanged(int); + 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 + } + + public static interface WifiManager.WifiConnectedNetworkScorer { + method public void onSetScoreUpdateObserver(@NonNull android.net.wifi.WifiManager.ScoreUpdateObserver); + method public void onStart(int); + method public void onStop(int); + } + + public final class WifiMigration { + method @Nullable public static java.io.InputStream convertAndRetrieveSharedConfigStoreFile(int); + method @Nullable public static java.io.InputStream convertAndRetrieveUserConfigStoreFile(int, @NonNull android.os.UserHandle); + method @NonNull public static android.net.wifi.WifiMigration.SettingsMigrationData loadFromSettings(@NonNull android.content.Context); + method public static void removeSharedConfigStoreFile(int); + method public static void removeUserConfigStoreFile(int, @NonNull android.os.UserHandle); + field public static final int STORE_FILE_SHARED_GENERAL = 0; // 0x0 + field public static final int STORE_FILE_SHARED_SOFTAP = 1; // 0x1 + field public static final int STORE_FILE_USER_GENERAL = 2; // 0x2 + field public static final int STORE_FILE_USER_NETWORK_SUGGESTIONS = 3; // 0x3 + } + + public static final class WifiMigration.SettingsMigrationData implements android.os.Parcelable { + method public int describeContents(); + method @Nullable public String getP2pDeviceName(); + method public boolean isP2pFactoryResetPending(); + method public boolean isScanAlwaysAvailable(); + method public boolean isScanThrottleEnabled(); + method public boolean isSoftApTimeoutEnabled(); + method public boolean isVerboseLoggingEnabled(); + method public boolean isWakeUpEnabled(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.WifiMigration.SettingsMigrationData> CREATOR; + } + + public static final class WifiMigration.SettingsMigrationData.Builder { + ctor public WifiMigration.SettingsMigrationData.Builder(); + method @NonNull public android.net.wifi.WifiMigration.SettingsMigrationData build(); + method @NonNull public android.net.wifi.WifiMigration.SettingsMigrationData.Builder setP2pDeviceName(@Nullable String); + method @NonNull public android.net.wifi.WifiMigration.SettingsMigrationData.Builder setP2pFactoryResetPending(boolean); + method @NonNull public android.net.wifi.WifiMigration.SettingsMigrationData.Builder setScanAlwaysAvailable(boolean); + method @NonNull public android.net.wifi.WifiMigration.SettingsMigrationData.Builder setScanThrottleEnabled(boolean); + method @NonNull public android.net.wifi.WifiMigration.SettingsMigrationData.Builder setSoftApTimeoutEnabled(boolean); + method @NonNull public android.net.wifi.WifiMigration.SettingsMigrationData.Builder setVerboseLoggingEnabled(boolean); + method @NonNull public android.net.wifi.WifiMigration.SettingsMigrationData.Builder setWakeUpEnabled(boolean); + } + + public class WifiNetworkConnectionStatistics implements android.os.Parcelable { + ctor public WifiNetworkConnectionStatistics(int, int); + ctor public WifiNetworkConnectionStatistics(); + ctor public WifiNetworkConnectionStatistics(android.net.wifi.WifiNetworkConnectionStatistics); + method public int describeContents(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.WifiNetworkConnectionStatistics> CREATOR; + field public int numConnection; + field public int numUsage; + } + + public final class WifiNetworkSuggestion implements android.os.Parcelable { + method @NonNull public android.net.wifi.WifiConfiguration getWifiConfiguration(); + method public boolean isOemPaid(); + method public boolean isOemPrivate(); + } + + public static final class WifiNetworkSuggestion.Builder { + method @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_CARRIER_PROVISIONING) public android.net.wifi.WifiNetworkSuggestion.Builder setCarrierId(int); + method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setOemPaid(boolean); + method @NonNull public android.net.wifi.WifiNetworkSuggestion.Builder setOemPrivate(boolean); + } + + public class WifiScanner { + method @Deprecated public void configureWifiChange(int, int, int, int, int, android.net.wifi.WifiScanner.BssidInfo[]); + method @Deprecated public void configureWifiChange(android.net.wifi.WifiScanner.WifiChangeSettings); + method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public java.util.List<java.lang.Integer> getAvailableChannels(int); + method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public boolean getScanResults(); + method @NonNull @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public java.util.List<android.net.wifi.ScanResult> getSingleScanResults(); + method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void registerScanListener(@NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.WifiScanner.ScanListener); + method @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public void setScanningEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void startBackgroundScan(android.net.wifi.WifiScanner.ScanSettings, android.net.wifi.WifiScanner.ScanListener); + method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void startBackgroundScan(android.net.wifi.WifiScanner.ScanSettings, android.net.wifi.WifiScanner.ScanListener, android.os.WorkSource); + method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void startScan(android.net.wifi.WifiScanner.ScanSettings, android.net.wifi.WifiScanner.ScanListener); + method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void startScan(android.net.wifi.WifiScanner.ScanSettings, android.net.wifi.WifiScanner.ScanListener, android.os.WorkSource); + method @Deprecated public void startTrackingBssids(android.net.wifi.WifiScanner.BssidInfo[], int, android.net.wifi.WifiScanner.BssidListener); + method @Deprecated public void startTrackingWifiChange(android.net.wifi.WifiScanner.WifiChangeListener); + method @Deprecated @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void stopBackgroundScan(android.net.wifi.WifiScanner.ScanListener); + method @RequiresPermission(android.Manifest.permission.LOCATION_HARDWARE) public void stopScan(android.net.wifi.WifiScanner.ScanListener); + method @Deprecated public void stopTrackingBssids(android.net.wifi.WifiScanner.BssidListener); + method @Deprecated public void stopTrackingWifiChange(android.net.wifi.WifiScanner.WifiChangeListener); + method public void unregisterScanListener(@NonNull android.net.wifi.WifiScanner.ScanListener); + field public static final int MAX_SCAN_PERIOD_MS = 1024000; // 0xfa000 + field public static final int MIN_SCAN_PERIOD_MS = 1000; // 0x3e8 + field public static final int REASON_DUPLICATE_REQEUST = -5; // 0xfffffffb + field public static final int REASON_INVALID_LISTENER = -2; // 0xfffffffe + field public static final int REASON_INVALID_REQUEST = -3; // 0xfffffffd + field public static final int REASON_NOT_AUTHORIZED = -4; // 0xfffffffc + field public static final int REASON_SUCCEEDED = 0; // 0x0 + field public static final int REASON_UNSPECIFIED = -1; // 0xffffffff + field @Deprecated public static final int REPORT_EVENT_AFTER_BUFFER_FULL = 0; // 0x0 + field public static final int REPORT_EVENT_AFTER_EACH_SCAN = 1; // 0x1 + field public static final int REPORT_EVENT_FULL_SCAN_RESULT = 2; // 0x2 + field public static final int REPORT_EVENT_NO_BATCH = 4; // 0x4 + field public static final int SCAN_TYPE_HIGH_ACCURACY = 2; // 0x2 + field public static final int SCAN_TYPE_LOW_LATENCY = 0; // 0x0 + field public static final int SCAN_TYPE_LOW_POWER = 1; // 0x1 + field public static final int WIFI_BAND_24_5_6_GHZ = 11; // 0xb + field public static final int WIFI_BAND_24_5_WITH_DFS_6_GHZ = 15; // 0xf + field public static final int WIFI_BAND_24_GHZ = 1; // 0x1 + field public static final int WIFI_BAND_5_GHZ = 2; // 0x2 + field public static final int WIFI_BAND_5_GHZ_DFS_ONLY = 4; // 0x4 + field public static final int WIFI_BAND_5_GHZ_WITH_DFS = 6; // 0x6 + field public static final int WIFI_BAND_60_GHZ = 16; // 0x10 + field public static final int WIFI_BAND_6_GHZ = 8; // 0x8 + field public static final int WIFI_BAND_BOTH = 3; // 0x3 + field public static final int WIFI_BAND_BOTH_WITH_DFS = 7; // 0x7 + field public static final int WIFI_BAND_UNSPECIFIED = 0; // 0x0 + } + + public static interface WifiScanner.ActionListener { + method public void onFailure(int, String); + method public void onSuccess(); + } + + @Deprecated public static class WifiScanner.BssidInfo { + ctor @Deprecated public WifiScanner.BssidInfo(); + field @Deprecated public String bssid; + field @Deprecated public int frequencyHint; + field @Deprecated public int high; + field @Deprecated public int low; + } + + @Deprecated public static interface WifiScanner.BssidListener extends android.net.wifi.WifiScanner.ActionListener { + method @Deprecated public void onFound(android.net.wifi.ScanResult[]); + method @Deprecated public void onLost(android.net.wifi.ScanResult[]); + } + + public static class WifiScanner.ChannelSpec { + ctor public WifiScanner.ChannelSpec(int); + field public int frequency; + } + + @Deprecated public static class WifiScanner.HotlistSettings implements android.os.Parcelable { + ctor @Deprecated public WifiScanner.HotlistSettings(); + field @Deprecated public int apLostThreshold; + field @Deprecated public android.net.wifi.WifiScanner.BssidInfo[] bssidInfos; + } + + public static class WifiScanner.ParcelableScanData implements android.os.Parcelable { + ctor public WifiScanner.ParcelableScanData(android.net.wifi.WifiScanner.ScanData[]); + method public android.net.wifi.WifiScanner.ScanData[] getResults(); + field public android.net.wifi.WifiScanner.ScanData[] mResults; + } + + public static class WifiScanner.ParcelableScanResults implements android.os.Parcelable { + ctor public WifiScanner.ParcelableScanResults(android.net.wifi.ScanResult[]); + method public android.net.wifi.ScanResult[] getResults(); + field public android.net.wifi.ScanResult[] mResults; + } + + public static class WifiScanner.ScanData implements android.os.Parcelable { + ctor public WifiScanner.ScanData(int, int, android.net.wifi.ScanResult[]); + ctor public WifiScanner.ScanData(android.net.wifi.WifiScanner.ScanData); + method public int getFlags(); + method public int getId(); + method public android.net.wifi.ScanResult[] getResults(); + } + + public static interface WifiScanner.ScanListener extends android.net.wifi.WifiScanner.ActionListener { + method public void onFullResult(android.net.wifi.ScanResult); + method @Deprecated public void onPeriodChanged(int); + method public void onResults(android.net.wifi.WifiScanner.ScanData[]); + } + + public static class WifiScanner.ScanSettings implements android.os.Parcelable { + ctor public WifiScanner.ScanSettings(); + field public int band; + field public android.net.wifi.WifiScanner.ChannelSpec[] channels; + field @NonNull @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public final java.util.List<android.net.wifi.WifiScanner.ScanSettings.HiddenNetwork> hiddenNetworks; + field public boolean hideFromAppOps; + field public boolean ignoreLocationSettings; + field @Deprecated public int maxPeriodInMs; + field @Deprecated public int maxScansToCache; + field @Deprecated public int numBssidsPerScan; + field @Deprecated public int periodInMs; + field @Deprecated public int reportEvents; + field @Deprecated public int stepCount; + field @RequiresPermission(android.Manifest.permission.NETWORK_STACK) public int type; + } + + public static class WifiScanner.ScanSettings.HiddenNetwork { + ctor public WifiScanner.ScanSettings.HiddenNetwork(@NonNull String); + field @NonNull public final String ssid; + } + + @Deprecated public static interface WifiScanner.WifiChangeListener extends android.net.wifi.WifiScanner.ActionListener { + method @Deprecated public void onChanging(android.net.wifi.ScanResult[]); + method @Deprecated public void onQuiescence(android.net.wifi.ScanResult[]); + } + + @Deprecated public static class WifiScanner.WifiChangeSettings implements android.os.Parcelable { + ctor @Deprecated public WifiScanner.WifiChangeSettings(); + field @Deprecated public android.net.wifi.WifiScanner.BssidInfo[] bssidInfos; + field @Deprecated public int lostApSampleSize; + field @Deprecated public int minApsBreachingThreshold; + field @Deprecated public int periodInMs; + field @Deprecated public int rssiSampleSize; + field @Deprecated public int unchangedSampleSize; + } + + public final class WifiUsabilityStatsEntry implements android.os.Parcelable { + method public int describeContents(); + method public int getCellularDataNetworkType(); + method public int getCellularSignalStrengthDb(); + method public int getCellularSignalStrengthDbm(); + method public int getLinkSpeedMbps(); + method public int getProbeElapsedTimeSinceLastUpdateMillis(); + method public int getProbeMcsRateSinceLastUpdate(); + method public int getProbeStatusSinceLastUpdate(); + method public int getRssi(); + method public int getRxLinkSpeedMbps(); + method public long getTimeStampMillis(); + method public long getTotalBackgroundScanTimeMillis(); + method public long getTotalBeaconRx(); + method public long getTotalCcaBusyFreqTimeMillis(); + method public long getTotalHotspot2ScanTimeMillis(); + method public long getTotalNanScanTimeMillis(); + method public long getTotalPnoScanTimeMillis(); + method public long getTotalRadioOnFreqTimeMillis(); + method public long getTotalRadioOnTimeMillis(); + method public long getTotalRadioRxTimeMillis(); + method public long getTotalRadioTxTimeMillis(); + method public long getTotalRoamScanTimeMillis(); + method public long getTotalRxSuccess(); + method public long getTotalScanTimeMillis(); + method public long getTotalTxBad(); + method public long getTotalTxRetries(); + method public long getTotalTxSuccess(); + method public boolean isSameRegisteredCell(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.WifiUsabilityStatsEntry> CREATOR; + field public static final int PROBE_STATUS_FAILURE = 3; // 0x3 + field public static final int PROBE_STATUS_NO_PROBE = 1; // 0x1 + field public static final int PROBE_STATUS_SUCCESS = 2; // 0x2 + field public static final int PROBE_STATUS_UNKNOWN = 0; // 0x0 + } + +} + +package android.net.wifi.aware { + + public class DiscoverySession implements java.lang.AutoCloseable { + method @Deprecated public android.net.NetworkSpecifier createNetworkSpecifierPmk(@NonNull android.net.wifi.aware.PeerHandle, @NonNull byte[]); + } + + public class WifiAwareManager { + method public void enableInstantCommunicationMode(boolean); + } + + public class WifiAwareSession implements java.lang.AutoCloseable { + method public android.net.NetworkSpecifier createNetworkSpecifierPmk(int, @NonNull byte[], @NonNull byte[]); + } + +} + +package android.net.wifi.hotspot2 { + + public final class OsuProvider implements android.os.Parcelable { + method public int describeContents(); + method @Nullable public String getFriendlyName(); + method @Nullable public android.net.Uri getServerUri(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.hotspot2.OsuProvider> CREATOR; + } + + public final class PasspointConfiguration implements android.os.Parcelable { + method public int getMeteredOverride(); + method public boolean isAutojoinEnabled(); + method public boolean isMacRandomizationEnabled(); + } + + public abstract class ProvisioningCallback { + ctor public ProvisioningCallback(); + method public abstract void onProvisioningComplete(); + method public abstract void onProvisioningFailure(int); + method public abstract void onProvisioningStatus(int); + field public static final int OSU_FAILURE_ADD_PASSPOINT_CONFIGURATION = 22; // 0x16 + field public static final int OSU_FAILURE_AP_CONNECTION = 1; // 0x1 + field public static final int OSU_FAILURE_INVALID_URL_FORMAT_FOR_OSU = 8; // 0x8 + field public static final int OSU_FAILURE_NO_AAA_SERVER_TRUST_ROOT_NODE = 17; // 0x11 + field public static final int OSU_FAILURE_NO_AAA_TRUST_ROOT_CERTIFICATE = 21; // 0x15 + field public static final int OSU_FAILURE_NO_OSU_ACTIVITY_FOUND = 14; // 0xe + field public static final int OSU_FAILURE_NO_POLICY_SERVER_TRUST_ROOT_NODE = 19; // 0x13 + field public static final int OSU_FAILURE_NO_PPS_MO = 16; // 0x10 + field public static final int OSU_FAILURE_NO_REMEDIATION_SERVER_TRUST_ROOT_NODE = 18; // 0x12 + field public static final int OSU_FAILURE_OSU_PROVIDER_NOT_FOUND = 23; // 0x17 + field public static final int OSU_FAILURE_PROVISIONING_ABORTED = 6; // 0x6 + field public static final int OSU_FAILURE_PROVISIONING_NOT_AVAILABLE = 7; // 0x7 + field public static final int OSU_FAILURE_RETRIEVE_TRUST_ROOT_CERTIFICATES = 20; // 0x14 + field public static final int OSU_FAILURE_SERVER_CONNECTION = 3; // 0x3 + field public static final int OSU_FAILURE_SERVER_URL_INVALID = 2; // 0x2 + field public static final int OSU_FAILURE_SERVER_VALIDATION = 4; // 0x4 + field public static final int OSU_FAILURE_SERVICE_PROVIDER_VERIFICATION = 5; // 0x5 + field public static final int OSU_FAILURE_SOAP_MESSAGE_EXCHANGE = 11; // 0xb + field public static final int OSU_FAILURE_START_REDIRECT_LISTENER = 12; // 0xc + field public static final int OSU_FAILURE_TIMED_OUT_REDIRECT_LISTENER = 13; // 0xd + field public static final int OSU_FAILURE_UNEXPECTED_COMMAND_TYPE = 9; // 0x9 + field public static final int OSU_FAILURE_UNEXPECTED_SOAP_MESSAGE_STATUS = 15; // 0xf + field public static final int OSU_FAILURE_UNEXPECTED_SOAP_MESSAGE_TYPE = 10; // 0xa + field public static final int OSU_STATUS_AP_CONNECTED = 2; // 0x2 + field public static final int OSU_STATUS_AP_CONNECTING = 1; // 0x1 + field public static final int OSU_STATUS_INIT_SOAP_EXCHANGE = 6; // 0x6 + field public static final int OSU_STATUS_REDIRECT_RESPONSE_RECEIVED = 8; // 0x8 + field public static final int OSU_STATUS_RETRIEVING_TRUST_ROOT_CERTS = 11; // 0xb + field public static final int OSU_STATUS_SECOND_SOAP_EXCHANGE = 9; // 0x9 + field public static final int OSU_STATUS_SERVER_CONNECTED = 5; // 0x5 + field public static final int OSU_STATUS_SERVER_CONNECTING = 3; // 0x3 + field public static final int OSU_STATUS_SERVER_VALIDATED = 4; // 0x4 + field public static final int OSU_STATUS_THIRD_SOAP_EXCHANGE = 10; // 0xa + field public static final int OSU_STATUS_WAITING_FOR_REDIRECT_RESPONSE = 7; // 0x7 + } + +} + +package android.net.wifi.nl80211 { + + public final class DeviceWiphyCapabilities implements android.os.Parcelable { + ctor public DeviceWiphyCapabilities(); + method public int describeContents(); + method public int getMaxNumberRxSpatialStreams(); + method public int getMaxNumberTxSpatialStreams(); + method public boolean isChannelWidthSupported(int); + method public boolean isWifiStandardSupported(int); + method public void setWifiStandardSupport(int, boolean); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.nl80211.DeviceWiphyCapabilities> CREATOR; + } + + public final class NativeScanResult implements android.os.Parcelable { + ctor public NativeScanResult(); + method public int describeContents(); + method @Nullable public android.net.MacAddress getBssid(); + method public int getCapabilities(); + method public int getFrequencyMhz(); + method @NonNull public byte[] getInformationElements(); + method @NonNull public java.util.List<android.net.wifi.nl80211.RadioChainInfo> getRadioChainInfos(); + method public int getSignalMbm(); + method @NonNull public byte[] getSsid(); + method public long getTsf(); + method public boolean isAssociated(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field public static final int BSS_CAPABILITY_APSD = 2048; // 0x800 + field public static final int BSS_CAPABILITY_CF_POLLABLE = 4; // 0x4 + field public static final int BSS_CAPABILITY_CF_POLL_REQUEST = 8; // 0x8 + field public static final int BSS_CAPABILITY_CHANNEL_AGILITY = 128; // 0x80 + field public static final int BSS_CAPABILITY_DELAYED_BLOCK_ACK = 16384; // 0x4000 + field public static final int BSS_CAPABILITY_DMG_ESS = 3; // 0x3 + field public static final int BSS_CAPABILITY_DMG_IBSS = 1; // 0x1 + field public static final int BSS_CAPABILITY_DSSS_OFDM = 8192; // 0x2000 + field public static final int BSS_CAPABILITY_ESS = 1; // 0x1 + field public static final int BSS_CAPABILITY_IBSS = 2; // 0x2 + field public static final int BSS_CAPABILITY_IMMEDIATE_BLOCK_ACK = 32768; // 0x8000 + field public static final int BSS_CAPABILITY_PBCC = 64; // 0x40 + field public static final int BSS_CAPABILITY_PRIVACY = 16; // 0x10 + field public static final int BSS_CAPABILITY_QOS = 512; // 0x200 + field public static final int BSS_CAPABILITY_RADIO_MANAGEMENT = 4096; // 0x1000 + field public static final int BSS_CAPABILITY_SHORT_PREAMBLE = 32; // 0x20 + field public static final int BSS_CAPABILITY_SHORT_SLOT_TIME = 1024; // 0x400 + field public static final int BSS_CAPABILITY_SPECTRUM_MANAGEMENT = 256; // 0x100 + field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.nl80211.NativeScanResult> CREATOR; + } + + public final class NativeWifiClient implements android.os.Parcelable { + ctor public NativeWifiClient(@Nullable android.net.MacAddress); + method public int describeContents(); + method @Nullable public android.net.MacAddress getMacAddress(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.nl80211.NativeWifiClient> CREATOR; + } + + public final class PnoNetwork implements android.os.Parcelable { + ctor public PnoNetwork(); + method public int describeContents(); + method @NonNull public int[] getFrequenciesMhz(); + method @NonNull public byte[] getSsid(); + method public boolean isHidden(); + method public void setFrequenciesMhz(@NonNull int[]); + method public void setHidden(boolean); + method public void setSsid(@NonNull byte[]); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.nl80211.PnoNetwork> CREATOR; + } + + public final class PnoSettings implements android.os.Parcelable { + ctor public PnoSettings(); + method public int describeContents(); + method public long getIntervalMillis(); + method public int getMin2gRssiDbm(); + method public int getMin5gRssiDbm(); + method public int getMin6gRssiDbm(); + method @NonNull public java.util.List<android.net.wifi.nl80211.PnoNetwork> getPnoNetworks(); + method public void setIntervalMillis(long); + method public void setMin2gRssiDbm(int); + method public void setMin5gRssiDbm(int); + method public void setMin6gRssiDbm(int); + method public void setPnoNetworks(@NonNull java.util.List<android.net.wifi.nl80211.PnoNetwork>); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.nl80211.PnoSettings> CREATOR; + } + + public final class RadioChainInfo implements android.os.Parcelable { + ctor public RadioChainInfo(int, int); + method public int describeContents(); + method public int getChainId(); + method public int getLevelDbm(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.nl80211.RadioChainInfo> CREATOR; + } + + public class WifiNl80211Manager { + method public void abortScan(@NonNull String); + method public void enableVerboseLogging(boolean); + method @NonNull public int[] getChannelsMhzForBand(int); + method @Nullable public android.net.wifi.nl80211.DeviceWiphyCapabilities getDeviceWiphyCapabilities(@NonNull String); + method @NonNull public java.util.List<android.net.wifi.nl80211.NativeScanResult> getScanResults(@NonNull String, int); + method @Nullable public android.net.wifi.nl80211.WifiNl80211Manager.TxPacketCounters getTxPacketCounters(@NonNull String); + method @Nullable public static android.net.wifi.nl80211.WifiNl80211Manager.OemSecurityType parseOemSecurityTypeElement(int, int, @NonNull byte[]); + method @Deprecated public boolean registerApCallback(@NonNull String, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.nl80211.WifiNl80211Manager.SoftApCallback); + method public void sendMgmtFrame(@NonNull String, @NonNull byte[], int, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.nl80211.WifiNl80211Manager.SendMgmtFrameCallback); + method public void setOnServiceDeadCallback(@NonNull Runnable); + method public boolean setupInterfaceForClientMode(@NonNull String, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.nl80211.WifiNl80211Manager.ScanEventCallback, @NonNull android.net.wifi.nl80211.WifiNl80211Manager.ScanEventCallback); + method public boolean setupInterfaceForSoftApMode(@NonNull String); + method @Nullable public android.net.wifi.nl80211.WifiNl80211Manager.SignalPollResult signalPoll(@NonNull String); + method public boolean startPnoScan(@NonNull String, @NonNull android.net.wifi.nl80211.PnoSettings, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.nl80211.WifiNl80211Manager.PnoScanRequestCallback); + method public boolean startScan(@NonNull String, int, @Nullable java.util.Set<java.lang.Integer>, @Nullable java.util.List<byte[]>); + method public boolean stopPnoScan(@NonNull String); + method public boolean tearDownClientInterface(@NonNull String); + method public boolean tearDownInterfaces(); + method public boolean tearDownSoftApInterface(@NonNull String); + field public static final int SCAN_TYPE_PNO_SCAN = 1; // 0x1 + field public static final int SCAN_TYPE_SINGLE_SCAN = 0; // 0x0 + field public static final int SEND_MGMT_FRAME_ERROR_ALREADY_STARTED = 5; // 0x5 + field public static final int SEND_MGMT_FRAME_ERROR_MCS_UNSUPPORTED = 2; // 0x2 + field public static final int SEND_MGMT_FRAME_ERROR_NO_ACK = 3; // 0x3 + field public static final int SEND_MGMT_FRAME_ERROR_TIMEOUT = 4; // 0x4 + field public static final int SEND_MGMT_FRAME_ERROR_UNKNOWN = 1; // 0x1 + } + + public static class WifiNl80211Manager.OemSecurityType { + ctor public WifiNl80211Manager.OemSecurityType(int, @NonNull java.util.List<java.lang.Integer>, @NonNull java.util.List<java.lang.Integer>, int); + field public final int groupCipher; + field @NonNull public final java.util.List<java.lang.Integer> keyManagement; + field @NonNull public final java.util.List<java.lang.Integer> pairwiseCipher; + field public final int protocol; + } + + public static interface WifiNl80211Manager.PnoScanRequestCallback { + method public void onPnoRequestFailed(); + method public void onPnoRequestSucceeded(); + } + + public static interface WifiNl80211Manager.ScanEventCallback { + method public void onScanFailed(); + method public void onScanResultReady(); + } + + public static interface WifiNl80211Manager.SendMgmtFrameCallback { + method public void onAck(int); + method public void onFailure(int); + } + + public static class WifiNl80211Manager.SignalPollResult { + field public final int associationFrequencyMHz; + field public final int currentRssiDbm; + field public final int rxBitrateMbps; + field public final int txBitrateMbps; + } + + @Deprecated public static interface WifiNl80211Manager.SoftApCallback { + method @Deprecated public void onConnectedClientsChanged(@NonNull android.net.wifi.nl80211.NativeWifiClient, boolean); + method @Deprecated public void onFailure(); + method @Deprecated public void onSoftApChannelSwitched(int, int); + } + + public static class WifiNl80211Manager.TxPacketCounters { + field public final int txPacketFailed; + field public final int txPacketSucceeded; + } + +} + +package android.net.wifi.p2p { + + public final class WifiP2pGroupList implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public java.util.List<android.net.wifi.p2p.WifiP2pGroup> getGroupList(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.p2p.WifiP2pGroupList> CREATOR; + } + + public class WifiP2pManager { + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public void deletePersistentGroup(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, int, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void factoryReset(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.READ_WIFI_CREDENTIAL}) public void requestPersistentGroupInfo(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.PersistentGroupInfoListener); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public void setDeviceName(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull String, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener); + method @RequiresPermission(android.Manifest.permission.CONFIGURE_WIFI_DISPLAY) public void setMiracastMode(int); + method @RequiresPermission(android.Manifest.permission.CONFIGURE_WIFI_DISPLAY) public void setWfdInfo(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @NonNull android.net.wifi.p2p.WifiP2pWfdInfo, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener); + method @RequiresPermission(anyOf={android.Manifest.permission.NETWORK_SETTINGS, android.Manifest.permission.NETWORK_STACK, android.Manifest.permission.OVERRIDE_WIFI_CONFIG}) public void setWifiP2pChannels(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, int, int, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void startListening(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener); + method @RequiresPermission(android.Manifest.permission.NETWORK_SETTINGS) public void stopListening(@NonNull android.net.wifi.p2p.WifiP2pManager.Channel, @Nullable android.net.wifi.p2p.WifiP2pManager.ActionListener); + field public static final String ACTION_WIFI_P2P_PERSISTENT_GROUPS_CHANGED = "android.net.wifi.p2p.action.WIFI_P2P_PERSISTENT_GROUPS_CHANGED"; + field public static final int MIRACAST_DISABLED = 0; // 0x0 + field public static final int MIRACAST_SINK = 2; // 0x2 + field public static final int MIRACAST_SOURCE = 1; // 0x1 + } + + public static interface WifiP2pManager.PersistentGroupInfoListener { + method public void onPersistentGroupInfoAvailable(@NonNull android.net.wifi.p2p.WifiP2pGroupList); + } + +} + +package android.net.wifi.rtt { + + public static final class RangingRequest.Builder { + method public android.net.wifi.rtt.RangingRequest.Builder addResponder(@NonNull android.net.wifi.rtt.ResponderConfig); + } + + public final class RangingResult implements android.os.Parcelable { + method @NonNull public byte[] getLci(); + method @NonNull public byte[] getLcr(); + } + + public final class ResponderConfig implements android.os.Parcelable { + ctor public ResponderConfig(@NonNull android.net.MacAddress, int, boolean, int, int, int, int, int); + ctor public ResponderConfig(@NonNull android.net.wifi.aware.PeerHandle, int, boolean, int, int, int, int, int); + method public int describeContents(); + method public static android.net.wifi.rtt.ResponderConfig fromScanResult(android.net.wifi.ScanResult); + method public static android.net.wifi.rtt.ResponderConfig fromWifiAwarePeerHandleWithDefaults(android.net.wifi.aware.PeerHandle); + method public static android.net.wifi.rtt.ResponderConfig fromWifiAwarePeerMacAddressWithDefaults(android.net.MacAddress); + method public void writeToParcel(android.os.Parcel, int); + 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 @NonNull public static final android.os.Parcelable.Creator<android.net.wifi.rtt.ResponderConfig> CREATOR; + field public static final int PREAMBLE_HE = 3; // 0x3 + field public static final int PREAMBLE_HT = 1; // 0x1 + field public static final int PREAMBLE_LEGACY = 0; // 0x0 + field public static final int PREAMBLE_VHT = 2; // 0x2 + field public static final int RESPONDER_AP = 0; // 0x0 + field public static final int RESPONDER_AWARE = 4; // 0x4 + field public static final int RESPONDER_P2P_CLIENT = 3; // 0x3 + field public static final int RESPONDER_P2P_GO = 2; // 0x2 + field public static final int RESPONDER_STA = 1; // 0x1 + field public final int centerFreq0; + field public final int centerFreq1; + field public final int channelWidth; + field public final int frequency; + field public final android.net.MacAddress macAddress; + field public final android.net.wifi.aware.PeerHandle peerHandle; + field public final int preamble; + field public final int responderType; + field public final boolean supports80211mc; + } + + public final class ResponderLocation implements android.os.Parcelable { + method public boolean getExtraInfoOnAssociationIndication(); + } + + public class WifiRttManager { + method @RequiresPermission(allOf={android.Manifest.permission.LOCATION_HARDWARE}) public void cancelRanging(@Nullable android.os.WorkSource); + method @RequiresPermission(allOf={android.Manifest.permission.LOCATION_HARDWARE, android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.CHANGE_WIFI_STATE, android.Manifest.permission.ACCESS_WIFI_STATE}) public void startRanging(@Nullable android.os.WorkSource, @NonNull android.net.wifi.rtt.RangingRequest, @NonNull java.util.concurrent.Executor, @NonNull android.net.wifi.rtt.RangingResultCallback); + } + +} + +package android.nfc { + + public final class NfcAdapter { + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean addNfcUnlockHandler(android.nfc.NfcAdapter.NfcUnlockHandler, String[]); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean disable(); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean disable(boolean); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean disableNdefPush(); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enable(); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enableNdefPush(); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean enableSecureNfc(boolean); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public boolean removeNfcUnlockHandler(android.nfc.NfcAdapter.NfcUnlockHandler); + method public void setNdefPushMessage(android.nfc.NdefMessage, android.app.Activity, int); + field public static final int FLAG_NDEF_PUSH_NO_CONFIRM = 1; // 0x1 + } + + public static interface NfcAdapter.NfcUnlockHandler { + method public boolean onUnlockAttempted(android.nfc.Tag); + } + +} + +package android.os { + + public class BatteryManager { + method @RequiresPermission(android.Manifest.permission.POWER_SAVER) public boolean setChargingStateUpdateDelayMillis(int); + field public static final String EXTRA_EVENTS = "android.os.extra.EVENTS"; + field public static final String EXTRA_EVENT_TIMESTAMP = "android.os.extra.EVENT_TIMESTAMP"; + } + + public final class BatterySaverPolicyConfig implements android.os.Parcelable { + method public int describeContents(); + method public float getAdjustBrightnessFactor(); + method public boolean getAdvertiseIsEnabled(); + method public boolean getDeferFullBackup(); + method public boolean getDeferKeyValueBackup(); + method @NonNull public java.util.Map<java.lang.String,java.lang.String> getDeviceSpecificSettings(); + method public boolean getDisableAnimation(); + method public boolean getDisableAod(); + method public boolean getDisableLaunchBoost(); + method public boolean getDisableOptionalSensors(); + method public boolean getDisableSoundTrigger(); + method public boolean getDisableVibration(); + method public boolean getEnableAdjustBrightness(); + method public boolean getEnableDataSaver(); + method public boolean getEnableFirewall(); + method public boolean getEnableNightMode(); + method public boolean getEnableQuickDoze(); + method public boolean getForceAllAppsStandby(); + method public boolean getForceBackgroundCheck(); + method public int getLocationMode(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.os.BatterySaverPolicyConfig> CREATOR; + } + + public static final class BatterySaverPolicyConfig.Builder { + ctor public BatterySaverPolicyConfig.Builder(); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder addDeviceSpecificSetting(@NonNull String, @NonNull String); + method @NonNull public android.os.BatterySaverPolicyConfig build(); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setAdjustBrightnessFactor(float); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setAdvertiseIsEnabled(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setDeferFullBackup(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setDeferKeyValueBackup(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setDisableAnimation(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setDisableAod(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setDisableLaunchBoost(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setDisableOptionalSensors(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setDisableSoundTrigger(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setDisableVibration(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setEnableAdjustBrightness(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setEnableDataSaver(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setEnableFirewall(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setEnableNightMode(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setEnableQuickDoze(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setForceAllAppsStandby(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setForceBackgroundCheck(boolean); + method @NonNull public android.os.BatterySaverPolicyConfig.Builder setLocationMode(int); + } + + public final class BatteryStatsManager { + method @NonNull @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public android.os.connectivity.CellularBatteryStats getCellularBatteryStats(); + method @NonNull @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public android.os.connectivity.WifiBatteryStats getWifiBatteryStats(); + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportFullWifiLockAcquiredFromSource(@NonNull android.os.WorkSource); + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportFullWifiLockReleasedFromSource(@NonNull android.os.WorkSource); + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiBatchedScanStartedFromSource(@NonNull android.os.WorkSource, @IntRange(from=0) int); + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiBatchedScanStoppedFromSource(@NonNull android.os.WorkSource); + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiMulticastDisabled(@NonNull android.os.WorkSource); + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiMulticastEnabled(@NonNull android.os.WorkSource); + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiOff(); + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiOn(); + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiRssiChanged(@IntRange(from=0xffffff81, to=0) int); + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiScanStartedFromSource(@NonNull android.os.WorkSource); + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiScanStoppedFromSource(@NonNull android.os.WorkSource); + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiState(int, @Nullable String); + method @RequiresPermission(android.Manifest.permission.UPDATE_DEVICE_STATS) public void reportWifiSupplicantStateChanged(int, boolean); + field public static final int WIFI_STATE_OFF = 0; // 0x0 + field public static final int WIFI_STATE_OFF_SCANNING = 1; // 0x1 + field public static final int WIFI_STATE_ON_CONNECTED_P2P = 5; // 0x5 + field public static final int WIFI_STATE_ON_CONNECTED_STA = 4; // 0x4 + field public static final int WIFI_STATE_ON_CONNECTED_STA_P2P = 6; // 0x6 + field public static final int WIFI_STATE_ON_DISCONNECTED = 3; // 0x3 + field public static final int WIFI_STATE_ON_NO_NETWORKS = 2; // 0x2 + field public static final int WIFI_STATE_SOFT_AP = 7; // 0x7 + field public static final int WIFI_SUPPL_STATE_ASSOCIATED = 7; // 0x7 + field public static final int WIFI_SUPPL_STATE_ASSOCIATING = 6; // 0x6 + field public static final int WIFI_SUPPL_STATE_AUTHENTICATING = 5; // 0x5 + field public static final int WIFI_SUPPL_STATE_COMPLETED = 10; // 0xa + field public static final int WIFI_SUPPL_STATE_DISCONNECTED = 1; // 0x1 + field public static final int WIFI_SUPPL_STATE_DORMANT = 11; // 0xb + field public static final int WIFI_SUPPL_STATE_FOUR_WAY_HANDSHAKE = 8; // 0x8 + field public static final int WIFI_SUPPL_STATE_GROUP_HANDSHAKE = 9; // 0x9 + field public static final int WIFI_SUPPL_STATE_INACTIVE = 3; // 0x3 + field public static final int WIFI_SUPPL_STATE_INTERFACE_DISABLED = 2; // 0x2 + field public static final int WIFI_SUPPL_STATE_INVALID = 0; // 0x0 + field public static final int WIFI_SUPPL_STATE_SCANNING = 4; // 0x4 + field public static final int WIFI_SUPPL_STATE_UNINITIALIZED = 12; // 0xc + } + + public class Binder implements android.os.IBinder { + method public int handleShellCommand(@NonNull android.os.ParcelFileDescriptor, @NonNull android.os.ParcelFileDescriptor, @NonNull android.os.ParcelFileDescriptor, @NonNull String[]); + method public static void setProxyTransactListener(@Nullable android.os.Binder.ProxyTransactListener); + } + + public static interface Binder.ProxyTransactListener { + method public void onTransactEnded(@Nullable Object); + method @Nullable public Object onTransactStarted(@NonNull android.os.IBinder, int); + } + + public final class BugreportManager { + method @RequiresPermission(android.Manifest.permission.DUMP) public void cancelBugreport(); + method @RequiresPermission(android.Manifest.permission.DUMP) public void requestBugreport(@NonNull android.os.BugreportParams, @Nullable CharSequence, @Nullable CharSequence); + method @RequiresPermission(android.Manifest.permission.DUMP) public void startBugreport(@NonNull android.os.ParcelFileDescriptor, @Nullable android.os.ParcelFileDescriptor, @NonNull android.os.BugreportParams, @NonNull java.util.concurrent.Executor, @NonNull android.os.BugreportManager.BugreportCallback); + } + + public abstract static class BugreportManager.BugreportCallback { + ctor public BugreportManager.BugreportCallback(); + method public void onError(int); + method public void onFinished(); + method public void onProgress(@FloatRange(from=0.0f, to=100.0f) float); + field public static final int BUGREPORT_ERROR_ANOTHER_REPORT_IN_PROGRESS = 5; // 0x5 + field public static final int BUGREPORT_ERROR_INVALID_INPUT = 1; // 0x1 + field public static final int BUGREPORT_ERROR_RUNTIME = 2; // 0x2 + field public static final int BUGREPORT_ERROR_USER_CONSENT_TIMED_OUT = 4; // 0x4 + field public static final int BUGREPORT_ERROR_USER_DENIED_CONSENT = 3; // 0x3 + } + + public final class BugreportParams { + ctor public BugreportParams(int); + method public int getMode(); + field public static final int BUGREPORT_MODE_FULL = 0; // 0x0 + field public static final int BUGREPORT_MODE_INTERACTIVE = 1; // 0x1 + field public static final int BUGREPORT_MODE_REMOTE = 2; // 0x2 + field public static final int BUGREPORT_MODE_TELEPHONY = 4; // 0x4 + field public static final int BUGREPORT_MODE_WEAR = 3; // 0x3 + field public static final int BUGREPORT_MODE_WIFI = 5; // 0x5 + } + + public static class Build.VERSION { + field @NonNull public static final String PREVIEW_SDK_FINGERPRINT; + } + + public final class ConfigUpdate { + field public static final String ACTION_UPDATE_CARRIER_ID_DB = "android.os.action.UPDATE_CARRIER_ID_DB"; + field public static final String ACTION_UPDATE_CARRIER_PROVISIONING_URLS = "android.intent.action.UPDATE_CARRIER_PROVISIONING_URLS"; + field public static final String ACTION_UPDATE_CONVERSATION_ACTIONS = "android.intent.action.UPDATE_CONVERSATION_ACTIONS"; + field public static final String ACTION_UPDATE_CT_LOGS = "android.intent.action.UPDATE_CT_LOGS"; + field public static final String ACTION_UPDATE_EMERGENCY_NUMBER_DB = "android.os.action.UPDATE_EMERGENCY_NUMBER_DB"; + field public static final String ACTION_UPDATE_INTENT_FIREWALL = "android.intent.action.UPDATE_INTENT_FIREWALL"; + field public static final String ACTION_UPDATE_LANG_ID = "android.intent.action.UPDATE_LANG_ID"; + field public static final String ACTION_UPDATE_NETWORK_WATCHLIST = "android.intent.action.UPDATE_NETWORK_WATCHLIST"; + field public static final String ACTION_UPDATE_PINS = "android.intent.action.UPDATE_PINS"; + field public static final String ACTION_UPDATE_SMART_SELECTION = "android.intent.action.UPDATE_SMART_SELECTION"; + field public static final String ACTION_UPDATE_SMS_SHORT_CODES = "android.intent.action.UPDATE_SMS_SHORT_CODES"; + field public static final String EXTRA_REQUIRED_HASH = "android.os.extra.REQUIRED_HASH"; + field public static final String EXTRA_VERSION = "android.os.extra.VERSION"; + } + + public class DeviceIdleManager { + method @RequiresPermission(android.Manifest.permission.DEVICE_POWER) public void endIdle(@NonNull String); + } + + public class Environment { + method @NonNull public static java.util.Collection<java.io.File> getInternalMediaDirectories(); + method @NonNull public static java.io.File getOdmDirectory(); + method @NonNull public static java.io.File getOemDirectory(); + method @NonNull public static java.io.File getProductDirectory(); + method @Deprecated @NonNull public static java.io.File getProductServicesDirectory(); + method @NonNull public static java.io.File getSystemExtDirectory(); + method @NonNull public static java.io.File getVendorDirectory(); + } + + public class HidlMemory implements java.io.Closeable { + ctor public HidlMemory(@NonNull String, @IntRange(from=0) long, @Nullable android.os.NativeHandle); + method public void close() throws java.io.IOException; + method @NonNull public android.os.HidlMemory dup() throws java.io.IOException; + method protected void finalize(); + method @Nullable public android.os.NativeHandle getHandle(); + method @NonNull public String getName(); + method public long getSize(); + method @Nullable public android.os.NativeHandle releaseHandle(); + } + + public class HidlSupport { + method public static boolean deepEquals(Object, Object); + method public static int deepHashCode(Object); + method public static int getPidIfSharable(); + method public static boolean interfacesEqual(android.os.IHwInterface, Object); + } + + public abstract class HwBinder implements android.os.IHwBinder { + ctor public HwBinder(); + method public static final void configureRpcThreadpool(long, boolean); + method public static void enableInstrumentation(); + method public static final android.os.IHwBinder getService(String, String) throws java.util.NoSuchElementException, android.os.RemoteException; + method public static final android.os.IHwBinder getService(String, String, boolean) throws java.util.NoSuchElementException, android.os.RemoteException; + method public static final void joinRpcThreadpool(); + method public abstract void onTransact(int, android.os.HwParcel, android.os.HwParcel, int) throws android.os.RemoteException; + method public final void registerService(String) throws android.os.RemoteException; + method public final void transact(int, android.os.HwParcel, android.os.HwParcel, int) throws android.os.RemoteException; + } + + public class HwBlob { + ctor public HwBlob(int); + method public final void copyToBoolArray(long, boolean[], int); + method public final void copyToDoubleArray(long, double[], int); + method public final void copyToFloatArray(long, float[], int); + method public final void copyToInt16Array(long, short[], int); + method public final void copyToInt32Array(long, int[], int); + method public final void copyToInt64Array(long, long[], int); + method public final void copyToInt8Array(long, byte[], int); + method public final boolean getBool(long); + method public final double getDouble(long); + method public final long getFieldHandle(long); + method public final float getFloat(long); + method public final short getInt16(long); + method public final int getInt32(long); + method public final long getInt64(long); + method public final byte getInt8(long); + method public final String getString(long); + method public final long handle(); + method public final void putBlob(long, android.os.HwBlob); + method public final void putBool(long, boolean); + method public final void putBoolArray(long, boolean[]); + method public final void putDouble(long, double); + method public final void putDoubleArray(long, double[]); + method public final void putFloat(long, float); + method public final void putFloatArray(long, float[]); + method public final void putHidlMemory(long, @NonNull android.os.HidlMemory); + method public final void putInt16(long, short); + method public final void putInt16Array(long, short[]); + method public final void putInt32(long, int); + method public final void putInt32Array(long, int[]); + method public final void putInt64(long, long); + method public final void putInt64Array(long, long[]); + method public final void putInt8(long, byte); + method public final void putInt8Array(long, byte[]); + method public final void putNativeHandle(long, @Nullable android.os.NativeHandle); + method public final void putString(long, String); + method public static Boolean[] wrapArray(@NonNull boolean[]); + method public static Long[] wrapArray(@NonNull long[]); + method public static Byte[] wrapArray(@NonNull byte[]); + method public static Short[] wrapArray(@NonNull short[]); + method public static Integer[] wrapArray(@NonNull int[]); + method public static Float[] wrapArray(@NonNull float[]); + method public static Double[] wrapArray(@NonNull double[]); + } + + public class HwParcel { + ctor public HwParcel(); + method public final void enforceInterface(String); + method public final boolean readBool(); + method public final java.util.ArrayList<java.lang.Boolean> readBoolVector(); + method public final android.os.HwBlob readBuffer(long); + method public final double readDouble(); + method public final java.util.ArrayList<java.lang.Double> readDoubleVector(); + method public final android.os.HwBlob readEmbeddedBuffer(long, long, long, boolean); + method @NonNull @Nullable public final android.os.HidlMemory readEmbeddedHidlMemory(long, long, long); + method @Nullable public final android.os.NativeHandle readEmbeddedNativeHandle(long, long); + method public final float readFloat(); + method public final java.util.ArrayList<java.lang.Float> readFloatVector(); + method @NonNull public final android.os.HidlMemory readHidlMemory(); + method public final short readInt16(); + method public final java.util.ArrayList<java.lang.Short> readInt16Vector(); + method public final int readInt32(); + method public final java.util.ArrayList<java.lang.Integer> readInt32Vector(); + method public final long readInt64(); + method public final java.util.ArrayList<java.lang.Long> readInt64Vector(); + method public final byte readInt8(); + method public final java.util.ArrayList<java.lang.Byte> readInt8Vector(); + method @Nullable public final android.os.NativeHandle readNativeHandle(); + method @NonNull public final java.util.ArrayList<android.os.NativeHandle> readNativeHandleVector(); + method public final String readString(); + method public final java.util.ArrayList<java.lang.String> readStringVector(); + method public final android.os.IHwBinder readStrongBinder(); + method public final void release(); + method public final void releaseTemporaryStorage(); + method public final void send(); + method public final void verifySuccess(); + method public final void writeBool(boolean); + method public final void writeBoolVector(java.util.ArrayList<java.lang.Boolean>); + method public final void writeBuffer(android.os.HwBlob); + method public final void writeDouble(double); + method public final void writeDoubleVector(java.util.ArrayList<java.lang.Double>); + method public final void writeFloat(float); + method public final void writeFloatVector(java.util.ArrayList<java.lang.Float>); + method public final void writeHidlMemory(@NonNull android.os.HidlMemory); + method public final void writeInt16(short); + method public final void writeInt16Vector(java.util.ArrayList<java.lang.Short>); + method public final void writeInt32(int); + method public final void writeInt32Vector(java.util.ArrayList<java.lang.Integer>); + method public final void writeInt64(long); + method public final void writeInt64Vector(java.util.ArrayList<java.lang.Long>); + method public final void writeInt8(byte); + method public final void writeInt8Vector(java.util.ArrayList<java.lang.Byte>); + method public final void writeInterfaceToken(String); + method public final void writeNativeHandle(@Nullable android.os.NativeHandle); + method public final void writeNativeHandleVector(@NonNull java.util.ArrayList<android.os.NativeHandle>); + method public final void writeStatus(int); + method public final void writeString(String); + method public final void writeStringVector(java.util.ArrayList<java.lang.String>); + method public final void writeStrongBinder(android.os.IHwBinder); + field public static final int STATUS_SUCCESS = 0; // 0x0 + } + + public interface IHwBinder { + method public boolean linkToDeath(android.os.IHwBinder.DeathRecipient, long); + method public android.os.IHwInterface queryLocalInterface(String); + method public void transact(int, android.os.HwParcel, android.os.HwParcel, int) throws android.os.RemoteException; + method public boolean unlinkToDeath(android.os.IHwBinder.DeathRecipient); + } + + public static interface IHwBinder.DeathRecipient { + method public void serviceDied(long); + } + + public interface IHwInterface { + method public android.os.IHwBinder asBinder(); + } + + public class IncidentManager { + method @RequiresPermission(android.Manifest.permission.APPROVE_INCIDENT_REPORTS) public void approveReport(android.net.Uri); + method @RequiresPermission("android.permission.REQUEST_INCIDENT_REPORT_APPROVAL") public void cancelAuthorization(android.os.IncidentManager.AuthListener); + method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void deleteIncidentReports(android.net.Uri); + method @RequiresPermission(android.Manifest.permission.APPROVE_INCIDENT_REPORTS) public void denyReport(android.net.Uri); + method @Nullable @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public android.os.IncidentManager.IncidentReport getIncidentReport(android.net.Uri); + method @NonNull @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public java.util.List<android.net.Uri> getIncidentReportList(String); + method @RequiresPermission(android.Manifest.permission.APPROVE_INCIDENT_REPORTS) public java.util.List<android.os.IncidentManager.PendingReport> getPendingReports(); + method public void registerSection(int, @NonNull String, @NonNull java.util.concurrent.Executor, @NonNull android.os.IncidentManager.DumpCallback); + method @RequiresPermission(allOf={android.Manifest.permission.DUMP, android.Manifest.permission.PACKAGE_USAGE_STATS}) public void reportIncident(android.os.IncidentReportArgs); + method @RequiresPermission("android.permission.REQUEST_INCIDENT_REPORT_APPROVAL") public void requestAuthorization(int, String, int, android.os.IncidentManager.AuthListener); + method public void unregisterSection(int); + field public static final int FLAG_CONFIRMATION_DIALOG = 1; // 0x1 + field public static final int PRIVACY_POLICY_AUTO = 200; // 0xc8 + field public static final int PRIVACY_POLICY_EXPLICIT = 100; // 0x64 + field public static final int PRIVACY_POLICY_LOCAL = 0; // 0x0 + } + + public static class IncidentManager.AuthListener { + ctor public IncidentManager.AuthListener(); + method public void onReportApproved(); + method public void onReportDenied(); + } + + public static class IncidentManager.DumpCallback { + ctor public IncidentManager.DumpCallback(); + method public void onDumpSection(int, @NonNull java.io.OutputStream); + } + + public static class IncidentManager.IncidentReport implements java.io.Closeable android.os.Parcelable { + ctor public IncidentManager.IncidentReport(android.os.Parcel); + method public void close(); + method public int describeContents(); + method public java.io.InputStream getInputStream() throws java.io.IOException; + method public long getPrivacyPolicy(); + method public long getTimestamp(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.os.IncidentManager.IncidentReport> CREATOR; + } + + public static class IncidentManager.PendingReport { + ctor public IncidentManager.PendingReport(@NonNull android.net.Uri); + method public int getFlags(); + method @NonNull public String getRequestingPackage(); + method public long getTimestamp(); + method @NonNull public android.net.Uri getUri(); + } + + public final class IncidentReportArgs implements android.os.Parcelable { + ctor public IncidentReportArgs(); + ctor public IncidentReportArgs(android.os.Parcel); + method public void addHeader(byte[]); + method public void addSection(int); + method public boolean containsSection(int); + method public int describeContents(); + method public boolean isAll(); + method public void readFromParcel(android.os.Parcel); + method public int sectionCount(); + method public void setAll(boolean); + method public void setPrivacyPolicy(int); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.os.IncidentReportArgs> CREATOR; + } + + public final class NativeHandle implements java.io.Closeable { + ctor public NativeHandle(); + ctor public NativeHandle(@NonNull java.io.FileDescriptor, boolean); + ctor public NativeHandle(@NonNull java.io.FileDescriptor[], @NonNull int[], boolean); + method public void close() throws java.io.IOException; + method @NonNull public android.os.NativeHandle dup() throws java.io.IOException; + method @NonNull public java.io.FileDescriptor getFileDescriptor(); + method @NonNull public java.io.FileDescriptor[] getFileDescriptors(); + method @NonNull public int[] getInts(); + method public boolean hasSingleFileDescriptor(); + } + + public interface Parcelable { + field public static final int PARCELABLE_STABILITY_LOCAL = 0; // 0x0 + field public static final int PARCELABLE_STABILITY_VINTF = 1; // 0x1 + } + + public final class ParcelableHolder implements android.os.Parcelable { + ctor public ParcelableHolder(int); + method public int describeContents(); + method @Nullable public <T extends android.os.Parcelable> T getParcelable(@NonNull Class<T>); + method public int getStability(); + method public void readFromParcel(@NonNull android.os.Parcel); + method public boolean setParcelable(@Nullable android.os.Parcelable); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.os.ParcelableHolder> CREATOR; + } + + public final class PowerManager { + method @RequiresPermission(allOf={android.Manifest.permission.READ_DREAM_STATE, android.Manifest.permission.WRITE_DREAM_STATE}) public void dream(long); + method @RequiresPermission(android.Manifest.permission.DEVICE_POWER) public boolean forceSuspend(); + method @RequiresPermission(android.Manifest.permission.POWER_SAVER) public int getPowerSaveModeTrigger(); + method @RequiresPermission(android.Manifest.permission.READ_DREAM_STATE) public boolean isAmbientDisplayAvailable(); + method @RequiresPermission(android.Manifest.permission.READ_DREAM_STATE) public boolean isAmbientDisplaySuppressed(); + method @RequiresPermission(android.Manifest.permission.READ_DREAM_STATE) public boolean isAmbientDisplaySuppressedForToken(@NonNull String); + method @RequiresPermission(anyOf={android.Manifest.permission.DEVICE_POWER, android.Manifest.permission.POWER_SAVER}) public boolean setAdaptivePowerSaveEnabled(boolean); + method @RequiresPermission(anyOf={android.Manifest.permission.DEVICE_POWER, android.Manifest.permission.POWER_SAVER}) public boolean setAdaptivePowerSavePolicy(@NonNull android.os.BatterySaverPolicyConfig); + method @RequiresPermission(android.Manifest.permission.DEVICE_POWER) public void setBatteryDischargePrediction(@NonNull java.time.Duration, boolean); + method @RequiresPermission(android.Manifest.permission.POWER_SAVER) public boolean setDynamicPowerSaveHint(boolean, int); + method @RequiresPermission(anyOf={android.Manifest.permission.DEVICE_POWER, android.Manifest.permission.POWER_SAVER}) public boolean setPowerSaveModeEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.WRITE_DREAM_STATE) public void suppressAmbientDisplay(@NonNull String, boolean); + method @RequiresPermission(anyOf={android.Manifest.permission.DEVICE_POWER, android.Manifest.permission.USER_ACTIVITY}) public void userActivity(long, int, int); + field public static final int POWER_SAVE_MODE_TRIGGER_DYNAMIC = 1; // 0x1 + field public static final int POWER_SAVE_MODE_TRIGGER_PERCENTAGE = 0; // 0x0 + field public static final String REBOOT_USERSPACE = "userspace"; + field public static final int USER_ACTIVITY_EVENT_ACCESSIBILITY = 3; // 0x3 + field public static final int USER_ACTIVITY_EVENT_BUTTON = 1; // 0x1 + field public static final int USER_ACTIVITY_EVENT_OTHER = 0; // 0x0 + field public static final int USER_ACTIVITY_EVENT_TOUCH = 2; // 0x2 + field public static final int USER_ACTIVITY_FLAG_INDIRECT = 2; // 0x2 + field public static final int USER_ACTIVITY_FLAG_NO_CHANGE_LIGHTS = 1; // 0x1 + } + + public class PowerWhitelistManager { + method @RequiresPermission(android.Manifest.permission.DEVICE_POWER) public void addToWhitelist(@NonNull String); + method @RequiresPermission(android.Manifest.permission.DEVICE_POWER) public void addToWhitelist(@NonNull java.util.List<java.lang.String>); + method @RequiresPermission(android.Manifest.permission.DEVICE_POWER) public void removeFromWhitelist(@NonNull String); + method @RequiresPermission(android.Manifest.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST) public void whitelistAppTemporarily(@NonNull String, long); + method @RequiresPermission(android.Manifest.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST) public long whitelistAppTemporarilyForEvent(@NonNull String, int, @NonNull String); + field public static final int EVENT_MMS = 2; // 0x2 + field public static final int EVENT_SMS = 1; // 0x1 + field public static final int EVENT_UNSPECIFIED = 0; // 0x0 + } + + public class RecoverySystem { + method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void cancelScheduledUpdate(android.content.Context) throws java.io.IOException; + method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void clearPrepareForUnattendedUpdate(@NonNull android.content.Context) throws java.io.IOException; + method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void installPackage(android.content.Context, java.io.File, boolean) throws java.io.IOException; + method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void prepareForUnattendedUpdate(@NonNull android.content.Context, @NonNull String, @Nullable android.content.IntentSender) throws java.io.IOException; + method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener, android.os.Handler) throws java.io.IOException; + method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void processPackage(android.content.Context, java.io.File, android.os.RecoverySystem.ProgressListener) throws java.io.IOException; + method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void rebootAndApply(@NonNull android.content.Context, @NonNull String, @NonNull String) throws java.io.IOException; + method @RequiresPermission(allOf={android.Manifest.permission.RECOVERY, android.Manifest.permission.REBOOT}) public static void rebootWipeAb(android.content.Context, java.io.File, String) throws java.io.IOException; + method @RequiresPermission(android.Manifest.permission.RECOVERY) public static void scheduleUpdateOnBoot(android.content.Context, java.io.File) throws java.io.IOException; + method public static boolean verifyPackageCompatibility(java.io.File) throws java.io.IOException; + } + + public final class RemoteCallback implements android.os.Parcelable { + ctor public RemoteCallback(android.os.RemoteCallback.OnResultListener); + ctor public RemoteCallback(@NonNull android.os.RemoteCallback.OnResultListener, @Nullable android.os.Handler); + method public int describeContents(); + method public void sendResult(@Nullable android.os.Bundle); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.os.RemoteCallback> CREATOR; + } + + public static interface RemoteCallback.OnResultListener { + method public void onResult(@Nullable android.os.Bundle); + } + + public class ServiceSpecificException extends java.lang.RuntimeException { + ctor public ServiceSpecificException(int, @Nullable String); + ctor public ServiceSpecificException(int); + field public final int errorCode; + } + + public final class StatsDimensionsValue implements android.os.Parcelable { + method public int describeContents(); + method public boolean getBooleanValue(); + method public int getField(); + method public float getFloatValue(); + method public int getIntValue(); + method public long getLongValue(); + method public String getStringValue(); + method public java.util.List<android.os.StatsDimensionsValue> getTupleValueList(); + method public int getValueType(); + method public boolean isValueType(int); + method public void writeToParcel(android.os.Parcel, int); + field public static final int BOOLEAN_VALUE_TYPE = 5; // 0x5 + field @NonNull public static final android.os.Parcelable.Creator<android.os.StatsDimensionsValue> CREATOR; + field public static final int FLOAT_VALUE_TYPE = 6; // 0x6 + field public static final int INT_VALUE_TYPE = 3; // 0x3 + field public static final int LONG_VALUE_TYPE = 4; // 0x4 + field public static final int STRING_VALUE_TYPE = 2; // 0x2 + field public static final int TUPLE_VALUE_TYPE = 7; // 0x7 + } + + public class SystemConfigManager { + method @NonNull @RequiresPermission(android.Manifest.permission.READ_CARRIER_APP_INFO) public java.util.Set<java.lang.String> getDisabledUntilUsedPreinstalledCarrierApps(); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_CARRIER_APP_INFO) public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getDisabledUntilUsedPreinstalledCarrierAssociatedApps(); + } + + public class SystemProperties { + method @NonNull public static String get(@NonNull String); + method @NonNull public static String get(@NonNull String, @Nullable String); + method public static boolean getBoolean(@NonNull String, boolean); + method public static int getInt(@NonNull String, int); + method public static long getLong(@NonNull String, long); + } + + public class SystemUpdateManager { + method @RequiresPermission(anyOf={android.Manifest.permission.READ_SYSTEM_UPDATE_INFO, android.Manifest.permission.RECOVERY}) public android.os.Bundle retrieveSystemUpdateInfo(); + method @RequiresPermission(android.Manifest.permission.RECOVERY) public void updateSystemUpdateInfo(android.os.PersistableBundle); + field public static final String KEY_IS_SECURITY_UPDATE = "is_security_update"; + field public static final String KEY_STATUS = "status"; + field public static final String KEY_TARGET_BUILD_FINGERPRINT = "target_build_fingerprint"; + field public static final String KEY_TARGET_SECURITY_PATCH_LEVEL = "target_security_patch_level"; + field public static final String KEY_TITLE = "title"; + field public static final int STATUS_IDLE = 1; // 0x1 + field public static final int STATUS_IN_PROGRESS = 3; // 0x3 + field public static final int STATUS_UNKNOWN = 0; // 0x0 + field public static final int STATUS_WAITING_DOWNLOAD = 2; // 0x2 + field public static final int STATUS_WAITING_INSTALL = 4; // 0x4 + field public static final int STATUS_WAITING_REBOOT = 5; // 0x5 + } + + public class UpdateEngine { + ctor public UpdateEngine(); + method @NonNull @WorkerThread public android.os.UpdateEngine.AllocateSpaceResult allocateSpace(@NonNull String, @NonNull String[]); + method public void applyPayload(String, long, long, String[]); + method public void applyPayload(@NonNull android.content.res.AssetFileDescriptor, @NonNull String[]); + method public boolean bind(android.os.UpdateEngineCallback, android.os.Handler); + method public boolean bind(android.os.UpdateEngineCallback); + method public void cancel(); + method @WorkerThread public int cleanupAppliedPayload(); + method public void resetStatus(); + method public void resume(); + method public void suspend(); + method public boolean unbind(); + method public boolean verifyPayloadMetadata(String); + } + + public static final class UpdateEngine.AllocateSpaceResult { + method public int getErrorCode(); + method public long getFreeSpaceRequired(); + } + + public static final class UpdateEngine.ErrorCodeConstants { + ctor public UpdateEngine.ErrorCodeConstants(); + field public static final int DEVICE_CORRUPTED = 61; // 0x3d + field public static final int DOWNLOAD_PAYLOAD_VERIFICATION_ERROR = 12; // 0xc + field public static final int DOWNLOAD_TRANSFER_ERROR = 9; // 0x9 + field public static final int ERROR = 1; // 0x1 + field public static final int FILESYSTEM_COPIER_ERROR = 4; // 0x4 + field public static final int INSTALL_DEVICE_OPEN_ERROR = 7; // 0x7 + field public static final int KERNEL_DEVICE_OPEN_ERROR = 8; // 0x8 + field public static final int NOT_ENOUGH_SPACE = 60; // 0x3c + field public static final int PAYLOAD_HASH_MISMATCH_ERROR = 10; // 0xa + field public static final int PAYLOAD_MISMATCHED_TYPE_ERROR = 6; // 0x6 + field public static final int PAYLOAD_SIZE_MISMATCH_ERROR = 11; // 0xb + field public static final int PAYLOAD_TIMESTAMP_ERROR = 51; // 0x33 + field public static final int POST_INSTALL_RUNNER_ERROR = 5; // 0x5 + field public static final int SUCCESS = 0; // 0x0 + field public static final int UPDATED_BUT_NOT_ACTIVE = 52; // 0x34 + } + + public static final class UpdateEngine.UpdateStatusConstants { + ctor public UpdateEngine.UpdateStatusConstants(); + field public static final int ATTEMPTING_ROLLBACK = 8; // 0x8 + field public static final int CHECKING_FOR_UPDATE = 1; // 0x1 + field public static final int DISABLED = 9; // 0x9 + field public static final int DOWNLOADING = 3; // 0x3 + field public static final int FINALIZING = 5; // 0x5 + field public static final int IDLE = 0; // 0x0 + field public static final int REPORTING_ERROR_EVENT = 7; // 0x7 + field public static final int UPDATED_NEED_REBOOT = 6; // 0x6 + field public static final int UPDATE_AVAILABLE = 2; // 0x2 + field public static final int VERIFYING = 4; // 0x4 + } + + public abstract class UpdateEngineCallback { + ctor public UpdateEngineCallback(); + method public abstract void onPayloadApplicationComplete(int); + method public abstract void onStatusUpdate(int, float); + } + + public final class UserHandle implements android.os.Parcelable { + method @NonNull public static String formatUid(int); + method public static int getAppId(int); + method public int getIdentifier(); + method @Deprecated public boolean isOwner(); + method public boolean isSystem(); + method public static int myUserId(); + method public static android.os.UserHandle of(int); + field @NonNull public static final android.os.UserHandle ALL; + field @NonNull public static final android.os.UserHandle CURRENT; + field @NonNull public static final android.os.UserHandle SYSTEM; + } + + public class UserManager { + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public void clearSeedAccountData(); + method @Nullable @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS}) public android.os.UserHandle createProfile(@NonNull String, @NonNull String, @NonNull java.util.Set<java.lang.String>) throws android.os.UserManager.UserOperationException; + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS}, conditional=true) public java.util.List<android.os.UserHandle> getAllProfiles(); + method @NonNull @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS}, conditional=true) public java.util.List<android.os.UserHandle> getEnabledProfiles(); + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public android.os.UserHandle getProfileParent(@NonNull android.os.UserHandle); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public String getSeedAccountName(); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public android.os.PersistableBundle getSeedAccountOptions(); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public String getSeedAccountType(); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public long[] getSerialNumbersOfUsers(boolean); + method @NonNull @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public java.util.List<android.os.UserHandle> getUserHandles(boolean); + method @Nullable @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.GET_ACCOUNTS_PRIVILEGED}) public android.graphics.Bitmap getUserIcon(); + method @Deprecated @android.os.UserManager.UserRestrictionSource @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public int getUserRestrictionSource(String, android.os.UserHandle); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public java.util.List<android.os.UserManager.EnforcingUser> getUserRestrictionSources(String, android.os.UserHandle); + method @RequiresPermission(allOf={android.Manifest.permission.READ_PHONE_STATE, android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.INTERACT_ACROSS_USERS}, conditional=true) public int getUserSwitchability(); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public boolean hasRestrictedProfiles(); + method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.INTERACT_ACROSS_USERS}, conditional=true) public boolean hasUserRestrictionForUser(@NonNull String, @NonNull android.os.UserHandle); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public boolean isAdminUser(); + method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS}) public boolean isGuestUser(); + method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.INTERACT_ACROSS_USERS}, conditional=true) public boolean isManagedProfile(int); + method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS}) public boolean isPrimaryUser(); + method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.INTERACT_ACROSS_USERS}, conditional=true) public boolean isProfile(); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public boolean isRestrictedProfile(); + method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS}) public boolean isRestrictedProfile(@NonNull android.os.UserHandle); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public boolean isSameProfileGroup(@NonNull android.os.UserHandle, @NonNull android.os.UserHandle); + method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.GET_ACCOUNTS_PRIVILEGED}) public boolean isUserNameSet(); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public boolean isUserOfType(@NonNull String); + method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.INTERACT_ACROSS_USERS}, conditional=true) public boolean isUserUnlockingOrUnlocked(@NonNull android.os.UserHandle); + method @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_USERS, android.Manifest.permission.CREATE_USERS}) public boolean removeUser(@NonNull android.os.UserHandle); + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public void setUserIcon(@NonNull android.graphics.Bitmap) throws android.os.UserManager.UserOperationException; + method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public void setUserName(@Nullable String); + field public static final String ACTION_USER_RESTRICTIONS_CHANGED = "android.os.action.USER_RESTRICTIONS_CHANGED"; + field @Deprecated public static final String DISALLOW_OEM_UNLOCK = "no_oem_unlock"; + field public static final String DISALLOW_RUN_IN_BACKGROUND = "no_run_in_background"; + field public static final int RESTRICTION_NOT_SET = 0; // 0x0 + field public static final int RESTRICTION_SOURCE_DEVICE_OWNER = 2; // 0x2 + field public static final int RESTRICTION_SOURCE_PROFILE_OWNER = 4; // 0x4 + field public static final int RESTRICTION_SOURCE_SYSTEM = 1; // 0x1 + field public static final int SWITCHABILITY_STATUS_OK = 0; // 0x0 + field public static final int SWITCHABILITY_STATUS_SYSTEM_USER_LOCKED = 4; // 0x4 + field public static final int SWITCHABILITY_STATUS_USER_IN_CALL = 1; // 0x1 + field public static final int SWITCHABILITY_STATUS_USER_SWITCH_DISALLOWED = 2; // 0x2 + field public static final String USER_TYPE_FULL_SECONDARY = "android.os.usertype.full.SECONDARY"; + field public static final String USER_TYPE_FULL_SYSTEM = "android.os.usertype.full.SYSTEM"; + field public static final String USER_TYPE_PROFILE_MANAGED = "android.os.usertype.profile.MANAGED"; + field public static final String USER_TYPE_SYSTEM_HEADLESS = "android.os.usertype.system.HEADLESS"; + } + + public static final class UserManager.EnforcingUser implements android.os.Parcelable { + method public int describeContents(); + method public android.os.UserHandle getUserHandle(); + method @android.os.UserManager.UserRestrictionSource public int getUserRestrictionSource(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.os.UserManager.EnforcingUser> CREATOR; + } + + @IntDef(flag=true, prefix={"RESTRICTION_"}, value={android.os.UserManager.RESTRICTION_NOT_SET, android.os.UserManager.RESTRICTION_SOURCE_SYSTEM, android.os.UserManager.RESTRICTION_SOURCE_DEVICE_OWNER, android.os.UserManager.RESTRICTION_SOURCE_PROFILE_OWNER}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface UserManager.UserRestrictionSource { + } + + public abstract class Vibrator { + method @RequiresPermission(android.Manifest.permission.ACCESS_VIBRATOR_STATE) public void addVibratorStateListener(@NonNull android.os.Vibrator.OnVibratorStateChangedListener); + method @RequiresPermission(android.Manifest.permission.ACCESS_VIBRATOR_STATE) public void addVibratorStateListener(@NonNull java.util.concurrent.Executor, @NonNull android.os.Vibrator.OnVibratorStateChangedListener); + method @RequiresPermission(android.Manifest.permission.ACCESS_VIBRATOR_STATE) public boolean isVibrating(); + method @RequiresPermission(android.Manifest.permission.ACCESS_VIBRATOR_STATE) public void removeVibratorStateListener(@NonNull android.os.Vibrator.OnVibratorStateChangedListener); + } + + public static interface Vibrator.OnVibratorStateChangedListener { + method public void onVibratorStateChanged(boolean); + } + + public class WorkSource implements android.os.Parcelable { + ctor public WorkSource(int); + ctor public WorkSource(int, @NonNull String); + method public android.os.WorkSource.WorkChain createWorkChain(); + method @Nullable public String getPackageName(int); + method public int getUid(int); + method @Nullable public java.util.List<android.os.WorkSource.WorkChain> getWorkChains(); + method public boolean isEmpty(); + method public int size(); + method @NonNull public android.os.WorkSource withoutNames(); + } + + public static final class WorkSource.WorkChain implements android.os.Parcelable { + ctor public WorkSource.WorkChain(); + method public android.os.WorkSource.WorkChain addNode(int, @Nullable String); + method public int describeContents(); + method public String getAttributionTag(); + method public int getAttributionUid(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.os.WorkSource.WorkChain> CREATOR; + } + +} + +package android.os.connectivity { + + public final class CellularBatteryStats implements android.os.Parcelable { + method public int describeContents(); + method public long getEnergyConsumedMaMillis(); + method public long getIdleTimeMillis(); + method public long getKernelActiveTimeMillis(); + method public long getLoggingDurationMillis(); + method public long getMonitoredRailChargeConsumedMaMillis(); + method public long getNumBytesRx(); + method public long getNumBytesTx(); + method public long getNumPacketsRx(); + method public long getNumPacketsTx(); + method public long getRxTimeMillis(); + method public long getSleepTimeMillis(); + method @NonNull public long getTimeInRatMicros(int); + method @NonNull public long getTimeInRxSignalStrengthLevelMicros(@IntRange(from=android.telephony.CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN, to=android.telephony.CellSignalStrength.SIGNAL_STRENGTH_GREAT) int); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.os.connectivity.CellularBatteryStats> CREATOR; + } + + public final class WifiActivityEnergyInfo implements android.os.Parcelable { + ctor public WifiActivityEnergyInfo(long, int, @IntRange(from=0) long, @IntRange(from=0) long, @IntRange(from=0) long, @IntRange(from=0) long); + method public int describeContents(); + method @IntRange(from=0) public long getControllerEnergyUsedMicroJoules(); + method @IntRange(from=0) public long getControllerIdleDurationMillis(); + method @IntRange(from=0) public long getControllerRxDurationMillis(); + method @IntRange(from=0) public long getControllerScanDurationMillis(); + method @IntRange(from=0) public long getControllerTxDurationMillis(); + method public int getStackState(); + method public long getTimeSinceBootMillis(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.os.connectivity.WifiActivityEnergyInfo> CREATOR; + field public static final int STACK_STATE_INVALID = 0; // 0x0 + field public static final int STACK_STATE_STATE_ACTIVE = 1; // 0x1 + field public static final int STACK_STATE_STATE_IDLE = 3; // 0x3 + field public static final int STACK_STATE_STATE_SCANNING = 2; // 0x2 + } + + public final class WifiBatteryStats implements android.os.Parcelable { + method public int describeContents(); + method public long getAppScanRequestCount(); + method public long getEnergyConsumedMaMillis(); + method public long getIdleTimeMillis(); + method public long getKernelActiveTimeMillis(); + method public long getLoggingDurationMillis(); + method public long getMonitoredRailChargeConsumedMaMillis(); + method public long getNumBytesRx(); + method public long getNumBytesTx(); + method public long getNumPacketsRx(); + method public long getNumPacketsTx(); + method public long getRxTimeMillis(); + method public long getScanTimeMillis(); + method public long getSleepTimeMillis(); + method public long getTxTimeMillis(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.os.connectivity.WifiBatteryStats> CREATOR; + } + +} + +package android.os.ext { + + public class SdkExtensions { + method public static int getExtensionVersion(int); + } + +} + +package android.os.image { + + public class DynamicSystemClient { + ctor public DynamicSystemClient(@NonNull android.content.Context); + method @RequiresPermission(android.Manifest.permission.INSTALL_DYNAMIC_SYSTEM) public void bind(); + method public void setOnStatusChangedListener(@NonNull java.util.concurrent.Executor, @NonNull android.os.image.DynamicSystemClient.OnStatusChangedListener); + method public void setOnStatusChangedListener(@NonNull android.os.image.DynamicSystemClient.OnStatusChangedListener); + method @RequiresPermission(android.Manifest.permission.INSTALL_DYNAMIC_SYSTEM) public void start(@NonNull android.net.Uri, long); + method @RequiresPermission(android.Manifest.permission.INSTALL_DYNAMIC_SYSTEM) public void start(@NonNull android.net.Uri, long, long); + method @RequiresPermission(android.Manifest.permission.INSTALL_DYNAMIC_SYSTEM) public void unbind(); + field public static final int CAUSE_ERROR_EXCEPTION = 6; // 0x6 + field public static final int CAUSE_ERROR_INVALID_URL = 4; // 0x4 + field public static final int CAUSE_ERROR_IO = 3; // 0x3 + field public static final int CAUSE_ERROR_IPC = 5; // 0x5 + field public static final int CAUSE_INSTALL_CANCELLED = 2; // 0x2 + field public static final int CAUSE_INSTALL_COMPLETED = 1; // 0x1 + field public static final int CAUSE_NOT_SPECIFIED = 0; // 0x0 + field public static final int STATUS_IN_PROGRESS = 2; // 0x2 + field public static final int STATUS_IN_USE = 4; // 0x4 + field public static final int STATUS_NOT_STARTED = 1; // 0x1 + field public static final int STATUS_READY = 3; // 0x3 + field public static final int STATUS_UNKNOWN = 0; // 0x0 + } + + public static interface DynamicSystemClient.OnStatusChangedListener { + method public void onStatusChanged(int, int, long, @Nullable Throwable); + } + +} + +package android.os.storage { + + public class StorageManager { + method @WorkerThread public void allocateBytes(@NonNull java.util.UUID, long, @RequiresPermission int) throws java.io.IOException; + method @WorkerThread public void allocateBytes(java.io.FileDescriptor, long, @RequiresPermission int) throws java.io.IOException; + method @WorkerThread public long getAllocatableBytes(@NonNull java.util.UUID, @RequiresPermission int) throws java.io.IOException; + method public static boolean hasIsolatedStorage(); + method public void updateExternalStorageFileQuotaType(@NonNull java.io.File, int) throws java.io.IOException; + field @RequiresPermission(android.Manifest.permission.ALLOCATE_AGGRESSIVE) public static final int FLAG_ALLOCATE_AGGRESSIVE = 1; // 0x1 + field public static final int QUOTA_TYPE_MEDIA_AUDIO = 2; // 0x2 + field public static final int QUOTA_TYPE_MEDIA_IMAGE = 1; // 0x1 + field public static final int QUOTA_TYPE_MEDIA_NONE = 0; // 0x0 + field public static final int QUOTA_TYPE_MEDIA_VIDEO = 3; // 0x3 + } + + public final class StorageVolume implements android.os.Parcelable { + method @NonNull public String getId(); + } + +} + +package android.permission { + + public final class PermissionControllerManager { + method @RequiresPermission(anyOf={android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS, android.Manifest.permission.RESTORE_RUNTIME_PERMISSIONS}) public void applyStagedRuntimePermissionBackup(@NonNull String, @NonNull android.os.UserHandle, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>); + method @RequiresPermission(android.Manifest.permission.GET_RUNTIME_PERMISSIONS) public void getRuntimePermissionBackup(@NonNull android.os.UserHandle, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<byte[]>); + method @RequiresPermission(android.Manifest.permission.REVOKE_RUNTIME_PERMISSIONS) public void revokeRuntimePermissions(@NonNull java.util.Map<java.lang.String,java.util.List<java.lang.String>>, boolean, int, @NonNull java.util.concurrent.Executor, @NonNull android.permission.PermissionControllerManager.OnRevokeRuntimePermissionsCallback); + method @RequiresPermission(anyOf={android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS, android.Manifest.permission.RESTORE_RUNTIME_PERMISSIONS}) public void stageAndApplyRuntimePermissionsBackup(@NonNull byte[], @NonNull android.os.UserHandle); + field public static final int COUNT_ONLY_WHEN_GRANTED = 1; // 0x1 + field public static final int COUNT_WHEN_SYSTEM = 2; // 0x2 + field public static final int REASON_INSTALLER_POLICY_VIOLATION = 2; // 0x2 + field public static final int REASON_MALWARE = 1; // 0x1 + } + + public abstract static class PermissionControllerManager.OnRevokeRuntimePermissionsCallback { + ctor public PermissionControllerManager.OnRevokeRuntimePermissionsCallback(); + method public abstract void onRevokeRuntimePermissions(@NonNull java.util.Map<java.lang.String,java.util.List<java.lang.String>>); + } + + public abstract class PermissionControllerService extends android.app.Service { + ctor public PermissionControllerService(); + method @BinderThread public void onApplyStagedRuntimePermissionBackup(@NonNull String, @NonNull android.os.UserHandle, @NonNull java.util.function.Consumer<java.lang.Boolean>); + method @NonNull public final android.os.IBinder onBind(android.content.Intent); + method @BinderThread public abstract void onCountPermissionApps(@NonNull java.util.List<java.lang.String>, int, @NonNull java.util.function.IntConsumer); + method @BinderThread public abstract void onGetAppPermissions(@NonNull String, @NonNull java.util.function.Consumer<java.util.List<android.permission.RuntimePermissionPresentationInfo>>); + method @BinderThread public abstract void onGetPermissionUsages(boolean, long, @NonNull java.util.function.Consumer<java.util.List<android.permission.RuntimePermissionUsageInfo>>); + method @BinderThread public abstract void onGetRuntimePermissionsBackup(@NonNull android.os.UserHandle, @NonNull java.io.OutputStream, @NonNull Runnable); + method @BinderThread public abstract void onGrantOrUpgradeDefaultRuntimePermissions(@NonNull Runnable); + method @BinderThread public void onOneTimePermissionSessionTimeout(@NonNull String); + method @Deprecated @BinderThread public void onRestoreDelayedRuntimePermissionsBackup(@NonNull String, @NonNull android.os.UserHandle, @NonNull java.util.function.Consumer<java.lang.Boolean>); + method @Deprecated @BinderThread public void onRestoreRuntimePermissionsBackup(@NonNull android.os.UserHandle, @NonNull java.io.InputStream, @NonNull Runnable); + method @BinderThread public abstract void onRevokeRuntimePermission(@NonNull String, @NonNull String, @NonNull Runnable); + method @BinderThread public abstract void onRevokeRuntimePermissions(@NonNull java.util.Map<java.lang.String,java.util.List<java.lang.String>>, boolean, int, @NonNull String, @NonNull java.util.function.Consumer<java.util.Map<java.lang.String,java.util.List<java.lang.String>>>); + method @BinderThread public abstract void onSetRuntimePermissionGrantStateByDeviceAdmin(@NonNull String, @NonNull String, @NonNull String, int, @NonNull java.util.function.Consumer<java.lang.Boolean>); + method @BinderThread public void onStageAndApplyRuntimePermissionsBackup(@NonNull android.os.UserHandle, @NonNull java.io.InputStream, @NonNull Runnable); + method @BinderThread public void onUpdateUserSensitivePermissionFlags(int, @NonNull java.util.concurrent.Executor, @NonNull Runnable); + method @BinderThread public void onUpdateUserSensitivePermissionFlags(int, @NonNull Runnable); + field public static final String SERVICE_INTERFACE = "android.permission.PermissionControllerService"; + } + + public final class PermissionManager { + method public int checkDeviceIdentifierAccess(@Nullable String, @Nullable String, @Nullable String, int, int); + method @NonNull @RequiresPermission(android.Manifest.permission.ADJUST_RUNTIME_PERMISSIONS_POLICY) public java.util.Set<java.lang.String> getAutoRevokeExemptionGrantedPackages(); + method @NonNull @RequiresPermission(android.Manifest.permission.ADJUST_RUNTIME_PERMISSIONS_POLICY) public java.util.Set<java.lang.String> getAutoRevokeExemptionRequestedPackages(); + method @IntRange(from=0) @RequiresPermission(anyOf={android.Manifest.permission.ADJUST_RUNTIME_PERMISSIONS_POLICY, android.Manifest.permission.UPGRADE_RUNTIME_PERMISSIONS}) public int getRuntimePermissionsVersion(); + method @NonNull public java.util.List<android.permission.PermissionManager.SplitPermissionInfo> getSplitPermissions(); + method @RequiresPermission(anyOf={android.Manifest.permission.ADJUST_RUNTIME_PERMISSIONS_POLICY, android.Manifest.permission.UPGRADE_RUNTIME_PERMISSIONS}) public void setRuntimePermissionsVersion(@IntRange(from=0) int); + method @RequiresPermission(android.Manifest.permission.MANAGE_ONE_TIME_PERMISSION_SESSIONS) public void startOneTimePermissionSession(@NonNull String, long, int, int); + method @RequiresPermission(android.Manifest.permission.MANAGE_ONE_TIME_PERMISSION_SESSIONS) public void stopOneTimePermissionSession(@NonNull String); + } + + public static final class PermissionManager.SplitPermissionInfo { + method @NonNull public java.util.List<java.lang.String> getNewPermissions(); + method @NonNull public String getSplitPermission(); + method public int getTargetSdk(); + } + + public final class RuntimePermissionPresentationInfo implements android.os.Parcelable { + ctor public RuntimePermissionPresentationInfo(@NonNull CharSequence, boolean, boolean); + method public int describeContents(); + method @NonNull public CharSequence getLabel(); + method public boolean isGranted(); + method public boolean isStandard(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.permission.RuntimePermissionPresentationInfo> CREATOR; + } + + public final class RuntimePermissionUsageInfo implements android.os.Parcelable { + ctor public RuntimePermissionUsageInfo(@NonNull String, int); + method public int describeContents(); + method public int getAppAccessCount(); + method @NonNull public String getName(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.permission.RuntimePermissionUsageInfo> CREATOR; + } + +} + +package android.permissionpresenterservice { + + @Deprecated public abstract class RuntimePermissionPresenterService extends android.app.Service { + ctor @Deprecated public RuntimePermissionPresenterService(); + method @Deprecated public final void attachBaseContext(android.content.Context); + method @Deprecated public final android.os.IBinder onBind(android.content.Intent); + method @Deprecated public abstract java.util.List<android.content.pm.permission.RuntimePermissionPresentationInfo> onGetAppPermissions(@NonNull String); + field @Deprecated public static final String SERVICE_INTERFACE = "android.permissionpresenterservice.RuntimePermissionPresenterService"; + } + +} + +package android.preference { + + @Deprecated public class PreferenceManager { + method @Deprecated public boolean isStorageCredentialProtected(); + method @Deprecated public void setStorageCredentialProtected(); + } + +} + +package android.print { + + public final class PrintManager { + method @RequiresPermission(android.Manifest.permission.READ_PRINT_SERVICE_RECOMMENDATIONS) public void addPrintServiceRecommendationsChangeListener(@NonNull android.print.PrintManager.PrintServiceRecommendationsChangeListener, @Nullable android.os.Handler); + method @RequiresPermission(android.Manifest.permission.READ_PRINT_SERVICES) public void addPrintServicesChangeListener(@NonNull android.print.PrintManager.PrintServicesChangeListener, @Nullable android.os.Handler); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRINT_SERVICE_RECOMMENDATIONS) public java.util.List<android.printservice.recommendation.RecommendationInfo> getPrintServiceRecommendations(); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRINT_SERVICES) public java.util.List<android.printservice.PrintServiceInfo> getPrintServices(int); + method @RequiresPermission(android.Manifest.permission.READ_PRINT_SERVICE_RECOMMENDATIONS) public void removePrintServiceRecommendationsChangeListener(@NonNull android.print.PrintManager.PrintServiceRecommendationsChangeListener); + method @RequiresPermission(android.Manifest.permission.READ_PRINT_SERVICES) public void removePrintServicesChangeListener(@NonNull android.print.PrintManager.PrintServicesChangeListener); + field public static final int ENABLED_SERVICES = 1; // 0x1 + } + + public static interface PrintManager.PrintServiceRecommendationsChangeListener { + method public void onPrintServiceRecommendationsChanged(); + } + + public static interface PrintManager.PrintServicesChangeListener { + method public void onPrintServicesChanged(); + } + +} + +package android.printservice { + + public final class PrintServiceInfo implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public android.content.ComponentName getComponentName(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.printservice.PrintServiceInfo> CREATOR; + } + +} + +package android.printservice.recommendation { + + public final class RecommendationInfo implements android.os.Parcelable { + ctor public RecommendationInfo(@NonNull CharSequence, @NonNull CharSequence, @NonNull java.util.List<java.net.InetAddress>, boolean); + ctor @Deprecated public RecommendationInfo(@NonNull CharSequence, @NonNull CharSequence, @IntRange(from=0) int, boolean); + method public int describeContents(); + method @NonNull public java.util.List<java.net.InetAddress> getDiscoveredPrinters(); + method public CharSequence getName(); + method public int getNumDiscoveredPrinters(); + method public CharSequence getPackageName(); + method public boolean recommendsMultiVendorService(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.printservice.recommendation.RecommendationInfo> CREATOR; + } + + public abstract class RecommendationService extends android.app.Service { + ctor public RecommendationService(); + method public final android.os.IBinder onBind(android.content.Intent); + method public abstract void onConnected(); + method public abstract void onDisconnected(); + method public final void updateRecommendations(@Nullable java.util.List<android.printservice.recommendation.RecommendationInfo>); + field public static final String SERVICE_INTERFACE = "android.printservice.recommendation.RecommendationService"; + } + +} + +package android.provider { + + @Deprecated public static final class ContactsContract.MetadataSync implements android.provider.BaseColumns android.provider.ContactsContract.MetadataSyncColumns { + field @Deprecated public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_metadata"; + field @Deprecated public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contact_metadata"; + field @Deprecated public static final android.net.Uri CONTENT_URI; + field @Deprecated public static final String METADATA_AUTHORITY = "com.android.contacts.metadata"; + field @Deprecated public static final android.net.Uri METADATA_AUTHORITY_URI; + } + + @Deprecated protected static interface ContactsContract.MetadataSyncColumns { + field @Deprecated public static final String ACCOUNT_NAME = "account_name"; + field @Deprecated public static final String ACCOUNT_TYPE = "account_type"; + field @Deprecated public static final String DATA = "data"; + field @Deprecated public static final String DATA_SET = "data_set"; + field @Deprecated public static final String DELETED = "deleted"; + field @Deprecated public static final String RAW_CONTACT_BACKUP_ID = "raw_contact_backup_id"; + } + + @Deprecated public static final class ContactsContract.MetadataSyncState implements android.provider.BaseColumns android.provider.ContactsContract.MetadataSyncStateColumns { + field @Deprecated public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_metadata_sync_state"; + field @Deprecated public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contact_metadata_sync_state"; + field @Deprecated public static final android.net.Uri CONTENT_URI; + } + + @Deprecated protected static interface ContactsContract.MetadataSyncStateColumns { + field @Deprecated public static final String ACCOUNT_NAME = "account_name"; + field @Deprecated public static final String ACCOUNT_TYPE = "account_type"; + field @Deprecated public static final String DATA_SET = "data_set"; + field @Deprecated public static final String STATE = "state"; + } + + public final class DeviceConfig { + method @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public static void addOnPropertiesChangedListener(@NonNull String, @NonNull java.util.concurrent.Executor, @NonNull android.provider.DeviceConfig.OnPropertiesChangedListener); + method @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public static boolean getBoolean(@NonNull String, @NonNull String, boolean); + method @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public static float getFloat(@NonNull String, @NonNull String, float); + method @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public static int getInt(@NonNull String, @NonNull String, int); + method @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public static long getLong(@NonNull String, @NonNull String, long); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public static android.provider.DeviceConfig.Properties getProperties(@NonNull String, @NonNull java.lang.String...); + method @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public static String getProperty(@NonNull String, @NonNull String); + method @RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG) public static String getString(@NonNull String, @NonNull String, @Nullable String); + method public static void removeOnPropertiesChangedListener(@NonNull android.provider.DeviceConfig.OnPropertiesChangedListener); + method @RequiresPermission(android.Manifest.permission.WRITE_DEVICE_CONFIG) public static void resetToDefaults(int, @Nullable String); + method @RequiresPermission(android.Manifest.permission.WRITE_DEVICE_CONFIG) public static boolean setProperties(@NonNull android.provider.DeviceConfig.Properties) throws android.provider.DeviceConfig.BadConfigException; + method @RequiresPermission(android.Manifest.permission.WRITE_DEVICE_CONFIG) public static boolean setProperty(@NonNull String, @NonNull String, @Nullable String, boolean); + field public static final String NAMESPACE_ACTIVITY_MANAGER = "activity_manager"; + field public static final String NAMESPACE_ACTIVITY_MANAGER_NATIVE_BOOT = "activity_manager_native_boot"; + field public static final String NAMESPACE_APP_COMPAT = "app_compat"; + field public static final String NAMESPACE_ATTENTION_MANAGER_SERVICE = "attention_manager_service"; + field public static final String NAMESPACE_AUTOFILL = "autofill"; + field public static final String NAMESPACE_BIOMETRICS = "biometrics"; + field public static final String NAMESPACE_BLOBSTORE = "blobstore"; + field public static final String NAMESPACE_BLUETOOTH = "bluetooth"; + field public static final String NAMESPACE_CONNECTIVITY = "connectivity"; + field public static final String NAMESPACE_CONTENT_CAPTURE = "content_capture"; + field @Deprecated public static final String NAMESPACE_DEX_BOOT = "dex_boot"; + field public static final String NAMESPACE_DISPLAY_MANAGER = "display_manager"; + field public static final String NAMESPACE_GAME_DRIVER = "game_driver"; + field public static final String NAMESPACE_INPUT_NATIVE_BOOT = "input_native_boot"; + field public static final String NAMESPACE_INTELLIGENCE_ATTENTION = "intelligence_attention"; + field public static final String NAMESPACE_MEDIA_NATIVE = "media_native"; + field public static final String NAMESPACE_NETD_NATIVE = "netd_native"; + field public static final String NAMESPACE_PACKAGE_MANAGER_SERVICE = "package_manager_service"; + field public static final String NAMESPACE_PERMISSIONS = "permissions"; + field public static final String NAMESPACE_PRIVACY = "privacy"; + field public static final String NAMESPACE_PROFCOLLECT_NATIVE_BOOT = "profcollect_native_boot"; + field public static final String NAMESPACE_ROLLBACK = "rollback"; + field public static final String NAMESPACE_ROLLBACK_BOOT = "rollback_boot"; + field public static final String NAMESPACE_RUNTIME = "runtime"; + field public static final String NAMESPACE_RUNTIME_NATIVE = "runtime_native"; + field public static final String NAMESPACE_RUNTIME_NATIVE_BOOT = "runtime_native_boot"; + field public static final String NAMESPACE_SCHEDULER = "scheduler"; + field @Deprecated public static final String NAMESPACE_STORAGE = "storage"; + field public static final String NAMESPACE_STORAGE_NATIVE_BOOT = "storage_native_boot"; + field public static final String NAMESPACE_SYSTEMUI = "systemui"; + field public static final String NAMESPACE_TELEPHONY = "telephony"; + field public static final String NAMESPACE_TEXTCLASSIFIER = "textclassifier"; + field public static final String NAMESPACE_WINDOW_MANAGER_NATIVE_BOOT = "window_manager_native_boot"; + } + + public static class DeviceConfig.BadConfigException extends java.lang.Exception { + ctor public DeviceConfig.BadConfigException(); + } + + public static interface DeviceConfig.OnPropertiesChangedListener { + method public void onPropertiesChanged(@NonNull android.provider.DeviceConfig.Properties); + } + + public static class DeviceConfig.Properties { + method public boolean getBoolean(@NonNull String, boolean); + method public float getFloat(@NonNull String, float); + method public int getInt(@NonNull String, int); + method @NonNull public java.util.Set<java.lang.String> getKeyset(); + method public long getLong(@NonNull String, long); + method @NonNull public String getNamespace(); + method @Nullable public String getString(@NonNull String, @Nullable String); + } + + public static final class DeviceConfig.Properties.Builder { + ctor public DeviceConfig.Properties.Builder(@NonNull String); + method @NonNull public android.provider.DeviceConfig.Properties build(); + method @NonNull public android.provider.DeviceConfig.Properties.Builder setBoolean(@NonNull String, boolean); + method @NonNull public android.provider.DeviceConfig.Properties.Builder setFloat(@NonNull String, float); + method @NonNull public android.provider.DeviceConfig.Properties.Builder setInt(@NonNull String, int); + method @NonNull public android.provider.DeviceConfig.Properties.Builder setLong(@NonNull String, long); + method @NonNull public android.provider.DeviceConfig.Properties.Builder setString(@NonNull String, @Nullable String); + } + + public final class DocumentsContract { + method @NonNull public static android.net.Uri buildDocumentUriAsUser(@NonNull String, @NonNull String, @NonNull android.os.UserHandle); + method public static boolean isManageMode(@NonNull android.net.Uri); + method @NonNull public static android.net.Uri setManageMode(@NonNull android.net.Uri); + field public static final String ACTION_DOCUMENT_ROOT_SETTINGS = "android.provider.action.DOCUMENT_ROOT_SETTINGS"; + field public static final String ACTION_MANAGE_DOCUMENT = "android.provider.action.MANAGE_DOCUMENT"; + field public static final String EXTRA_SHOW_ADVANCED = "android.provider.extra.SHOW_ADVANCED"; + } + + public static final class DocumentsContract.Root { + field public static final int FLAG_ADVANCED = 65536; // 0x10000 + field public static final int FLAG_HAS_SETTINGS = 131072; // 0x20000 + field public static final int FLAG_REMOVABLE_SD = 262144; // 0x40000 + field public static final int FLAG_REMOVABLE_USB = 524288; // 0x80000 + } + + public final class MediaStore { + method @NonNull public static android.net.Uri rewriteToLegacy(@NonNull android.net.Uri); + method @NonNull @WorkerThread public static android.net.Uri scanFile(@NonNull android.content.ContentResolver, @NonNull java.io.File); + method @WorkerThread public static void scanVolume(@NonNull android.content.ContentResolver, @NonNull String); + method @WorkerThread public static void waitForIdle(@NonNull android.content.ContentResolver); + field public static final String AUTHORITY_LEGACY = "media_legacy"; + field @NonNull public static final android.net.Uri AUTHORITY_LEGACY_URI; + } + + public abstract class SearchIndexableData { + ctor public SearchIndexableData(); + ctor public SearchIndexableData(android.content.Context); + field public String className; + field public android.content.Context context; + field public boolean enabled; + field public int iconResId; + field public String intentAction; + field public String intentTargetClass; + field public String intentTargetPackage; + field public String key; + field public java.util.Locale locale; + field public String packageName; + field public int rank; + field public int userId; + } + + public class SearchIndexableResource extends android.provider.SearchIndexableData { + ctor public SearchIndexableResource(int, int, String, int); + ctor public SearchIndexableResource(android.content.Context); + field public int xmlResId; + } + + public class SearchIndexablesContract { + ctor public SearchIndexablesContract(); + field public static final int COLUMN_INDEX_NON_INDEXABLE_KEYS_KEY_VALUE = 0; // 0x0 + field public static final int COLUMN_INDEX_RAW_CLASS_NAME = 7; // 0x7 + field public static final int COLUMN_INDEX_RAW_ENTRIES = 4; // 0x4 + field public static final int COLUMN_INDEX_RAW_ICON_RESID = 8; // 0x8 + field public static final int COLUMN_INDEX_RAW_INTENT_ACTION = 9; // 0x9 + field public static final int COLUMN_INDEX_RAW_INTENT_TARGET_CLASS = 11; // 0xb + field public static final int COLUMN_INDEX_RAW_INTENT_TARGET_PACKAGE = 10; // 0xa + field public static final int COLUMN_INDEX_RAW_KEY = 12; // 0xc + field public static final int COLUMN_INDEX_RAW_KEYWORDS = 5; // 0x5 + field public static final int COLUMN_INDEX_RAW_RANK = 0; // 0x0 + field public static final int COLUMN_INDEX_RAW_SCREEN_TITLE = 6; // 0x6 + field public static final int COLUMN_INDEX_RAW_SUMMARY_OFF = 3; // 0x3 + field public static final int COLUMN_INDEX_RAW_SUMMARY_ON = 2; // 0x2 + field public static final int COLUMN_INDEX_RAW_TITLE = 1; // 0x1 + field public static final int COLUMN_INDEX_RAW_USER_ID = 13; // 0xd + field public static final int COLUMN_INDEX_XML_RES_CLASS_NAME = 2; // 0x2 + field public static final int COLUMN_INDEX_XML_RES_ICON_RESID = 3; // 0x3 + field public static final int COLUMN_INDEX_XML_RES_INTENT_ACTION = 4; // 0x4 + field public static final int COLUMN_INDEX_XML_RES_INTENT_TARGET_CLASS = 6; // 0x6 + field public static final int COLUMN_INDEX_XML_RES_INTENT_TARGET_PACKAGE = 5; // 0x5 + field public static final int COLUMN_INDEX_XML_RES_RANK = 0; // 0x0 + field public static final int COLUMN_INDEX_XML_RES_RESID = 1; // 0x1 + field public static final String DYNAMIC_INDEXABLES_RAW = "dynamic_indexables_raw"; + field public static final String DYNAMIC_INDEXABLES_RAW_PATH = "settings/dynamic_indexables_raw"; + field public static final String INDEXABLES_RAW = "indexables_raw"; + field public static final String[] INDEXABLES_RAW_COLUMNS; + field public static final String INDEXABLES_RAW_PATH = "settings/indexables_raw"; + field public static final String INDEXABLES_XML_RES = "indexables_xml_res"; + field public static final String[] INDEXABLES_XML_RES_COLUMNS; + field public static final String INDEXABLES_XML_RES_PATH = "settings/indexables_xml_res"; + field public static final String NON_INDEXABLES_KEYS = "non_indexables_key"; + field public static final String[] NON_INDEXABLES_KEYS_COLUMNS; + field public static final String NON_INDEXABLES_KEYS_PATH = "settings/non_indexables_key"; + field public static final String PROVIDER_INTERFACE = "android.content.action.SEARCH_INDEXABLES_PROVIDER"; + field public static final String SLICE_URI_PAIRS = "slice_uri_pairs"; + field @NonNull public static final String[] SLICE_URI_PAIRS_COLUMNS; + field public static final String SLICE_URI_PAIRS_PATH = "settings/slice_uri_pairs"; + } + + public static class SearchIndexablesContract.BaseColumns { + field public static final String COLUMN_CLASS_NAME = "className"; + field public static final String COLUMN_ICON_RESID = "iconResId"; + field public static final String COLUMN_INTENT_ACTION = "intentAction"; + field public static final String COLUMN_INTENT_TARGET_CLASS = "intentTargetClass"; + field public static final String COLUMN_INTENT_TARGET_PACKAGE = "intentTargetPackage"; + field public static final String COLUMN_RANK = "rank"; + } + + public static final class SearchIndexablesContract.NonIndexableKey extends android.provider.SearchIndexablesContract.BaseColumns { + field public static final String COLUMN_KEY_VALUE = "key"; + field public static final String MIME_TYPE = "vnd.android.cursor.dir/non_indexables_key"; + } + + public static final class SearchIndexablesContract.RawData extends android.provider.SearchIndexablesContract.BaseColumns { + field public static final String COLUMN_ENTRIES = "entries"; + field public static final String COLUMN_KEY = "key"; + field public static final String COLUMN_KEYWORDS = "keywords"; + field public static final String COLUMN_SCREEN_TITLE = "screenTitle"; + field public static final String COLUMN_SUMMARY_OFF = "summaryOff"; + field public static final String COLUMN_SUMMARY_ON = "summaryOn"; + field public static final String COLUMN_TITLE = "title"; + field public static final String COLUMN_USER_ID = "user_id"; + field public static final String MIME_TYPE = "vnd.android.cursor.dir/indexables_raw"; + } + + public static final class SearchIndexablesContract.SliceUriPairColumns { + field public static final String KEY = "key"; + field public static final String SLICE_URI = "slice_uri"; + } + + public static final class SearchIndexablesContract.XmlResource extends android.provider.SearchIndexablesContract.BaseColumns { + field public static final String COLUMN_XML_RESID = "xmlResId"; + field public static final String MIME_TYPE = "vnd.android.cursor.dir/indexables_xml_res"; + } + + public abstract class SearchIndexablesProvider extends android.content.ContentProvider { + ctor public SearchIndexablesProvider(); + method public final int delete(android.net.Uri, String, String[]); + method public String getType(android.net.Uri); + method public final android.net.Uri insert(android.net.Uri, android.content.ContentValues); + method public android.database.Cursor query(android.net.Uri, String[], String, String[], String); + method @Nullable public android.database.Cursor queryDynamicRawData(@Nullable String[]); + method public abstract android.database.Cursor queryNonIndexableKeys(String[]); + method public abstract android.database.Cursor queryRawData(String[]); + method @Nullable public android.database.Cursor querySliceUriPairs(); + method public abstract android.database.Cursor queryXmlResources(String[]); + method public final int update(android.net.Uri, android.content.ContentValues, String, String[]); + } + + public final class Settings { + method @Deprecated public static boolean checkAndNoteWriteSettingsOperation(@NonNull android.content.Context, int, @NonNull String, boolean); + method public static boolean checkAndNoteWriteSettingsOperation(@NonNull android.content.Context, int, @NonNull String, @Nullable String, boolean); + field public static final String ACTION_ACCESSIBILITY_DETAILS_SETTINGS = "android.settings.ACCESSIBILITY_DETAILS_SETTINGS"; + field public static final String ACTION_BUGREPORT_HANDLER_SETTINGS = "android.settings.BUGREPORT_HANDLER_SETTINGS"; + field public static final String ACTION_ENTERPRISE_PRIVACY_SETTINGS = "android.settings.ENTERPRISE_PRIVACY_SETTINGS"; + field public static final String ACTION_LOCATION_CONTROLLER_EXTRA_PACKAGE_SETTINGS = "android.settings.LOCATION_CONTROLLER_EXTRA_PACKAGE_SETTINGS"; + field public static final String ACTION_MANAGE_APP_OVERLAY_PERMISSION = "android.settings.MANAGE_APP_OVERLAY_PERMISSION"; + field public static final String ACTION_MANAGE_DOMAIN_URLS = "android.settings.MANAGE_DOMAIN_URLS"; + field public static final String ACTION_MANAGE_MORE_DEFAULT_APPS_SETTINGS = "android.settings.MANAGE_MORE_DEFAULT_APPS_SETTINGS"; + field public static final String ACTION_NOTIFICATION_POLICY_ACCESS_DETAIL_SETTINGS = "android.settings.NOTIFICATION_POLICY_ACCESS_DETAIL_SETTINGS"; + field public static final String ACTION_REQUEST_ENABLE_CONTENT_CAPTURE = "android.settings.REQUEST_ENABLE_CONTENT_CAPTURE"; + field public static final String ACTION_SHOW_ADMIN_SUPPORT_DETAILS = "android.settings.SHOW_ADMIN_SUPPORT_DETAILS"; + field public static final String ACTION_TETHER_PROVISIONING_UI = "android.settings.TETHER_PROVISIONING_UI"; + field public static final String ACTION_TETHER_SETTINGS = "android.settings.TETHER_SETTINGS"; + } + + public static final class Settings.Global extends android.provider.Settings.NameValueTable { + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public static boolean putString(@NonNull android.content.ContentResolver, @NonNull String, @Nullable String, @Nullable String, boolean); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public static void resetToDefaults(@NonNull android.content.ContentResolver, @Nullable String); + field public static final String AIRPLANE_MODE_TOGGLEABLE_RADIOS = "airplane_mode_toggleable_radios"; + field public static final String APP_STANDBY_ENABLED = "app_standby_enabled"; + field public static final String AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES = "autofill_compat_mode_allowed_packages"; + field public static final String CARRIER_APP_NAMES = "carrier_app_names"; + field public static final String CARRIER_APP_WHITELIST = "carrier_app_whitelist"; + field public static final String DEFAULT_SM_DP_PLUS = "default_sm_dp_plus"; + field public static final String DEVICE_DEMO_MODE = "device_demo_mode"; + field public static final String DEVICE_PROVISIONING_MOBILE_DATA_ENABLED = "device_provisioning_mobile_data"; + field public static final String EUICC_PROVISIONED = "euicc_provisioned"; + field public static final String EUICC_SUPPORTED_COUNTRIES = "euicc_supported_countries"; + field public static final String EUICC_UNSUPPORTED_COUNTRIES = "euicc_unsupported_countries"; + field public static final String INSTALL_CARRIER_APP_NOTIFICATION_PERSISTENT = "install_carrier_app_notification_persistent"; + field public static final String INSTALL_CARRIER_APP_NOTIFICATION_SLEEP_MILLIS = "install_carrier_app_notification_sleep_millis"; + field public static final String OTA_DISABLE_AUTOMATIC_UPDATE = "ota_disable_automatic_update"; + field public static final String REQUIRE_PASSWORD_TO_DECRYPT = "require_password_to_decrypt"; + field public static final String TETHER_OFFLOAD_DISABLED = "tether_offload_disabled"; + field public static final String TETHER_SUPPORTED = "tether_supported"; + field public static final String THEATER_MODE_ON = "theater_mode_on"; + field public static final String WEBVIEW_MULTIPROCESS = "webview_multiprocess"; + field public static final String WIFI_BADGING_THRESHOLDS = "wifi_badging_thresholds"; + field @Deprecated public static final String WIFI_WAKEUP_ENABLED = "wifi_wakeup_enabled"; + } + + public static final class Settings.Secure extends android.provider.Settings.NameValueTable { + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public static boolean putString(@NonNull android.content.ContentResolver, @NonNull String, @Nullable String, @Nullable String, boolean); + method @RequiresPermission(android.Manifest.permission.WRITE_SECURE_SETTINGS) public static void resetToDefaults(@NonNull android.content.ContentResolver, @Nullable String); + field @Deprecated public static final String ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED = "accessibility_display_magnification_navbar_enabled"; + field public static final String ASSIST_GESTURE_SETUP_COMPLETE = "assist_gesture_setup_complete"; + field public static final String AUTOFILL_FEATURE_FIELD_CLASSIFICATION = "autofill_field_classification"; + field public static final String AUTOFILL_USER_DATA_MAX_CATEGORY_COUNT = "autofill_user_data_max_category_count"; + field public static final String AUTOFILL_USER_DATA_MAX_FIELD_CLASSIFICATION_IDS_SIZE = "autofill_user_data_max_field_classification_size"; + field public static final String AUTOFILL_USER_DATA_MAX_USER_DATA_SIZE = "autofill_user_data_max_user_data_size"; + field public static final String AUTOFILL_USER_DATA_MAX_VALUE_LENGTH = "autofill_user_data_max_value_length"; + field public static final String AUTOFILL_USER_DATA_MIN_VALUE_LENGTH = "autofill_user_data_min_value_length"; + field public static final String AUTO_REVOKE_DISABLED = "auto_revoke_disabled"; + field public static final String COMPLETED_CATEGORY_PREFIX = "suggested.completed_category."; + field public static final String DOZE_ALWAYS_ON = "doze_always_on"; + field public static final String HUSH_GESTURE_USED = "hush_gesture_used"; + field public static final String INSTANT_APPS_ENABLED = "instant_apps_enabled"; + field public static final String LAST_SETUP_SHOWN = "last_setup_shown"; + field public static final String LOCATION_ACCESS_CHECK_DELAY_MILLIS = "location_access_check_delay_millis"; + field public static final String LOCATION_ACCESS_CHECK_INTERVAL_MILLIS = "location_access_check_interval_millis"; + field public static final int LOCATION_MODE_ON = 3; // 0x3 + field @Deprecated public static final String LOCATION_PERMISSIONS_UPGRADE_TO_Q_MODE = "location_permissions_upgrade_to_q_mode"; + field public static final String LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS = "lock_screen_allow_private_notifications"; + field public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS = "lock_screen_show_notifications"; + field public static final String ODI_CAPTIONS_ENABLED = "odi_captions_enabled"; + field public static final String THEME_CUSTOMIZATION_OVERLAY_PACKAGES = "theme_customization_overlay_packages"; + field public static final String USER_SETUP_COMPLETE = "user_setup_complete"; + field public static final int USER_SETUP_PERSONALIZATION_COMPLETE = 10; // 0xa + field public static final int USER_SETUP_PERSONALIZATION_NOT_STARTED = 0; // 0x0 + field public static final int USER_SETUP_PERSONALIZATION_PAUSED = 2; // 0x2 + field public static final int USER_SETUP_PERSONALIZATION_STARTED = 1; // 0x1 + field public static final String USER_SETUP_PERSONALIZATION_STATE = "user_setup_personalization_state"; + field public static final String VOLUME_HUSH_GESTURE = "volume_hush_gesture"; + field public static final int VOLUME_HUSH_MUTE = 2; // 0x2 + field public static final int VOLUME_HUSH_OFF = 0; // 0x0 + field public static final int VOLUME_HUSH_VIBRATE = 1; // 0x1 + } + + public static final class Settings.System extends android.provider.Settings.NameValueTable { + method @RequiresPermission(android.Manifest.permission.MODIFY_SETTINGS_OVERRIDEABLE_BY_RESTORE) public static boolean putString(@NonNull android.content.ContentResolver, @NonNull String, @Nullable String, boolean); + } + + public static final class Telephony.Carriers implements android.provider.BaseColumns { + field public static final String APN_SET_ID = "apn_set_id"; + field public static final int CARRIER_EDITED = 4; // 0x4 + field public static final String EDITED_STATUS = "edited"; + field public static final int MATCH_ALL_APN_SET_ID = -1; // 0xffffffff + field public static final String MAX_CONNECTIONS = "max_conns"; + field public static final String MODEM_PERSIST = "modem_cognitive"; + field public static final String MTU = "mtu"; + field public static final int NO_APN_SET_ID = 0; // 0x0 + field public static final String TIME_LIMIT_FOR_MAX_CONNECTIONS = "max_conns_time"; + field public static final int UNEDITED = 0; // 0x0 + field public static final int USER_DELETED = 2; // 0x2 + field public static final String USER_EDITABLE = "user_editable"; + field public static final int USER_EDITED = 1; // 0x1 + field public static final String USER_VISIBLE = "user_visible"; + field public static final String WAIT_TIME_RETRY = "wait_time"; + } + + public static final class Telephony.CellBroadcasts implements android.provider.BaseColumns { + field @NonNull public static final String AUTHORITY_LEGACY = "cellbroadcast-legacy"; + field @NonNull public static final android.net.Uri AUTHORITY_LEGACY_URI; + field @NonNull public static final String CALL_METHOD_GET_PREFERENCE = "get_preference"; + field public static final String CID = "cid"; + field public static final String CMAS_CATEGORY = "cmas_category"; + field public static final String CMAS_CERTAINTY = "cmas_certainty"; + field public static final String CMAS_MESSAGE_CLASS = "cmas_message_class"; + field public static final String CMAS_RESPONSE_TYPE = "cmas_response_type"; + field public static final String CMAS_SEVERITY = "cmas_severity"; + field public static final String CMAS_URGENCY = "cmas_urgency"; + field @NonNull public static final android.net.Uri CONTENT_URI; + field public static final String DATA_CODING_SCHEME = "dcs"; + field public static final String DEFAULT_SORT_ORDER = "date DESC"; + field public static final String DELIVERY_TIME = "date"; + field public static final String ETWS_IS_PRIMARY = "etws_is_primary"; + field public static final String ETWS_WARNING_TYPE = "etws_warning_type"; + field public static final String GEOGRAPHICAL_SCOPE = "geo_scope"; + field public static final String GEOMETRIES = "geometries"; + field public static final String LAC = "lac"; + field public static final String LANGUAGE_CODE = "language"; + field public static final String LOCATION_CHECK_TIME = "location_check_time"; + field public static final String MAXIMUM_WAIT_TIME = "maximum_wait_time"; + field public static final String MESSAGE_BODY = "body"; + field public static final String MESSAGE_BROADCASTED = "message_broadcasted"; + field public static final String MESSAGE_DISPLAYED = "message_displayed"; + field public static final String MESSAGE_FORMAT = "format"; + field @NonNull @RequiresPermission(android.Manifest.permission.READ_CELL_BROADCASTS) public static final android.net.Uri MESSAGE_HISTORY_URI; + field public static final String MESSAGE_PRIORITY = "priority"; + field public static final String MESSAGE_READ = "read"; + field public static final String PLMN = "plmn"; + field public static final String RECEIVED_TIME = "received_time"; + field public static final String SERIAL_NUMBER = "serial_number"; + field public static final String SERVICE_CATEGORY = "service_category"; + field public static final String SLOT_INDEX = "slot_index"; + field public static final String SUBSCRIPTION_ID = "sub_id"; + } + + public static final class Telephony.CellBroadcasts.Preference { + field @NonNull public static final String ENABLE_ALERT_VIBRATION_PREF = "enable_alert_vibrate"; + field @NonNull public static final String ENABLE_AREA_UPDATE_INFO_PREF = "enable_area_update_info_alerts"; + field @NonNull public static final String ENABLE_CMAS_AMBER_PREF = "enable_cmas_amber_alerts"; + field @NonNull public static final String ENABLE_CMAS_EXTREME_THREAT_PREF = "enable_cmas_extreme_threat_alerts"; + field @NonNull public static final String ENABLE_CMAS_IN_SECOND_LANGUAGE_PREF = "receive_cmas_in_second_language"; + field @NonNull public static final String ENABLE_CMAS_PRESIDENTIAL_PREF = "enable_cmas_presidential_alerts"; + field @NonNull public static final String ENABLE_CMAS_SEVERE_THREAT_PREF = "enable_cmas_severe_threat_alerts"; + field @NonNull public static final String ENABLE_EMERGENCY_PERF = "enable_emergency_alerts"; + field @NonNull public static final String ENABLE_PUBLIC_SAFETY_PREF = "enable_public_safety_messages"; + field @NonNull public static final String ENABLE_STATE_LOCAL_TEST_PREF = "enable_state_local_test_alerts"; + field @NonNull public static final String ENABLE_TEST_ALERT_PREF = "enable_test_alerts"; + } + + public static final class Telephony.Sms.Intents { + field public static final String ACTION_SMS_EMERGENCY_CB_RECEIVED = "android.provider.action.SMS_EMERGENCY_CB_RECEIVED"; + } + + public final class TimeZoneRulesDataContract { + field public static final String AUTHORITY = "com.android.timezone"; + } + + public static final class TimeZoneRulesDataContract.Operation { + field public static final String COLUMN_DISTRO_MAJOR_VERSION = "distro_major_version"; + field public static final String COLUMN_DISTRO_MINOR_VERSION = "distro_minor_version"; + field public static final String COLUMN_REVISION = "revision"; + field public static final String COLUMN_RULES_VERSION = "rules_version"; + field public static final String COLUMN_TYPE = "type"; + field public static final android.net.Uri CONTENT_URI; + field public static final String TYPE_INSTALL = "INSTALL"; + field public static final String TYPE_NO_OP = "NOOP"; + field public static final String TYPE_UNINSTALL = "UNINSTALL"; + } + +} + +package android.se.omapi { + + public final class Reader { + method @RequiresPermission(android.Manifest.permission.SECURE_ELEMENT_PRIVILEGED_OPERATION) public boolean reset(); + } + +} + +package android.security.keystore { + + public class AndroidKeyStoreProvider extends java.security.Provider { + method @NonNull public static java.security.KeyStore getKeyStoreForUid(int) throws java.security.KeyStoreException, java.security.NoSuchProviderException; + } + + public abstract class AttestationUtils { + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static java.security.cert.X509Certificate[] attestDeviceIds(android.content.Context, @NonNull int[], @NonNull byte[]) throws android.security.keystore.DeviceIdAttestationException; + field public static final int ID_TYPE_IMEI = 2; // 0x2 + field public static final int ID_TYPE_MEID = 3; // 0x3 + field public static final int ID_TYPE_SERIAL = 1; // 0x1 + field public static final int USE_INDIVIDUAL_ATTESTATION = 4; // 0x4 + } + + public class DeviceIdAttestationException extends java.lang.Exception { + ctor public DeviceIdAttestationException(@Nullable String); + ctor public DeviceIdAttestationException(@Nullable String, @Nullable Throwable); + } + + public static final class KeyGenParameterSpec.Builder { + method @NonNull public android.security.keystore.KeyGenParameterSpec.Builder setUid(int); + } + +} + +package android.security.keystore.recovery { + + public class DecryptionFailedException extends java.security.GeneralSecurityException { + ctor public DecryptionFailedException(String); + } + + public class InternalRecoveryServiceException extends java.security.GeneralSecurityException { + ctor public InternalRecoveryServiceException(String); + ctor public InternalRecoveryServiceException(String, Throwable); + } + + public final class KeyChainProtectionParams implements android.os.Parcelable { + method public void clearSecret(); + method public int describeContents(); + method @NonNull public android.security.keystore.recovery.KeyDerivationParams getKeyDerivationParams(); + method public int getLockScreenUiFormat(); + method @NonNull public byte[] getSecret(); + method public int getUserSecretType(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.security.keystore.recovery.KeyChainProtectionParams> CREATOR; + field public static final int TYPE_LOCKSCREEN = 100; // 0x64 + field public static final int UI_FORMAT_PASSWORD = 2; // 0x2 + field public static final int UI_FORMAT_PATTERN = 3; // 0x3 + field public static final int UI_FORMAT_PIN = 1; // 0x1 + } + + public static class KeyChainProtectionParams.Builder { + ctor public KeyChainProtectionParams.Builder(); + method @NonNull public android.security.keystore.recovery.KeyChainProtectionParams build(); + method @NonNull public android.security.keystore.recovery.KeyChainProtectionParams.Builder setKeyDerivationParams(@NonNull android.security.keystore.recovery.KeyDerivationParams); + method @NonNull public android.security.keystore.recovery.KeyChainProtectionParams.Builder setLockScreenUiFormat(int); + method @NonNull public android.security.keystore.recovery.KeyChainProtectionParams.Builder setSecret(@NonNull byte[]); + method @NonNull public android.security.keystore.recovery.KeyChainProtectionParams.Builder setUserSecretType(int); + } + + public final class KeyChainSnapshot implements android.os.Parcelable { + method public int describeContents(); + method public long getCounterId(); + method @NonNull public byte[] getEncryptedRecoveryKeyBlob(); + method @NonNull public java.util.List<android.security.keystore.recovery.KeyChainProtectionParams> getKeyChainProtectionParams(); + method public int getMaxAttempts(); + method @NonNull public byte[] getServerParams(); + method public int getSnapshotVersion(); + method @NonNull public java.security.cert.CertPath getTrustedHardwareCertPath(); + method @NonNull public java.util.List<android.security.keystore.recovery.WrappedApplicationKey> getWrappedApplicationKeys(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.security.keystore.recovery.KeyChainSnapshot> CREATOR; + } + + public final class KeyDerivationParams implements android.os.Parcelable { + method @NonNull public static android.security.keystore.recovery.KeyDerivationParams createScryptParams(@NonNull byte[], int); + method @NonNull public static android.security.keystore.recovery.KeyDerivationParams createSha256Params(@NonNull byte[]); + method public int describeContents(); + method public int getAlgorithm(); + method public int getMemoryDifficulty(); + method @NonNull public byte[] getSalt(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int ALGORITHM_SCRYPT = 2; // 0x2 + field public static final int ALGORITHM_SHA256 = 1; // 0x1 + field @NonNull public static final android.os.Parcelable.Creator<android.security.keystore.recovery.KeyDerivationParams> CREATOR; + } + + public class LockScreenRequiredException extends java.security.GeneralSecurityException { + ctor public LockScreenRequiredException(String); + } + + public class RecoveryController { + method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public android.security.keystore.recovery.RecoverySession createRecoverySession(); + method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.security.Key generateKey(@NonNull String) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException; + method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.security.Key generateKey(@NonNull String, @Nullable byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException; + method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.util.List<java.lang.String> getAliases() throws android.security.keystore.recovery.InternalRecoveryServiceException; + method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public static android.security.keystore.recovery.RecoveryController getInstance(@NonNull android.content.Context); + method @Nullable @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.security.Key getKey(@NonNull String) throws android.security.keystore.recovery.InternalRecoveryServiceException, java.security.UnrecoverableKeyException; + method @Nullable @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public android.security.keystore.recovery.KeyChainSnapshot getKeyChainSnapshot() throws android.security.keystore.recovery.InternalRecoveryServiceException; + method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public int[] getRecoverySecretTypes() throws android.security.keystore.recovery.InternalRecoveryServiceException; + method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public int getRecoveryStatus(@NonNull String) throws android.security.keystore.recovery.InternalRecoveryServiceException; + method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.util.Map<java.lang.String,java.security.cert.X509Certificate> getRootCertificates(); + method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.security.Key importKey(@NonNull String, @NonNull byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException; + method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.security.Key importKey(@NonNull String, @NonNull byte[], @Nullable byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.LockScreenRequiredException; + method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public void initRecoveryService(@NonNull String, @NonNull byte[], @NonNull byte[]) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException; + method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public static boolean isRecoverableKeyStoreEnabled(@NonNull android.content.Context); + method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public void removeKey(@NonNull String) throws android.security.keystore.recovery.InternalRecoveryServiceException; + method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public void setRecoverySecretTypes(@NonNull int[]) throws android.security.keystore.recovery.InternalRecoveryServiceException; + method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public void setRecoveryStatus(@NonNull String, int) throws android.security.keystore.recovery.InternalRecoveryServiceException; + method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public void setServerParams(@NonNull byte[]) throws android.security.keystore.recovery.InternalRecoveryServiceException; + method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public void setSnapshotCreatedPendingIntent(@Nullable android.app.PendingIntent) throws android.security.keystore.recovery.InternalRecoveryServiceException; + field public static final int RECOVERY_STATUS_PERMANENT_FAILURE = 3; // 0x3 + field public static final int RECOVERY_STATUS_SYNCED = 0; // 0x0 + field public static final int RECOVERY_STATUS_SYNC_IN_PROGRESS = 1; // 0x1 + } + + public class RecoverySession implements java.lang.AutoCloseable { + method @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public void close(); + method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public java.util.Map<java.lang.String,java.security.Key> recoverKeyChainSnapshot(@NonNull byte[], @NonNull java.util.List<android.security.keystore.recovery.WrappedApplicationKey>) throws android.security.keystore.recovery.DecryptionFailedException, android.security.keystore.recovery.InternalRecoveryServiceException, android.security.keystore.recovery.SessionExpiredException; + method @NonNull @RequiresPermission(android.Manifest.permission.RECOVER_KEYSTORE) public byte[] start(@NonNull String, @NonNull java.security.cert.CertPath, @NonNull byte[], @NonNull byte[], @NonNull java.util.List<android.security.keystore.recovery.KeyChainProtectionParams>) throws java.security.cert.CertificateException, android.security.keystore.recovery.InternalRecoveryServiceException; + } + + public class SessionExpiredException extends java.security.GeneralSecurityException { + ctor public SessionExpiredException(String); + } + + public final class WrappedApplicationKey implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public String getAlias(); + method @NonNull public byte[] getEncryptedKeyMaterial(); + method @Nullable public byte[] getMetadata(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.security.keystore.recovery.WrappedApplicationKey> CREATOR; + } + + public static class WrappedApplicationKey.Builder { + ctor public WrappedApplicationKey.Builder(); + method @NonNull public android.security.keystore.recovery.WrappedApplicationKey build(); + method @NonNull public android.security.keystore.recovery.WrappedApplicationKey.Builder setAlias(@NonNull String); + method @NonNull public android.security.keystore.recovery.WrappedApplicationKey.Builder setEncryptedKeyMaterial(@NonNull byte[]); + method @NonNull public android.security.keystore.recovery.WrappedApplicationKey.Builder setMetadata(@Nullable byte[]); + } + +} + +package android.service.appprediction { + + public abstract class AppPredictionService extends android.app.Service { + ctor public AppPredictionService(); + method @MainThread public abstract void onAppTargetEvent(@NonNull android.app.prediction.AppPredictionSessionId, @NonNull android.app.prediction.AppTargetEvent); + method @NonNull public final android.os.IBinder onBind(@NonNull android.content.Intent); + method public void onCreatePredictionSession(@NonNull android.app.prediction.AppPredictionContext, @NonNull android.app.prediction.AppPredictionSessionId); + method @MainThread public void onDestroyPredictionSession(@NonNull android.app.prediction.AppPredictionSessionId); + method @MainThread public abstract void onLaunchLocationShown(@NonNull android.app.prediction.AppPredictionSessionId, @NonNull String, @NonNull java.util.List<android.app.prediction.AppTargetId>); + method @MainThread public abstract void onRequestPredictionUpdate(@NonNull android.app.prediction.AppPredictionSessionId); + method @MainThread public abstract void onSortAppTargets(@NonNull android.app.prediction.AppPredictionSessionId, @NonNull java.util.List<android.app.prediction.AppTarget>, @NonNull android.os.CancellationSignal, @NonNull java.util.function.Consumer<java.util.List<android.app.prediction.AppTarget>>); + method @MainThread public void onStartPredictionUpdates(); + method @MainThread public void onStopPredictionUpdates(); + method public final void updatePredictions(@NonNull android.app.prediction.AppPredictionSessionId, @NonNull java.util.List<android.app.prediction.AppTarget>); + } + +} + +package android.service.attention { + + public abstract class AttentionService extends android.app.Service { + ctor public AttentionService(); + method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent); + method public abstract void onCancelAttentionCheck(@NonNull android.service.attention.AttentionService.AttentionCallback); + method public abstract void onCheckAttention(@NonNull android.service.attention.AttentionService.AttentionCallback); + field public static final int ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6; // 0x6 + field public static final int ATTENTION_FAILURE_CANCELLED = 3; // 0x3 + field public static final int ATTENTION_FAILURE_PREEMPTED = 4; // 0x4 + field public static final int ATTENTION_FAILURE_TIMED_OUT = 5; // 0x5 + field public static final int ATTENTION_FAILURE_UNKNOWN = 2; // 0x2 + field public static final int ATTENTION_SUCCESS_ABSENT = 0; // 0x0 + field public static final int ATTENTION_SUCCESS_PRESENT = 1; // 0x1 + field public static final String SERVICE_INTERFACE = "android.service.attention.AttentionService"; + } + + public static final class AttentionService.AttentionCallback { + method public void onFailure(int); + method public void onSuccess(int, long); + } + +} + +package android.service.autofill { + + public abstract class AutofillFieldClassificationService extends android.app.Service { + ctor public AutofillFieldClassificationService(); + method public android.os.IBinder onBind(android.content.Intent); + method @Nullable public float[][] onCalculateScores(@NonNull java.util.List<android.view.autofill.AutofillValue>, @NonNull java.util.List<java.lang.String>, @NonNull java.util.List<java.lang.String>, @Nullable String, @Nullable android.os.Bundle, @Nullable java.util.Map, @Nullable java.util.Map); + method @Deprecated @Nullable public float[][] onGetScores(@Nullable String, @Nullable android.os.Bundle, @NonNull java.util.List<android.view.autofill.AutofillValue>, @NonNull java.util.List<java.lang.String>); + field public static final String REQUIRED_ALGORITHM_CREDIT_CARD = "CREDIT_CARD"; + field public static final String REQUIRED_ALGORITHM_EDIT_DISTANCE = "EDIT_DISTANCE"; + field public static final String REQUIRED_ALGORITHM_EXACT_MATCH = "EXACT_MATCH"; + field public static final String SERVICE_INTERFACE = "android.service.autofill.AutofillFieldClassificationService"; + field public static final String SERVICE_META_DATA_KEY_AVAILABLE_ALGORITHMS = "android.autofill.field_classification.available_algorithms"; + field public static final String SERVICE_META_DATA_KEY_DEFAULT_ALGORITHM = "android.autofill.field_classification.default_algorithm"; + } + + public static final class Dataset.Builder { + ctor public Dataset.Builder(@NonNull android.service.autofill.InlinePresentation); + method @NonNull public android.service.autofill.Dataset.Builder setContent(@NonNull android.view.autofill.AutofillId, @Nullable android.content.ClipData); + method @NonNull public android.service.autofill.Dataset.Builder setFieldInlinePresentation(@NonNull android.view.autofill.AutofillId, @Nullable android.view.autofill.AutofillValue, @Nullable java.util.regex.Pattern, @NonNull android.service.autofill.InlinePresentation); + } + + public abstract class InlineSuggestionRenderService extends android.app.Service { + ctor public InlineSuggestionRenderService(); + method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent); + method @NonNull public android.os.Bundle onGetInlineSuggestionsRendererInfo(); + method @Nullable public android.view.View onRenderSuggestion(@NonNull android.service.autofill.InlinePresentation, int, int); + method public final void startIntentSender(@NonNull android.content.IntentSender); + field public static final String SERVICE_INTERFACE = "android.service.autofill.InlineSuggestionRenderService"; + } + +} + +package android.service.autofill.augmented { + + public abstract class AugmentedAutofillService extends android.app.Service { + ctor public AugmentedAutofillService(); + method protected final void dump(java.io.FileDescriptor, java.io.PrintWriter, String[]); + method protected void dump(@NonNull java.io.PrintWriter, @NonNull String[]); + method @Nullable public final android.service.autofill.FillEventHistory getFillEventHistory(); + method public void onConnected(); + method public void onDisconnected(); + method public void onFillRequest(@NonNull android.service.autofill.augmented.FillRequest, @NonNull android.os.CancellationSignal, @NonNull android.service.autofill.augmented.FillController, @NonNull android.service.autofill.augmented.FillCallback); + method public final boolean requestAutofill(@NonNull android.content.ComponentName, @NonNull android.view.autofill.AutofillId); + field public static final String SERVICE_INTERFACE = "android.service.autofill.augmented.AugmentedAutofillService"; + } + + public final class FillCallback { + method public void onSuccess(@Nullable android.service.autofill.augmented.FillResponse); + } + + public final class FillController { + method public void autofill(@NonNull java.util.List<android.util.Pair<android.view.autofill.AutofillId,android.view.autofill.AutofillValue>>); + } + + public final class FillRequest { + method @NonNull public android.content.ComponentName getActivityComponent(); + method @NonNull public android.view.autofill.AutofillId getFocusedId(); + method @NonNull public android.view.autofill.AutofillValue getFocusedValue(); + method @Nullable public android.view.inputmethod.InlineSuggestionsRequest getInlineSuggestionsRequest(); + method @Nullable public android.service.autofill.augmented.PresentationParams getPresentationParams(); + method public int getTaskId(); + } + + public final class FillResponse { + } + + public static final class FillResponse.Builder { + ctor public FillResponse.Builder(); + method @NonNull public android.service.autofill.augmented.FillResponse build(); + method @NonNull public android.service.autofill.augmented.FillResponse.Builder setClientState(@NonNull android.os.Bundle); + method @NonNull public android.service.autofill.augmented.FillResponse.Builder setFillWindow(@NonNull android.service.autofill.augmented.FillWindow); + method @NonNull public android.service.autofill.augmented.FillResponse.Builder setInlineSuggestions(@NonNull java.util.List<android.service.autofill.Dataset>); + } + + public final class FillWindow implements java.lang.AutoCloseable { + ctor public FillWindow(); + method public void destroy(); + method public boolean update(@NonNull android.service.autofill.augmented.PresentationParams.Area, @NonNull android.view.View, long); + } + + public abstract class PresentationParams { + method @Nullable public android.service.autofill.augmented.PresentationParams.Area getSuggestionArea(); + } + + public abstract static class PresentationParams.Area { + method @NonNull public android.graphics.Rect getBounds(); + } + +} + +package android.service.carrier { + + public abstract class ApnService extends android.app.Service { + ctor public ApnService(); + method @NonNull public android.os.IBinder onBind(@Nullable android.content.Intent); + method @NonNull @WorkerThread public abstract java.util.List<android.content.ContentValues> onRestoreApns(int); + } + +} + +package android.service.contentcapture { + + public final class ActivityEvent implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public android.content.ComponentName getComponentName(); + method public int getEventType(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.service.contentcapture.ActivityEvent> CREATOR; + field public static final int TYPE_ACTIVITY_DESTROYED = 24; // 0x18 + field public static final int TYPE_ACTIVITY_PAUSED = 2; // 0x2 + field public static final int TYPE_ACTIVITY_RESUMED = 1; // 0x1 + field public static final int TYPE_ACTIVITY_STOPPED = 23; // 0x17 + } + + public abstract class ContentCaptureService extends android.app.Service { + ctor public ContentCaptureService(); + method public final void disableSelf(); + method public void onActivityEvent(@NonNull android.service.contentcapture.ActivityEvent); + method public void onActivitySnapshot(@NonNull android.view.contentcapture.ContentCaptureSessionId, @NonNull android.service.contentcapture.SnapshotData); + method public void onConnected(); + method public void onContentCaptureEvent(@NonNull android.view.contentcapture.ContentCaptureSessionId, @NonNull android.view.contentcapture.ContentCaptureEvent); + method public void onCreateContentCaptureSession(@NonNull android.view.contentcapture.ContentCaptureContext, @NonNull android.view.contentcapture.ContentCaptureSessionId); + method public void onDataRemovalRequest(@NonNull android.view.contentcapture.DataRemovalRequest); + method public void onDataShareRequest(@NonNull android.view.contentcapture.DataShareRequest, @NonNull android.service.contentcapture.DataShareCallback); + method public void onDestroyContentCaptureSession(@NonNull android.view.contentcapture.ContentCaptureSessionId); + method public void onDisconnected(); + method public final void setContentCaptureConditions(@NonNull String, @Nullable java.util.Set<android.view.contentcapture.ContentCaptureCondition>); + method public final void setContentCaptureWhitelist(@Nullable java.util.Set<java.lang.String>, @Nullable java.util.Set<android.content.ComponentName>); + field public static final String SERVICE_INTERFACE = "android.service.contentcapture.ContentCaptureService"; + field public static final String SERVICE_META_DATA = "android.content_capture"; + } + + public interface DataShareCallback { + method public void onAccept(@NonNull java.util.concurrent.Executor, @NonNull android.service.contentcapture.DataShareReadAdapter); + method public void onReject(); + } + + public interface DataShareReadAdapter { + method public void onError(int); + method public void onStart(@NonNull android.os.ParcelFileDescriptor); + } + + public final class SnapshotData implements android.os.Parcelable { + method public int describeContents(); + method @Nullable public android.app.assist.AssistContent getAssistContent(); + method @NonNull public android.os.Bundle getAssistData(); + method @NonNull public android.app.assist.AssistStructure getAssistStructure(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.service.contentcapture.SnapshotData> CREATOR; + } + +} + +package android.service.contentsuggestions { + + public abstract class ContentSuggestionsService extends android.app.Service { + ctor public ContentSuggestionsService(); + method public abstract void onClassifyContentSelections(@NonNull android.app.contentsuggestions.ClassificationsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.ClassificationsCallback); + method public abstract void onNotifyInteraction(@NonNull String, @NonNull android.os.Bundle); + method public abstract void onProcessContextImage(int, @Nullable android.graphics.Bitmap, @NonNull android.os.Bundle); + method public abstract void onSuggestContentSelections(@NonNull android.app.contentsuggestions.SelectionsRequest, @NonNull android.app.contentsuggestions.ContentSuggestionsManager.SelectionsCallback); + field public static final String SERVICE_INTERFACE = "android.service.contentsuggestions.ContentSuggestionsService"; + } + +} + +package android.service.dataloader { + + public abstract class DataLoaderService extends android.app.Service { + ctor public DataLoaderService(); + method @Nullable public android.service.dataloader.DataLoaderService.DataLoader onCreateDataLoader(@NonNull android.content.pm.DataLoaderParams); + } + + public static interface DataLoaderService.DataLoader { + method public boolean onCreate(@NonNull android.content.pm.DataLoaderParams, @NonNull android.service.dataloader.DataLoaderService.FileSystemConnector); + method public boolean onPrepareImage(@NonNull java.util.Collection<android.content.pm.InstallationFile>, @NonNull java.util.Collection<java.lang.String>); + } + + public static final class DataLoaderService.FileSystemConnector { + method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void writeData(@NonNull String, long, long, @NonNull android.os.ParcelFileDescriptor) throws java.io.IOException; + } + +} + +package android.service.euicc { + + public final class DownloadSubscriptionResult implements android.os.Parcelable { + ctor public DownloadSubscriptionResult(int, int, int); + method public int describeContents(); + method public int getCardId(); + method public int getResolvableErrors(); + method public int getResult(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.service.euicc.DownloadSubscriptionResult> CREATOR; + } + + public final class EuiccProfileInfo implements android.os.Parcelable { + method public int describeContents(); + method public android.service.carrier.CarrierIdentifier getCarrierIdentifier(); + method public String getIccid(); + method @Nullable public String getNickname(); + method @android.service.euicc.EuiccProfileInfo.PolicyRule public int getPolicyRules(); + method @android.service.euicc.EuiccProfileInfo.ProfileClass public int getProfileClass(); + method public String getProfileName(); + method public String getServiceProviderName(); + method @android.service.euicc.EuiccProfileInfo.ProfileState public int getState(); + method @Nullable public java.util.List<android.telephony.UiccAccessRule> getUiccAccessRules(); + method public boolean hasPolicyRule(@android.service.euicc.EuiccProfileInfo.PolicyRule int); + method public boolean hasPolicyRules(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.service.euicc.EuiccProfileInfo> CREATOR; + field public static final int POLICY_RULE_DELETE_AFTER_DISABLING = 4; // 0x4 + field public static final int POLICY_RULE_DO_NOT_DELETE = 2; // 0x2 + field public static final int POLICY_RULE_DO_NOT_DISABLE = 1; // 0x1 + field public static final int PROFILE_CLASS_OPERATIONAL = 2; // 0x2 + field public static final int PROFILE_CLASS_PROVISIONING = 1; // 0x1 + field public static final int PROFILE_CLASS_TESTING = 0; // 0x0 + field public static final int PROFILE_STATE_DISABLED = 0; // 0x0 + field public static final int PROFILE_STATE_ENABLED = 1; // 0x1 + } + + public static final class EuiccProfileInfo.Builder { + ctor public EuiccProfileInfo.Builder(String); + ctor public EuiccProfileInfo.Builder(android.service.euicc.EuiccProfileInfo); + method public android.service.euicc.EuiccProfileInfo build(); + method public android.service.euicc.EuiccProfileInfo.Builder setCarrierIdentifier(android.service.carrier.CarrierIdentifier); + method public android.service.euicc.EuiccProfileInfo.Builder setIccid(String); + method public android.service.euicc.EuiccProfileInfo.Builder setNickname(String); + method public android.service.euicc.EuiccProfileInfo.Builder setPolicyRules(@android.service.euicc.EuiccProfileInfo.PolicyRule int); + method public android.service.euicc.EuiccProfileInfo.Builder setProfileClass(@android.service.euicc.EuiccProfileInfo.ProfileClass int); + method public android.service.euicc.EuiccProfileInfo.Builder setProfileName(String); + method public android.service.euicc.EuiccProfileInfo.Builder setServiceProviderName(String); + method public android.service.euicc.EuiccProfileInfo.Builder setState(@android.service.euicc.EuiccProfileInfo.ProfileState int); + method public android.service.euicc.EuiccProfileInfo.Builder setUiccAccessRule(@Nullable java.util.List<android.telephony.UiccAccessRule>); + } + + @IntDef(flag=true, prefix={"POLICY_RULE_"}, value={android.service.euicc.EuiccProfileInfo.POLICY_RULE_DO_NOT_DISABLE, android.service.euicc.EuiccProfileInfo.POLICY_RULE_DO_NOT_DELETE, android.service.euicc.EuiccProfileInfo.POLICY_RULE_DELETE_AFTER_DISABLING}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccProfileInfo.PolicyRule { + } + + @IntDef(prefix={"PROFILE_CLASS_"}, value={android.service.euicc.EuiccProfileInfo.PROFILE_CLASS_TESTING, android.service.euicc.EuiccProfileInfo.PROFILE_CLASS_PROVISIONING, android.service.euicc.EuiccProfileInfo.PROFILE_CLASS_OPERATIONAL, 0xffffffff}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccProfileInfo.ProfileClass { + } + + @IntDef(prefix={"PROFILE_STATE_"}, value={android.service.euicc.EuiccProfileInfo.PROFILE_STATE_DISABLED, android.service.euicc.EuiccProfileInfo.PROFILE_STATE_ENABLED, 0xffffffff}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccProfileInfo.ProfileState { + } + + public abstract class EuiccService extends android.app.Service { + ctor public EuiccService(); + method public void dump(@NonNull java.io.PrintWriter); + method public int encodeSmdxSubjectAndReasonCode(@Nullable String, @Nullable String); + method @CallSuper public android.os.IBinder onBind(android.content.Intent); + method public abstract int onDeleteSubscription(int, String); + method public android.service.euicc.DownloadSubscriptionResult onDownloadSubscription(int, @NonNull android.telephony.euicc.DownloadableSubscription, boolean, boolean, @Nullable android.os.Bundle); + method @Deprecated public int onDownloadSubscription(int, @NonNull android.telephony.euicc.DownloadableSubscription, boolean, boolean); + method @Deprecated public abstract int onEraseSubscriptions(int); + method public int onEraseSubscriptions(int, @android.telephony.euicc.EuiccCardManager.ResetOption int); + method public abstract android.service.euicc.GetDefaultDownloadableSubscriptionListResult onGetDefaultDownloadableSubscriptionList(int, boolean); + method public abstract android.service.euicc.GetDownloadableSubscriptionMetadataResult onGetDownloadableSubscriptionMetadata(int, android.telephony.euicc.DownloadableSubscription, boolean); + method public abstract String onGetEid(int); + method @NonNull public abstract android.telephony.euicc.EuiccInfo onGetEuiccInfo(int); + method @NonNull public abstract android.service.euicc.GetEuiccProfileInfoListResult onGetEuiccProfileInfoList(int); + method @android.telephony.euicc.EuiccManager.OtaStatus public abstract int onGetOtaStatus(int); + method public abstract int onRetainSubscriptionsForFactoryReset(int); + method public abstract void onStartOtaIfNecessary(int, android.service.euicc.EuiccService.OtaStatusChangedCallback); + method public abstract int onSwitchToSubscription(int, @Nullable String, boolean); + method public abstract int onUpdateSubscriptionNickname(int, String, String); + field public static final String ACTION_BIND_CARRIER_PROVISIONING_SERVICE = "android.service.euicc.action.BIND_CARRIER_PROVISIONING_SERVICE"; + field public static final String ACTION_DELETE_SUBSCRIPTION_PRIVILEGED = "android.service.euicc.action.DELETE_SUBSCRIPTION_PRIVILEGED"; + field public static final String ACTION_MANAGE_EMBEDDED_SUBSCRIPTIONS = "android.service.euicc.action.MANAGE_EMBEDDED_SUBSCRIPTIONS"; + field public static final String ACTION_PROVISION_EMBEDDED_SUBSCRIPTION = "android.service.euicc.action.PROVISION_EMBEDDED_SUBSCRIPTION"; + field public static final String ACTION_RENAME_SUBSCRIPTION_PRIVILEGED = "android.service.euicc.action.RENAME_SUBSCRIPTION_PRIVILEGED"; + field @Deprecated public static final String ACTION_RESOLVE_CONFIRMATION_CODE = "android.service.euicc.action.RESOLVE_CONFIRMATION_CODE"; + field public static final String ACTION_RESOLVE_DEACTIVATE_SIM = "android.service.euicc.action.RESOLVE_DEACTIVATE_SIM"; + field public static final String ACTION_RESOLVE_NO_PRIVILEGES = "android.service.euicc.action.RESOLVE_NO_PRIVILEGES"; + field public static final String ACTION_RESOLVE_RESOLVABLE_ERRORS = "android.service.euicc.action.RESOLVE_RESOLVABLE_ERRORS"; + field public static final String ACTION_START_CARRIER_ACTIVATION = "android.service.euicc.action.START_CARRIER_ACTIVATION"; + field public static final String ACTION_START_EUICC_ACTIVATION = "android.service.euicc.action.START_EUICC_ACTIVATION"; + field public static final String ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED = "android.service.euicc.action.TOGGLE_SUBSCRIPTION_PRIVILEGED"; + field public static final String CATEGORY_EUICC_UI = "android.service.euicc.category.EUICC_UI"; + field public static final String EUICC_SERVICE_INTERFACE = "android.service.euicc.EuiccService"; + field public static final String EXTRA_RESOLUTION_ALLOW_POLICY_RULES = "android.service.euicc.extra.RESOLUTION_ALLOW_POLICY_RULES"; + field public static final String EXTRA_RESOLUTION_CALLING_PACKAGE = "android.service.euicc.extra.RESOLUTION_CALLING_PACKAGE"; + field public static final String EXTRA_RESOLUTION_CARD_ID = "android.service.euicc.extra.RESOLUTION_CARD_ID"; + field public static final String EXTRA_RESOLUTION_CONFIRMATION_CODE = "android.service.euicc.extra.RESOLUTION_CONFIRMATION_CODE"; + field public static final String EXTRA_RESOLUTION_CONFIRMATION_CODE_RETRIED = "android.service.euicc.extra.RESOLUTION_CONFIRMATION_CODE_RETRIED"; + field public static final String EXTRA_RESOLUTION_CONSENT = "android.service.euicc.extra.RESOLUTION_CONSENT"; + field public static final String EXTRA_RESOLVABLE_ERRORS = "android.service.euicc.extra.RESOLVABLE_ERRORS"; + field public static final int RESOLVABLE_ERROR_CONFIRMATION_CODE = 1; // 0x1 + field public static final int RESOLVABLE_ERROR_POLICY_RULES = 2; // 0x2 + field public static final int RESULT_FIRST_USER = 1; // 0x1 + field public static final int RESULT_MUST_DEACTIVATE_SIM = -1; // 0xffffffff + field @Deprecated public static final int RESULT_NEED_CONFIRMATION_CODE = -2; // 0xfffffffe + field public static final int RESULT_OK = 0; // 0x0 + field public static final int RESULT_RESOLVABLE_ERRORS = -2; // 0xfffffffe + } + + public abstract static class EuiccService.OtaStatusChangedCallback { + ctor public EuiccService.OtaStatusChangedCallback(); + method public abstract void onOtaStatusChanged(int); + } + + public final class GetDefaultDownloadableSubscriptionListResult implements android.os.Parcelable { + ctor public GetDefaultDownloadableSubscriptionListResult(int, @Nullable android.telephony.euicc.DownloadableSubscription[]); + method public int describeContents(); + method @Nullable public java.util.List<android.telephony.euicc.DownloadableSubscription> getDownloadableSubscriptions(); + method public int getResult(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.service.euicc.GetDefaultDownloadableSubscriptionListResult> CREATOR; + } + + public final class GetDownloadableSubscriptionMetadataResult implements android.os.Parcelable { + ctor public GetDownloadableSubscriptionMetadataResult(int, @Nullable android.telephony.euicc.DownloadableSubscription); + method public int describeContents(); + method @Nullable public android.telephony.euicc.DownloadableSubscription getDownloadableSubscription(); + method public int getResult(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.service.euicc.GetDownloadableSubscriptionMetadataResult> CREATOR; + } + + public final class GetEuiccProfileInfoListResult implements android.os.Parcelable { + ctor public GetEuiccProfileInfoListResult(int, @Nullable android.service.euicc.EuiccProfileInfo[], boolean); + method public int describeContents(); + method public boolean getIsRemovable(); + method @Nullable public java.util.List<android.service.euicc.EuiccProfileInfo> getProfiles(); + method public int getResult(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.service.euicc.GetEuiccProfileInfoListResult> CREATOR; + } + +} + +package android.service.notification { + + public final class Adjustment implements android.os.Parcelable { + ctor public Adjustment(String, String, android.os.Bundle, CharSequence, int); + ctor public Adjustment(@NonNull String, @NonNull String, @NonNull android.os.Bundle, @NonNull CharSequence, @NonNull android.os.UserHandle); + ctor protected Adjustment(android.os.Parcel); + method public int describeContents(); + method @NonNull public CharSequence getExplanation(); + method @NonNull public String getKey(); + method @NonNull public String getPackage(); + method @NonNull public android.os.Bundle getSignals(); + method public int getUser(); + method @NonNull public android.os.UserHandle getUserHandle(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.service.notification.Adjustment> CREATOR; + field public static final String KEY_CONTEXTUAL_ACTIONS = "key_contextual_actions"; + field public static final String KEY_IMPORTANCE = "key_importance"; + field public static final String KEY_NOT_CONVERSATION = "key_not_conversation"; + field public static final String KEY_PEOPLE = "key_people"; + field public static final String KEY_RANKING_SCORE = "key_ranking_score"; + field public static final String KEY_SNOOZE_CRITERIA = "key_snooze_criteria"; + field public static final String KEY_TEXT_REPLIES = "key_text_replies"; + field public static final String KEY_USER_SENTIMENT = "key_user_sentiment"; + } + + public abstract class NotificationAssistantService extends android.service.notification.NotificationListenerService { + ctor public NotificationAssistantService(); + method public final void adjustNotification(@NonNull android.service.notification.Adjustment); + method public final void adjustNotifications(@NonNull java.util.List<android.service.notification.Adjustment>); + method public void onActionInvoked(@NonNull String, @NonNull android.app.Notification.Action, int); + method public void onAllowedAdjustmentsChanged(); + method @NonNull public final android.os.IBinder onBind(@Nullable android.content.Intent); + method public void onNotificationDirectReplied(@NonNull String); + method @Nullable public abstract android.service.notification.Adjustment onNotificationEnqueued(@NonNull android.service.notification.StatusBarNotification); + method @Nullable public android.service.notification.Adjustment onNotificationEnqueued(@NonNull android.service.notification.StatusBarNotification, @NonNull android.app.NotificationChannel); + method public void onNotificationExpansionChanged(@NonNull String, boolean, boolean); + method public abstract void onNotificationSnoozedUntilContext(@NonNull android.service.notification.StatusBarNotification, @NonNull String); + method public void onNotificationVisibilityChanged(@NonNull String, boolean); + method public void onNotificationsSeen(@NonNull java.util.List<java.lang.String>); + method public void onPanelHidden(); + method public void onPanelRevealed(int); + method public void onSuggestedReplySent(@NonNull String, @NonNull CharSequence, int); + method public final void unsnoozeNotification(@NonNull String); + field public static final String SERVICE_INTERFACE = "android.service.notification.NotificationAssistantService"; + field public static final int SOURCE_FROM_APP = 0; // 0x0 + field public static final int SOURCE_FROM_ASSISTANT = 1; // 0x1 + } + + public abstract class NotificationListenerService extends android.app.Service { + method public void onNotificationRemoved(@NonNull android.service.notification.StatusBarNotification, @NonNull android.service.notification.NotificationListenerService.RankingMap, @NonNull android.service.notification.NotificationStats, int); + } + + public final class NotificationStats implements android.os.Parcelable { + ctor public NotificationStats(); + ctor protected NotificationStats(android.os.Parcel); + method public int describeContents(); + method public int getDismissalSentiment(); + method public int getDismissalSurface(); + method public boolean hasDirectReplied(); + method public boolean hasExpanded(); + method public boolean hasInteracted(); + method public boolean hasSeen(); + method public boolean hasSnoozed(); + method public boolean hasViewedSettings(); + method public void setDirectReplied(); + method public void setDismissalSentiment(int); + method public void setDismissalSurface(int); + method public void setExpanded(); + method public void setSeen(); + method public void setSnoozed(); + method public void setViewedSettings(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.service.notification.NotificationStats> CREATOR; + field public static final int DISMISSAL_AOD = 2; // 0x2 + field public static final int DISMISSAL_NOT_DISMISSED = -1; // 0xffffffff + field public static final int DISMISSAL_OTHER = 0; // 0x0 + field public static final int DISMISSAL_PEEK = 1; // 0x1 + field public static final int DISMISSAL_SHADE = 3; // 0x3 + field public static final int DISMISS_SENTIMENT_NEGATIVE = 0; // 0x0 + field public static final int DISMISS_SENTIMENT_NEUTRAL = 1; // 0x1 + field public static final int DISMISS_SENTIMENT_POSITIVE = 2; // 0x2 + field public static final int DISMISS_SENTIMENT_UNKNOWN = -1000; // 0xfffffc18 + } + + public final class SnoozeCriterion implements android.os.Parcelable { + ctor public SnoozeCriterion(String, CharSequence, CharSequence); + ctor protected SnoozeCriterion(android.os.Parcel); + method public int describeContents(); + method public CharSequence getConfirmation(); + method public CharSequence getExplanation(); + method public String getId(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.service.notification.SnoozeCriterion> CREATOR; + } + +} + +package android.service.oemlock { + + public class OemLockManager { + method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_CARRIER_OEM_UNLOCK_STATE) public String getLockName(); + method @RequiresPermission(android.Manifest.permission.MANAGE_CARRIER_OEM_UNLOCK_STATE) public boolean isOemUnlockAllowedByCarrier(); + method @RequiresPermission(android.Manifest.permission.MANAGE_USER_OEM_UNLOCK_STATE) public boolean isOemUnlockAllowedByUser(); + method @RequiresPermission(android.Manifest.permission.MANAGE_CARRIER_OEM_UNLOCK_STATE) public void setOemUnlockAllowedByCarrier(boolean, @Nullable byte[]); + method @RequiresPermission(android.Manifest.permission.MANAGE_USER_OEM_UNLOCK_STATE) public void setOemUnlockAllowedByUser(boolean); + } + +} + +package android.service.persistentdata { + + public class PersistentDataBlockManager { + method @RequiresPermission("android.permission.ACCESS_PDB_STATE") public int getDataBlockSize(); + method @android.service.persistentdata.PersistentDataBlockManager.FlashLockState @RequiresPermission(anyOf={android.Manifest.permission.READ_OEM_UNLOCK_STATE, "android.permission.OEM_UNLOCK_STATE"}) public int getFlashLockState(); + method public long getMaximumDataBlockSize(); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_OEM_UNLOCK_STATE, "android.permission.OEM_UNLOCK_STATE"}) public boolean getOemUnlockEnabled(); + method public byte[] read(); + method @Deprecated @RequiresPermission("android.permission.OEM_UNLOCK_STATE") public void setOemUnlockEnabled(boolean); + method @RequiresPermission("android.permission.OEM_UNLOCK_STATE") public void wipe(); + method public int write(byte[]); + field public static final int FLASH_LOCK_LOCKED = 1; // 0x1 + field public static final int FLASH_LOCK_UNKNOWN = -1; // 0xffffffff + field public static final int FLASH_LOCK_UNLOCKED = 0; // 0x0 + } + + @IntDef(prefix={"FLASH_LOCK_"}, value={android.service.persistentdata.PersistentDataBlockManager.FLASH_LOCK_UNKNOWN, android.service.persistentdata.PersistentDataBlockManager.FLASH_LOCK_LOCKED, android.service.persistentdata.PersistentDataBlockManager.FLASH_LOCK_UNLOCKED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface PersistentDataBlockManager.FlashLockState { + } + +} + +package android.service.quicksettings { + + public class TileService extends android.app.Service { + method public final void setStatusIcon(android.graphics.drawable.Icon, String); + } + +} + +package android.service.resolver { + + public abstract class ResolverRankerService extends android.app.Service { + ctor public ResolverRankerService(); + method public android.os.IBinder onBind(android.content.Intent); + method public void onPredictSharingProbabilities(java.util.List<android.service.resolver.ResolverTarget>); + method public void onTrainRankingModel(java.util.List<android.service.resolver.ResolverTarget>, int); + field public static final String BIND_PERMISSION = "android.permission.BIND_RESOLVER_RANKER_SERVICE"; + field public static final String HOLD_PERMISSION = "android.permission.PROVIDE_RESOLVER_RANKER_SERVICE"; + field public static final String SERVICE_INTERFACE = "android.service.resolver.ResolverRankerService"; + } + + public final class ResolverTarget implements android.os.Parcelable { + ctor public ResolverTarget(); + method public int describeContents(); + method public float getChooserScore(); + method public float getLaunchScore(); + method public float getRecencyScore(); + method public float getSelectProbability(); + method public float getTimeSpentScore(); + method public void setChooserScore(float); + method public void setLaunchScore(float); + method public void setRecencyScore(float); + method public void setSelectProbability(float); + method public void setTimeSpentScore(float); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.service.resolver.ResolverTarget> CREATOR; + } + +} + +package android.service.settings.suggestions { + + public final class Suggestion implements android.os.Parcelable { + method public int describeContents(); + method public int getFlags(); + method public android.graphics.drawable.Icon getIcon(); + method public String getId(); + method public android.app.PendingIntent getPendingIntent(); + method public CharSequence getSummary(); + method public CharSequence getTitle(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.service.settings.suggestions.Suggestion> CREATOR; + field public static final int FLAG_HAS_BUTTON = 1; // 0x1 + } + + public static class Suggestion.Builder { + ctor public Suggestion.Builder(String); + method public android.service.settings.suggestions.Suggestion build(); + method public android.service.settings.suggestions.Suggestion.Builder setFlags(int); + method public android.service.settings.suggestions.Suggestion.Builder setIcon(android.graphics.drawable.Icon); + method public android.service.settings.suggestions.Suggestion.Builder setPendingIntent(android.app.PendingIntent); + method public android.service.settings.suggestions.Suggestion.Builder setSummary(CharSequence); + method public android.service.settings.suggestions.Suggestion.Builder setTitle(CharSequence); + } + + public abstract class SuggestionService extends android.app.Service { + ctor public SuggestionService(); + method public android.os.IBinder onBind(android.content.Intent); + method public abstract java.util.List<android.service.settings.suggestions.Suggestion> onGetSuggestions(); + method public abstract void onSuggestionDismissed(android.service.settings.suggestions.Suggestion); + method public abstract void onSuggestionLaunched(android.service.settings.suggestions.Suggestion); + } + +} + +package android.service.storage { + + public abstract class ExternalStorageService extends android.app.Service { + ctor public ExternalStorageService(); + method @NonNull public final android.os.IBinder onBind(@NonNull android.content.Intent); + method public abstract void onEndSession(@NonNull String) throws java.io.IOException; + method public abstract void onStartSession(@NonNull String, int, @NonNull android.os.ParcelFileDescriptor, @NonNull java.io.File, @NonNull java.io.File) throws java.io.IOException; + method public abstract void onVolumeStateChanged(@NonNull android.os.storage.StorageVolume) throws java.io.IOException; + field public static final int FLAG_SESSION_ATTRIBUTE_INDEXABLE = 2; // 0x2 + field public static final int FLAG_SESSION_TYPE_FUSE = 1; // 0x1 + field public static final String SERVICE_INTERFACE = "android.service.storage.ExternalStorageService"; + } + +} + +package android.service.textclassifier { + + public abstract class TextClassifierService extends android.app.Service { + ctor public TextClassifierService(); + method @NonNull public static android.view.textclassifier.TextClassifier getDefaultTextClassifierImplementation(@NonNull android.content.Context); + method @Deprecated public final android.view.textclassifier.TextClassifier getLocalTextClassifier(); + method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent); + method @MainThread public abstract void onClassifyText(@Nullable android.view.textclassifier.TextClassificationSessionId, @NonNull android.view.textclassifier.TextClassification.Request, @NonNull android.os.CancellationSignal, @NonNull android.service.textclassifier.TextClassifierService.Callback<android.view.textclassifier.TextClassification>); + method public void onConnected(); + method @MainThread public void onCreateTextClassificationSession(@NonNull android.view.textclassifier.TextClassificationContext, @NonNull android.view.textclassifier.TextClassificationSessionId); + method @MainThread public void onDestroyTextClassificationSession(@NonNull android.view.textclassifier.TextClassificationSessionId); + method @MainThread public void onDetectLanguage(@Nullable android.view.textclassifier.TextClassificationSessionId, @NonNull android.view.textclassifier.TextLanguage.Request, @NonNull android.os.CancellationSignal, @NonNull android.service.textclassifier.TextClassifierService.Callback<android.view.textclassifier.TextLanguage>); + method public void onDisconnected(); + method @MainThread public abstract void onGenerateLinks(@Nullable android.view.textclassifier.TextClassificationSessionId, @NonNull android.view.textclassifier.TextLinks.Request, @NonNull android.os.CancellationSignal, @NonNull android.service.textclassifier.TextClassifierService.Callback<android.view.textclassifier.TextLinks>); + method @Deprecated @MainThread public void onSelectionEvent(@Nullable android.view.textclassifier.TextClassificationSessionId, @NonNull android.view.textclassifier.SelectionEvent); + method @MainThread public void onSuggestConversationActions(@Nullable android.view.textclassifier.TextClassificationSessionId, @NonNull android.view.textclassifier.ConversationActions.Request, @NonNull android.os.CancellationSignal, @NonNull android.service.textclassifier.TextClassifierService.Callback<android.view.textclassifier.ConversationActions>); + method @MainThread public abstract void onSuggestSelection(@Nullable android.view.textclassifier.TextClassificationSessionId, @NonNull android.view.textclassifier.TextSelection.Request, @NonNull android.os.CancellationSignal, @NonNull android.service.textclassifier.TextClassifierService.Callback<android.view.textclassifier.TextSelection>); + method @MainThread public void onTextClassifierEvent(@Nullable android.view.textclassifier.TextClassificationSessionId, @NonNull android.view.textclassifier.TextClassifierEvent); + field public static final String SERVICE_INTERFACE = "android.service.textclassifier.TextClassifierService"; + } + + public static interface TextClassifierService.Callback<T> { + method public void onFailure(@NonNull CharSequence); + method public void onSuccess(T); + } + +} + +package android.service.trust { + + public class TrustAgentService extends android.app.Service { + ctor public TrustAgentService(); + method public final void addEscrowToken(byte[], android.os.UserHandle); + method @Deprecated public final void grantTrust(CharSequence, long, boolean); + method public final void grantTrust(CharSequence, long, int); + method public final void isEscrowTokenActive(long, android.os.UserHandle); + method public final android.os.IBinder onBind(android.content.Intent); + method public boolean onConfigure(java.util.List<android.os.PersistableBundle>); + method public void onDeviceLocked(); + method public void onDeviceUnlockLockout(long); + method public void onDeviceUnlocked(); + method public void onEscrowTokenAdded(byte[], long, android.os.UserHandle); + method public void onEscrowTokenRemoved(long, boolean); + method public void onEscrowTokenStateReceived(long, int); + method public void onTrustTimeout(); + method public void onUnlockAttempt(boolean); + method public final void removeEscrowToken(long, android.os.UserHandle); + method public final void revokeTrust(); + method public final void setManagingTrust(boolean); + method public final void showKeyguardErrorMessage(@NonNull CharSequence); + method public final void unlockUserWithToken(long, byte[], android.os.UserHandle); + field public static final int FLAG_GRANT_TRUST_DISMISS_KEYGUARD = 2; // 0x2 + field public static final int FLAG_GRANT_TRUST_INITIATED_BY_USER = 1; // 0x1 + field public static final String SERVICE_INTERFACE = "android.service.trust.TrustAgentService"; + field public static final int TOKEN_STATE_ACTIVE = 1; // 0x1 + field public static final int TOKEN_STATE_INACTIVE = 0; // 0x0 + field public static final String TRUST_AGENT_META_DATA = "android.service.trust.trustagent"; + } + +} + +package android.service.voice { + + public class AlwaysOnHotwordDetector { + method @Nullable public android.content.Intent createEnrollIntent(); + method @Nullable public android.content.Intent createReEnrollIntent(); + method @Nullable public android.content.Intent createUnEnrollIntent(); + method @RequiresPermission(allOf={android.Manifest.permission.RECORD_AUDIO, android.Manifest.permission.CAPTURE_AUDIO_HOTWORD}) public int getParameter(int); + method public int getSupportedAudioCapabilities(); + method public int getSupportedRecognitionModes(); + method @Nullable @RequiresPermission(allOf={android.Manifest.permission.RECORD_AUDIO, android.Manifest.permission.CAPTURE_AUDIO_HOTWORD}) public android.service.voice.AlwaysOnHotwordDetector.ModelParamRange queryParameter(int); + method @RequiresPermission(allOf={android.Manifest.permission.RECORD_AUDIO, android.Manifest.permission.CAPTURE_AUDIO_HOTWORD}) public int setParameter(int, int); + method @RequiresPermission(allOf={android.Manifest.permission.RECORD_AUDIO, android.Manifest.permission.CAPTURE_AUDIO_HOTWORD}) public boolean startRecognition(int); + method @RequiresPermission(allOf={android.Manifest.permission.RECORD_AUDIO, android.Manifest.permission.CAPTURE_AUDIO_HOTWORD}) public boolean stopRecognition(); + field public static final int AUDIO_CAPABILITY_ECHO_CANCELLATION = 1; // 0x1 + field public static final int AUDIO_CAPABILITY_NOISE_SUPPRESSION = 2; // 0x2 + field public static final int MODEL_PARAM_THRESHOLD_FACTOR = 0; // 0x0 + 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_FLAG_ENABLE_AUDIO_ECHO_CANCELLATION = 4; // 0x4 + field public static final int RECOGNITION_FLAG_ENABLE_AUDIO_NOISE_SUPPRESSION = 8; // 0x8 + 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 @Deprecated public static final int STATE_KEYPHRASE_UNSUPPORTED = -1; // 0xffffffff + } + + public abstract static class AlwaysOnHotwordDetector.Callback { + ctor public AlwaysOnHotwordDetector.Callback(); + method public abstract void onAvailabilityChanged(int); + method public abstract void onDetected(@NonNull 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 @Nullable public android.media.AudioFormat getCaptureAudioFormat(); + method @Nullable public byte[] getTriggerAudio(); + } + + public static final class AlwaysOnHotwordDetector.ModelParamRange { + method public int getEnd(); + method public int getStart(); + } + + public class VoiceInteractionService extends android.app.Service { + method @NonNull public final android.service.voice.AlwaysOnHotwordDetector createAlwaysOnHotwordDetector(String, java.util.Locale, android.service.voice.AlwaysOnHotwordDetector.Callback); + method @NonNull @RequiresPermission("android.permission.MANAGE_VOICE_KEYPHRASES") public final android.media.voice.KeyphraseModelManager createKeyphraseModelManager(); + } + +} + +package android.service.wallpaper { + + public class WallpaperService.Engine { + method public boolean isInAmbientMode(); + method public void onAmbientModeChanged(boolean, long); + } + +} + +package android.service.watchdog { + + public abstract class ExplicitHealthCheckService extends android.app.Service { + ctor public ExplicitHealthCheckService(); + method public final void notifyHealthCheckPassed(@NonNull String); + method @NonNull public final android.os.IBinder onBind(@NonNull android.content.Intent); + method public abstract void onCancelHealthCheck(@NonNull String); + method @NonNull public abstract java.util.List<java.lang.String> onGetRequestedPackages(); + method @NonNull public abstract java.util.List<android.service.watchdog.ExplicitHealthCheckService.PackageConfig> onGetSupportedPackages(); + method public abstract void onRequestHealthCheck(@NonNull String); + field public static final String BIND_PERMISSION = "android.permission.BIND_EXPLICIT_HEALTH_CHECK_SERVICE"; + field public static final String SERVICE_INTERFACE = "android.service.watchdog.ExplicitHealthCheckService"; + } + + public static final class ExplicitHealthCheckService.PackageConfig implements android.os.Parcelable { + ctor public ExplicitHealthCheckService.PackageConfig(@NonNull String, long); + method public int describeContents(); + method public long getHealthCheckTimeoutMillis(); + method @NonNull public String getPackageName(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.service.watchdog.ExplicitHealthCheckService.PackageConfig> CREATOR; + } + +} + +package android.telecom { + + @Deprecated public class AudioState implements android.os.Parcelable { + ctor @Deprecated public AudioState(boolean, int, int); + ctor @Deprecated public AudioState(android.telecom.AudioState); + ctor @Deprecated public AudioState(android.telecom.CallAudioState); + method @Deprecated public static String audioRouteToString(int); + method @Deprecated public int describeContents(); + method @Deprecated public int getRoute(); + method @Deprecated public int getSupportedRouteMask(); + method @Deprecated public boolean isMuted(); + method @Deprecated public void writeToParcel(android.os.Parcel, int); + field @Deprecated @NonNull public static final android.os.Parcelable.Creator<android.telecom.AudioState> CREATOR; + field @Deprecated public static final int ROUTE_BLUETOOTH = 2; // 0x2 + field @Deprecated public static final int ROUTE_EARPIECE = 1; // 0x1 + field @Deprecated public static final int ROUTE_SPEAKER = 8; // 0x8 + field @Deprecated public static final int ROUTE_WIRED_HEADSET = 4; // 0x4 + field @Deprecated public static final int ROUTE_WIRED_OR_EARPIECE = 5; // 0x5 + } + + public final class Call { + method @Deprecated public void addListener(android.telecom.Call.Listener); + method public void enterBackgroundAudioProcessing(); + method public void exitBackgroundAudioProcessing(boolean); + method @Deprecated public void removeListener(android.telecom.Call.Listener); + field @Deprecated public static final int STATE_PRE_DIAL_WAIT = 8; // 0x8 + } + + @Deprecated public abstract static class Call.Listener extends android.telecom.Call.Callback { + ctor @Deprecated public Call.Listener(); + } + + public static class CallScreeningService.CallResponse.Builder { + method @NonNull @RequiresPermission(android.Manifest.permission.CAPTURE_AUDIO_OUTPUT) public android.telecom.CallScreeningService.CallResponse.Builder setShouldScreenCallViaAudioProcessing(boolean); + } + + public abstract class Conference extends android.telecom.Conferenceable { + method @Deprecated public final android.telecom.AudioState getAudioState(); + method @Deprecated public final long getConnectTimeMillis(); + method public android.telecom.Connection getPrimaryConnection(); + method @NonNull public final String getTelecomCallId(); + method @Deprecated public void onAudioStateChanged(android.telecom.AudioState); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public final void setAddress(@NonNull android.net.Uri, int); + method public final void setCallerDisplayName(@NonNull String, int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setConferenceState(boolean); + method @Deprecated public final void setConnectTimeMillis(long); + } + + public abstract class Connection extends android.telecom.Conferenceable { + method @Deprecated public final android.telecom.AudioState getAudioState(); + method @IntRange(from=0) public final long getConnectTimeMillis(); + method public final long getConnectionStartElapsedRealtimeMillis(); + method @Nullable public android.telecom.PhoneAccountHandle getPhoneAccountHandle(); + method @Nullable public final String getTelecomCallId(); + method @Deprecated public void onAudioStateChanged(android.telecom.AudioState); + method public final void resetConnectionTime(); + method public void setCallDirection(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public final void setConnectTimeMillis(@IntRange(from=0) long); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public final void setConnectionStartElapsedRealtimeMillis(long); + method public void setPhoneAccountHandle(@NonNull android.telecom.PhoneAccountHandle); + method public void setTelecomCallId(@NonNull String); + field public static final int CAPABILITY_CONFERENCE_HAS_NO_CHILDREN = 2097152; // 0x200000 + field public static final int CAPABILITY_SPEED_UP_MT_AUDIO = 262144; // 0x40000 + field public static final String EXTRA_DISABLE_ADD_CALL = "android.telecom.extra.DISABLE_ADD_CALL"; + field public static final int PROPERTY_EMERGENCY_CALLBACK_MODE = 1; // 0x1 + field public static final int PROPERTY_GENERIC_CONFERENCE = 2; // 0x2 + field public static final int PROPERTY_IS_DOWNGRADED_CONFERENCE = 64; // 0x40 + field public static final int PROPERTY_REMOTELY_HOSTED = 2048; // 0x800 + } + + public final class ConnectionRequest implements android.os.Parcelable { + method @Nullable public String getTelecomCallId(); + } + + public abstract class ConnectionService extends android.app.Service { + method public final void addExistingConnection(@NonNull android.telecom.PhoneAccountHandle, @NonNull android.telecom.Connection, @NonNull android.telecom.Conference); + } + + public abstract class InCallService extends android.app.Service { + method @Deprecated public android.telecom.Phone getPhone(); + method @Deprecated public void onPhoneCreated(android.telecom.Phone); + method @Deprecated public void onPhoneDestroyed(android.telecom.Phone); + } + + public class ParcelableCallAnalytics implements android.os.Parcelable { + ctor public ParcelableCallAnalytics(long, long, int, boolean, boolean, int, int, boolean, String, boolean, java.util.List<android.telecom.ParcelableCallAnalytics.AnalyticsEvent>, java.util.List<android.telecom.ParcelableCallAnalytics.EventTiming>); + ctor public ParcelableCallAnalytics(android.os.Parcel); + method public java.util.List<android.telecom.ParcelableCallAnalytics.AnalyticsEvent> analyticsEvents(); + method public int describeContents(); + method public long getCallDurationMillis(); + method public int getCallTechnologies(); + method public int getCallTerminationCode(); + method public int getCallType(); + method public String getConnectionService(); + method public java.util.List<android.telecom.ParcelableCallAnalytics.EventTiming> getEventTimings(); + method public long getStartTimeMillis(); + method public boolean isAdditionalCall(); + method public boolean isCreatedFromExistingConnection(); + method public boolean isEmergencyCall(); + method public boolean isInterrupted(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CALLTYPE_INCOMING = 1; // 0x1 + field public static final int CALLTYPE_OUTGOING = 2; // 0x2 + field public static final int CALLTYPE_UNKNOWN = 0; // 0x0 + field public static final int CDMA_PHONE = 1; // 0x1 + field @NonNull public static final android.os.Parcelable.Creator<android.telecom.ParcelableCallAnalytics> CREATOR; + field public static final int GSM_PHONE = 2; // 0x2 + field public static final int IMS_PHONE = 4; // 0x4 + field public static final long MILLIS_IN_1_SECOND = 1000L; // 0x3e8L + field public static final long MILLIS_IN_5_MINUTES = 300000L; // 0x493e0L + field public static final int SIP_PHONE = 8; // 0x8 + field public static final int STILL_CONNECTED = -1; // 0xffffffff + field public static final int THIRD_PARTY_PHONE = 16; // 0x10 + } + + public static final class ParcelableCallAnalytics.AnalyticsEvent implements android.os.Parcelable { + ctor public ParcelableCallAnalytics.AnalyticsEvent(int, long); + method public int describeContents(); + method public int getEventName(); + method public long getTimeSinceLastEvent(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int AUDIO_ROUTE_BT = 204; // 0xcc + field public static final int AUDIO_ROUTE_EARPIECE = 205; // 0xcd + field public static final int AUDIO_ROUTE_HEADSET = 206; // 0xce + field public static final int AUDIO_ROUTE_SPEAKER = 207; // 0xcf + field public static final int BIND_CS = 5; // 0x5 + field public static final int BLOCK_CHECK_FINISHED = 105; // 0x69 + field public static final int BLOCK_CHECK_INITIATED = 104; // 0x68 + field public static final int CONFERENCE_WITH = 300; // 0x12c + field @NonNull public static final android.os.Parcelable.Creator<android.telecom.ParcelableCallAnalytics.AnalyticsEvent> CREATOR; + field public static final int CS_BOUND = 6; // 0x6 + field public static final int DIRECT_TO_VM_FINISHED = 103; // 0x67 + field public static final int DIRECT_TO_VM_INITIATED = 102; // 0x66 + field public static final int FILTERING_COMPLETED = 107; // 0x6b + field public static final int FILTERING_INITIATED = 106; // 0x6a + field public static final int FILTERING_TIMED_OUT = 108; // 0x6c + field public static final int MUTE = 202; // 0xca + field public static final int REMOTELY_HELD = 402; // 0x192 + field public static final int REMOTELY_UNHELD = 403; // 0x193 + field public static final int REQUEST_ACCEPT = 7; // 0x7 + field public static final int REQUEST_HOLD = 400; // 0x190 + field public static final int REQUEST_PULL = 500; // 0x1f4 + field public static final int REQUEST_REJECT = 8; // 0x8 + field public static final int REQUEST_UNHOLD = 401; // 0x191 + field public static final int SCREENING_COMPLETED = 101; // 0x65 + field public static final int SCREENING_SENT = 100; // 0x64 + field public static final int SET_ACTIVE = 1; // 0x1 + field public static final int SET_DIALING = 4; // 0x4 + field public static final int SET_DISCONNECTED = 2; // 0x2 + field public static final int SET_HOLD = 404; // 0x194 + field public static final int SET_PARENT = 302; // 0x12e + field public static final int SET_SELECT_PHONE_ACCOUNT = 0; // 0x0 + field public static final int SILENCE = 201; // 0xc9 + field public static final int SKIP_RINGING = 200; // 0xc8 + field public static final int SPLIT_CONFERENCE = 301; // 0x12d + field public static final int START_CONNECTION = 3; // 0x3 + field public static final int SWAP = 405; // 0x195 + field public static final int UNMUTE = 203; // 0xcb + } + + public static final class ParcelableCallAnalytics.EventTiming implements android.os.Parcelable { + ctor public ParcelableCallAnalytics.EventTiming(int, long); + method public int describeContents(); + method public int getName(); + method public long getTime(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int ACCEPT_TIMING = 0; // 0x0 + field public static final int BIND_CS_TIMING = 6; // 0x6 + field public static final int BLOCK_CHECK_FINISHED_TIMING = 9; // 0x9 + field @NonNull public static final android.os.Parcelable.Creator<android.telecom.ParcelableCallAnalytics.EventTiming> CREATOR; + field public static final int DIRECT_TO_VM_FINISHED_TIMING = 8; // 0x8 + field public static final int DISCONNECT_TIMING = 2; // 0x2 + field public static final int FILTERING_COMPLETED_TIMING = 10; // 0xa + field public static final int FILTERING_TIMED_OUT_TIMING = 11; // 0xb + field public static final int HOLD_TIMING = 3; // 0x3 + field public static final int INVALID = 999999; // 0xf423f + field public static final int OUTGOING_TIME_TO_DIALING_TIMING = 5; // 0x5 + field public static final int REJECT_TIMING = 1; // 0x1 + field public static final int SCREENING_COMPLETED_TIMING = 7; // 0x7 + field public static final int UNHOLD_TIMING = 4; // 0x4 + } + + @Deprecated public final class Phone { + method @Deprecated public void addListener(android.telecom.Phone.Listener); + method @Deprecated public boolean canAddCall(); + method @Deprecated public android.telecom.AudioState getAudioState(); + method @Deprecated public android.telecom.CallAudioState getCallAudioState(); + method @Deprecated public java.util.List<android.telecom.Call> getCalls(); + method @Deprecated public void removeListener(android.telecom.Phone.Listener); + method @Deprecated public void requestBluetoothAudio(String); + method @Deprecated public void setAudioRoute(int); + method @Deprecated public void setMuted(boolean); + } + + @Deprecated public abstract static class Phone.Listener { + ctor @Deprecated public Phone.Listener(); + method @Deprecated public void onAudioStateChanged(android.telecom.Phone, android.telecom.AudioState); + method @Deprecated public void onBringToForeground(android.telecom.Phone, boolean); + method @Deprecated public void onCallAdded(android.telecom.Phone, android.telecom.Call); + method @Deprecated public void onCallAudioStateChanged(android.telecom.Phone, android.telecom.CallAudioState); + method @Deprecated public void onCallRemoved(android.telecom.Phone, android.telecom.Call); + method @Deprecated public void onCanAddCallChanged(android.telecom.Phone, boolean); + method @Deprecated public void onSilenceRinger(android.telecom.Phone); + } + + public final class PhoneAccount implements android.os.Parcelable { + field public static final int CAPABILITY_EMERGENCY_CALLS_ONLY = 128; // 0x80 + field public static final int CAPABILITY_EMERGENCY_PREFERRED = 8192; // 0x2000 + field public static final int CAPABILITY_EMERGENCY_VIDEO_CALLING = 512; // 0x200 + field public static final int CAPABILITY_MULTI_USER = 32; // 0x20 + field public static final String EXTRA_PLAY_CALL_RECORDING_TONE = "android.telecom.extra.PLAY_CALL_RECORDING_TONE"; + field public static final String EXTRA_SORT_ORDER = "android.telecom.extra.SORT_ORDER"; + } + + public static class PhoneAccount.Builder { + method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public android.telecom.PhoneAccount.Builder setGroupId(@NonNull String); + } + + public class PhoneAccountSuggestionService extends android.app.Service { + ctor public PhoneAccountSuggestionService(); + method public void onAccountSuggestionRequest(@NonNull String); + method public android.os.IBinder onBind(android.content.Intent); + method public final void suggestPhoneAccounts(@NonNull String, @NonNull java.util.List<android.telecom.PhoneAccountSuggestion>); + field public static final String SERVICE_INTERFACE = "android.telecom.PhoneAccountSuggestionService"; + } + + public final class RemoteConference { + method @Deprecated public void setAudioState(android.telecom.AudioState); + } + + public final class RemoteConnection { + method @Deprecated public void setAudioState(android.telecom.AudioState); + } + + public final class StatusHints implements android.os.Parcelable { + ctor @Deprecated public StatusHints(android.content.ComponentName, CharSequence, int, android.os.Bundle); + method @Deprecated public android.graphics.drawable.Drawable getIcon(android.content.Context); + method @Deprecated public int getIconResId(); + method @Deprecated public android.content.ComponentName getPackageName(); + } + + public final class TelecomAnalytics implements android.os.Parcelable { + ctor public TelecomAnalytics(java.util.List<android.telecom.TelecomAnalytics.SessionTiming>, java.util.List<android.telecom.ParcelableCallAnalytics>); + method public int describeContents(); + method public java.util.List<android.telecom.ParcelableCallAnalytics> getCallAnalytics(); + method public java.util.List<android.telecom.TelecomAnalytics.SessionTiming> getSessionTimings(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telecom.TelecomAnalytics> CREATOR; + } + + public static final class TelecomAnalytics.SessionTiming implements android.os.Parcelable { + ctor public TelecomAnalytics.SessionTiming(int, long); + method public int describeContents(); + method public Integer getKey(); + method public long getTime(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telecom.TelecomAnalytics.SessionTiming> CREATOR; + field public static final int CSW_ADD_CONFERENCE_CALL = 108; // 0x6c + field public static final int CSW_HANDLE_CREATE_CONNECTION_COMPLETE = 100; // 0x64 + field public static final int CSW_REMOVE_CALL = 106; // 0x6a + field public static final int CSW_SET_ACTIVE = 101; // 0x65 + field public static final int CSW_SET_DIALING = 103; // 0x67 + field public static final int CSW_SET_DISCONNECTED = 104; // 0x68 + field public static final int CSW_SET_IS_CONFERENCED = 107; // 0x6b + field public static final int CSW_SET_ON_HOLD = 105; // 0x69 + field public static final int CSW_SET_RINGING = 102; // 0x66 + field public static final int ICA_ANSWER_CALL = 1; // 0x1 + field public static final int ICA_CONFERENCE = 8; // 0x8 + field public static final int ICA_DISCONNECT_CALL = 3; // 0x3 + field public static final int ICA_HOLD_CALL = 4; // 0x4 + field public static final int ICA_MUTE = 6; // 0x6 + field public static final int ICA_REJECT_CALL = 2; // 0x2 + field public static final int ICA_SET_AUDIO_ROUTE = 7; // 0x7 + field public static final int ICA_UNHOLD_CALL = 5; // 0x5 + } + + public class TelecomManager { + method public void addNewUnknownCall(android.telecom.PhoneAccountHandle, android.os.Bundle); + method @Deprecated public void clearAccounts(); + method public void clearPhoneAccounts(); + method @NonNull public android.content.Intent createLaunchEmergencyDialerIntent(@Nullable String); + method @RequiresPermission(android.Manifest.permission.DUMP) public android.telecom.TelecomAnalytics dumpAnalytics(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void enablePhoneAccount(android.telecom.PhoneAccountHandle, boolean); + method public java.util.List<android.telecom.PhoneAccountHandle> getAllPhoneAccountHandles(); + method public java.util.List<android.telecom.PhoneAccount> getAllPhoneAccounts(); + method public int getAllPhoneAccountsCount(); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.List<android.telecom.PhoneAccountHandle> getCallCapablePhoneAccounts(boolean); + method public int getCallState(); + method public android.telecom.PhoneAccountHandle getConnectionManager(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getCurrentTtyMode(); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getDefaultDialerPackage(@NonNull android.os.UserHandle); + method @Deprecated public android.content.ComponentName getDefaultPhoneApp(); + method @Deprecated public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsForPackage(); + method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsSupportingScheme(String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean isInEmergencyCall(); + method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRinging(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUserSelectedOutgoingPhoneAccount(@Nullable android.telecom.PhoneAccountHandle); + field public static final String ACTION_CURRENT_TTY_MODE_CHANGED = "android.telecom.action.CURRENT_TTY_MODE_CHANGED"; + field public static final String ACTION_TTY_PREFERRED_MODE_CHANGED = "android.telecom.action.TTY_PREFERRED_MODE_CHANGED"; + field public static final int CALL_SOURCE_EMERGENCY_DIALPAD = 1; // 0x1 + field public static final int CALL_SOURCE_EMERGENCY_SHORTCUT = 2; // 0x2 + field public static final int CALL_SOURCE_UNSPECIFIED = 0; // 0x0 + field public static final String EXTRA_CALL_BACK_INTENT = "android.telecom.extra.CALL_BACK_INTENT"; + field public static final String EXTRA_CALL_SOURCE = "android.telecom.extra.CALL_SOURCE"; + field public static final String EXTRA_CALL_TECHNOLOGY_TYPE = "android.telecom.extra.CALL_TECHNOLOGY_TYPE"; + field public static final String EXTRA_CLEAR_MISSED_CALLS_INTENT = "android.telecom.extra.CLEAR_MISSED_CALLS_INTENT"; + field public static final String EXTRA_CONNECTION_SERVICE = "android.telecom.extra.CONNECTION_SERVICE"; + field public static final String EXTRA_CURRENT_TTY_MODE = "android.telecom.extra.CURRENT_TTY_MODE"; + field public static final String EXTRA_IS_USER_INTENT_EMERGENCY_CALL = "android.telecom.extra.IS_USER_INTENT_EMERGENCY_CALL"; + field public static final String EXTRA_TTY_PREFERRED_MODE = "android.telecom.extra.TTY_PREFERRED_MODE"; + field public static final String EXTRA_UNKNOWN_CALL_HANDLE = "android.telecom.extra.UNKNOWN_CALL_HANDLE"; + field public static final int TTY_MODE_FULL = 1; // 0x1 + field public static final int TTY_MODE_HCO = 2; // 0x2 + field public static final int TTY_MODE_OFF = 0; // 0x0 + field public static final int TTY_MODE_VCO = 3; // 0x3 + } + +} + +package android.telephony { + + public final class AccessNetworkConstants { + field public static final int TRANSPORT_TYPE_INVALID = -1; // 0xffffffff + } + + public static final class AccessNetworkConstants.NgranBands { + method public static int getFrequencyRangeGroup(int); + field public static final int FREQUENCY_RANGE_GROUP_1 = 1; // 0x1 + field public static final int FREQUENCY_RANGE_GROUP_2 = 2; // 0x2 + field public static final int FREQUENCY_RANGE_GROUP_UNKNOWN = 0; // 0x0 + } + + public final class BarringInfo implements android.os.Parcelable { + ctor public BarringInfo(); + method @NonNull public android.telephony.BarringInfo createLocationInfoSanitizedCopy(); + } + + public final class CallAttributes implements android.os.Parcelable { + ctor public CallAttributes(@NonNull android.telephony.PreciseCallState, int, @NonNull android.telephony.CallQuality); + method public int describeContents(); + method @NonNull public android.telephony.CallQuality getCallQuality(); + method public int getNetworkType(); + method @NonNull public android.telephony.PreciseCallState getPreciseCallState(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CallAttributes> CREATOR; + } + + public final class CallForwardingInfo implements android.os.Parcelable { + ctor public CallForwardingInfo(boolean, int, @Nullable String, int); + method public int describeContents(); + method @Nullable public String getNumber(); + method public int getReason(); + method public int getTimeoutSeconds(); + method public boolean isEnabled(); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CallForwardingInfo> CREATOR; + field public static final int REASON_ALL = 4; // 0x4 + field public static final int REASON_ALL_CONDITIONAL = 5; // 0x5 + field public static final int REASON_BUSY = 1; // 0x1 + field public static final int REASON_NOT_REACHABLE = 3; // 0x3 + field public static final int REASON_NO_REPLY = 2; // 0x2 + field public static final int REASON_UNCONDITIONAL = 0; // 0x0 + } + + public final class CallQuality implements android.os.Parcelable { + ctor public CallQuality(int, int, int, int, int, int, int, int, int, int, int); + ctor public CallQuality(int, int, int, int, int, int, int, int, int, int, int, boolean, boolean, boolean); + method public int describeContents(); + method public int getAverageRelativeJitter(); + method public int getAverageRoundTripTime(); + method public int getCallDuration(); + method public int getCodecType(); + method public int getDownlinkCallQualityLevel(); + method public int getMaxRelativeJitter(); + method public int getNumRtpPacketsNotReceived(); + method public int getNumRtpPacketsReceived(); + method public int getNumRtpPacketsTransmitted(); + method public int getNumRtpPacketsTransmittedLost(); + method public int getUplinkCallQualityLevel(); + method public boolean isIncomingSilenceDetectedAtCallSetup(); + method public boolean isOutgoingSilenceDetectedAtCallSetup(); + method public boolean isRtpInactivityDetected(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CALL_QUALITY_BAD = 4; // 0x4 + field public static final int CALL_QUALITY_EXCELLENT = 0; // 0x0 + field public static final int CALL_QUALITY_FAIR = 2; // 0x2 + field public static final int CALL_QUALITY_GOOD = 1; // 0x1 + field public static final int CALL_QUALITY_NOT_AVAILABLE = 5; // 0x5 + field public static final int CALL_QUALITY_POOR = 3; // 0x3 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CallQuality> CREATOR; + } + + public class CarrierConfigManager { + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getDefaultCarrierServicePackageName(); + method @NonNull public static android.os.PersistableBundle getDefaultConfig(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void overrideConfig(int, @Nullable android.os.PersistableBundle); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void updateConfigForPhoneId(int, String); + field public static final String KEY_CARRIER_SETUP_APP_STRING = "carrier_setup_app_string"; + field public static final String KEY_SUPPORT_CDMA_1X_VOICE_CALLS_BOOL = "support_cdma_1x_voice_calls_bool"; + } + + public static final class CarrierConfigManager.Wifi { + field public static final String KEY_HOTSPOT_MAX_CLIENT_COUNT = "wifi.hotspot_maximum_client_count"; + field public static final String KEY_PREFIX = "wifi."; + } + + public final class CarrierRestrictionRules implements android.os.Parcelable { + method @NonNull public java.util.List<java.lang.Boolean> areCarrierIdentifiersAllowed(@NonNull java.util.List<android.service.carrier.CarrierIdentifier>); + method public int describeContents(); + method @NonNull public java.util.List<android.service.carrier.CarrierIdentifier> getAllowedCarriers(); + method public int getDefaultCarrierRestriction(); + method @NonNull public java.util.List<android.service.carrier.CarrierIdentifier> getExcludedCarriers(); + method public int getMultiSimPolicy(); + method public boolean isAllCarriersAllowed(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CARRIER_RESTRICTION_DEFAULT_ALLOWED = 1; // 0x1 + field public static final int CARRIER_RESTRICTION_DEFAULT_NOT_ALLOWED = 0; // 0x0 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CarrierRestrictionRules> CREATOR; + field public static final int MULTISIM_POLICY_NONE = 0; // 0x0 + field public static final int MULTISIM_POLICY_ONE_VALID_SIM_MUST_BE_PRESENT = 1; // 0x1 + } + + public static final class CarrierRestrictionRules.Builder { + ctor public CarrierRestrictionRules.Builder(); + method @NonNull public android.telephony.CarrierRestrictionRules build(); + method @NonNull public android.telephony.CarrierRestrictionRules.Builder setAllCarriersAllowed(); + method @NonNull public android.telephony.CarrierRestrictionRules.Builder setAllowedCarriers(@NonNull java.util.List<android.service.carrier.CarrierIdentifier>); + method @NonNull public android.telephony.CarrierRestrictionRules.Builder setDefaultCarrierRestriction(int); + method @NonNull public android.telephony.CarrierRestrictionRules.Builder setExcludedCarriers(@NonNull java.util.List<android.service.carrier.CarrierIdentifier>); + method @NonNull public android.telephony.CarrierRestrictionRules.Builder setMultiSimPolicy(int); + } + + public class CbGeoUtils { + } + + public static class CbGeoUtils.Circle implements android.telephony.CbGeoUtils.Geometry { + ctor public CbGeoUtils.Circle(@NonNull android.telephony.CbGeoUtils.LatLng, double); + method public boolean contains(@NonNull android.telephony.CbGeoUtils.LatLng); + method @NonNull public android.telephony.CbGeoUtils.LatLng getCenter(); + method public double getRadius(); + } + + public static interface CbGeoUtils.Geometry { + method public boolean contains(@NonNull android.telephony.CbGeoUtils.LatLng); + } + + public static class CbGeoUtils.LatLng { + ctor public CbGeoUtils.LatLng(double, double); + method public double distance(@NonNull android.telephony.CbGeoUtils.LatLng); + method @NonNull public android.telephony.CbGeoUtils.LatLng subtract(@NonNull android.telephony.CbGeoUtils.LatLng); + field public final double lat; + field public final double lng; + } + + public static class CbGeoUtils.Polygon implements android.telephony.CbGeoUtils.Geometry { + ctor public CbGeoUtils.Polygon(@NonNull java.util.List<android.telephony.CbGeoUtils.LatLng>); + method public boolean contains(@NonNull android.telephony.CbGeoUtils.LatLng); + method @NonNull public java.util.List<android.telephony.CbGeoUtils.LatLng> getVertices(); + } + + public class CellBroadcastIntents { + method public static void sendSmsCbReceivedBroadcast(@NonNull android.content.Context, @Nullable android.os.UserHandle, @NonNull android.telephony.SmsCbMessage, @Nullable android.content.BroadcastReceiver, @Nullable android.os.Handler, int, int); + field public static final String ACTION_AREA_INFO_UPDATED = "android.telephony.action.AREA_INFO_UPDATED"; + } + + public abstract class CellBroadcastService extends android.app.Service { + ctor public CellBroadcastService(); + method @NonNull @WorkerThread public abstract CharSequence getCellBroadcastAreaInfo(int); + method @CallSuper public android.os.IBinder onBind(@Nullable android.content.Intent); + method public abstract void onCdmaCellBroadcastSms(int, @NonNull byte[], int); + method public abstract void onCdmaScpMessage(int, @NonNull java.util.List<android.telephony.cdma.CdmaSmsCbProgramData>, @NonNull String, @NonNull java.util.function.Consumer<android.os.Bundle>); + method public abstract void onGsmCellBroadcastSms(int, @NonNull byte[]); + field public static final String CELL_BROADCAST_SERVICE_INTERFACE = "android.telephony.CellBroadcastService"; + } + + public abstract class CellIdentity implements android.os.Parcelable { + method @NonNull public abstract android.telephony.CellLocation asCellLocation(); + method @NonNull public abstract android.telephony.CellIdentity sanitizeLocationInfo(); + } + + public final class CellIdentityCdma extends android.telephony.CellIdentity { + method @NonNull public android.telephony.cdma.CdmaCellLocation asCellLocation(); + method @NonNull public android.telephony.CellIdentityCdma sanitizeLocationInfo(); + } + + public final class CellIdentityGsm extends android.telephony.CellIdentity { + method @NonNull public android.telephony.gsm.GsmCellLocation asCellLocation(); + method @NonNull public android.telephony.CellIdentityGsm sanitizeLocationInfo(); + } + + public final class CellIdentityLte extends android.telephony.CellIdentity { + method @NonNull public android.telephony.gsm.GsmCellLocation asCellLocation(); + method @NonNull public android.telephony.CellIdentityLte sanitizeLocationInfo(); + } + + public final class CellIdentityNr extends android.telephony.CellIdentity { + method @NonNull public android.telephony.CellLocation asCellLocation(); + method @NonNull public android.telephony.CellIdentityNr sanitizeLocationInfo(); + } + + public final class CellIdentityTdscdma extends android.telephony.CellIdentity { + method @NonNull public android.telephony.gsm.GsmCellLocation asCellLocation(); + method @NonNull public android.telephony.CellIdentityTdscdma sanitizeLocationInfo(); + } + + public final class CellIdentityWcdma extends android.telephony.CellIdentity { + method @NonNull public android.telephony.gsm.GsmCellLocation asCellLocation(); + method @NonNull public android.telephony.CellIdentityWcdma sanitizeLocationInfo(); + } + + public final class DataFailCause { + field @Deprecated public static final int VSNCP_APN_UNATHORIZED = 2238; // 0x8be + } + + public final class DataSpecificRegistrationInfo implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public android.telephony.LteVopsSupportInfo getLteVopsSupportInfo(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.DataSpecificRegistrationInfo> CREATOR; + } + + public final class ImsiEncryptionInfo implements android.os.Parcelable { + method public int describeContents(); + method @Nullable public String getKeyIdentifier(); + method @Nullable public java.security.PublicKey getPublicKey(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ImsiEncryptionInfo> CREATOR; + } + + public final class LteVopsSupportInfo implements android.os.Parcelable { + ctor public LteVopsSupportInfo(int, int); + method public int describeContents(); + method public int getEmcBearerSupport(); + method public int getVopsSupport(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.LteVopsSupportInfo> CREATOR; + field public static final int LTE_STATUS_NOT_AVAILABLE = 1; // 0x1 + field public static final int LTE_STATUS_NOT_SUPPORTED = 3; // 0x3 + field public static final int LTE_STATUS_SUPPORTED = 2; // 0x2 + } + + public class MbmsDownloadSession implements java.lang.AutoCloseable { + field public static final String MBMS_DOWNLOAD_SERVICE_ACTION = "android.telephony.action.EmbmsDownload"; + } + + public class MbmsGroupCallSession implements java.lang.AutoCloseable { + field public static final String MBMS_GROUP_CALL_SERVICE_ACTION = "android.telephony.action.EmbmsGroupCall"; + } + + public class MbmsStreamingSession implements java.lang.AutoCloseable { + field public static final String MBMS_STREAMING_SERVICE_ACTION = "android.telephony.action.EmbmsStreaming"; + } + + public final class ModemActivityInfo implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public android.telephony.ModemActivityInfo getDelta(@NonNull android.telephony.ModemActivityInfo); + method public long getIdleTimeMillis(); + method public static int getNumTxPowerLevels(); + method public long getReceiveTimeMillis(); + method public long getSleepTimeMillis(); + method public long getTimestampMillis(); + method public long getTransmitDurationMillisAtPowerLevel(int); + method @NonNull public android.util.Range<java.lang.Integer> getTransmitPowerRange(int); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ModemActivityInfo> CREATOR; + field public static final int TX_POWER_LEVEL_0 = 0; // 0x0 + field public static final int TX_POWER_LEVEL_1 = 1; // 0x1 + field public static final int TX_POWER_LEVEL_2 = 2; // 0x2 + field public static final int TX_POWER_LEVEL_3 = 3; // 0x3 + field public static final int TX_POWER_LEVEL_4 = 4; // 0x4 + } + + public final class NetworkRegistrationInfo implements android.os.Parcelable { + method @Nullable public android.telephony.DataSpecificRegistrationInfo getDataSpecificInfo(); + method public int getRegistrationState(); + method public int getRejectCause(); + method public int getRoamingType(); + method public boolean isEmergencyEnabled(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int REGISTRATION_STATE_DENIED = 3; // 0x3 + field public static final int REGISTRATION_STATE_HOME = 1; // 0x1 + field public static final int REGISTRATION_STATE_NOT_REGISTERED_OR_SEARCHING = 0; // 0x0 + field public static final int REGISTRATION_STATE_NOT_REGISTERED_SEARCHING = 2; // 0x2 + field public static final int REGISTRATION_STATE_ROAMING = 5; // 0x5 + field public static final int REGISTRATION_STATE_UNKNOWN = 4; // 0x4 + } + + public static final class NetworkRegistrationInfo.Builder { + ctor public NetworkRegistrationInfo.Builder(); + method @NonNull public android.telephony.NetworkRegistrationInfo build(); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setAccessNetworkTechnology(int); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setAvailableServices(@NonNull java.util.List<java.lang.Integer>); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setCellIdentity(@Nullable android.telephony.CellIdentity); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setDomain(int); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setEmergencyOnly(boolean); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setRegisteredPlmn(@Nullable String); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setRegistrationState(int); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setRejectCause(int); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setTransportType(int); + } + + public abstract class NetworkService extends android.app.Service { + ctor public NetworkService(); + method public android.os.IBinder onBind(android.content.Intent); + method @Nullable public abstract android.telephony.NetworkService.NetworkServiceProvider onCreateNetworkServiceProvider(int); + field public static final String SERVICE_INTERFACE = "android.telephony.NetworkService"; + } + + public abstract class NetworkService.NetworkServiceProvider implements java.lang.AutoCloseable { + ctor public NetworkService.NetworkServiceProvider(int); + method public abstract void close(); + method public final int getSlotIndex(); + method public final void notifyNetworkRegistrationInfoChanged(); + method public void requestNetworkRegistrationInfo(int, @NonNull android.telephony.NetworkServiceCallback); + } + + public class NetworkServiceCallback { + method public void onRequestNetworkRegistrationInfoComplete(int, @Nullable android.telephony.NetworkRegistrationInfo); + field public static final int RESULT_ERROR_BUSY = 3; // 0x3 + field public static final int RESULT_ERROR_FAILED = 5; // 0x5 + field public static final int RESULT_ERROR_ILLEGAL_STATE = 4; // 0x4 + field public static final int RESULT_ERROR_INVALID_ARG = 2; // 0x2 + field public static final int RESULT_ERROR_UNSUPPORTED = 1; // 0x1 + field public static final int RESULT_SUCCESS = 0; // 0x0 + } + + public interface NumberVerificationCallback { + method public default void onCallReceived(@NonNull String); + method public default void onVerificationFailed(int); + field public static final int REASON_CONCURRENT_REQUESTS = 4; // 0x4 + field public static final int REASON_IN_ECBM = 5; // 0x5 + field public static final int REASON_IN_EMERGENCY_CALL = 6; // 0x6 + field public static final int REASON_NETWORK_NOT_AVAILABLE = 2; // 0x2 + field public static final int REASON_TIMED_OUT = 1; // 0x1 + field public static final int REASON_TOO_MANY_CALLS = 3; // 0x3 + field public static final int REASON_UNSPECIFIED = 0; // 0x0 + } + + public final class PhoneNumberRange implements android.os.Parcelable { + ctor public PhoneNumberRange(@NonNull String, @NonNull String, @NonNull String, @NonNull String); + method public int describeContents(); + method public boolean matches(@NonNull String); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.PhoneNumberRange> CREATOR; + } + + public class PhoneNumberUtils { + method @NonNull public static String getUsernameFromUriNumber(@NonNull String); + method public static boolean isUriNumber(@Nullable String); + method public static boolean isVoiceMailNumber(@NonNull android.content.Context, int, @Nullable String); + } + + public class PhoneStateListener { + method public void onCallAttributesChanged(@NonNull android.telephony.CallAttributes); + method @Deprecated public void onOutgoingEmergencyCall(@NonNull android.telephony.emergency.EmergencyNumber); + method public void onOutgoingEmergencyCall(@NonNull android.telephony.emergency.EmergencyNumber, int); + method @Deprecated public void onOutgoingEmergencySms(@NonNull android.telephony.emergency.EmergencyNumber); + method public void onOutgoingEmergencySms(@NonNull android.telephony.emergency.EmergencyNumber, int); + method public void onPhysicalChannelConfigurationChanged(@NonNull java.util.List<android.telephony.PhysicalChannelConfig>); + method @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public void onPreciseCallStateChanged(@NonNull android.telephony.PreciseCallState); + method public void onRadioPowerStateChanged(int); + method public void onSrvccStateChanged(int); + method public void onVoiceActivationStateChanged(int); + field @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public static final int LISTEN_CALL_ATTRIBUTES_CHANGED = 67108864; // 0x4000000 + field @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public static final int LISTEN_OUTGOING_EMERGENCY_CALL = 268435456; // 0x10000000 + field @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public static final int LISTEN_OUTGOING_EMERGENCY_SMS = 536870912; // 0x20000000 + field @RequiresPermission(android.Manifest.permission.READ_PRECISE_PHONE_STATE) public static final long LISTEN_PHYSICAL_CHANNEL_CONFIGURATION = 4294967296L; // 0x100000000L + field @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public static final int LISTEN_PRECISE_CALL_STATE = 2048; // 0x800 + field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int LISTEN_RADIO_POWER_STATE_CHANGED = 8388608; // 0x800000 + field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int LISTEN_SRVCC_STATE_CHANGED = 16384; // 0x4000 + field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final int LISTEN_VOICE_ACTIVATION_STATE = 131072; // 0x20000 + } + + public final class PhysicalChannelConfig implements android.os.Parcelable { + method public int describeContents(); + method public int getCellBandwidthDownlink(); + method public int getChannelNumber(); + method public int getConnectionStatus(); + method public int getNetworkType(); + method @IntRange(from=0, to=1007) public int getPhysicalCellId(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field public static final int CHANNEL_NUMBER_UNKNOWN = -1; // 0xffffffff + field public static final int CONNECTION_PRIMARY_SERVING = 1; // 0x1 + field public static final int CONNECTION_SECONDARY_SERVING = 2; // 0x2 + field public static final int CONNECTION_UNKNOWN = -1; // 0xffffffff + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.PhysicalChannelConfig> CREATOR; + field public static final int PHYSICAL_CELL_ID_UNKNOWN = -1; // 0xffffffff + } + + public final class PreciseCallState implements android.os.Parcelable { + ctor public PreciseCallState(int, int, int, int, int); + method public int describeContents(); + method public int getBackgroundCallState(); + method public int getForegroundCallState(); + method public int getRingingCallState(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.PreciseCallState> CREATOR; + field public static final int PRECISE_CALL_STATE_ACTIVE = 1; // 0x1 + field public static final int PRECISE_CALL_STATE_ALERTING = 4; // 0x4 + field public static final int PRECISE_CALL_STATE_DIALING = 3; // 0x3 + field public static final int PRECISE_CALL_STATE_DISCONNECTED = 7; // 0x7 + field public static final int PRECISE_CALL_STATE_DISCONNECTING = 8; // 0x8 + field public static final int PRECISE_CALL_STATE_HOLDING = 2; // 0x2 + field public static final int PRECISE_CALL_STATE_IDLE = 0; // 0x0 + field public static final int PRECISE_CALL_STATE_INCOMING = 5; // 0x5 + field public static final int PRECISE_CALL_STATE_NOT_VALID = -1; // 0xffffffff + field public static final int PRECISE_CALL_STATE_WAITING = 6; // 0x6 + } + + public final class PreciseDataConnectionState implements android.os.Parcelable { + method @Deprecated @NonNull public String getDataConnectionApn(); + method @Deprecated public int getDataConnectionApnTypeBitMask(); + method @Deprecated public int getDataConnectionFailCause(); + method @Deprecated public int getDataConnectionState(); + method public int getId(); + } + + public final class PreciseDisconnectCause { + field public static final int ACCESS_CLASS_BLOCKED = 260; // 0x104 + field public static final int ACCESS_INFORMATION_DISCARDED = 43; // 0x2b + field public static final int ACM_LIMIT_EXCEEDED = 68; // 0x44 + field public static final int BEARER_CAPABILITY_NOT_AUTHORIZED = 57; // 0x39 + field public static final int BEARER_NOT_AVAIL = 58; // 0x3a + field public static final int BEARER_SERVICE_NOT_IMPLEMENTED = 65; // 0x41 + field public static final int BUSY = 17; // 0x11 + field public static final int CALL_BARRED = 240; // 0xf0 + field public static final int CALL_REJECTED = 21; // 0x15 + field public static final int CDMA_ACCESS_BLOCKED = 1009; // 0x3f1 + field public static final int CDMA_ACCESS_FAILURE = 1006; // 0x3ee + field public static final int CDMA_DROP = 1001; // 0x3e9 + field public static final int CDMA_INTERCEPT = 1002; // 0x3ea + field public static final int CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000; // 0x3e8 + field public static final int CDMA_NOT_EMERGENCY = 1008; // 0x3f0 + field public static final int CDMA_PREEMPTED = 1007; // 0x3ef + field public static final int CDMA_REORDER = 1003; // 0x3eb + field public static final int CDMA_RETRY_ORDER = 1005; // 0x3ed + field public static final int CDMA_SO_REJECT = 1004; // 0x3ec + field public static final int CHANNEL_NOT_AVAIL = 44; // 0x2c + field public static final int CHANNEL_UNACCEPTABLE = 6; // 0x6 + field public static final int CONDITIONAL_IE_ERROR = 100; // 0x64 + field public static final int DESTINATION_OUT_OF_ORDER = 27; // 0x1b + field public static final int ERROR_UNSPECIFIED = 65535; // 0xffff + field public static final int FACILITY_REJECTED = 29; // 0x1d + field public static final int FDN_BLOCKED = 241; // 0xf1 + field public static final int IMEI_NOT_ACCEPTED = 243; // 0xf3 + field public static final int IMSI_UNKNOWN_IN_VLR = 242; // 0xf2 + field public static final int INCOMING_CALLS_BARRED_WITHIN_CUG = 55; // 0x37 + field public static final int INCOMPATIBLE_DESTINATION = 88; // 0x58 + field public static final int INFORMATION_ELEMENT_NON_EXISTENT = 99; // 0x63 + field public static final int INTERWORKING_UNSPECIFIED = 127; // 0x7f + field public static final int INVALID_MANDATORY_INFORMATION = 96; // 0x60 + field public static final int INVALID_NUMBER_FORMAT = 28; // 0x1c + field public static final int INVALID_TRANSACTION_IDENTIFIER = 81; // 0x51 + field public static final int MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101; // 0x65 + field public static final int MESSAGE_TYPE_NON_IMPLEMENTED = 97; // 0x61 + field public static final int MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98; // 0x62 + field public static final int NETWORK_DETACH = 261; // 0x105 + field public static final int NETWORK_OUT_OF_ORDER = 38; // 0x26 + field public static final int NETWORK_REJECT = 252; // 0xfc + field public static final int NETWORK_RESP_TIMEOUT = 251; // 0xfb + field public static final int NORMAL = 16; // 0x10 + field public static final int NORMAL_UNSPECIFIED = 31; // 0x1f + field public static final int NOT_VALID = -1; // 0xffffffff + field public static final int NO_ANSWER_FROM_USER = 19; // 0x13 + field public static final int NO_CIRCUIT_AVAIL = 34; // 0x22 + field public static final int NO_DISCONNECT_CAUSE_AVAILABLE = 0; // 0x0 + field public static final int NO_ROUTE_TO_DESTINATION = 3; // 0x3 + field public static final int NO_USER_RESPONDING = 18; // 0x12 + field public static final int NO_VALID_SIM = 249; // 0xf9 + field public static final int NUMBER_CHANGED = 22; // 0x16 + field public static final int OEM_CAUSE_1 = 61441; // 0xf001 + field public static final int OEM_CAUSE_10 = 61450; // 0xf00a + field public static final int OEM_CAUSE_11 = 61451; // 0xf00b + field public static final int OEM_CAUSE_12 = 61452; // 0xf00c + field public static final int OEM_CAUSE_13 = 61453; // 0xf00d + field public static final int OEM_CAUSE_14 = 61454; // 0xf00e + field public static final int OEM_CAUSE_15 = 61455; // 0xf00f + field public static final int OEM_CAUSE_2 = 61442; // 0xf002 + field public static final int OEM_CAUSE_3 = 61443; // 0xf003 + field public static final int OEM_CAUSE_4 = 61444; // 0xf004 + field public static final int OEM_CAUSE_5 = 61445; // 0xf005 + field public static final int OEM_CAUSE_6 = 61446; // 0xf006 + field public static final int OEM_CAUSE_7 = 61447; // 0xf007 + field public static final int OEM_CAUSE_8 = 61448; // 0xf008 + field public static final int OEM_CAUSE_9 = 61449; // 0xf009 + field public static final int ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70; // 0x46 + field public static final int OPERATOR_DETERMINED_BARRING = 8; // 0x8 + field public static final int OUT_OF_SRV = 248; // 0xf8 + field public static final int PREEMPTION = 25; // 0x19 + field public static final int PROTOCOL_ERROR_UNSPECIFIED = 111; // 0x6f + field public static final int QOS_NOT_AVAIL = 49; // 0x31 + field public static final int RADIO_ACCESS_FAILURE = 253; // 0xfd + field public static final int RADIO_INTERNAL_ERROR = 250; // 0xfa + field public static final int RADIO_LINK_FAILURE = 254; // 0xfe + field public static final int RADIO_LINK_LOST = 255; // 0xff + field public static final int RADIO_OFF = 247; // 0xf7 + field public static final int RADIO_RELEASE_ABNORMAL = 259; // 0x103 + field public static final int RADIO_RELEASE_NORMAL = 258; // 0x102 + field public static final int RADIO_SETUP_FAILURE = 257; // 0x101 + field public static final int RADIO_UPLINK_FAILURE = 256; // 0x100 + field public static final int RECOVERY_ON_TIMER_EXPIRED = 102; // 0x66 + field public static final int REQUESTED_FACILITY_NOT_IMPLEMENTED = 69; // 0x45 + field public static final int REQUESTED_FACILITY_NOT_SUBSCRIBED = 50; // 0x32 + field public static final int RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47; // 0x2f + field public static final int SEMANTICALLY_INCORRECT_MESSAGE = 95; // 0x5f + field public static final int SERVICE_OPTION_NOT_AVAILABLE = 63; // 0x3f + field public static final int SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79; // 0x4f + field public static final int STATUS_ENQUIRY = 30; // 0x1e + field public static final int SWITCHING_CONGESTION = 42; // 0x2a + field public static final int TEMPORARY_FAILURE = 41; // 0x29 + field public static final int UNOBTAINABLE_NUMBER = 1; // 0x1 + field public static final int USER_NOT_MEMBER_OF_CUG = 87; // 0x57 + } + + public class ServiceState implements android.os.Parcelable { + method @Nullable public android.telephony.NetworkRegistrationInfo getNetworkRegistrationInfo(int, int); + method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoListForDomain(int); + method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoListForTransportType(int); + field public static final int ROAMING_TYPE_DOMESTIC = 2; // 0x2 + field public static final int ROAMING_TYPE_INTERNATIONAL = 3; // 0x3 + field public static final int ROAMING_TYPE_NOT_ROAMING = 0; // 0x0 + field public static final int ROAMING_TYPE_UNKNOWN = 1; // 0x1 + } + + public final class SmsCbCmasInfo implements android.os.Parcelable { + ctor public SmsCbCmasInfo(int, int, int, int, int, int); + method public int describeContents(); + method public int getCategory(); + method public int getCertainty(); + method public int getMessageClass(); + method public int getResponseType(); + method public int getSeverity(); + method public int getUrgency(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CMAS_CATEGORY_CBRNE = 10; // 0xa + field public static final int CMAS_CATEGORY_ENV = 7; // 0x7 + field public static final int CMAS_CATEGORY_FIRE = 5; // 0x5 + field public static final int CMAS_CATEGORY_GEO = 0; // 0x0 + field public static final int CMAS_CATEGORY_HEALTH = 6; // 0x6 + field public static final int CMAS_CATEGORY_INFRA = 9; // 0x9 + field public static final int CMAS_CATEGORY_MET = 1; // 0x1 + field public static final int CMAS_CATEGORY_OTHER = 11; // 0xb + field public static final int CMAS_CATEGORY_RESCUE = 4; // 0x4 + field public static final int CMAS_CATEGORY_SAFETY = 2; // 0x2 + field public static final int CMAS_CATEGORY_SECURITY = 3; // 0x3 + field public static final int CMAS_CATEGORY_TRANSPORT = 8; // 0x8 + field public static final int CMAS_CATEGORY_UNKNOWN = -1; // 0xffffffff + field public static final int CMAS_CERTAINTY_LIKELY = 1; // 0x1 + field public static final int CMAS_CERTAINTY_OBSERVED = 0; // 0x0 + field public static final int CMAS_CERTAINTY_UNKNOWN = -1; // 0xffffffff + field public static final int CMAS_CLASS_CHILD_ABDUCTION_EMERGENCY = 3; // 0x3 + field public static final int CMAS_CLASS_CMAS_EXERCISE = 5; // 0x5 + field public static final int CMAS_CLASS_EXTREME_THREAT = 1; // 0x1 + field public static final int CMAS_CLASS_OPERATOR_DEFINED_USE = 6; // 0x6 + field public static final int CMAS_CLASS_PRESIDENTIAL_LEVEL_ALERT = 0; // 0x0 + field public static final int CMAS_CLASS_REQUIRED_MONTHLY_TEST = 4; // 0x4 + field public static final int CMAS_CLASS_SEVERE_THREAT = 2; // 0x2 + field public static final int CMAS_CLASS_UNKNOWN = -1; // 0xffffffff + field public static final int CMAS_RESPONSE_TYPE_ASSESS = 6; // 0x6 + field public static final int CMAS_RESPONSE_TYPE_AVOID = 5; // 0x5 + field public static final int CMAS_RESPONSE_TYPE_EVACUATE = 1; // 0x1 + field public static final int CMAS_RESPONSE_TYPE_EXECUTE = 3; // 0x3 + field public static final int CMAS_RESPONSE_TYPE_MONITOR = 4; // 0x4 + field public static final int CMAS_RESPONSE_TYPE_NONE = 7; // 0x7 + field public static final int CMAS_RESPONSE_TYPE_PREPARE = 2; // 0x2 + field public static final int CMAS_RESPONSE_TYPE_SHELTER = 0; // 0x0 + field public static final int CMAS_RESPONSE_TYPE_UNKNOWN = -1; // 0xffffffff + field public static final int CMAS_SEVERITY_EXTREME = 0; // 0x0 + field public static final int CMAS_SEVERITY_SEVERE = 1; // 0x1 + field public static final int CMAS_SEVERITY_UNKNOWN = -1; // 0xffffffff + field public static final int CMAS_URGENCY_EXPECTED = 1; // 0x1 + field public static final int CMAS_URGENCY_IMMEDIATE = 0; // 0x0 + field public static final int CMAS_URGENCY_UNKNOWN = -1; // 0xffffffff + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.SmsCbCmasInfo> CREATOR; + } + + public final class SmsCbEtwsInfo implements android.os.Parcelable { + ctor public SmsCbEtwsInfo(int, boolean, boolean, boolean, @Nullable byte[]); + method public int describeContents(); + method @Nullable public byte[] getPrimaryNotificationSignature(); + method public long getPrimaryNotificationTimestamp(); + method public int getWarningType(); + method public boolean isEmergencyUserAlert(); + method public boolean isPopupAlert(); + method public boolean isPrimary(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.SmsCbEtwsInfo> CREATOR; + field public static final int ETWS_WARNING_TYPE_EARTHQUAKE = 0; // 0x0 + field public static final int ETWS_WARNING_TYPE_EARTHQUAKE_AND_TSUNAMI = 2; // 0x2 + field public static final int ETWS_WARNING_TYPE_OTHER_EMERGENCY = 4; // 0x4 + field public static final int ETWS_WARNING_TYPE_TEST_MESSAGE = 3; // 0x3 + field public static final int ETWS_WARNING_TYPE_TSUNAMI = 1; // 0x1 + field public static final int ETWS_WARNING_TYPE_UNKNOWN = -1; // 0xffffffff + } + + public final class SmsCbLocation implements android.os.Parcelable { + ctor public SmsCbLocation(@NonNull String, int, int); + method public int describeContents(); + method public int getCid(); + method public int getLac(); + method @NonNull public String getPlmn(); + method public boolean isInLocationArea(@NonNull android.telephony.SmsCbLocation); + method public boolean isInLocationArea(@Nullable String, int, int); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.SmsCbLocation> CREATOR; + } + + public final class SmsCbMessage implements android.os.Parcelable { + ctor public SmsCbMessage(int, int, int, @NonNull android.telephony.SmsCbLocation, int, @Nullable String, int, @Nullable String, int, @Nullable android.telephony.SmsCbEtwsInfo, @Nullable android.telephony.SmsCbCmasInfo, int, @Nullable java.util.List<android.telephony.CbGeoUtils.Geometry>, long, int, int); + method @NonNull public static android.telephony.SmsCbMessage createFromCursor(@NonNull android.database.Cursor); + method public int describeContents(); + method @Nullable public android.telephony.SmsCbCmasInfo getCmasWarningInfo(); + method @NonNull public android.content.ContentValues getContentValues(); + method public int getDataCodingScheme(); + method @Nullable public android.telephony.SmsCbEtwsInfo getEtwsWarningInfo(); + method public int getGeographicalScope(); + method @NonNull public java.util.List<android.telephony.CbGeoUtils.Geometry> getGeometries(); + method @Nullable public String getLanguageCode(); + method @NonNull public android.telephony.SmsCbLocation getLocation(); + method public int getMaximumWaitingDuration(); + method @Nullable public String getMessageBody(); + method public int getMessageFormat(); + method public int getMessagePriority(); + method public long getReceivedTime(); + method public int getSerialNumber(); + method public int getServiceCategory(); + method public int getSlotIndex(); + method public int getSubscriptionId(); + method public boolean isCmasMessage(); + method public boolean isEmergencyMessage(); + method public boolean isEtwsMessage(); + method public boolean needGeoFencingCheck(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.SmsCbMessage> CREATOR; + field public static final int GEOGRAPHICAL_SCOPE_CELL_WIDE = 3; // 0x3 + field public static final int GEOGRAPHICAL_SCOPE_CELL_WIDE_IMMEDIATE = 0; // 0x0 + field public static final int GEOGRAPHICAL_SCOPE_LOCATION_AREA_WIDE = 2; // 0x2 + field public static final int GEOGRAPHICAL_SCOPE_PLMN_WIDE = 1; // 0x1 + field public static final int MAXIMUM_WAIT_TIME_NOT_SET = 255; // 0xff + field public static final int MESSAGE_FORMAT_3GPP = 1; // 0x1 + field public static final int MESSAGE_FORMAT_3GPP2 = 2; // 0x2 + field public static final int MESSAGE_PRIORITY_EMERGENCY = 3; // 0x3 + field public static final int MESSAGE_PRIORITY_INTERACTIVE = 1; // 0x1 + field public static final int MESSAGE_PRIORITY_NORMAL = 0; // 0x0 + field public static final int MESSAGE_PRIORITY_URGENT = 2; // 0x2 + } + + public final class SmsManager { + method public boolean disableCellBroadcastRange(int, int, int); + method public boolean enableCellBroadcastRange(int, int, int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getPremiumSmsConsent(@NonNull String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void sendMultipartTextMessageWithoutPersisting(String, String, java.util.List<java.lang.String>, java.util.List<android.app.PendingIntent>, java.util.List<android.app.PendingIntent>); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setPremiumSmsConsent(@NonNull String, int); + field public static final int PREMIUM_SMS_CONSENT_ALWAYS_ALLOW = 3; // 0x3 + field public static final int PREMIUM_SMS_CONSENT_ASK_USER = 1; // 0x1 + field public static final int PREMIUM_SMS_CONSENT_NEVER_ALLOW = 2; // 0x2 + field public static final int PREMIUM_SMS_CONSENT_UNKNOWN = 0; // 0x0 + } + + public class SmsMessage { + method @Nullable public static android.telephony.SmsMessage createFromNativeSmsSubmitPdu(@NonNull byte[], boolean); + method @Nullable public static android.telephony.SmsMessage.SubmitPdu getSmsPdu(int, int, @Nullable String, @NonNull String, @NonNull String, long); + method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public static byte[] getSubmitPduEncodedMessage(boolean, @NonNull String, @NonNull String, int, @IntRange(from=0) int, @IntRange(from=0) int, @IntRange(from=0, to=255) int, @IntRange(from=1, to=255) int, @IntRange(from=1, to=255) int); + } + + public class SubscriptionInfo implements android.os.Parcelable { + method public boolean areUiccApplicationsEnabled(); + method @Nullable public java.util.List<android.telephony.UiccAccessRule> getAccessRules(); + method public int getProfileClass(); + method public boolean isGroupDisabled(); + } + + public class SubscriptionManager { + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean canDisablePhysicalSubscription(); + method public boolean canManageSubscription(@NonNull android.telephony.SubscriptionInfo, @NonNull String); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int[] getActiveSubscriptionIdList(); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.SubscriptionInfo getActiveSubscriptionInfoForIcc(@NonNull String); + method public java.util.List<android.telephony.SubscriptionInfo> getAvailableSubscriptionInfoList(); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int[] getCompleteActiveSubscriptionIdList(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getEnabledSubscriptionId(int); + method @NonNull public static android.content.res.Resources getResourcesForSubId(@NonNull android.content.Context, int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isSubscriptionEnabled(int); + method public void requestEmbeddedSubscriptionInfoListRefresh(); + method public void requestEmbeddedSubscriptionInfoListRefresh(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDefaultDataSubId(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDefaultSmsSubId(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDefaultVoiceSubscriptionId(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setPreferredDataSubscriptionId(int, boolean, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setSubscriptionEnabled(int, boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUiccApplicationsEnabled(int, boolean); + field @RequiresPermission(android.Manifest.permission.MANAGE_SUBSCRIPTION_PLANS) public static final String ACTION_SUBSCRIPTION_PLANS_CHANGED = "android.telephony.action.SUBSCRIPTION_PLANS_CHANGED"; + field @NonNull public static final android.net.Uri ADVANCED_CALLING_ENABLED_CONTENT_URI; + field @Deprecated public static final int PROFILE_CLASS_DEFAULT = -1; // 0xffffffff + field public static final int PROFILE_CLASS_OPERATIONAL = 2; // 0x2 + field public static final int PROFILE_CLASS_PROVISIONING = 1; // 0x1 + field public static final int PROFILE_CLASS_TESTING = 0; // 0x0 + field public static final int PROFILE_CLASS_UNSET = -1; // 0xffffffff + field @NonNull public static final android.net.Uri VT_ENABLED_CONTENT_URI; + field @NonNull public static final android.net.Uri WFC_ENABLED_CONTENT_URI; + field @NonNull public static final android.net.Uri WFC_MODE_CONTENT_URI; + field @NonNull public static final android.net.Uri WFC_ROAMING_ENABLED_CONTENT_URI; + field @NonNull public static final android.net.Uri WFC_ROAMING_MODE_CONTENT_URI; + } + + public static class SubscriptionPlan.Builder { + method @Deprecated public static android.telephony.SubscriptionPlan.Builder createRecurringDaily(java.time.ZonedDateTime); + method @Deprecated public static android.telephony.SubscriptionPlan.Builder createRecurringMonthly(java.time.ZonedDateTime); + method @Deprecated public static android.telephony.SubscriptionPlan.Builder createRecurringWeekly(java.time.ZonedDateTime); + } + + public final class TelephonyHistogram implements android.os.Parcelable { + ctor public TelephonyHistogram(int, int, int); + ctor public TelephonyHistogram(android.telephony.TelephonyHistogram); + ctor public TelephonyHistogram(android.os.Parcel); + method public void addTimeTaken(int); + method public int describeContents(); + method public int getAverageTime(); + method public int getBucketCount(); + method public int[] getBucketCounters(); + method public int[] getBucketEndPoints(); + method public int getCategory(); + method public int getId(); + method public int getMaxTime(); + method public int getMinTime(); + method public int getSampleCount(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.TelephonyHistogram> CREATOR; + field public static final int TELEPHONY_CATEGORY_RIL = 1; // 0x1 + } + + public class TelephonyManager { + method @Deprecated @RequiresPermission(android.Manifest.permission.CALL_PHONE) public void call(String, String); + method public int checkCarrierPrivilegesForPackage(String); + method public int checkCarrierPrivilegesForPackageAnyPhone(String); + method public void dial(String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean disableDataConnectivity(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean enableDataConnectivity(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean enableModemForSlot(int, boolean); + method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void enableVideoCalling(boolean); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getAidForAppType(int); + method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.List<android.service.carrier.CarrierIdentifier> getAllowedCarriers(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public long getAllowedNetworkTypes(); + method @Nullable @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public android.content.ComponentName getAndUpdateDefaultRespondViaMessageApplication(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void getCallForwarding(int, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.TelephonyManager.CallForwardingInfoCallback); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void getCallWaitingStatus(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.ImsiEncryptionInfo getCarrierInfoForImsiEncryption(int); + method public java.util.List<java.lang.String> getCarrierPackageNamesForIntent(android.content.Intent); + method public java.util.List<java.lang.String> getCarrierPackageNamesForIntentAndPhone(android.content.Intent, int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getCarrierPrivilegeStatus(int); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.List<java.lang.String> getCarrierPrivilegedPackagesForAllActiveSubscriptions(); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.CarrierRestrictionRules getCarrierRestrictionRules(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getCdmaEnhancedRoamingIndicatorDisplayNumber(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String getCdmaMdn(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String getCdmaMdn(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String getCdmaMin(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String getCdmaMin(int); + method public String getCdmaPrlVersion(); + method public int getCurrentPhoneType(); + method public int getCurrentPhoneType(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getDataActivationState(); + method @Deprecated public boolean getDataEnabled(); + method @Deprecated public boolean getDataEnabled(int); + method @Nullable @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public android.content.ComponentName getDefaultRespondViaMessageApplication(); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getDeviceSoftwareVersion(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean getEmergencyCallbackMode(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getEmergencyNumberDbVersion(); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimDomain(); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimIst(); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.Map<java.lang.Integer,java.lang.Integer> getLogicalToPhysicalSlotMapping(); + method public int getMaxNumberOfSimultaneouslyActiveSims(); + method public static long getMaxNumberVerificationTimeoutMillis(); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String[] getMergedImsisFromGroup(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public long getPreferredNetworkTypeBitmask(); + method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public int getRadioPowerState(); + method public int getSimApplicationState(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getSimApplicationState(int); + method public int getSimCardState(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getSimCardState(int); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.Locale getSimLocale(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public long getSupportedRadioAccessFamily(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public java.util.List<android.telephony.TelephonyHistogram> getTelephonyHistograms(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.UiccSlotInfo[] getUiccSlotsInfo(); + method @Nullable public android.os.Bundle getVisualVoicemailSettings(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getVoiceActivationState(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handlePinMmi(String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handlePinMmiForSubscriber(int, String); + method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean iccCloseLogicalChannelBySlot(int, int); + method @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannelBySlot(int, @Nullable String, int); + method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String iccTransmitApduBasicChannelBySlot(int, int, int, int, int, int, @Nullable String); + method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String iccTransmitApduLogicalChannelBySlot(int, int, int, int, int, int, int, @Nullable String); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isAnyRadioPoweredOn(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isApnMetered(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isApplicationOnUicc(int); + method public boolean isDataConnectivityPossible(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataEnabledForApn(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isEmergencyAssistanceEnabled(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public boolean isIccLockEnabled(); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isIdle(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isLteCdmaEvdoGsmWcdmaEnabled(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isMobileDataPolicyEnabled(int); + method public boolean isNrDualConnectivityEnabled(); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isOffhook(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isOpportunisticNetworkEnabled(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isPotentialEmergencyNumber(@NonNull String); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRadioOn(); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRinging(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean isTetheringApnRequired(); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isVideoCallingEnabled(); + method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isVisualVoicemailEnabled(android.telecom.PhoneAccountHandle); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean matchesCurrentSimOperator(@NonNull String, int, @Nullable String); + method public boolean needsOtaServiceProvisioning(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void notifyOtaEmergencyNumberDbInstalled(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean rebootRadio(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void reportDefaultNetworkStatus(boolean); + method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.MODIFY_PHONE_STATE}) public void requestCellInfoUpdate(@NonNull android.os.WorkSource, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.TelephonyManager.CellInfoCallback); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void requestModemActivityInfo(@NonNull java.util.concurrent.Executor, @NonNull android.os.OutcomeReceiver<android.telephony.ModemActivityInfo,android.telephony.TelephonyManager.ModemActivityInfoException>); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void requestNumberVerification(@NonNull android.telephony.PhoneNumberRange, long, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.NumberVerificationCallback); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void resetAllCarrierActions(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void resetCarrierKeysForImsiEncryption(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void resetIms(int); + method @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public void resetOtaEmergencyNumberDbFilePath(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean resetRadioConfig(); + method @RequiresPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL) public void resetSettings(); + method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setAllowedCarriers(int, java.util.List<android.service.carrier.CarrierIdentifier>); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setAllowedNetworkTypes(long); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCallForwarding(@NonNull android.telephony.CallForwardingInfo, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCallWaitingEnabled(boolean, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>); + method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCarrierDataEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setCarrierRestrictionRules(@NonNull android.telephony.CarrierRestrictionRules); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataActivationState(int); + method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataEnabled(int, boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataRoamingEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setMobileDataPolicyEnabledStatus(int, boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setMultiSimCarrierRestriction(boolean); + method public int setNrDualConnectivityState(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setOpportunisticNetworkState(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setPreferredNetworkTypeBitmask(long); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setRadio(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setRadioEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setRadioPower(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSimPowerState(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSimPowerStateForSlot(int, int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSystemSelectionChannels(@NonNull java.util.List<android.telephony.RadioAccessSpecifier>, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSystemSelectionChannels(@NonNull java.util.List<android.telephony.RadioAccessSpecifier>); + method @Deprecated public void setVisualVoicemailEnabled(android.telecom.PhoneAccountHandle, boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoiceActivationState(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void shutdownAllRadios(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean supplyPin(String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int[] supplyPinReportResult(String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean supplyPuk(String, String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int[] supplyPukReportResult(String, String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean switchSlots(int[]); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void toggleRadioOnOff(); + method @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public void updateOtaEmergencyNumberDbFilePath(@NonNull android.os.ParcelFileDescriptor); + method public void updateServiceLocation(); + field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final String ACTION_ANOMALY_REPORTED = "android.telephony.action.ANOMALY_REPORTED"; + field public static final String ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED = "android.intent.action.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED"; + field public static final String ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED = "android.intent.action.ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED"; + field public static final String ACTION_EMERGENCY_ASSISTANCE = "android.telephony.action.EMERGENCY_ASSISTANCE"; + field public static final String ACTION_EMERGENCY_CALLBACK_MODE_CHANGED = "android.intent.action.EMERGENCY_CALLBACK_MODE_CHANGED"; + field public static final String ACTION_EMERGENCY_CALL_STATE_CHANGED = "android.intent.action.EMERGENCY_CALL_STATE_CHANGED"; + field public static final String ACTION_REQUEST_OMADM_CONFIGURATION_UPDATE = "com.android.omadm.service.CONFIGURATION_UPDATE"; + field public static final String ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS = "android.telephony.action.SHOW_NOTICE_ECM_BLOCK_OTHERS"; + field public static final String ACTION_SIM_APPLICATION_STATE_CHANGED = "android.telephony.action.SIM_APPLICATION_STATE_CHANGED"; + field public static final String ACTION_SIM_CARD_STATE_CHANGED = "android.telephony.action.SIM_CARD_STATE_CHANGED"; + field public static final String ACTION_SIM_SLOT_STATUS_CHANGED = "android.telephony.action.SIM_SLOT_STATUS_CHANGED"; + field public static final int CALL_WAITING_STATUS_DISABLED = 2; // 0x2 + field public static final int CALL_WAITING_STATUS_ENABLED = 1; // 0x1 + field public static final int CALL_WAITING_STATUS_NOT_SUPPORTED = 4; // 0x4 + field public static final int CALL_WAITING_STATUS_UNKNOWN_ERROR = 3; // 0x3 + field public static final int CARRIER_PRIVILEGE_STATUS_ERROR_LOADING_RULES = -2; // 0xfffffffe + field public static final int CARRIER_PRIVILEGE_STATUS_HAS_ACCESS = 1; // 0x1 + field public static final int CARRIER_PRIVILEGE_STATUS_NO_ACCESS = 0; // 0x0 + field public static final int CARRIER_PRIVILEGE_STATUS_RULES_NOT_LOADED = -1; // 0xffffffff + field public static final int ENABLE_NR_DUAL_CONNECTIVITY_INVALID_STATE = 4; // 0x4 + field public static final int ENABLE_NR_DUAL_CONNECTIVITY_NOT_SUPPORTED = 1; // 0x1 + field public static final int ENABLE_NR_DUAL_CONNECTIVITY_RADIO_ERROR = 3; // 0x3 + field public static final int ENABLE_NR_DUAL_CONNECTIVITY_RADIO_NOT_AVAILABLE = 2; // 0x2 + field public static final int ENABLE_NR_DUAL_CONNECTIVITY_SUCCESS = 0; // 0x0 + field public static final String EXTRA_ANOMALY_DESCRIPTION = "android.telephony.extra.ANOMALY_DESCRIPTION"; + field public static final String EXTRA_ANOMALY_ID = "android.telephony.extra.ANOMALY_ID"; + field public static final String EXTRA_PHONE_IN_ECM_STATE = "android.telephony.extra.PHONE_IN_ECM_STATE"; + field public static final String EXTRA_PHONE_IN_EMERGENCY_CALL = "android.telephony.extra.PHONE_IN_EMERGENCY_CALL"; + field public static final String EXTRA_SIM_STATE = "android.telephony.extra.SIM_STATE"; + field public static final String EXTRA_VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL = "android.telephony.extra.VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL"; + field public static final String EXTRA_VOICEMAIL_SCRAMBLED_PIN_STRING = "android.telephony.extra.VOICEMAIL_SCRAMBLED_PIN_STRING"; + field public static final int INVALID_EMERGENCY_NUMBER_DB_VERSION = -1; // 0xffffffff + field public static final int KEY_TYPE_EPDG = 1; // 0x1 + field public static final int KEY_TYPE_WLAN = 2; // 0x2 + field public static final int MOBILE_DATA_POLICY_DATA_ON_NON_DEFAULT_DURING_VOICE_CALL = 1; // 0x1 + field public static final int MOBILE_DATA_POLICY_MMS_ALWAYS_ALLOWED = 2; // 0x2 + field public static final long NETWORK_TYPE_BITMASK_1xRTT = 64L; // 0x40L + field public static final long NETWORK_TYPE_BITMASK_CDMA = 8L; // 0x8L + field public static final long NETWORK_TYPE_BITMASK_EDGE = 2L; // 0x2L + field public static final long NETWORK_TYPE_BITMASK_EHRPD = 8192L; // 0x2000L + field public static final long NETWORK_TYPE_BITMASK_EVDO_0 = 16L; // 0x10L + field public static final long NETWORK_TYPE_BITMASK_EVDO_A = 32L; // 0x20L + field public static final long NETWORK_TYPE_BITMASK_EVDO_B = 2048L; // 0x800L + field public static final long NETWORK_TYPE_BITMASK_GPRS = 1L; // 0x1L + field public static final long NETWORK_TYPE_BITMASK_GSM = 32768L; // 0x8000L + field public static final long NETWORK_TYPE_BITMASK_HSDPA = 128L; // 0x80L + field public static final long NETWORK_TYPE_BITMASK_HSPA = 512L; // 0x200L + field public static final long NETWORK_TYPE_BITMASK_HSPAP = 16384L; // 0x4000L + field public static final long NETWORK_TYPE_BITMASK_HSUPA = 256L; // 0x100L + field public static final long NETWORK_TYPE_BITMASK_IWLAN = 131072L; // 0x20000L + field public static final long NETWORK_TYPE_BITMASK_LTE = 4096L; // 0x1000L + field public static final long NETWORK_TYPE_BITMASK_LTE_CA = 262144L; // 0x40000L + field public static final long NETWORK_TYPE_BITMASK_NR = 524288L; // 0x80000L + field public static final long NETWORK_TYPE_BITMASK_TD_SCDMA = 65536L; // 0x10000L + field public static final long NETWORK_TYPE_BITMASK_UMTS = 4L; // 0x4L + field public static final long NETWORK_TYPE_BITMASK_UNKNOWN = 0L; // 0x0L + field public static final int NR_DUAL_CONNECTIVITY_DISABLE = 2; // 0x2 + field public static final int NR_DUAL_CONNECTIVITY_DISABLE_IMMEDIATE = 3; // 0x3 + field public static final int NR_DUAL_CONNECTIVITY_ENABLE = 1; // 0x1 + field public static final int RADIO_POWER_OFF = 0; // 0x0 + field public static final int RADIO_POWER_ON = 1; // 0x1 + field public static final int RADIO_POWER_UNAVAILABLE = 2; // 0x2 + field public static final int SET_CARRIER_RESTRICTION_ERROR = 2; // 0x2 + field public static final int SET_CARRIER_RESTRICTION_NOT_SUPPORTED = 1; // 0x1 + field public static final int SET_CARRIER_RESTRICTION_SUCCESS = 0; // 0x0 + field public static final int SIM_ACTIVATION_STATE_ACTIVATED = 2; // 0x2 + field public static final int SIM_ACTIVATION_STATE_ACTIVATING = 1; // 0x1 + field public static final int SIM_ACTIVATION_STATE_DEACTIVATED = 3; // 0x3 + field public static final int SIM_ACTIVATION_STATE_RESTRICTED = 4; // 0x4 + field public static final int SIM_ACTIVATION_STATE_UNKNOWN = 0; // 0x0 + field public static final int SIM_STATE_LOADED = 10; // 0xa + field public static final int SIM_STATE_PRESENT = 11; // 0xb + field public static final int SRVCC_STATE_HANDOVER_CANCELED = 3; // 0x3 + field public static final int SRVCC_STATE_HANDOVER_COMPLETED = 1; // 0x1 + field public static final int SRVCC_STATE_HANDOVER_FAILED = 2; // 0x2 + field public static final int SRVCC_STATE_HANDOVER_NONE = -1; // 0xffffffff + field public static final int SRVCC_STATE_HANDOVER_STARTED = 0; // 0x0 + } + + public static interface TelephonyManager.CallForwardingInfoCallback { + method public void onCallForwardingInfoAvailable(@NonNull android.telephony.CallForwardingInfo); + method public void onError(int); + field public static final int RESULT_ERROR_FDN_CHECK_FAILURE = 2; // 0x2 + field public static final int RESULT_ERROR_NOT_SUPPORTED = 3; // 0x3 + field public static final int RESULT_ERROR_UNKNOWN = 1; // 0x1 + field public static final int RESULT_SUCCESS = 0; // 0x0 + } + + public static class TelephonyManager.ModemActivityInfoException extends java.lang.Exception { + method public int getErrorCode(); + field public static final int ERROR_INVALID_INFO_RECEIVED = 2; // 0x2 + field public static final int ERROR_MODEM_RESPONSE_ERROR = 3; // 0x3 + field public static final int ERROR_PHONE_NOT_AVAILABLE = 1; // 0x1 + field public static final int ERROR_UNKNOWN = 0; // 0x0 + } + + public final class UiccAccessRule implements android.os.Parcelable { + ctor public UiccAccessRule(byte[], @Nullable String, long); + method public int describeContents(); + method public int getCarrierPrivilegeStatus(android.content.pm.PackageInfo); + method public int getCarrierPrivilegeStatus(android.content.pm.Signature, String); + method public String getCertificateHexString(); + method @Nullable public String getPackageName(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.UiccAccessRule> CREATOR; + } + + public class UiccSlotInfo implements android.os.Parcelable { + ctor @Deprecated public UiccSlotInfo(boolean, boolean, String, int, int, boolean); + method public int describeContents(); + method public String getCardId(); + method public int getCardStateInfo(); + method public boolean getIsActive(); + method public boolean getIsEuicc(); + method public boolean getIsExtendedApduSupported(); + method public int getLogicalSlotIdx(); + method public boolean isRemovable(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CARD_STATE_INFO_ABSENT = 1; // 0x1 + field public static final int CARD_STATE_INFO_ERROR = 3; // 0x3 + field public static final int CARD_STATE_INFO_PRESENT = 2; // 0x2 + field public static final int CARD_STATE_INFO_RESTRICTED = 4; // 0x4 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.UiccSlotInfo> CREATOR; + } + + public abstract class VisualVoicemailService extends android.app.Service { + method public static final void sendVisualVoicemailSms(android.content.Context, android.telecom.PhoneAccountHandle, String, short, String, android.app.PendingIntent); + method public static final void setSmsFilterSettings(android.content.Context, android.telecom.PhoneAccountHandle, android.telephony.VisualVoicemailSmsFilterSettings); + } + +} + +package android.telephony.cdma { + + public final class CdmaSmsCbProgramData implements android.os.Parcelable { + method public int describeContents(); + method public int getCategory(); + method public int getOperation(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CATEGORY_CMAS_CHILD_ABDUCTION_EMERGENCY = 4099; // 0x1003 + field public static final int CATEGORY_CMAS_EXTREME_THREAT = 4097; // 0x1001 + field public static final int CATEGORY_CMAS_LAST_RESERVED_VALUE = 4351; // 0x10ff + field public static final int CATEGORY_CMAS_PRESIDENTIAL_LEVEL_ALERT = 4096; // 0x1000 + field public static final int CATEGORY_CMAS_SEVERE_THREAT = 4098; // 0x1002 + field public static final int CATEGORY_CMAS_TEST_MESSAGE = 4100; // 0x1004 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.cdma.CdmaSmsCbProgramData> CREATOR; + field public static final int OPERATION_ADD_CATEGORY = 1; // 0x1 + field public static final int OPERATION_CLEAR_CATEGORIES = 2; // 0x2 + field public static final int OPERATION_DELETE_CATEGORY = 0; // 0x0 + } + +} + +package android.telephony.data { + + public final class DataCallResponse implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public java.util.List<android.net.LinkAddress> getAddresses(); + method public int getCause(); + method @NonNull public java.util.List<java.net.InetAddress> getDnsAddresses(); + method @NonNull public java.util.List<java.net.InetAddress> getGatewayAddresses(); + method public int getHandoverFailureMode(); + method public int getId(); + method @NonNull public String getInterfaceName(); + method public int getLinkStatus(); + method @Deprecated public int getMtu(); + method public int getMtuV4(); + method public int getMtuV6(); + method @NonNull public java.util.List<java.net.InetAddress> getPcscfAddresses(); + method public int getProtocolType(); + method public long getRetryIntervalMillis(); + method @Deprecated public int getSuggestedRetryTime(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.DataCallResponse> CREATOR; + field public static final int HANDOVER_FAILURE_MODE_DO_FALLBACK = 1; // 0x1 + field public static final int HANDOVER_FAILURE_MODE_LEGACY = 0; // 0x0 + field public static final int HANDOVER_FAILURE_MODE_NO_FALLBACK_RETRY_HANDOVER = 2; // 0x2 + field public static final int HANDOVER_FAILURE_MODE_NO_FALLBACK_RETRY_SETUP_NORMAL = 3; // 0x3 + field public static final int HANDOVER_FAILURE_MODE_UNKNOWN = -1; // 0xffffffff + field public static final int LINK_STATUS_ACTIVE = 2; // 0x2 + field public static final int LINK_STATUS_DORMANT = 1; // 0x1 + field public static final int LINK_STATUS_INACTIVE = 0; // 0x0 + field public static final int LINK_STATUS_UNKNOWN = -1; // 0xffffffff + field public static final int RETRY_INTERVAL_UNDEFINED = -1; // 0xffffffff + } + + public static final class DataCallResponse.Builder { + ctor public DataCallResponse.Builder(); + method @NonNull public android.telephony.data.DataCallResponse build(); + method @NonNull public android.telephony.data.DataCallResponse.Builder setAddresses(@NonNull java.util.List<android.net.LinkAddress>); + method @NonNull public android.telephony.data.DataCallResponse.Builder setCause(int); + method @NonNull public android.telephony.data.DataCallResponse.Builder setDnsAddresses(@NonNull java.util.List<java.net.InetAddress>); + method @NonNull public android.telephony.data.DataCallResponse.Builder setGatewayAddresses(@NonNull java.util.List<java.net.InetAddress>); + method @NonNull public android.telephony.data.DataCallResponse.Builder setHandoverFailureMode(int); + method @NonNull public android.telephony.data.DataCallResponse.Builder setId(int); + method @NonNull public android.telephony.data.DataCallResponse.Builder setInterfaceName(@NonNull String); + method @NonNull public android.telephony.data.DataCallResponse.Builder setLinkStatus(int); + method @Deprecated @NonNull public android.telephony.data.DataCallResponse.Builder setMtu(int); + method @NonNull public android.telephony.data.DataCallResponse.Builder setMtuV4(int); + method @NonNull public android.telephony.data.DataCallResponse.Builder setMtuV6(int); + method @NonNull public android.telephony.data.DataCallResponse.Builder setPcscfAddresses(@NonNull java.util.List<java.net.InetAddress>); + method @NonNull public android.telephony.data.DataCallResponse.Builder setProtocolType(int); + method @NonNull public android.telephony.data.DataCallResponse.Builder setRetryIntervalMillis(long); + method @Deprecated @NonNull public android.telephony.data.DataCallResponse.Builder setSuggestedRetryTime(int); + } + + public final class DataProfile implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public String getApn(); + method public int getAuthType(); + method public int getBearerBitmask(); + method @Deprecated public int getMtu(); + method public int getMtuV4(); + method public int getMtuV6(); + method @Nullable public String getPassword(); + method public int getProfileId(); + method public int getProtocolType(); + method public int getRoamingProtocolType(); + method public int getSupportedApnTypesBitmask(); + method public int getType(); + method @Nullable public String getUserName(); + method public boolean isEnabled(); + method public boolean isPersistent(); + method public boolean isPreferred(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.DataProfile> CREATOR; + field public static final int TYPE_3GPP = 1; // 0x1 + field public static final int TYPE_3GPP2 = 2; // 0x2 + field public static final int TYPE_COMMON = 0; // 0x0 + } + + public static final class DataProfile.Builder { + ctor public DataProfile.Builder(); + method @NonNull public android.telephony.data.DataProfile build(); + method @NonNull public android.telephony.data.DataProfile.Builder enable(boolean); + method @NonNull public android.telephony.data.DataProfile.Builder setApn(@NonNull String); + method @NonNull public android.telephony.data.DataProfile.Builder setAuthType(int); + method @NonNull public android.telephony.data.DataProfile.Builder setBearerBitmask(int); + method @Deprecated @NonNull public android.telephony.data.DataProfile.Builder setMtu(int); + method @NonNull public android.telephony.data.DataProfile.Builder setMtuV4(int); + method @NonNull public android.telephony.data.DataProfile.Builder setMtuV6(int); + method @NonNull public android.telephony.data.DataProfile.Builder setPassword(@NonNull String); + method @NonNull public android.telephony.data.DataProfile.Builder setPersistent(boolean); + method @NonNull public android.telephony.data.DataProfile.Builder setPreferred(boolean); + method @NonNull public android.telephony.data.DataProfile.Builder setProfileId(int); + method @NonNull public android.telephony.data.DataProfile.Builder setProtocolType(int); + method @NonNull public android.telephony.data.DataProfile.Builder setRoamingProtocolType(int); + method @NonNull public android.telephony.data.DataProfile.Builder setSupportedApnTypesBitmask(int); + method @NonNull public android.telephony.data.DataProfile.Builder setType(int); + method @NonNull public android.telephony.data.DataProfile.Builder setUserName(@NonNull String); + } + + public abstract class DataService extends android.app.Service { + ctor public DataService(); + method public android.os.IBinder onBind(android.content.Intent); + method @Nullable public abstract android.telephony.data.DataService.DataServiceProvider onCreateDataServiceProvider(int); + field public static final int REQUEST_REASON_HANDOVER = 3; // 0x3 + field public static final int REQUEST_REASON_NORMAL = 1; // 0x1 + field public static final int REQUEST_REASON_SHUTDOWN = 2; // 0x2 + field public static final int REQUEST_REASON_UNKNOWN = 0; // 0x0 + field public static final String SERVICE_INTERFACE = "android.telephony.data.DataService"; + } + + public abstract class DataService.DataServiceProvider implements java.lang.AutoCloseable { + ctor public DataService.DataServiceProvider(int); + method public abstract void close(); + method public void deactivateDataCall(int, int, @Nullable android.telephony.data.DataServiceCallback); + method public final int getSlotIndex(); + method public final void notifyDataCallListChanged(java.util.List<android.telephony.data.DataCallResponse>); + method public void requestDataCallList(@NonNull android.telephony.data.DataServiceCallback); + method public void setDataProfile(@NonNull java.util.List<android.telephony.data.DataProfile>, boolean, @NonNull android.telephony.data.DataServiceCallback); + method public void setInitialAttachApn(@NonNull android.telephony.data.DataProfile, boolean, @NonNull android.telephony.data.DataServiceCallback); + method public void setupDataCall(int, @NonNull android.telephony.data.DataProfile, boolean, boolean, int, @Nullable android.net.LinkProperties, @NonNull android.telephony.data.DataServiceCallback); + } + + public class DataServiceCallback { + method public void onDataCallListChanged(@NonNull java.util.List<android.telephony.data.DataCallResponse>); + method public void onDeactivateDataCallComplete(int); + method public void onRequestDataCallListComplete(int, @NonNull java.util.List<android.telephony.data.DataCallResponse>); + method public void onSetDataProfileComplete(int); + method public void onSetInitialAttachApnComplete(int); + method public void onSetupDataCallComplete(int, @Nullable android.telephony.data.DataCallResponse); + field public static final int RESULT_ERROR_BUSY = 3; // 0x3 + field public static final int RESULT_ERROR_ILLEGAL_STATE = 4; // 0x4 + field public static final int RESULT_ERROR_INVALID_ARG = 2; // 0x2 + field public static final int RESULT_ERROR_UNSUPPORTED = 1; // 0x1 + field public static final int RESULT_SUCCESS = 0; // 0x0 + } + + public abstract class QualifiedNetworksService extends android.app.Service { + ctor public QualifiedNetworksService(); + method @NonNull public abstract android.telephony.data.QualifiedNetworksService.NetworkAvailabilityProvider onCreateNetworkAvailabilityProvider(int); + field public static final String QUALIFIED_NETWORKS_SERVICE_INTERFACE = "android.telephony.data.QualifiedNetworksService"; + } + + public abstract class QualifiedNetworksService.NetworkAvailabilityProvider implements java.lang.AutoCloseable { + ctor public QualifiedNetworksService.NetworkAvailabilityProvider(int); + method public abstract void close(); + method public final int getSlotIndex(); + method public final void updateQualifiedNetworkTypes(int, @NonNull java.util.List<java.lang.Integer>); + } + +} + +package android.telephony.euicc { + + public final class DownloadableSubscription implements android.os.Parcelable { + method public java.util.List<android.telephony.UiccAccessRule> getAccessRules(); + method @Nullable public String getCarrierName(); + } + + public static final class DownloadableSubscription.Builder { + ctor public DownloadableSubscription.Builder(); + ctor public DownloadableSubscription.Builder(android.telephony.euicc.DownloadableSubscription); + method public android.telephony.euicc.DownloadableSubscription build(); + method public android.telephony.euicc.DownloadableSubscription.Builder setAccessRules(java.util.List<android.telephony.UiccAccessRule>); + method public android.telephony.euicc.DownloadableSubscription.Builder setCarrierName(String); + method public android.telephony.euicc.DownloadableSubscription.Builder setConfirmationCode(String); + method public android.telephony.euicc.DownloadableSubscription.Builder setEncodedActivationCode(String); + } + + public class EuiccCardManager { + method public void authenticateServer(String, String, byte[], byte[], byte[], byte[], java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>); + method public void cancelSession(String, byte[], @android.telephony.euicc.EuiccCardManager.CancelReason int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>); + method public void deleteProfile(String, String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>); + method public void disableProfile(String, String, boolean, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>); + method public void listNotifications(String, @android.telephony.euicc.EuiccNotification.Event int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.telephony.euicc.EuiccNotification[]>); + method public void loadBoundProfilePackage(String, byte[], java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>); + method public void prepareDownload(String, @Nullable byte[], byte[], byte[], byte[], java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>); + method public void removeNotificationFromList(String, int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>); + method public void requestAllProfiles(String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.service.euicc.EuiccProfileInfo[]>); + method public void requestDefaultSmdpAddress(String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.String>); + method public void requestEuiccChallenge(String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>); + method public void requestEuiccInfo1(String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>); + method public void requestEuiccInfo2(String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>); + method public void requestProfile(String, String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.service.euicc.EuiccProfileInfo>); + method public void requestRulesAuthTable(String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.telephony.euicc.EuiccRulesAuthTable>); + method public void requestSmdsAddress(String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.String>); + method public void resetMemory(String, @android.telephony.euicc.EuiccCardManager.ResetOption int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>); + method public void retrieveNotification(String, int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.telephony.euicc.EuiccNotification>); + method public void retrieveNotificationList(String, @android.telephony.euicc.EuiccNotification.Event int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.telephony.euicc.EuiccNotification[]>); + method public void setDefaultSmdpAddress(String, String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>); + method public void setNickname(String, String, String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>); + method public void switchToProfile(String, String, boolean, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.service.euicc.EuiccProfileInfo>); + field public static final int CANCEL_REASON_END_USER_REJECTED = 0; // 0x0 + field public static final int CANCEL_REASON_POSTPONED = 1; // 0x1 + field public static final int CANCEL_REASON_PPR_NOT_ALLOWED = 3; // 0x3 + field public static final int CANCEL_REASON_TIMEOUT = 2; // 0x2 + field public static final int RESET_OPTION_DELETE_FIELD_LOADED_TEST_PROFILES = 2; // 0x2 + field public static final int RESET_OPTION_DELETE_OPERATIONAL_PROFILES = 1; // 0x1 + field public static final int RESET_OPTION_RESET_DEFAULT_SMDP_ADDRESS = 4; // 0x4 + field public static final int RESULT_CALLER_NOT_ALLOWED = -3; // 0xfffffffd + field public static final int RESULT_EUICC_NOT_FOUND = -2; // 0xfffffffe + field public static final int RESULT_OK = 0; // 0x0 + field public static final int RESULT_UNKNOWN_ERROR = -1; // 0xffffffff + } + + @IntDef(prefix={"CANCEL_REASON_"}, value={android.telephony.euicc.EuiccCardManager.CANCEL_REASON_END_USER_REJECTED, android.telephony.euicc.EuiccCardManager.CANCEL_REASON_POSTPONED, android.telephony.euicc.EuiccCardManager.CANCEL_REASON_TIMEOUT, android.telephony.euicc.EuiccCardManager.CANCEL_REASON_PPR_NOT_ALLOWED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccCardManager.CancelReason { + } + + @IntDef(flag=true, prefix={"RESET_OPTION_"}, value={android.telephony.euicc.EuiccCardManager.RESET_OPTION_DELETE_OPERATIONAL_PROFILES, android.telephony.euicc.EuiccCardManager.RESET_OPTION_DELETE_FIELD_LOADED_TEST_PROFILES, android.telephony.euicc.EuiccCardManager.RESET_OPTION_RESET_DEFAULT_SMDP_ADDRESS}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccCardManager.ResetOption { + } + + public static interface EuiccCardManager.ResultCallback<T> { + method public void onComplete(int, T); + } + + public class EuiccManager { + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void continueOperation(android.content.Intent, android.os.Bundle); + method @Deprecated @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void eraseSubscriptions(@NonNull android.app.PendingIntent); + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void eraseSubscriptions(@android.telephony.euicc.EuiccCardManager.ResetOption int, @NonNull android.app.PendingIntent); + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void getDefaultDownloadableSubscriptionList(android.app.PendingIntent); + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void getDownloadableSubscriptionMetadata(android.telephony.euicc.DownloadableSubscription, android.app.PendingIntent); + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public int getOtaStatus(); + method @NonNull @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public java.util.List<java.lang.String> getSupportedCountries(); + method @NonNull @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public java.util.List<java.lang.String> getUnsupportedCountries(); + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public boolean isSupportedCountry(@NonNull String); + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void setSupportedCountries(@NonNull java.util.List<java.lang.String>); + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void setUnsupportedCountries(@NonNull java.util.List<java.lang.String>); + field public static final String ACTION_DELETE_SUBSCRIPTION_PRIVILEGED = "android.telephony.euicc.action.DELETE_SUBSCRIPTION_PRIVILEGED"; + field @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public static final String ACTION_OTA_STATUS_CHANGED = "android.telephony.euicc.action.OTA_STATUS_CHANGED"; + field public static final String ACTION_PROVISION_EMBEDDED_SUBSCRIPTION = "android.telephony.euicc.action.PROVISION_EMBEDDED_SUBSCRIPTION"; + field public static final String ACTION_RENAME_SUBSCRIPTION_PRIVILEGED = "android.telephony.euicc.action.RENAME_SUBSCRIPTION_PRIVILEGED"; + field public static final String ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED = "android.telephony.euicc.action.TOGGLE_SUBSCRIPTION_PRIVILEGED"; + field public static final int EUICC_ACTIVATION_TYPE_ACCOUNT_REQUIRED = 4; // 0x4 + field public static final int EUICC_ACTIVATION_TYPE_BACKUP = 2; // 0x2 + field public static final int EUICC_ACTIVATION_TYPE_DEFAULT = 1; // 0x1 + field public static final int EUICC_ACTIVATION_TYPE_TRANSFER = 3; // 0x3 + field public static final int EUICC_OTA_FAILED = 2; // 0x2 + field public static final int EUICC_OTA_IN_PROGRESS = 1; // 0x1 + field public static final int EUICC_OTA_NOT_NEEDED = 4; // 0x4 + field public static final int EUICC_OTA_STATUS_UNAVAILABLE = 5; // 0x5 + field public static final int EUICC_OTA_SUCCEEDED = 3; // 0x3 + field public static final String EXTRA_ACTIVATION_TYPE = "android.telephony.euicc.extra.ACTIVATION_TYPE"; + field public static final String EXTRA_EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTIONS = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTIONS"; + field public static final String EXTRA_ENABLE_SUBSCRIPTION = "android.telephony.euicc.extra.ENABLE_SUBSCRIPTION"; + field public static final String EXTRA_FORCE_PROVISION = "android.telephony.euicc.extra.FORCE_PROVISION"; + field public static final String EXTRA_FROM_SUBSCRIPTION_ID = "android.telephony.euicc.extra.FROM_SUBSCRIPTION_ID"; + field public static final String EXTRA_PHYSICAL_SLOT_ID = "android.telephony.euicc.extra.PHYSICAL_SLOT_ID"; + field public static final String EXTRA_SUBSCRIPTION_ID = "android.telephony.euicc.extra.SUBSCRIPTION_ID"; + field public static final String EXTRA_SUBSCRIPTION_NICKNAME = "android.telephony.euicc.extra.SUBSCRIPTION_NICKNAME"; + } + + @IntDef(prefix={"EUICC_OTA_"}, value={android.telephony.euicc.EuiccManager.EUICC_OTA_IN_PROGRESS, android.telephony.euicc.EuiccManager.EUICC_OTA_FAILED, android.telephony.euicc.EuiccManager.EUICC_OTA_SUCCEEDED, android.telephony.euicc.EuiccManager.EUICC_OTA_NOT_NEEDED, android.telephony.euicc.EuiccManager.EUICC_OTA_STATUS_UNAVAILABLE}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccManager.OtaStatus { + } + + public final class EuiccNotification implements android.os.Parcelable { + ctor public EuiccNotification(int, String, @android.telephony.euicc.EuiccNotification.Event int, @Nullable byte[]); + method public int describeContents(); + method @Nullable public byte[] getData(); + method @android.telephony.euicc.EuiccNotification.Event public int getEvent(); + method public int getSeq(); + method public String getTargetAddr(); + method public void writeToParcel(android.os.Parcel, int); + field @android.telephony.euicc.EuiccNotification.Event public static final int ALL_EVENTS = 15; // 0xf + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.euicc.EuiccNotification> CREATOR; + field public static final int EVENT_DELETE = 8; // 0x8 + field public static final int EVENT_DISABLE = 4; // 0x4 + field public static final int EVENT_ENABLE = 2; // 0x2 + field public static final int EVENT_INSTALL = 1; // 0x1 + } + + @IntDef(flag=true, prefix={"EVENT_"}, value={android.telephony.euicc.EuiccNotification.EVENT_INSTALL, android.telephony.euicc.EuiccNotification.EVENT_ENABLE, android.telephony.euicc.EuiccNotification.EVENT_DISABLE, android.telephony.euicc.EuiccNotification.EVENT_DELETE}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccNotification.Event { + } + + public final class EuiccRulesAuthTable implements android.os.Parcelable { + method public int describeContents(); + method public int findIndex(@android.service.euicc.EuiccProfileInfo.PolicyRule int, android.service.carrier.CarrierIdentifier); + method public boolean hasPolicyRuleFlag(int, @android.telephony.euicc.EuiccRulesAuthTable.PolicyRuleFlag int); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.euicc.EuiccRulesAuthTable> CREATOR; + field public static final int POLICY_RULE_FLAG_CONSENT_REQUIRED = 1; // 0x1 + } + + public static final class EuiccRulesAuthTable.Builder { + ctor public EuiccRulesAuthTable.Builder(int); + method public android.telephony.euicc.EuiccRulesAuthTable.Builder add(int, java.util.List<android.service.carrier.CarrierIdentifier>, int); + method public android.telephony.euicc.EuiccRulesAuthTable build(); + } + + @IntDef(flag=true, prefix={"POLICY_RULE_FLAG_"}, value={android.telephony.euicc.EuiccRulesAuthTable.POLICY_RULE_FLAG_CONSENT_REQUIRED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccRulesAuthTable.PolicyRuleFlag { + } + +} + +package android.telephony.ims { + + public final class AudioCodecAttributes implements android.os.Parcelable { + ctor public AudioCodecAttributes(float, @NonNull android.util.Range<java.lang.Float>, float, @NonNull android.util.Range<java.lang.Float>); + method public int describeContents(); + method public float getBandwidthKhz(); + method @NonNull public android.util.Range<java.lang.Float> getBandwidthRangeKhz(); + method public float getBitrateKbps(); + method @NonNull public android.util.Range<java.lang.Float> getBitrateRangeKbps(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.AudioCodecAttributes> CREATOR; + } + + public final class ImsCallForwardInfo implements android.os.Parcelable { + ctor public ImsCallForwardInfo(int, int, int, int, @NonNull String, int); + method public int describeContents(); + method public int getCondition(); + method public String getNumber(); + method public int getServiceClass(); + method public int getStatus(); + method public int getTimeSeconds(); + method public int getToA(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CDIV_CF_REASON_ALL = 4; // 0x4 + field public static final int CDIV_CF_REASON_ALL_CONDITIONAL = 5; // 0x5 + field public static final int CDIV_CF_REASON_BUSY = 1; // 0x1 + field public static final int CDIV_CF_REASON_NOT_LOGGED_IN = 6; // 0x6 + field public static final int CDIV_CF_REASON_NOT_REACHABLE = 3; // 0x3 + field public static final int CDIV_CF_REASON_NO_REPLY = 2; // 0x2 + field public static final int CDIV_CF_REASON_UNCONDITIONAL = 0; // 0x0 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsCallForwardInfo> CREATOR; + field public static final int STATUS_ACTIVE = 1; // 0x1 + field public static final int STATUS_NOT_ACTIVE = 0; // 0x0 + field public static final int TYPE_OF_ADDRESS_INTERNATIONAL = 145; // 0x91 + field public static final int TYPE_OF_ADDRESS_UNKNOWN = 129; // 0x81 + } + + public final class ImsCallProfile implements android.os.Parcelable { + ctor public ImsCallProfile(); + ctor public ImsCallProfile(int, int); + ctor public ImsCallProfile(int, int, android.os.Bundle, android.telephony.ims.ImsStreamMediaProfile); + method public int describeContents(); + method public String getCallExtra(String); + method public String getCallExtra(String, String); + method public boolean getCallExtraBoolean(String); + method public boolean getCallExtraBoolean(String, boolean); + method public int getCallExtraInt(String); + method public int getCallExtraInt(String, int); + method public android.os.Bundle getCallExtras(); + method public int getCallType(); + method public static int getCallTypeFromVideoState(int); + method public int getCallerNumberVerificationStatus(); + method public int getEmergencyCallRouting(); + method public int getEmergencyServiceCategories(); + method @NonNull public java.util.List<java.lang.String> getEmergencyUrns(); + method public android.telephony.ims.ImsStreamMediaProfile getMediaProfile(); + method @NonNull public android.os.Bundle getProprietaryCallExtras(); + method public int getRestrictCause(); + method public int getServiceType(); + method public static int getVideoStateFromCallType(int); + method public static int getVideoStateFromImsCallProfile(android.telephony.ims.ImsCallProfile); + method public boolean hasKnownUserIntentEmergency(); + method public boolean isEmergencyCallTesting(); + method public boolean isVideoCall(); + method public boolean isVideoPaused(); + method public static int presentationToOir(int); + method public void setCallExtra(String, String); + method public void setCallExtraBoolean(String, boolean); + method public void setCallExtraInt(String, int); + method public void setCallRestrictCause(int); + method public void setCallerNumberVerificationStatus(int); + method public void setEmergencyCallRouting(int); + method public void setEmergencyCallTesting(boolean); + method public void setEmergencyServiceCategories(int); + method public void setEmergencyUrns(@NonNull java.util.List<java.lang.String>); + method public void setHasKnownUserIntentEmergency(boolean); + method public void updateCallExtras(android.telephony.ims.ImsCallProfile); + method public void updateCallType(android.telephony.ims.ImsCallProfile); + method public void updateMediaProfile(android.telephony.ims.ImsCallProfile); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CALL_RESTRICT_CAUSE_DISABLED = 2; // 0x2 + field public static final int CALL_RESTRICT_CAUSE_HD = 3; // 0x3 + field public static final int CALL_RESTRICT_CAUSE_NONE = 0; // 0x0 + field public static final int CALL_RESTRICT_CAUSE_RAT = 1; // 0x1 + field public static final int CALL_TYPE_VIDEO_N_VOICE = 3; // 0x3 + field public static final int CALL_TYPE_VOICE = 2; // 0x2 + field public static final int CALL_TYPE_VOICE_N_VIDEO = 1; // 0x1 + field public static final int CALL_TYPE_VS = 8; // 0x8 + field public static final int CALL_TYPE_VS_RX = 10; // 0xa + field public static final int CALL_TYPE_VS_TX = 9; // 0x9 + field public static final int CALL_TYPE_VT = 4; // 0x4 + field public static final int CALL_TYPE_VT_NODIR = 7; // 0x7 + field public static final int CALL_TYPE_VT_RX = 6; // 0x6 + field public static final int CALL_TYPE_VT_TX = 5; // 0x5 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsCallProfile> CREATOR; + field public static final int DIALSTRING_NORMAL = 0; // 0x0 + field public static final int DIALSTRING_SS_CONF = 1; // 0x1 + field public static final int DIALSTRING_USSD = 2; // 0x2 + field public static final String EXTRA_ADDITIONAL_CALL_INFO = "AdditionalCallInfo"; + field public static final String EXTRA_ADDITIONAL_SIP_INVITE_FIELDS = "android.telephony.ims.extra.ADDITIONAL_SIP_INVITE_FIELDS"; + field public static final String EXTRA_CALL_DISCONNECT_CAUSE = "android.telephony.ims.extra.CALL_DISCONNECT_CAUSE"; + field public static final String EXTRA_CALL_NETWORK_TYPE = "android.telephony.ims.extra.CALL_NETWORK_TYPE"; + field @Deprecated public static final String EXTRA_CALL_RAT_TYPE = "CallRadioTech"; + field public static final String EXTRA_CHILD_NUMBER = "ChildNum"; + field public static final String EXTRA_CNA = "cna"; + field public static final String EXTRA_CNAP = "cnap"; + field public static final String EXTRA_CODEC = "Codec"; + field public static final String EXTRA_DIALSTRING = "dialstring"; + field public static final String EXTRA_DISPLAY_TEXT = "DisplayText"; + field public static final String EXTRA_EMERGENCY_CALL = "e_call"; + field public static final String EXTRA_FORWARDED_NUMBER = "android.telephony.ims.extra.FORWARDED_NUMBER"; + field public static final String EXTRA_IS_CALL_PULL = "CallPull"; + field public static final String EXTRA_OI = "oi"; + field public static final String EXTRA_OIR = "oir"; + field public static final String EXTRA_REMOTE_URI = "remote_uri"; + field public static final String EXTRA_USSD = "ussd"; + field public static final int OIR_DEFAULT = 0; // 0x0 + field public static final int OIR_PRESENTATION_NOT_RESTRICTED = 2; // 0x2 + field public static final int OIR_PRESENTATION_PAYPHONE = 4; // 0x4 + field public static final int OIR_PRESENTATION_RESTRICTED = 1; // 0x1 + field public static final int OIR_PRESENTATION_UNKNOWN = 3; // 0x3 + field public static final int SERVICE_TYPE_EMERGENCY = 2; // 0x2 + field public static final int SERVICE_TYPE_NONE = 0; // 0x0 + field public static final int SERVICE_TYPE_NORMAL = 1; // 0x1 + field public static final int VERIFICATION_STATUS_FAILED = 2; // 0x2 + field public static final int VERIFICATION_STATUS_NOT_VERIFIED = 0; // 0x0 + field public static final int VERIFICATION_STATUS_PASSED = 1; // 0x1 + } + + public class ImsCallSessionListener { + method public void callQualityChanged(@NonNull android.telephony.CallQuality); + method public void callSessionConferenceExtendFailed(android.telephony.ims.ImsReasonInfo); + method public void callSessionConferenceExtendReceived(android.telephony.ims.stub.ImsCallSessionImplBase, android.telephony.ims.ImsCallProfile); + method public void callSessionConferenceExtended(android.telephony.ims.stub.ImsCallSessionImplBase, android.telephony.ims.ImsCallProfile); + method public void callSessionConferenceStateUpdated(android.telephony.ims.ImsConferenceState); + method @Deprecated public void callSessionHandover(int, int, android.telephony.ims.ImsReasonInfo); + method @Deprecated public void callSessionHandoverFailed(int, int, android.telephony.ims.ImsReasonInfo); + method public void callSessionHeld(android.telephony.ims.ImsCallProfile); + method public void callSessionHoldFailed(android.telephony.ims.ImsReasonInfo); + method public void callSessionHoldReceived(android.telephony.ims.ImsCallProfile); + method public void callSessionInitiated(android.telephony.ims.ImsCallProfile); + method public void callSessionInitiatedFailed(android.telephony.ims.ImsReasonInfo); + method public void callSessionInviteParticipantsRequestDelivered(); + method public void callSessionInviteParticipantsRequestFailed(android.telephony.ims.ImsReasonInfo); + method @Deprecated public void callSessionMayHandover(int, int); + method public void callSessionMergeComplete(android.telephony.ims.stub.ImsCallSessionImplBase); + method public void callSessionMergeFailed(android.telephony.ims.ImsReasonInfo); + method public void callSessionMergeStarted(android.telephony.ims.stub.ImsCallSessionImplBase, android.telephony.ims.ImsCallProfile); + method public void callSessionMultipartyStateChanged(boolean); + method public void callSessionProgressing(android.telephony.ims.ImsStreamMediaProfile); + method public void callSessionRemoveParticipantsRequestDelivered(); + method public void callSessionRemoveParticipantsRequestFailed(android.telephony.ims.ImsReasonInfo); + method public void callSessionResumeFailed(android.telephony.ims.ImsReasonInfo); + method public void callSessionResumeReceived(android.telephony.ims.ImsCallProfile); + method public void callSessionResumed(android.telephony.ims.ImsCallProfile); + method public void callSessionRttAudioIndicatorChanged(@NonNull android.telephony.ims.ImsStreamMediaProfile); + method public void callSessionRttMessageReceived(String); + method public void callSessionRttModifyRequestReceived(android.telephony.ims.ImsCallProfile); + method public void callSessionRttModifyResponseReceived(int); + method public void callSessionSuppServiceReceived(android.telephony.ims.ImsSuppServiceNotification); + method public void callSessionTerminated(android.telephony.ims.ImsReasonInfo); + method public void callSessionTtyModeReceived(int); + method public void callSessionUpdateFailed(android.telephony.ims.ImsReasonInfo); + method public void callSessionUpdateReceived(android.telephony.ims.ImsCallProfile); + method public void callSessionUpdated(android.telephony.ims.ImsCallProfile); + method public void callSessionUssdMessageReceived(int, String); + method public void onHandover(int, int, @Nullable android.telephony.ims.ImsReasonInfo); + method public void onHandoverFailed(int, int, @NonNull android.telephony.ims.ImsReasonInfo); + method public void onMayHandover(int, int); + } + + public final class ImsConferenceState implements android.os.Parcelable { + method public int describeContents(); + method public static int getConnectionStateForStatus(String); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsConferenceState> CREATOR; + field public static final String DISPLAY_TEXT = "display-text"; + field public static final String ENDPOINT = "endpoint"; + field public static final String SIP_STATUS_CODE = "sipstatuscode"; + field public static final String STATUS = "status"; + field public static final String STATUS_ALERTING = "alerting"; + field public static final String STATUS_CONNECTED = "connected"; + field public static final String STATUS_CONNECT_FAIL = "connect-fail"; + field public static final String STATUS_DIALING_IN = "dialing-in"; + field public static final String STATUS_DIALING_OUT = "dialing-out"; + field public static final String STATUS_DISCONNECTED = "disconnected"; + field public static final String STATUS_DISCONNECTING = "disconnecting"; + field public static final String STATUS_MUTED_VIA_FOCUS = "muted-via-focus"; + field public static final String STATUS_ON_HOLD = "on-hold"; + field public static final String STATUS_PENDING = "pending"; + field public static final String STATUS_SEND_ONLY = "sendonly"; + field public static final String STATUS_SEND_RECV = "sendrecv"; + field public static final String USER = "user"; + field public final java.util.HashMap<java.lang.String,android.os.Bundle> mParticipants; + } + + public final class ImsException extends java.lang.Exception { + ctor public ImsException(@Nullable String); + ctor public ImsException(@Nullable String, int); + ctor public ImsException(@Nullable String, int, @Nullable Throwable); + } + + public final class ImsExternalCallState implements android.os.Parcelable { + ctor public ImsExternalCallState(@NonNull String, @NonNull android.net.Uri, @Nullable android.net.Uri, boolean, int, int, boolean); + method public int describeContents(); + method @NonNull public android.net.Uri getAddress(); + method public int getCallId(); + method public int getCallState(); + method public int getCallType(); + method @Nullable public android.net.Uri getLocalAddress(); + method public boolean isCallHeld(); + method public boolean isCallPullable(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CALL_STATE_CONFIRMED = 1; // 0x1 + field public static final int CALL_STATE_TERMINATED = 2; // 0x2 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsExternalCallState> CREATOR; + } + + public class ImsManager { + method @NonNull public android.telephony.ims.SipDelegateManager getSipDelegateManager(int); + } + + public class ImsMmTelManager implements android.telephony.ims.RegistrationManager { + method @Deprecated @NonNull @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PRECISE_PHONE_STATE}) public static android.telephony.ims.ImsMmTelManager createForSubscriptionId(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void getFeatureState(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>) throws android.telephony.ims.ImsException; + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void getRegistrationState(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getVoWiFiRoamingModeSetting(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isAvailable(int, int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isCapable(int, int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void isSupported(int, int, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>) throws android.telephony.ims.ImsException; + method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void registerImsRegistrationCallback(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.ims.ImsMmTelManager.RegistrationCallback) throws android.telephony.ims.ImsException; + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setAdvancedCallingSettingEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setRttCapabilitySetting(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoWiFiModeSetting(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoWiFiNonPersistent(boolean, int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoWiFiRoamingModeSetting(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoWiFiRoamingSettingEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoWiFiSettingEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVtSettingEnabled(boolean); + method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void unregisterImsRegistrationCallback(@NonNull android.telephony.ims.ImsMmTelManager.RegistrationCallback); + } + + @Deprecated public static class ImsMmTelManager.RegistrationCallback extends android.telephony.ims.RegistrationManager.RegistrationCallback { + ctor @Deprecated public ImsMmTelManager.RegistrationCallback(); + } + + public final class ImsReasonInfo implements android.os.Parcelable { + field public static final String EXTRA_MSG_SERVICE_NOT_AUTHORIZED = "Forbidden. Not Authorized for Service"; + } + + public class ImsService extends android.app.Service { + ctor public ImsService(); + method public android.telephony.ims.feature.MmTelFeature createMmTelFeature(int); + method public android.telephony.ims.feature.RcsFeature createRcsFeature(int); + method public void disableIms(int); + method public void enableIms(int); + method public android.telephony.ims.stub.ImsConfigImplBase getConfig(int); + method public long getImsServiceCapabilities(); + method public android.telephony.ims.stub.ImsRegistrationImplBase getRegistration(int); + method @Nullable public android.telephony.ims.stub.SipTransportImplBase getSipTransport(int); + method public final void onUpdateSupportedImsFeatures(android.telephony.ims.stub.ImsFeatureConfiguration) throws android.os.RemoteException; + method public android.telephony.ims.stub.ImsFeatureConfiguration querySupportedImsFeatures(); + method public void readyForFeatureCreation(); + field public static final long CAPABILITY_SIP_DELEGATE_CREATION = 2L; // 0x2L + } + + public final class ImsSsData implements android.os.Parcelable { + ctor public ImsSsData(int, int, int, int, int); + method public int describeContents(); + method @Nullable public java.util.List<android.telephony.ims.ImsCallForwardInfo> getCallForwardInfo(); + method public int getRequestType(); + method public int getResult(); + method public int getServiceClass(); + method public int getServiceType(); + method @NonNull public java.util.List<android.telephony.ims.ImsSsInfo> getSuppServiceInfo(); + method public int getTeleserviceType(); + method public boolean isTypeBarring(); + method public boolean isTypeCf(); + method public boolean isTypeClip(); + method public boolean isTypeClir(); + method public boolean isTypeColp(); + method public boolean isTypeColr(); + method public boolean isTypeCw(); + method public boolean isTypeIcb(); + method public boolean isTypeInterrogation(); + method public boolean isTypeUnConditional(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsSsData> CREATOR; + field public static final int RESULT_SUCCESS = 0; // 0x0 + field public static final int SERVICE_CLASS_DATA = 2; // 0x2 + field public static final int SERVICE_CLASS_DATA_CIRCUIT_ASYNC = 32; // 0x20 + field public static final int SERVICE_CLASS_DATA_CIRCUIT_SYNC = 16; // 0x10 + field public static final int SERVICE_CLASS_DATA_PACKET_ACCESS = 64; // 0x40 + field public static final int SERVICE_CLASS_DATA_PAD = 128; // 0x80 + field public static final int SERVICE_CLASS_FAX = 4; // 0x4 + field public static final int SERVICE_CLASS_NONE = 0; // 0x0 + field public static final int SERVICE_CLASS_SMS = 8; // 0x8 + field public static final int SERVICE_CLASS_VOICE = 1; // 0x1 + field public static final int SS_ACTIVATION = 0; // 0x0 + field public static final int SS_ALL_BARRING = 18; // 0x12 + field public static final int SS_ALL_DATA_TELESERVICES = 3; // 0x3 + field public static final int SS_ALL_TELESERVICES_EXCEPT_SMS = 5; // 0x5 + field public static final int SS_ALL_TELESEVICES = 1; // 0x1 + field public static final int SS_ALL_TELE_AND_BEARER_SERVICES = 0; // 0x0 + field public static final int SS_BAIC = 16; // 0x10 + field public static final int SS_BAIC_ROAMING = 17; // 0x11 + field public static final int SS_BAOC = 13; // 0xd + field public static final int SS_BAOIC = 14; // 0xe + field public static final int SS_BAOIC_EXC_HOME = 15; // 0xf + field public static final int SS_CFU = 0; // 0x0 + field public static final int SS_CFUT = 6; // 0x6 + field public static final int SS_CF_ALL = 4; // 0x4 + field public static final int SS_CF_ALL_CONDITIONAL = 5; // 0x5 + field public static final int SS_CF_BUSY = 1; // 0x1 + field public static final int SS_CF_NOT_REACHABLE = 3; // 0x3 + field public static final int SS_CF_NO_REPLY = 2; // 0x2 + field public static final int SS_CLIP = 7; // 0x7 + field public static final int SS_CLIR = 8; // 0x8 + field public static final int SS_CNAP = 11; // 0xb + field public static final int SS_COLP = 9; // 0x9 + field public static final int SS_COLR = 10; // 0xa + field public static final int SS_DEACTIVATION = 1; // 0x1 + field public static final int SS_ERASURE = 4; // 0x4 + field public static final int SS_INCOMING_BARRING = 20; // 0x14 + field public static final int SS_INCOMING_BARRING_ANONYMOUS = 22; // 0x16 + field public static final int SS_INCOMING_BARRING_DN = 21; // 0x15 + field public static final int SS_INTERROGATION = 2; // 0x2 + field public static final int SS_OUTGOING_BARRING = 19; // 0x13 + field public static final int SS_REGISTRATION = 3; // 0x3 + field public static final int SS_SMS_SERVICES = 4; // 0x4 + field public static final int SS_TELEPHONY = 2; // 0x2 + field public static final int SS_WAIT = 12; // 0xc + } + + public static final class ImsSsData.Builder { + ctor public ImsSsData.Builder(int, int, int, int, int); + method @NonNull public android.telephony.ims.ImsSsData build(); + method @NonNull public android.telephony.ims.ImsSsData.Builder setCallForwardingInfo(@NonNull java.util.List<android.telephony.ims.ImsCallForwardInfo>); + method @NonNull public android.telephony.ims.ImsSsData.Builder setSuppServiceInfo(@NonNull java.util.List<android.telephony.ims.ImsSsInfo>); + } + + public final class ImsSsInfo implements android.os.Parcelable { + ctor @Deprecated public ImsSsInfo(int, @Nullable String); + method public int describeContents(); + method public int getClirInterrogationStatus(); + method public int getClirOutgoingState(); + method @Deprecated public String getIcbNum(); + method @Nullable public String getIncomingCommunicationBarringNumber(); + method public int getProvisionStatus(); + method public int getStatus(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CLIR_OUTGOING_DEFAULT = 0; // 0x0 + field public static final int CLIR_OUTGOING_INVOCATION = 1; // 0x1 + field public static final int CLIR_OUTGOING_SUPPRESSION = 2; // 0x2 + field public static final int CLIR_STATUS_NOT_PROVISIONED = 0; // 0x0 + field public static final int CLIR_STATUS_PROVISIONED_PERMANENT = 1; // 0x1 + field public static final int CLIR_STATUS_TEMPORARILY_ALLOWED = 4; // 0x4 + field public static final int CLIR_STATUS_TEMPORARILY_RESTRICTED = 3; // 0x3 + field public static final int CLIR_STATUS_UNKNOWN = 2; // 0x2 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsSsInfo> CREATOR; + field public static final int DISABLED = 0; // 0x0 + field public static final int ENABLED = 1; // 0x1 + field public static final int NOT_REGISTERED = -1; // 0xffffffff + field public static final int SERVICE_NOT_PROVISIONED = 0; // 0x0 + field public static final int SERVICE_PROVISIONED = 1; // 0x1 + field public static final int SERVICE_PROVISIONING_UNKNOWN = -1; // 0xffffffff + } + + public static final class ImsSsInfo.Builder { + ctor public ImsSsInfo.Builder(int); + method @NonNull public android.telephony.ims.ImsSsInfo build(); + method @NonNull public android.telephony.ims.ImsSsInfo.Builder setClirInterrogationStatus(int); + method @NonNull public android.telephony.ims.ImsSsInfo.Builder setClirOutgoingState(int); + method @NonNull public android.telephony.ims.ImsSsInfo.Builder setIncomingCommunicationBarringNumber(@NonNull String); + method @NonNull public android.telephony.ims.ImsSsInfo.Builder setProvisionStatus(int); + } + + public final class ImsStreamMediaProfile implements android.os.Parcelable { + ctor public ImsStreamMediaProfile(int, int, int, int, int); + method public void copyFrom(android.telephony.ims.ImsStreamMediaProfile); + method public int describeContents(); + method @Nullable public android.telephony.ims.AudioCodecAttributes getAudioCodecAttributes(); + method public int getAudioDirection(); + method public int getAudioQuality(); + method public int getRttMode(); + method public int getVideoDirection(); + method public int getVideoQuality(); + method public boolean isReceivingRttAudio(); + method public boolean isRttCall(); + method public void setAudioCodecAttributes(@NonNull android.telephony.ims.AudioCodecAttributes); + method public void setReceivingRttAudio(boolean); + method public void setRttMode(int); + method public void writeToParcel(android.os.Parcel, int); + field public static final int AUDIO_QUALITY_AMR = 1; // 0x1 + field public static final int AUDIO_QUALITY_AMR_WB = 2; // 0x2 + field public static final int AUDIO_QUALITY_EVRC = 4; // 0x4 + field public static final int AUDIO_QUALITY_EVRC_B = 5; // 0x5 + field public static final int AUDIO_QUALITY_EVRC_NW = 7; // 0x7 + field public static final int AUDIO_QUALITY_EVRC_WB = 6; // 0x6 + field public static final int AUDIO_QUALITY_EVS_FB = 20; // 0x14 + field public static final int AUDIO_QUALITY_EVS_NB = 17; // 0x11 + field public static final int AUDIO_QUALITY_EVS_SWB = 19; // 0x13 + field public static final int AUDIO_QUALITY_EVS_WB = 18; // 0x12 + field public static final int AUDIO_QUALITY_G711A = 13; // 0xd + field public static final int AUDIO_QUALITY_G711AB = 15; // 0xf + field public static final int AUDIO_QUALITY_G711U = 11; // 0xb + field public static final int AUDIO_QUALITY_G722 = 14; // 0xe + field public static final int AUDIO_QUALITY_G723 = 12; // 0xc + field public static final int AUDIO_QUALITY_G729 = 16; // 0x10 + field public static final int AUDIO_QUALITY_GSM_EFR = 8; // 0x8 + field public static final int AUDIO_QUALITY_GSM_FR = 9; // 0x9 + field public static final int AUDIO_QUALITY_GSM_HR = 10; // 0xa + field public static final int AUDIO_QUALITY_NONE = 0; // 0x0 + field public static final int AUDIO_QUALITY_QCELP13K = 3; // 0x3 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsStreamMediaProfile> CREATOR; + field public static final int DIRECTION_INACTIVE = 0; // 0x0 + field public static final int DIRECTION_INVALID = -1; // 0xffffffff + field public static final int DIRECTION_RECEIVE = 1; // 0x1 + field public static final int DIRECTION_SEND = 2; // 0x2 + field public static final int DIRECTION_SEND_RECEIVE = 3; // 0x3 + field public static final int RTT_MODE_DISABLED = 0; // 0x0 + field public static final int RTT_MODE_FULL = 1; // 0x1 + field public static final int VIDEO_QUALITY_NONE = 0; // 0x0 + field public static final int VIDEO_QUALITY_QCIF = 1; // 0x1 + field public static final int VIDEO_QUALITY_QVGA_LANDSCAPE = 2; // 0x2 + field public static final int VIDEO_QUALITY_QVGA_PORTRAIT = 4; // 0x4 + field public static final int VIDEO_QUALITY_VGA_LANDSCAPE = 8; // 0x8 + field public static final int VIDEO_QUALITY_VGA_PORTRAIT = 16; // 0x10 + } + + public final class ImsSuppServiceNotification implements android.os.Parcelable { + ctor public ImsSuppServiceNotification(int, int, int, int, String, String[]); + method public int describeContents(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsSuppServiceNotification> CREATOR; + field public final int code; + field public final String[] history; + field public final int index; + field public final int notificationType; + field public final String number; + field public final int type; + } + + public class ImsUtListener { + method public void onLineIdentificationSupplementaryServiceResponse(int, @NonNull android.telephony.ims.ImsSsInfo); + method public void onSupplementaryServiceIndication(android.telephony.ims.ImsSsData); + method public void onUtConfigurationCallBarringQueried(int, android.telephony.ims.ImsSsInfo[]); + method public void onUtConfigurationCallForwardQueried(int, android.telephony.ims.ImsCallForwardInfo[]); + method public void onUtConfigurationCallWaitingQueried(int, android.telephony.ims.ImsSsInfo[]); + method @Deprecated public void onUtConfigurationQueried(int, android.os.Bundle); + method public void onUtConfigurationQueryFailed(int, android.telephony.ims.ImsReasonInfo); + method public void onUtConfigurationUpdateFailed(int, android.telephony.ims.ImsReasonInfo); + method public void onUtConfigurationUpdated(int); + field @Deprecated public static final String BUNDLE_KEY_CLIR = "queryClir"; + field @Deprecated public static final String BUNDLE_KEY_SSINFO = "imsSsInfo"; + } + + public abstract class ImsVideoCallProvider { + ctor public ImsVideoCallProvider(); + method public void changeCallDataUsage(long); + 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 onRequestCallDataUsage(); + method public abstract void onRequestCameraCapabilities(); + method public abstract void onSendSessionModifyRequest(android.telecom.VideoProfile, android.telecom.VideoProfile); + method public abstract void onSendSessionModifyResponse(android.telecom.VideoProfile); + method public abstract void onSetCamera(String); + method public void onSetCamera(String, int); + 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); + } + + public class ProvisioningManager { + method @NonNull public static android.telephony.ims.ProvisioningManager createForSubscriptionId(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public int getProvisioningIntValue(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public boolean getProvisioningStatusForCapability(int, int); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public String getProvisioningStringValue(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public boolean getRcsProvisioningStatusForCapability(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void notifyRcsAutoConfigurationReceived(@NonNull byte[], boolean); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void registerProvisioningChangedCallback(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.ims.ProvisioningManager.Callback) throws android.telephony.ims.ImsException; + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public int setProvisioningIntValue(int, int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void setProvisioningStatusForCapability(int, int, boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public int setProvisioningStringValue(int, @NonNull String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void setRcsProvisioningStatusForCapability(int, boolean); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void unregisterProvisioningChangedCallback(@NonNull android.telephony.ims.ProvisioningManager.Callback); + field public static final int KEY_VOICE_OVER_WIFI_ENTITLEMENT_ID = 67; // 0x43 + field public static final int KEY_VOICE_OVER_WIFI_MODE_OVERRIDE = 27; // 0x1b + field public static final int KEY_VOICE_OVER_WIFI_ROAMING_ENABLED_OVERRIDE = 26; // 0x1a + field public static final int PROVISIONING_VALUE_DISABLED = 0; // 0x0 + field public static final int PROVISIONING_VALUE_ENABLED = 1; // 0x1 + field public static final String STRING_QUERY_RESULT_ERROR_GENERIC = "STRING_QUERY_RESULT_ERROR_GENERIC"; + field public static final String STRING_QUERY_RESULT_ERROR_NOT_READY = "STRING_QUERY_RESULT_ERROR_NOT_READY"; + } + + public static class ProvisioningManager.Callback { + ctor public ProvisioningManager.Callback(); + method public void onProvisioningIntChanged(int, int); + method public void onProvisioningStringChanged(int, @NonNull String); + } + + public class RcsUceAdapter { + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUceSettingEnabled(boolean) throws android.telephony.ims.ImsException; + } + + public class SipDelegateManager { + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isSupported() throws android.telephony.ims.ImsException; + } + +} + +package android.telephony.ims.feature { + + public final class CapabilityChangeRequest implements android.os.Parcelable { + method public void addCapabilitiesToDisableForTech(int, int); + method public void addCapabilitiesToEnableForTech(int, int); + method public int describeContents(); + method public java.util.List<android.telephony.ims.feature.CapabilityChangeRequest.CapabilityPair> getCapabilitiesToDisable(); + method public java.util.List<android.telephony.ims.feature.CapabilityChangeRequest.CapabilityPair> getCapabilitiesToEnable(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.feature.CapabilityChangeRequest> CREATOR; + } + + public static class CapabilityChangeRequest.CapabilityPair { + ctor public CapabilityChangeRequest.CapabilityPair(int, int); + method public int getCapability(); + method public int getRadioTech(); + } + + public abstract class ImsFeature { + ctor public ImsFeature(); + method public abstract void changeEnabledCapabilities(android.telephony.ims.feature.CapabilityChangeRequest, android.telephony.ims.feature.ImsFeature.CapabilityCallbackProxy); + method public int getFeatureState(); + method public final int getSlotIndex(); + method public abstract void onFeatureReady(); + method public abstract void onFeatureRemoved(); + method public final void setFeatureState(int); + field public static final int CAPABILITY_ERROR_GENERIC = -1; // 0xffffffff + field public static final int CAPABILITY_SUCCESS = 0; // 0x0 + field public static final int FEATURE_EMERGENCY_MMTEL = 0; // 0x0 + field public static final int FEATURE_MMTEL = 1; // 0x1 + field public static final int FEATURE_RCS = 2; // 0x2 + field public static final int STATE_INITIALIZING = 1; // 0x1 + field public static final int STATE_READY = 2; // 0x2 + field public static final int STATE_UNAVAILABLE = 0; // 0x0 + } + + @Deprecated public static class ImsFeature.Capabilities { + field @Deprecated protected int mCapabilities; + } + + protected static class ImsFeature.CapabilityCallbackProxy { + method public void onChangeCapabilityConfigurationError(int, int, int); + } + + public class MmTelFeature extends android.telephony.ims.feature.ImsFeature { + ctor public MmTelFeature(); + method public void changeEnabledCapabilities(@NonNull android.telephony.ims.feature.CapabilityChangeRequest, @NonNull android.telephony.ims.feature.ImsFeature.CapabilityCallbackProxy); + method @Nullable public android.telephony.ims.ImsCallProfile createCallProfile(int, int); + method @Nullable public android.telephony.ims.stub.ImsCallSessionImplBase createCallSession(@NonNull android.telephony.ims.ImsCallProfile); + method @NonNull public android.telephony.ims.stub.ImsEcbmImplBase getEcbm(); + method @NonNull public android.telephony.ims.stub.ImsMultiEndpointImplBase getMultiEndpoint(); + method @NonNull public android.telephony.ims.stub.ImsSmsImplBase getSmsImplementation(); + method @NonNull public android.telephony.ims.stub.ImsUtImplBase getUt(); + method public final void notifyCapabilitiesStatusChanged(@NonNull android.telephony.ims.feature.MmTelFeature.MmTelCapabilities); + method public final void notifyIncomingCall(@NonNull android.telephony.ims.stub.ImsCallSessionImplBase, @NonNull android.os.Bundle); + method public final void notifyRejectedCall(@NonNull android.telephony.ims.ImsCallProfile, @NonNull android.telephony.ims.ImsReasonInfo); + method public final void notifyVoiceMessageCountUpdate(int); + method public void onFeatureReady(); + method public void onFeatureRemoved(); + method public boolean queryCapabilityConfiguration(int, int); + method @NonNull public final android.telephony.ims.feature.MmTelFeature.MmTelCapabilities queryCapabilityStatus(); + method public void setUiTtyMode(int, @Nullable android.os.Message); + method public int shouldProcessCall(@NonNull String[]); + field public static final String EXTRA_IS_UNKNOWN_CALL = "android.telephony.ims.feature.extra.IS_UNKNOWN_CALL"; + field public static final String EXTRA_IS_USSD = "android.telephony.ims.feature.extra.IS_USSD"; + field public static final int PROCESS_CALL_CSFB = 1; // 0x1 + field public static final int PROCESS_CALL_IMS = 0; // 0x0 + } + + public static class MmTelFeature.MmTelCapabilities extends android.telephony.ims.feature.ImsFeature.Capabilities { + ctor public MmTelFeature.MmTelCapabilities(); + ctor @Deprecated public MmTelFeature.MmTelCapabilities(android.telephony.ims.feature.ImsFeature.Capabilities); + ctor public MmTelFeature.MmTelCapabilities(int); + method public final void addCapabilities(int); + method public final void removeCapabilities(int); + } + + public class RcsFeature extends android.telephony.ims.feature.ImsFeature { + ctor public RcsFeature(); + method public void changeEnabledCapabilities(@NonNull android.telephony.ims.feature.CapabilityChangeRequest, @NonNull android.telephony.ims.feature.ImsFeature.CapabilityCallbackProxy); + method public void onFeatureReady(); + method public void onFeatureRemoved(); + } + +} + +package android.telephony.ims.stub { + + public class ImsCallSessionImplBase implements java.lang.AutoCloseable { + ctor public ImsCallSessionImplBase(); + method public void accept(int, android.telephony.ims.ImsStreamMediaProfile); + method public void close(); + method public void deflect(String); + method public void extendToConference(String[]); + method public String getCallId(); + method public android.telephony.ims.ImsCallProfile getCallProfile(); + method public android.telephony.ims.ImsVideoCallProvider getImsVideoCallProvider(); + method public android.telephony.ims.ImsCallProfile getLocalCallProfile(); + method public String getProperty(String); + method public android.telephony.ims.ImsCallProfile getRemoteCallProfile(); + method public int getState(); + method public void hold(android.telephony.ims.ImsStreamMediaProfile); + method public void inviteParticipants(String[]); + method public boolean isInCall(); + method public boolean isMultiparty(); + method public void merge(); + method public void reject(int); + method public void removeParticipants(String[]); + method public void resume(android.telephony.ims.ImsStreamMediaProfile); + method public void sendDtmf(char, android.os.Message); + method public void sendRttMessage(String); + method public void sendRttModifyRequest(android.telephony.ims.ImsCallProfile); + method public void sendRttModifyResponse(boolean); + method public void sendUssd(String); + method public void setListener(android.telephony.ims.ImsCallSessionListener); + method public void setMute(boolean); + method public void start(String, android.telephony.ims.ImsCallProfile); + method public void startConference(String[], android.telephony.ims.ImsCallProfile); + method public void startDtmf(char); + method public void stopDtmf(); + method public void terminate(int); + method public void update(int, android.telephony.ims.ImsStreamMediaProfile); + field public static final int USSD_MODE_NOTIFY = 0; // 0x0 + field public static final int USSD_MODE_REQUEST = 1; // 0x1 + } + + public static class ImsCallSessionImplBase.State { + method public static String toString(int); + field public static final int ESTABLISHED = 4; // 0x4 + field public static final int ESTABLISHING = 3; // 0x3 + field public static final int IDLE = 0; // 0x0 + field public static final int INITIATED = 1; // 0x1 + field public static final int INVALID = -1; // 0xffffffff + field public static final int NEGOTIATING = 2; // 0x2 + field public static final int REESTABLISHING = 6; // 0x6 + field public static final int RENEGOTIATING = 5; // 0x5 + field public static final int TERMINATED = 8; // 0x8 + field public static final int TERMINATING = 7; // 0x7 + } + + public class ImsConfigImplBase { + ctor public ImsConfigImplBase(); + method public int getConfigInt(int); + method public String getConfigString(int); + method public final void notifyProvisionedValueChanged(int, int); + method public final void notifyProvisionedValueChanged(int, String); + method public void notifyRcsAutoConfigurationReceived(@NonNull byte[], boolean); + method public int setConfig(int, int); + method public int setConfig(int, String); + field public static final int CONFIG_RESULT_FAILED = 1; // 0x1 + field public static final int CONFIG_RESULT_SUCCESS = 0; // 0x0 + field public static final int CONFIG_RESULT_UNKNOWN = -1; // 0xffffffff + } + + public class ImsEcbmImplBase { + ctor public ImsEcbmImplBase(); + method public final void enteredEcbm(); + method public void exitEmergencyCallbackMode(); + method public final void exitedEcbm(); + } + + public final class ImsFeatureConfiguration implements android.os.Parcelable { + method public int describeContents(); + method public java.util.Set<android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair> getServiceFeatures(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.stub.ImsFeatureConfiguration> CREATOR; + } + + public static class ImsFeatureConfiguration.Builder { + ctor public ImsFeatureConfiguration.Builder(); + method public android.telephony.ims.stub.ImsFeatureConfiguration.Builder addFeature(int, int); + method public android.telephony.ims.stub.ImsFeatureConfiguration build(); + } + + public static final class ImsFeatureConfiguration.FeatureSlotPair { + ctor public ImsFeatureConfiguration.FeatureSlotPair(int, int); + field public final int featureType; + field public final int slotId; + } + + public class ImsMultiEndpointImplBase { + ctor public ImsMultiEndpointImplBase(); + method public final void onImsExternalCallStateUpdate(java.util.List<android.telephony.ims.ImsExternalCallState>); + method public void requestImsExternalCallStateInfo(); + } + + public class ImsRegistrationImplBase { + ctor public ImsRegistrationImplBase(); + method public final void onDeregistered(android.telephony.ims.ImsReasonInfo); + method public final void onRegistered(int); + method public final void onRegistering(int); + method public final void onSubscriberAssociatedUriChanged(android.net.Uri[]); + method public final void onTechnologyChangeFailed(int, android.telephony.ims.ImsReasonInfo); + field public static final int REGISTRATION_TECH_IWLAN = 1; // 0x1 + field public static final int REGISTRATION_TECH_LTE = 0; // 0x0 + field public static final int REGISTRATION_TECH_NONE = -1; // 0xffffffff + } + + public class ImsSmsImplBase { + ctor public ImsSmsImplBase(); + method public void acknowledgeSms(int, @IntRange(from=0, to=65535) int, int); + method public void acknowledgeSmsReport(int, @IntRange(from=0, to=65535) int, int); + method public String getSmsFormat(); + method public void onReady(); + method @Deprecated public final void onSendSmsResult(int, @IntRange(from=0, to=65535) int, int, int) throws java.lang.RuntimeException; + method public final void onSendSmsResultError(int, @IntRange(from=0, to=65535) int, int, int, int) throws java.lang.RuntimeException; + method public final void onSendSmsResultSuccess(int, @IntRange(from=0, to=65535) int) throws java.lang.RuntimeException; + method public final void onSmsReceived(int, String, byte[]) throws java.lang.RuntimeException; + method @Deprecated public final void onSmsStatusReportReceived(int, @IntRange(from=0, to=65535) int, String, byte[]) throws java.lang.RuntimeException; + method public final void onSmsStatusReportReceived(int, String, byte[]) throws java.lang.RuntimeException; + method public void sendSms(int, @IntRange(from=0, to=65535) int, String, String, boolean, byte[]); + field public static final int DELIVER_STATUS_ERROR_GENERIC = 2; // 0x2 + field public static final int DELIVER_STATUS_ERROR_NO_MEMORY = 3; // 0x3 + field public static final int DELIVER_STATUS_ERROR_REQUEST_NOT_SUPPORTED = 4; // 0x4 + field public static final int DELIVER_STATUS_OK = 1; // 0x1 + field public static final int RESULT_NO_NETWORK_ERROR = -1; // 0xffffffff + field public static final int SEND_STATUS_ERROR = 2; // 0x2 + field public static final int SEND_STATUS_ERROR_FALLBACK = 4; // 0x4 + field public static final int SEND_STATUS_ERROR_RETRY = 3; // 0x3 + field public static final int SEND_STATUS_OK = 1; // 0x1 + field public static final int STATUS_REPORT_STATUS_ERROR = 2; // 0x2 + field public static final int STATUS_REPORT_STATUS_OK = 1; // 0x1 + } + + public class ImsUtImplBase { + ctor public ImsUtImplBase(); + method public void close(); + method public int queryCFForServiceClass(int, String, int); + method public int queryCallBarring(int); + method public int queryCallBarringForServiceClass(int, int); + method public int queryCallForward(int, String); + method public int queryCallWaiting(); + method public int queryClip(); + method public int queryClir(); + method public int queryColp(); + method public int queryColr(); + method public void setListener(android.telephony.ims.ImsUtListener); + method public int transact(android.os.Bundle); + method public int updateCallBarring(int, int, String[]); + method public int updateCallBarringForServiceClass(int, int, String[], int); + method public int updateCallForward(int, int, String, int, int); + method public int updateCallWaiting(boolean, int); + method public int updateClip(boolean); + method public int updateClir(int); + method public int updateColp(boolean); + method public int updateColr(int); + } + + public class SipTransportImplBase { + ctor public SipTransportImplBase(@NonNull java.util.concurrent.Executor); + } + +} + +package android.telephony.mbms { + + public static class DownloadRequest.Builder { + method public android.telephony.mbms.DownloadRequest.Builder setServiceId(String); + } + + public final class FileInfo implements android.os.Parcelable { + ctor public FileInfo(android.net.Uri, String); + } + + public final class FileServiceInfo extends android.telephony.mbms.ServiceInfo implements android.os.Parcelable { + ctor public FileServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date, java.util.List<android.telephony.mbms.FileInfo>); + } + + public class MbmsDownloadReceiver extends android.content.BroadcastReceiver { + field public static final int RESULT_APP_NOTIFICATION_ERROR = 6; // 0x6 + field public static final int RESULT_BAD_TEMP_FILE_ROOT = 3; // 0x3 + field public static final int RESULT_DOWNLOAD_FINALIZATION_ERROR = 4; // 0x4 + field public static final int RESULT_INVALID_ACTION = 1; // 0x1 + field public static final int RESULT_MALFORMED_INTENT = 2; // 0x2 + field public static final int RESULT_OK = 0; // 0x0 + field public static final int RESULT_TEMP_FILE_GENERATION_ERROR = 5; // 0x5 + } + + public final class StreamingServiceInfo extends android.telephony.mbms.ServiceInfo implements android.os.Parcelable { + ctor public StreamingServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date); + } + + public final class UriPathPair implements android.os.Parcelable { + method public int describeContents(); + method public android.net.Uri getContentUri(); + method public android.net.Uri getFilePathUri(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.mbms.UriPathPair> CREATOR; + } + +} + +package android.telephony.mbms.vendor { + + public class MbmsDownloadServiceBase extends android.os.Binder implements android.os.IInterface { + ctor public MbmsDownloadServiceBase(); + method public int addProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) throws android.os.RemoteException; + method public int addServiceAnnouncement(int, @NonNull byte[]); + method public int addStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) throws android.os.RemoteException; + method public android.os.IBinder asBinder(); + method public int cancelDownload(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException; + method public void dispose(int) throws android.os.RemoteException; + method public int download(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException; + method public int initialize(int, android.telephony.mbms.MbmsDownloadSessionCallback) throws android.os.RemoteException; + method @NonNull public java.util.List<android.telephony.mbms.DownloadRequest> listPendingDownloads(int) throws android.os.RemoteException; + method public void onAppCallbackDied(int, int); + method public boolean onTransact(int, android.os.Parcel, android.os.Parcel, int) throws android.os.RemoteException; + method public int removeProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) throws android.os.RemoteException; + method public int removeStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) throws android.os.RemoteException; + method public int requestDownloadState(android.telephony.mbms.DownloadRequest, android.telephony.mbms.FileInfo) throws android.os.RemoteException; + method public int requestUpdateFileServices(int, java.util.List<java.lang.String>) throws android.os.RemoteException; + method public int resetDownloadKnowledge(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException; + method public int setTempFileRootDirectory(int, String) throws android.os.RemoteException; + } + + public class MbmsGroupCallServiceBase extends android.app.Service { + ctor public MbmsGroupCallServiceBase(); + method public void dispose(int) throws android.os.RemoteException; + method public int initialize(@NonNull android.telephony.mbms.MbmsGroupCallSessionCallback, int) throws android.os.RemoteException; + method public void onAppCallbackDied(int, int); + method public android.os.IBinder onBind(android.content.Intent); + method public int startGroupCall(int, long, @NonNull java.util.List<java.lang.Integer>, @NonNull java.util.List<java.lang.Integer>, @NonNull android.telephony.mbms.GroupCallCallback); + method public void stopGroupCall(int, long); + method public void updateGroupCall(int, long, @NonNull java.util.List<java.lang.Integer>, @NonNull java.util.List<java.lang.Integer>); + } + + public class MbmsStreamingServiceBase extends android.os.Binder implements android.os.IInterface { + ctor public MbmsStreamingServiceBase(); + method public android.os.IBinder asBinder(); + method public void dispose(int) throws android.os.RemoteException; + method @Nullable public android.net.Uri getPlaybackUri(int, String) throws android.os.RemoteException; + method public int initialize(android.telephony.mbms.MbmsStreamingSessionCallback, int) throws android.os.RemoteException; + method public void onAppCallbackDied(int, int); + method public boolean onTransact(int, android.os.Parcel, android.os.Parcel, int) throws android.os.RemoteException; + method public int requestUpdateStreamingServices(int, java.util.List<java.lang.String>) throws android.os.RemoteException; + method public int startStreaming(int, String, android.telephony.mbms.StreamingServiceCallback) throws android.os.RemoteException; + method public void stopStreaming(int, String) throws android.os.RemoteException; + } + + public class VendorUtils { + ctor public VendorUtils(); + method public static android.content.ComponentName getAppReceiverFromPackageName(android.content.Context, String); + field public static final String ACTION_CLEANUP = "android.telephony.mbms.action.CLEANUP"; + field public static final String ACTION_DOWNLOAD_RESULT_INTERNAL = "android.telephony.mbms.action.DOWNLOAD_RESULT_INTERNAL"; + field public static final String ACTION_FILE_DESCRIPTOR_REQUEST = "android.telephony.mbms.action.FILE_DESCRIPTOR_REQUEST"; + field public static final String EXTRA_FD_COUNT = "android.telephony.mbms.extra.FD_COUNT"; + field public static final String EXTRA_FINAL_URI = "android.telephony.mbms.extra.FINAL_URI"; + field public static final String EXTRA_FREE_URI_LIST = "android.telephony.mbms.extra.FREE_URI_LIST"; + field public static final String EXTRA_PAUSED_LIST = "android.telephony.mbms.extra.PAUSED_LIST"; + field public static final String EXTRA_PAUSED_URI_LIST = "android.telephony.mbms.extra.PAUSED_URI_LIST"; + field public static final String EXTRA_SERVICE_ID = "android.telephony.mbms.extra.SERVICE_ID"; + field public static final String EXTRA_TEMP_FILES_IN_USE = "android.telephony.mbms.extra.TEMP_FILES_IN_USE"; + field public static final String EXTRA_TEMP_FILE_ROOT = "android.telephony.mbms.extra.TEMP_FILE_ROOT"; + field public static final String EXTRA_TEMP_LIST = "android.telephony.mbms.extra.TEMP_LIST"; + } + +} + +package android.util { + + public class EventLog { + method public static void readEventsOnWrapping(int[], long, java.util.Collection<android.util.EventLog.Event>) throws java.io.IOException; + } + + public static final class EventLog.Event { + method public int getUid(); + } + + public final class StatsEvent { + method @NonNull public static android.util.StatsEvent.Builder newBuilder(); + } + + public static final class StatsEvent.Builder { + method @NonNull public android.util.StatsEvent.Builder addBooleanAnnotation(byte, boolean); + method @NonNull public android.util.StatsEvent.Builder addIntAnnotation(byte, int); + method @NonNull public android.util.StatsEvent build(); + method @NonNull public android.util.StatsEvent.Builder setAtomId(int); + method @NonNull public android.util.StatsEvent.Builder usePooledBuffer(); + method @NonNull public android.util.StatsEvent.Builder writeAttributionChain(@NonNull int[], @NonNull String[]); + method @NonNull public android.util.StatsEvent.Builder writeBoolean(boolean); + method @NonNull public android.util.StatsEvent.Builder writeByteArray(@NonNull byte[]); + method @NonNull public android.util.StatsEvent.Builder writeFloat(float); + method @NonNull public android.util.StatsEvent.Builder writeInt(int); + method @NonNull public android.util.StatsEvent.Builder writeKeyValuePairs(@Nullable android.util.SparseIntArray, @Nullable android.util.SparseLongArray, @Nullable android.util.SparseArray<java.lang.String>, @Nullable android.util.SparseArray<java.lang.Float>); + method @NonNull public android.util.StatsEvent.Builder writeLong(long); + method @NonNull public android.util.StatsEvent.Builder writeString(@NonNull String); + } + + public final class StatsLog { + method public static void write(@NonNull android.util.StatsEvent); + method public static void writeRaw(@NonNull byte[], int); + } + +} + +package android.view { + + public abstract class Window { + method public void addSystemFlags(@android.view.WindowManager.LayoutParams.SystemFlags int); + } + + public interface WindowManager extends android.view.ViewManager { + method @RequiresPermission(android.Manifest.permission.RESTRICTED_VR_ACCESS) public android.graphics.Region getCurrentImeTouchRegion(); + } + + public static class WindowManager.LayoutParams extends android.view.ViewGroup.LayoutParams implements android.os.Parcelable { + method public final long getUserActivityTimeout(); + method public final void setUserActivityTimeout(long); + field @RequiresPermission(android.Manifest.permission.HIDE_NON_SYSTEM_OVERLAY_WINDOWS) public static final int SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS = 524288; // 0x80000 + field @RequiresPermission(android.Manifest.permission.INTERNAL_SYSTEM_WINDOW) public static final int SYSTEM_FLAG_SHOW_FOR_ALL_USERS = 16; // 0x10 + } + + @IntDef(flag=true, prefix={"SYSTEM_FLAG_"}, value={android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS, android.view.WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface WindowManager.LayoutParams.SystemFlags { + } + +} + +package android.view.accessibility { + + public final class AccessibilityManager { + method public int getAccessibilityWindowId(@Nullable android.os.IBinder); + method @RequiresPermission(android.Manifest.permission.MANAGE_ACCESSIBILITY) public void performAccessibilityShortcut(); + method @RequiresPermission(android.Manifest.permission.MANAGE_ACCESSIBILITY) public void registerSystemAction(@NonNull android.app.RemoteAction, int); + method @RequiresPermission(android.Manifest.permission.MANAGE_ACCESSIBILITY) public void unregisterSystemAction(int); + } + +} + +package android.view.autofill { + + public final class AutofillManager { + method public void setAugmentedAutofillWhitelist(@Nullable java.util.Set<java.lang.String>, @Nullable java.util.Set<android.content.ComponentName>); + } + +} + +package android.view.contentcapture { + + public final class ContentCaptureContext implements android.os.Parcelable { + method @Nullable public android.content.ComponentName getActivityComponent(); + method public int getDisplayId(); + method public int getFlags(); + method @Nullable public android.view.contentcapture.ContentCaptureSessionId getParentSessionId(); + method public int getTaskId(); + field public static final int FLAG_DISABLED_BY_APP = 1; // 0x1 + field public static final int FLAG_DISABLED_BY_FLAG_SECURE = 2; // 0x2 + field public static final int FLAG_RECONNECTED = 4; // 0x4 + } + + public final class ContentCaptureEvent implements android.os.Parcelable { + method public int describeContents(); + method @Nullable public android.view.contentcapture.ContentCaptureContext getContentCaptureContext(); + method public long getEventTime(); + method @Nullable public android.view.autofill.AutofillId getId(); + method @Nullable public java.util.List<android.view.autofill.AutofillId> getIds(); + method @Nullable public android.graphics.Insets getInsets(); + method @Nullable public CharSequence getText(); + method public int getType(); + method @Nullable public android.view.contentcapture.ViewNode getViewNode(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.view.contentcapture.ContentCaptureEvent> CREATOR; + field public static final int TYPE_CONTEXT_UPDATED = 6; // 0x6 + field public static final int TYPE_SESSION_PAUSED = 8; // 0x8 + field public static final int TYPE_SESSION_RESUMED = 7; // 0x7 + field public static final int TYPE_VIEW_APPEARED = 1; // 0x1 + field public static final int TYPE_VIEW_DISAPPEARED = 2; // 0x2 + field public static final int TYPE_VIEW_INSETS_CHANGED = 9; // 0x9 + field public static final int TYPE_VIEW_TEXT_CHANGED = 3; // 0x3 + field public static final int TYPE_VIEW_TREE_APPEARED = 5; // 0x5 + field public static final int TYPE_VIEW_TREE_APPEARING = 4; // 0x4 + } + + public final class ContentCaptureManager { + method public boolean isContentCaptureFeatureEnabled(); + field public static final int NO_SESSION_ID = 0; // 0x0 + } + + public final class ViewNode extends android.app.assist.AssistStructure.ViewNode { + method @Nullable public android.view.autofill.AutofillId getParentAutofillId(); + } + +} + +package android.webkit { + + public abstract class CookieManager { + method protected abstract boolean allowFileSchemeCookiesImpl(); + method public abstract String getCookie(String, boolean); + method public String getCookie(android.net.WebAddress); + method public abstract boolean hasCookies(boolean); + method protected abstract void setAcceptFileSchemeCookiesImpl(boolean); + } + + public class FindActionModeCallback implements android.view.ActionMode.Callback android.text.TextWatcher android.view.View.OnClickListener android.webkit.WebView.FindListener { + ctor public FindActionModeCallback(android.content.Context); + method public void afterTextChanged(android.text.Editable); + method public void beforeTextChanged(CharSequence, int, int, int); + method public void findAll(); + method public void finish(); + method public int getActionModeGlobalBottom(); + method public boolean onActionItemClicked(android.view.ActionMode, android.view.MenuItem); + method public void onClick(android.view.View); + method public boolean onCreateActionMode(android.view.ActionMode, android.view.Menu); + method public void onDestroyActionMode(android.view.ActionMode); + method public void onFindResultReceived(int, int, boolean); + method public boolean onPrepareActionMode(android.view.ActionMode, android.view.Menu); + method public void onTextChanged(CharSequence, int, int, int); + method public void setText(String); + method public void setWebView(@NonNull android.webkit.WebView); + method public void showSoftInput(); + method public void updateMatchCount(int, int, boolean); + } + + public static class FindActionModeCallback.NoAction implements android.view.ActionMode.Callback { + ctor public FindActionModeCallback.NoAction(); + method public boolean onActionItemClicked(android.view.ActionMode, android.view.MenuItem); + method public boolean onCreateActionMode(android.view.ActionMode, android.view.Menu); + method public void onDestroyActionMode(android.view.ActionMode); + method public boolean onPrepareActionMode(android.view.ActionMode, android.view.Menu); + } + + public class GeolocationPermissions { + ctor public GeolocationPermissions(); + } + + public class HttpAuthHandler extends android.os.Handler { + ctor public HttpAuthHandler(); + } + + public class JsDialogHelper { + ctor public JsDialogHelper(android.webkit.JsPromptResult, int, String, String, String); + ctor public JsDialogHelper(android.webkit.JsPromptResult, android.os.Message); + method public boolean invokeCallback(android.webkit.WebChromeClient, android.webkit.WebView); + method public void showDialog(android.content.Context); + field public static final int ALERT = 1; // 0x1 + field public static final int CONFIRM = 2; // 0x2 + field public static final int PROMPT = 3; // 0x3 + field public static final int UNLOAD = 4; // 0x4 + } + + public class JsPromptResult extends android.webkit.JsResult { + ctor public JsPromptResult(android.webkit.JsResult.ResultReceiver); + method public String getStringResult(); + } + + public class JsResult { + ctor public JsResult(android.webkit.JsResult.ResultReceiver); + method public final boolean getResult(); + } + + public static interface JsResult.ResultReceiver { + method public void onJsResultComplete(android.webkit.JsResult); + } + + public interface PacProcessor { + method @NonNull public static android.webkit.PacProcessor createInstance(); + method @Nullable public String findProxyForUrl(@NonNull String); + method @NonNull public static android.webkit.PacProcessor getInstance(); + method @Nullable public default android.net.Network getNetwork(); + method public default void release(); + method public default void setNetwork(@Nullable android.net.Network); + method public boolean setProxyScript(@NonNull String); + } + + public class SslErrorHandler extends android.os.Handler { + ctor public SslErrorHandler(); + } + + @Deprecated public abstract class TokenBindingService { + ctor @Deprecated public TokenBindingService(); + } + + public class WebChromeClient { + method @Deprecated public void openFileChooser(android.webkit.ValueCallback<android.net.Uri>, String, String); + } + + public abstract class WebHistoryItem implements java.lang.Cloneable { + method @Deprecated public abstract int getId(); + } + + @Deprecated public abstract class WebIconDatabase { + method @Deprecated public abstract void bulkRequestIconForPageUrl(android.content.ContentResolver, String, android.webkit.WebIconDatabase.IconListener); + } + + public abstract class WebMessagePort { + ctor public WebMessagePort(); + } + + public abstract class WebResourceError { + ctor public WebResourceError(); + } + + public class WebResourceResponse { + ctor public WebResourceResponse(boolean, String, String, int, String, java.util.Map<java.lang.String,java.lang.String>, java.io.InputStream); + } + + public abstract class WebSettings { + method public abstract boolean getAcceptThirdPartyCookies(); + method @Deprecated public abstract boolean getNavDump(); + method @Deprecated public abstract boolean getPluginsEnabled(); + method @Deprecated public abstract boolean getUseWebViewBackgroundForOverscrollBackground(); + method @Deprecated public abstract int getUserAgent(); + method public abstract boolean getVideoOverlayForEmbeddedEncryptedVideoEnabled(); + method public abstract void setAcceptThirdPartyCookies(boolean); + method @Deprecated public abstract void setNavDump(boolean); + method @Deprecated public abstract void setPluginsEnabled(boolean); + method @Deprecated public abstract void setUseWebViewBackgroundForOverscrollBackground(boolean); + method @Deprecated public abstract void setUserAgent(int); + method public abstract void setVideoOverlayForEmbeddedEncryptedVideoEnabled(boolean); + } + + public class WebStorage { + ctor public WebStorage(); + } + + public static class WebStorage.Origin { + ctor protected WebStorage.Origin(String, long, long); + } + + public class WebView extends android.widget.AbsoluteLayout implements android.view.ViewGroup.OnHierarchyChangeListener android.view.ViewTreeObserver.OnGlobalFocusChangeListener { + method public android.webkit.WebViewProvider getWebViewProvider(); + } + + public static class WebView.HitTestResult { + ctor public WebView.HitTestResult(); + method public void setExtra(String); + method public void setType(int); + } + + public class WebView.PrivateAccess { + ctor public WebView.PrivateAccess(); + method public void awakenScrollBars(int); + method public void awakenScrollBars(int, boolean); + method public float getHorizontalScrollFactor(); + method public int getHorizontalScrollbarHeight(); + method public float getVerticalScrollFactor(); + method public void onScrollChanged(int, int, int, int); + method public void overScrollBy(int, int, int, int, int, int, int, int, boolean); + method public void setMeasuredDimension(int, int); + method public void setScrollXRaw(int); + method public void setScrollYRaw(int); + method public void super_computeScroll(); + method public boolean super_dispatchKeyEvent(android.view.KeyEvent); + method public int super_getScrollBarStyle(); + method @Nullable public android.view.WindowInsets super_onApplyWindowInsets(@Nullable android.view.WindowInsets); + method public void super_onDrawVerticalScrollBar(android.graphics.Canvas, android.graphics.drawable.Drawable, int, int, int, int); + method public boolean super_onGenericMotionEvent(android.view.MotionEvent); + method public boolean super_onHoverEvent(android.view.MotionEvent); + method public boolean super_performAccessibilityAction(int, android.os.Bundle); + method public boolean super_performLongClick(); + method public boolean super_requestFocus(int, android.graphics.Rect); + method public void super_scrollTo(int, int); + method public boolean super_setFrame(int, int, int, int); + method public void super_setLayoutParams(android.view.ViewGroup.LayoutParams); + method public void super_startActivityForResult(android.content.Intent, int); + } + + public final class WebViewDelegate { + method public void addWebViewAssetPath(android.content.Context); + method @Deprecated public void callDrawGlFunction(android.graphics.Canvas, long); + method @Deprecated public void callDrawGlFunction(@NonNull android.graphics.Canvas, long, @Nullable Runnable); + method @Deprecated public boolean canInvokeDrawGlFunctor(android.view.View); + method @Deprecated public void detachDrawGlFunctor(android.view.View, long); + method public void drawWebViewFunctor(@NonNull android.graphics.Canvas, int); + method public android.app.Application getApplication(); + method public String getDataDirectorySuffix(); + method public String getErrorString(android.content.Context, int); + method public int getPackageId(android.content.res.Resources, String); + method @Deprecated public void invokeDrawGlFunctor(android.view.View, long, boolean); + method public boolean isMultiProcessEnabled(); + method public boolean isTraceTagEnabled(); + method public void setOnTraceEnabledChangeListener(android.webkit.WebViewDelegate.OnTraceEnabledChangeListener); + } + + public static interface WebViewDelegate.OnTraceEnabledChangeListener { + method public void onTraceEnabledChange(boolean); + } + + public final class WebViewFactory { + ctor public WebViewFactory(); + method public static android.content.pm.PackageInfo getLoadedPackageInfo(); + method public static int loadWebViewNativeLibraryFromPackage(String, ClassLoader); + method public static void prepareWebViewInZygote(); + field public static final int LIBLOAD_ADDRESS_SPACE_NOT_RESERVED = 2; // 0x2 + field public static final int LIBLOAD_FAILED_JNI_CALL = 7; // 0x7 + field public static final int LIBLOAD_FAILED_LISTING_WEBVIEW_PACKAGES = 4; // 0x4 + field public static final int LIBLOAD_FAILED_TO_FIND_NAMESPACE = 10; // 0xa + field public static final int LIBLOAD_FAILED_TO_LOAD_LIBRARY = 6; // 0x6 + field public static final int LIBLOAD_FAILED_TO_OPEN_RELRO_FILE = 5; // 0x5 + field public static final int LIBLOAD_FAILED_WAITING_FOR_RELRO = 3; // 0x3 + field public static final int LIBLOAD_FAILED_WAITING_FOR_WEBVIEW_REASON_UNKNOWN = 8; // 0x8 + field public static final int LIBLOAD_SUCCESS = 0; // 0x0 + field public static final int LIBLOAD_WRONG_PACKAGE_NAME = 1; // 0x1 + } + + public interface WebViewFactoryProvider { + method @NonNull public default android.webkit.PacProcessor createPacProcessor(); + method public android.webkit.WebViewProvider createWebView(android.webkit.WebView, android.webkit.WebView.PrivateAccess); + method public android.webkit.CookieManager getCookieManager(); + method public android.webkit.GeolocationPermissions getGeolocationPermissions(); + method @NonNull public default android.webkit.PacProcessor getPacProcessor(); + method public android.webkit.ServiceWorkerController getServiceWorkerController(); + method public android.webkit.WebViewFactoryProvider.Statics getStatics(); + method @Deprecated public android.webkit.TokenBindingService getTokenBindingService(); + method public android.webkit.TracingController getTracingController(); + method public android.webkit.WebIconDatabase getWebIconDatabase(); + method public android.webkit.WebStorage getWebStorage(); + method public ClassLoader getWebViewClassLoader(); + method public android.webkit.WebViewDatabase getWebViewDatabase(android.content.Context); + } + + public static interface WebViewFactoryProvider.Statics { + method public void clearClientCertPreferences(Runnable); + method public void enableSlowWholeDocumentDraw(); + method public String findAddress(String); + method public void freeMemoryForTests(); + method public String getDefaultUserAgent(android.content.Context); + method @NonNull public android.net.Uri getSafeBrowsingPrivacyPolicyUrl(); + method public void initSafeBrowsing(android.content.Context, android.webkit.ValueCallback<java.lang.Boolean>); + method public android.net.Uri[] parseFileChooserResult(int, android.content.Intent); + method public void setSafeBrowsingWhitelist(java.util.List<java.lang.String>, android.webkit.ValueCallback<java.lang.Boolean>); + method public void setWebContentsDebuggingEnabled(boolean); + } + + public interface WebViewProvider { + method public void addJavascriptInterface(Object, String); + method public boolean canGoBack(); + method public boolean canGoBackOrForward(int); + method public boolean canGoForward(); + method public boolean canZoomIn(); + method public boolean canZoomOut(); + method public android.graphics.Picture capturePicture(); + method public void clearCache(boolean); + method public void clearFormData(); + method public void clearHistory(); + method public void clearMatches(); + method public void clearSslPreferences(); + method public void clearView(); + method public android.webkit.WebBackForwardList copyBackForwardList(); + method public android.print.PrintDocumentAdapter createPrintDocumentAdapter(String); + method public android.webkit.WebMessagePort[] createWebMessageChannel(); + method public void destroy(); + method public void documentHasImages(android.os.Message); + method public void dumpViewHierarchyWithProperties(java.io.BufferedWriter, int); + method public void evaluateJavaScript(String, android.webkit.ValueCallback<java.lang.String>); + method public int findAll(String); + method public void findAllAsync(String); + method public android.view.View findHierarchyView(String, int); + method public void findNext(boolean); + method public void flingScroll(int, int); + method public void freeMemory(); + method public android.net.http.SslCertificate getCertificate(); + method public int getContentHeight(); + method public int getContentWidth(); + method public android.graphics.Bitmap getFavicon(); + method public android.webkit.WebView.HitTestResult getHitTestResult(); + method public String[] getHttpAuthUsernamePassword(String, String); + method public String getOriginalUrl(); + method public int getProgress(); + method public boolean getRendererPriorityWaivedWhenNotVisible(); + method public int getRendererRequestedPriority(); + method public float getScale(); + method public android.webkit.WebViewProvider.ScrollDelegate getScrollDelegate(); + method public android.webkit.WebSettings getSettings(); + method @NonNull public default android.view.textclassifier.TextClassifier getTextClassifier(); + method public String getTitle(); + method public String getTouchIconUrl(); + method public String getUrl(); + method public android.webkit.WebViewProvider.ViewDelegate getViewDelegate(); + method public int getVisibleTitleHeight(); + method public android.webkit.WebChromeClient getWebChromeClient(); + method public android.webkit.WebViewClient getWebViewClient(); + method @Nullable public android.webkit.WebViewRenderProcess getWebViewRenderProcess(); + method @Nullable public android.webkit.WebViewRenderProcessClient getWebViewRenderProcessClient(); + method public android.view.View getZoomControls(); + method public void goBack(); + method public void goBackOrForward(int); + method public void goForward(); + method public void init(java.util.Map<java.lang.String,java.lang.Object>, boolean); + method public void insertVisualStateCallback(long, android.webkit.WebView.VisualStateCallback); + method public void invokeZoomPicker(); + method public boolean isPaused(); + method public boolean isPrivateBrowsingEnabled(); + method public void loadData(String, String, String); + method public void loadDataWithBaseURL(String, String, String, String, String); + method public void loadUrl(String, java.util.Map<java.lang.String,java.lang.String>); + method public void loadUrl(String); + method public void notifyFindDialogDismissed(); + method public void onPause(); + method public void onResume(); + method public boolean overlayHorizontalScrollbar(); + method public boolean overlayVerticalScrollbar(); + method public boolean pageDown(boolean); + method public boolean pageUp(boolean); + method public void pauseTimers(); + method public void postMessageToMainFrame(android.webkit.WebMessage, android.net.Uri); + method public void postUrl(String, byte[]); + method public void reload(); + method public void removeJavascriptInterface(String); + method public void requestFocusNodeHref(android.os.Message); + method public void requestImageRef(android.os.Message); + method public boolean restorePicture(android.os.Bundle, java.io.File); + method public android.webkit.WebBackForwardList restoreState(android.os.Bundle); + method public void resumeTimers(); + method public void savePassword(String, String, String); + method public boolean savePicture(android.os.Bundle, java.io.File); + method public android.webkit.WebBackForwardList saveState(android.os.Bundle); + method public void saveWebArchive(String); + method public void saveWebArchive(String, boolean, android.webkit.ValueCallback<java.lang.String>); + method public void setCertificate(android.net.http.SslCertificate); + method public void setDownloadListener(android.webkit.DownloadListener); + method public void setFindListener(android.webkit.WebView.FindListener); + method public void setHorizontalScrollbarOverlay(boolean); + method public void setHttpAuthUsernamePassword(String, String, String, String); + method public void setInitialScale(int); + method public void setMapTrackballToArrowKeys(boolean); + method public void setNetworkAvailable(boolean); + method public void setPictureListener(android.webkit.WebView.PictureListener); + method public void setRendererPriorityPolicy(int, boolean); + method public default void setTextClassifier(@Nullable android.view.textclassifier.TextClassifier); + method public void setVerticalScrollbarOverlay(boolean); + method public void setWebChromeClient(android.webkit.WebChromeClient); + method public void setWebViewClient(android.webkit.WebViewClient); + method public void setWebViewRenderProcessClient(@Nullable java.util.concurrent.Executor, @Nullable android.webkit.WebViewRenderProcessClient); + method public boolean showFindDialog(String, boolean); + method public void stopLoading(); + method public boolean zoomBy(float); + method public boolean zoomIn(); + method public boolean zoomOut(); + } + + public static interface WebViewProvider.ScrollDelegate { + method public int computeHorizontalScrollOffset(); + method public int computeHorizontalScrollRange(); + method public void computeScroll(); + method public int computeVerticalScrollExtent(); + method public int computeVerticalScrollOffset(); + method public int computeVerticalScrollRange(); + } + + public static interface WebViewProvider.ViewDelegate { + method public default void autofill(android.util.SparseArray<android.view.autofill.AutofillValue>); + method public boolean dispatchKeyEvent(android.view.KeyEvent); + method public android.view.View findFocus(android.view.View); + method public android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider(); + method public android.os.Handler getHandler(android.os.Handler); + method public default boolean isVisibleToUserForAutofill(int); + method public void onActivityResult(int, int, android.content.Intent); + method @Nullable public default android.view.WindowInsets onApplyWindowInsets(@Nullable android.view.WindowInsets); + method public void onAttachedToWindow(); + method public default boolean onCheckIsTextEditor(); + method public void onConfigurationChanged(android.content.res.Configuration); + method public android.view.inputmethod.InputConnection onCreateInputConnection(android.view.inputmethod.EditorInfo); + method public void onDetachedFromWindow(); + method public boolean onDragEvent(android.view.DragEvent); + method public void onDraw(android.graphics.Canvas); + method public void onDrawVerticalScrollBar(android.graphics.Canvas, android.graphics.drawable.Drawable, int, int, int, int); + method public void onFinishTemporaryDetach(); + method public void onFocusChanged(boolean, int, android.graphics.Rect); + method public boolean onGenericMotionEvent(android.view.MotionEvent); + 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 onKeyMultiple(int, int, android.view.KeyEvent); + method public boolean onKeyUp(int, android.view.KeyEvent); + method public void onMeasure(int, int); + method public default void onMovedToDisplay(int, android.content.res.Configuration); + method public void onOverScrolled(int, int, boolean, boolean); + method public default void onProvideAutofillVirtualStructure(android.view.ViewStructure, int); + method public default void onProvideContentCaptureStructure(@NonNull android.view.ViewStructure, int); + method public void onProvideVirtualStructure(android.view.ViewStructure); + method public void onScrollChanged(int, int, int, int); + method public 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 onVisibilityChanged(android.view.View, int); + method public void onWindowFocusChanged(boolean); + method public void onWindowVisibilityChanged(int); + method public boolean performAccessibilityAction(int, android.os.Bundle); + method public boolean performLongClick(); + method public void preDispatchDraw(android.graphics.Canvas); + method public boolean requestChildRectangleOnScreen(android.view.View, android.graphics.Rect, boolean); + method public boolean requestFocus(int, android.graphics.Rect); + method public void setBackgroundColor(int); + method public boolean setFrame(int, int, int, int); + method public void setLayerType(int, android.graphics.Paint); + method public void setLayoutParams(android.view.ViewGroup.LayoutParams); + method public void setOverScrollMode(int); + method public void setScrollBarStyle(int); + method public boolean shouldDelayChildPressedState(); + } + + public final class WebViewProviderInfo implements android.os.Parcelable { + ctor public WebViewProviderInfo(String, String, boolean, boolean, String[]); + method public int describeContents(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.webkit.WebViewProviderInfo> CREATOR; + field public final boolean availableByDefault; + field public final String description; + field public final boolean isFallback; + field public final String packageName; + field public final android.content.pm.Signature[] signatures; + } + + public final class WebViewUpdateService { + method public static android.webkit.WebViewProviderInfo[] getAllWebViewPackages(); + method public static String getCurrentWebViewPackageName(); + method public static android.webkit.WebViewProviderInfo[] getValidWebViewPackages(); + } + +} + diff --git a/api/system-lint-baseline.txt b/api/system-lint-baseline.txt new file mode 100644 index 000000000000..cb885296e72a --- /dev/null +++ b/api/system-lint-baseline.txt @@ -0,0 +1,571 @@ +// Baseline format: 1.0 +AcronymName: android.net.NetworkCapabilities#setSSID(String): + + + +AcronymName: android.telephony.ims.stub.ImsUtImplBase#queryCFForServiceClass(int, String, int): + Acronyms should not be capitalized in method names: was `queryCFForServiceClass`, should this be `queryCfForServiceClass`? + + +ActionValue: android.location.Location#EXTRA_NO_GPS_LOCATION: + +ActionValue: android.net.wifi.WifiManager#ACTION_LINK_CONFIGURATION_CHANGED: + +ActionValue: android.net.wifi.WifiManager#EXTRA_WIFI_AP_FAILURE_DESCRIPTION: + Inconsistent extra value; expected `android.net.wifi.extra.WIFI_AP_FAILURE_DESCRIPTION`, was `wifi_ap_error_description` + +ActionValue: android.net.TetheringManager#ACTION_TETHER_STATE_CHANGED: + +ActionValue: android.net.TetheringManager#EXTRA_ACTIVE_TETHER: + +ActionValue: android.net.TetheringManager#EXTRA_AVAILABLE_TETHER: + +ActionValue: android.net.TetheringManager#EXTRA_ERRORED_TETHER: + +ActionValue: android.net.wifi.WifiManager#ACTION_LINK_CONFIGURATION_CHANGED: + + + +ArrayReturn: android.bluetooth.BluetoothCodecStatus#BluetoothCodecStatus(android.bluetooth.BluetoothCodecConfig, android.bluetooth.BluetoothCodecConfig[], android.bluetooth.BluetoothCodecConfig[]) parameter #1: + +ArrayReturn: android.bluetooth.BluetoothCodecStatus#BluetoothCodecStatus(android.bluetooth.BluetoothCodecConfig, android.bluetooth.BluetoothCodecConfig[], android.bluetooth.BluetoothCodecConfig[]) parameter #2: + +ArrayReturn: android.bluetooth.BluetoothCodecStatus#getCodecsLocalCapabilities(): + +ArrayReturn: android.bluetooth.BluetoothCodecStatus#getCodecsSelectableCapabilities(): + +ArrayReturn: android.bluetooth.BluetoothUuid#containsAnyUuid(android.os.ParcelUuid[], android.os.ParcelUuid[]) parameter #0: + +ArrayReturn: android.bluetooth.BluetoothUuid#containsAnyUuid(android.os.ParcelUuid[], android.os.ParcelUuid[]) parameter #1: + +ArrayReturn: android.media.tv.tuner.Tuner.FilterCallback#onFilterEvent(android.media.tv.tuner.Tuner.Filter, android.media.tv.tuner.filter.FilterEvent[]) parameter #1: + +ArrayReturn: android.net.NetworkScoreManager#requestScores(android.net.NetworkKey[]) parameter #0: + +ArrayReturn: android.view.contentcapture.ViewNode#getAutofillOptions(): + + + +BuilderSetStyle: android.net.IpSecTransform.Builder#buildTunnelModeTransform(java.net.InetAddress, android.net.IpSecManager.SecurityParameterIndex): + Builder methods names should use setFoo() / addFoo() / clearFoo() style: method android.net.IpSecTransform.Builder.buildTunnelModeTransform(java.net.InetAddress,android.net.IpSecManager.SecurityParameterIndex) + + +ExecutorRegistration: android.media.MediaPlayer#setOnImsRxNoticeListener(android.media.MediaPlayer.OnImsRxNoticeListener, android.os.Handler): + Registration methods should have overload that accepts delivery Executor: `setOnImsRxNoticeListener` +ExecutorRegistration: android.net.wifi.p2p.WifiP2pManager#deletePersistentGroup(android.net.wifi.p2p.WifiP2pManager.Channel, int, android.net.wifi.p2p.WifiP2pManager.ActionListener): + +ExecutorRegistration: android.net.wifi.p2p.WifiP2pManager#factoryReset(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.ActionListener): + +ExecutorRegistration: android.net.wifi.p2p.WifiP2pManager#listen(android.net.wifi.p2p.WifiP2pManager.Channel, boolean, android.net.wifi.p2p.WifiP2pManager.ActionListener): + +ExecutorRegistration: android.net.wifi.p2p.WifiP2pManager#requestPersistentGroupInfo(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pManager.PersistentGroupInfoListener): + +ExecutorRegistration: android.net.wifi.p2p.WifiP2pManager#setDeviceName(android.net.wifi.p2p.WifiP2pManager.Channel, String, android.net.wifi.p2p.WifiP2pManager.ActionListener): + +ExecutorRegistration: android.net.wifi.p2p.WifiP2pManager#setWfdInfo(android.net.wifi.p2p.WifiP2pManager.Channel, android.net.wifi.p2p.WifiP2pWfdInfo, android.net.wifi.p2p.WifiP2pManager.ActionListener): + +ExecutorRegistration: android.net.wifi.p2p.WifiP2pManager#setWifiP2pChannels(android.net.wifi.p2p.WifiP2pManager.Channel, int, int, android.net.wifi.p2p.WifiP2pManager.ActionListener): + + + +GenericException: android.app.prediction.AppPredictor#finalize(): + +GenericException: android.hardware.location.ContextHubClient#finalize(): + +GenericException: android.net.IpSecManager.IpSecTunnelInterface#finalize(): + +GenericException: android.service.autofill.augmented.FillWindow#finalize(): + + + +IntentBuilderName: android.content.Context#registerReceiverForAllUsers(android.content.BroadcastReceiver, android.content.IntentFilter, String, android.os.Handler): + + + +IntentName: android.net.wifi.WifiManager#WIFI_COUNTRY_CODE_CHANGED_ACTION: + Intent action constant name must be ACTION_FOO: WIFI_COUNTRY_CODE_CHANGED_ACTION + + +KotlinKeyword: android.app.Notification#when: + + + +KotlinOperator: android.telephony.CbGeoUtils.Geometry#contains(android.telephony.CbGeoUtils.LatLng): + + + +MissingGetterMatchingBuilder: android.net.wifi.rtt.RangingRequest.Builder#addResponder(android.net.wifi.rtt.ResponderConfig): + android.net.wifi.rtt.RangingRequest does not declare a `getResponders()` method matching method android.net.wifi.rtt.RangingRequest.Builder.addResponder(android.net.wifi.rtt.ResponderConfig) +MissingGetterMatchingBuilder: android.security.keystore.KeyGenParameterSpec.Builder#setUid(int): + android.security.keystore.KeyGenParameterSpec does not declare a `getUid()` method matching method android.security.keystore.KeyGenParameterSpec.Builder.setUid(int) +MissingGetterMatchingBuilder: android.service.autofill.Dataset.Builder#setFieldInlinePresentation(android.view.autofill.AutofillId, android.view.autofill.AutofillValue, java.util.regex.Pattern, android.service.autofill.InlinePresentation): + android.service.autofill.Dataset does not declare a `getFieldInlinePresentation()` method matching method android.service.autofill.Dataset.Builder.setFieldInlinePresentation(android.view.autofill.AutofillId,android.view.autofill.AutofillValue,java.util.regex.Pattern,android.service.autofill.InlinePresentation) +MissingGetterMatchingBuilder: android.telecom.CallScreeningService.CallResponse.Builder#setShouldScreenCallViaAudioProcessing(boolean): + android.telecom.CallScreeningService.CallResponse does not declare a `shouldScreenCallViaAudioProcessing()` method matching method android.telecom.CallScreeningService.CallResponse.Builder.setShouldScreenCallViaAudioProcessing(boolean) +MissingGetterMatchingBuilder: android.telephony.mbms.DownloadRequest.Builder#setServiceId(String): + android.telephony.mbms.DownloadRequest does not declare a `getServiceId()` method matching method android.telephony.mbms.DownloadRequest.Builder.setServiceId(String) + + +MissingNullability: android.hardware.soundtrigger.SoundTrigger.ModuleProperties#toString(): + +MissingNullability: android.hardware.soundtrigger.SoundTrigger.ModuleProperties#writeToParcel(android.os.Parcel, int) parameter #0: + +MissingNullability: android.media.session.MediaSessionManager.Callback#onAddressedPlayerChanged(android.content.ComponentName) parameter #0: + +MissingNullability: android.media.session.MediaSessionManager.Callback#onAddressedPlayerChanged(android.media.session.MediaSession.Token) parameter #0: + +MissingNullability: android.media.session.MediaSessionManager.Callback#onMediaKeyEventDispatched(android.view.KeyEvent, android.content.ComponentName) parameter #0: + +MissingNullability: android.media.session.MediaSessionManager.Callback#onMediaKeyEventDispatched(android.view.KeyEvent, android.content.ComponentName) parameter #1: + +MissingNullability: android.media.session.MediaSessionManager.Callback#onMediaKeyEventDispatched(android.view.KeyEvent, android.media.session.MediaSession.Token) parameter #0: + +MissingNullability: android.media.session.MediaSessionManager.Callback#onMediaKeyEventDispatched(android.view.KeyEvent, android.media.session.MediaSession.Token) parameter #1: + +MissingNullability: android.media.soundtrigger.SoundTriggerDetectionService#onUnbind(android.content.Intent) parameter #0: + +MissingNullability: android.media.tv.TvRecordingClient.RecordingCallback#onEvent(String, String, android.os.Bundle) parameter #0: + +MissingNullability: android.media.tv.TvRecordingClient.RecordingCallback#onEvent(String, String, android.os.Bundle) parameter #1: + +MissingNullability: android.media.tv.TvRecordingClient.RecordingCallback#onEvent(String, String, android.os.Bundle) parameter #2: + +MissingNullability: android.net.wifi.rtt.RangingRequest.Builder#addResponder(android.net.wifi.rtt.ResponderConfig): + +MissingNullability: android.printservice.recommendation.RecommendationService#attachBaseContext(android.content.Context) parameter #0: + +MissingNullability: android.provider.ContactsContract.MetadataSync#CONTENT_URI: + +MissingNullability: android.provider.ContactsContract.MetadataSync#METADATA_AUTHORITY_URI: + +MissingNullability: android.provider.ContactsContract.MetadataSyncState#CONTENT_URI: + +MissingNullability: android.provider.SearchIndexablesProvider#attachInfo(android.content.Context, android.content.pm.ProviderInfo) parameter #0: + +MissingNullability: android.provider.SearchIndexablesProvider#attachInfo(android.content.Context, android.content.pm.ProviderInfo) parameter #1: + +MissingNullability: android.service.autofill.augmented.AugmentedAutofillService#onUnbind(android.content.Intent) parameter #0: + +MissingNullability: android.service.contentcapture.ContentCaptureService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #0: + +MissingNullability: android.service.contentcapture.ContentCaptureService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #1: + +MissingNullability: android.service.contentcapture.ContentCaptureService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #2: + +MissingNullability: android.service.notification.NotificationAssistantService#attachBaseContext(android.content.Context) parameter #0: + +MissingNullability: android.telecom.CallScreeningService.CallResponse.Builder#setShouldScreenCallFurther(boolean): + +MissingNullability: android.telephony.CallerInfo#toString(): + +MissingNullability: android.telephony.CellBroadcastService#onBind(android.content.Intent): + +MissingNullability: android.telephony.CellBroadcastService#onBind(android.content.Intent) parameter #0: + +MissingNullability: android.telephony.CellBroadcastService#onCdmaCellBroadcastSms(int, byte[]) parameter #1: + +MissingNullability: android.telephony.CellBroadcastService#onCdmaCellBroadcastSms(int, byte[], int) parameter #1: + +MissingNullability: android.telephony.CellBroadcastService#onGsmCellBroadcastSms(int, byte[]) parameter #1: + +MissingNullability: android.telephony.ModemActivityInfo#toString(): + +MissingNullability: android.telephony.ModemActivityInfo#writeToParcel(android.os.Parcel, int) parameter #0: + +MissingNullability: android.telephony.NetworkService#onUnbind(android.content.Intent) parameter #0: + +MissingNullability: android.telephony.SmsCbCmasInfo#toString(): + +MissingNullability: android.telephony.SmsCbCmasInfo#writeToParcel(android.os.Parcel, int) parameter #0: + +MissingNullability: android.telephony.SmsCbEtwsInfo#toString(): + +MissingNullability: android.telephony.SmsCbEtwsInfo#writeToParcel(android.os.Parcel, int) parameter #0: + +MissingNullability: android.telephony.SmsCbLocation#equals(Object) parameter #0: + +MissingNullability: android.telephony.SmsCbLocation#toString(): + +MissingNullability: android.telephony.SmsCbLocation#writeToParcel(android.os.Parcel, int) parameter #0: + +MissingNullability: android.telephony.SmsCbMessage#toString(): + +MissingNullability: android.telephony.SmsCbMessage#writeToParcel(android.os.Parcel, int) parameter #0: + +MissingNullability: android.telephony.SubscriptionPlan.Builder#createRecurringDaily(java.time.ZonedDateTime) parameter #0: + +MissingNullability: android.telephony.SubscriptionPlan.Builder#createRecurringMonthly(java.time.ZonedDateTime) parameter #0: + +MissingNullability: android.telephony.SubscriptionPlan.Builder#createRecurringWeekly(java.time.ZonedDateTime) parameter #0: + +MissingNullability: android.telephony.cdma.CdmaSmsCbProgramData#toString(): + +MissingNullability: android.telephony.cdma.CdmaSmsCbProgramData#writeToParcel(android.os.Parcel, int) parameter #0: + +MissingNullability: android.telephony.data.DataService#onUnbind(android.content.Intent) parameter #0: + +MissingNullability: android.telephony.ims.stub.ImsSmsImplBase#onSmsStatusReportReceived(int, String, byte[]) parameter #1: + +MissingNullability: android.telephony.ims.stub.ImsSmsImplBase#onSmsStatusReportReceived(int, String, byte[]) parameter #2: + +MissingNullability: android.telephony.ims.stub.ImsUtImplBase#queryCFForServiceClass(int, String, int) parameter #1: + Missing nullability on parameter `number` in method `queryCFForServiceClass` +MissingNullability: android.telephony.mbms.DownloadRequest.Builder#setServiceId(String): + +MissingNullability: android.telephony.mbms.DownloadRequest.Builder#setServiceId(String) parameter #0: + + + +MutableBareField: android.net.IpConfiguration#httpProxy: + +MutableBareField: android.net.IpConfiguration#ipAssignment: + +MutableBareField: android.net.IpConfiguration#proxySettings: + +MutableBareField: android.net.IpConfiguration#staticIpConfiguration: + +MutableBareField: android.net.wifi.WifiConfiguration#allowAutojoin: + +MutableBareField: android.net.wifi.WifiConfiguration#carrierId: + +MutableBareField: android.net.wifi.WifiConfiguration#fromWifiNetworkSpecifier: + +MutableBareField: android.net.wifi.WifiConfiguration#fromWifiNetworkSuggestion: + +MutableBareField: android.net.wifi.WifiConfiguration#macRandomizationSetting: + +MutableBareField: android.net.wifi.WifiConfiguration#meteredOverride: + +MutableBareField: android.net.wifi.WifiConfiguration#requirePmf: + +MutableBareField: android.net.wifi.WifiConfiguration#saePasswordId: + +MutableBareField: android.net.wifi.WifiConfiguration#shareThisAp: + +MutableBareField: android.net.wifi.WifiConfiguration#shared: + +MutableBareField: android.net.wifi.WifiConfiguration#subscriptionId: + Bare field subscriptionId must be marked final, or moved behind accessors if mutable + +MutableBareField: android.net.wifi.WifiScanner.ScanSettings#type: + +MutableBareField: android.net.wifi.wificond.WifiNl80211Manager.WifiGenerationCapabilities#htSupport2g: + Bare field htSupport2g must be marked final, or moved behind accessors if mutable +MutableBareField: android.net.wifi.wificond.WifiNl80211Manager.WifiGenerationCapabilities#htSupport5g: + Bare field htSupport5g must be marked final, or moved behind accessors if mutable +MutableBareField: android.net.wifi.wificond.WifiNl80211Manager.WifiGenerationCapabilities#sapHeSupport2g: + Bare field sapHeSupport2g must be marked final, or moved behind accessors if mutable +MutableBareField: android.net.wifi.wificond.WifiNl80211Manager.WifiGenerationCapabilities#sapHeSupport5g: + Bare field sapHeSupport5g must be marked final, or moved behind accessors if mutable +MutableBareField: android.net.wifi.wificond.WifiNl80211Manager.WifiGenerationCapabilities#staHeSupport2g: + Bare field staHeSupport2g must be marked final, or moved behind accessors if mutable +MutableBareField: android.net.wifi.wificond.WifiNl80211Manager.WifiGenerationCapabilities#staHeSupport5g: + Bare field staHeSupport5g must be marked final, or moved behind accessors if mutable +MutableBareField: android.net.wifi.wificond.WifiNl80211Manager.WifiGenerationCapabilities#vhtSupport2g: + Bare field vhtSupport2g must be marked final, or moved behind accessors if mutable +MutableBareField: android.net.wifi.wificond.WifiNl80211Manager.WifiGenerationCapabilities#vhtSupport5g: + Bare field vhtSupport5g must be marked final, or moved behind accessors if mutable + + +NoClone: android.service.contentcapture.ContentCaptureService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #0: + + + +NoSettingsProvider: android.provider.Settings.Global#TETHER_OFFLOAD_DISABLED: + +NoSettingsProvider: android.provider.Settings.Global#TETHER_SUPPORTED: + + + +NotCloseable: android.bluetooth.BluetoothA2dpSink: + +NotCloseable: android.bluetooth.BluetoothMap: + +NotCloseable: android.bluetooth.BluetoothPan: + +NotCloseable: android.bluetooth.BluetoothPbap: + + + +OnNameExpected: android.content.ContentProvider#checkUriPermission(android.net.Uri, int, int): + + + +PairedRegistration: android.net.wifi.nl80211.WifiNl80211Manager#registerApCallback(String, java.util.concurrent.Executor, android.net.wifi.nl80211.WifiNl80211Manager.SoftApCallback): + + + +ProtectedMember: android.printservice.recommendation.RecommendationService#attachBaseContext(android.content.Context): + +ProtectedMember: android.service.contentcapture.ContentCaptureService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]): + +ProtectedMember: android.service.notification.NotificationAssistantService#attachBaseContext(android.content.Context): + + + +SamShouldBeLast: android.accounts.AccountManager#addAccount(String, String, String[], android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean): + +SamShouldBeLast: android.accounts.AccountManager#addOnAccountsUpdatedListener(android.accounts.OnAccountsUpdateListener, android.os.Handler, boolean, String[]): + +SamShouldBeLast: android.accounts.AccountManager#confirmCredentials(android.accounts.Account, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#editProperties(String, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#finishSession(android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#getAccountsByTypeAndFeatures(String, String[], android.accounts.AccountManagerCallback<android.accounts.Account[]>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#getAuthToken(android.accounts.Account, String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#getAuthToken(android.accounts.Account, String, android.os.Bundle, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#getAuthToken(android.accounts.Account, String, boolean, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#getAuthTokenByFeatures(String, String, String[], android.app.Activity, android.os.Bundle, android.os.Bundle, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#hasFeatures(android.accounts.Account, String[], android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#isCredentialsUpdateSuggested(android.accounts.Account, String, android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#removeAccount(android.accounts.Account, android.accounts.AccountManagerCallback<java.lang.Boolean>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#removeAccount(android.accounts.Account, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#renameAccount(android.accounts.Account, String, android.accounts.AccountManagerCallback<android.accounts.Account>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#startAddAccountSession(String, String, String[], android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#startUpdateCredentialsSession(android.accounts.Account, String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler): + +SamShouldBeLast: android.accounts.AccountManager#updateCredentials(android.accounts.Account, String, android.os.Bundle, android.app.Activity, android.accounts.AccountManagerCallback<android.os.Bundle>, android.os.Handler): + +SamShouldBeLast: android.app.AlarmManager#set(int, long, String, android.app.AlarmManager.OnAlarmListener, android.os.Handler): + +SamShouldBeLast: android.app.AlarmManager#setExact(int, long, String, android.app.AlarmManager.OnAlarmListener, android.os.Handler): + +SamShouldBeLast: android.app.AlarmManager#setWindow(int, long, long, String, android.app.AlarmManager.OnAlarmListener, android.os.Handler): + +SamShouldBeLast: android.app.WallpaperInfo#dump(android.util.Printer, String): + +SamShouldBeLast: android.app.WallpaperManager#addOnColorsChangedListener(android.app.WallpaperManager.OnColorsChangedListener, android.os.Handler): + +SamShouldBeLast: android.app.admin.DevicePolicyManager#installSystemUpdate(android.content.ComponentName, android.net.Uri, java.util.concurrent.Executor, android.app.admin.DevicePolicyManager.InstallSystemUpdateCallback): + +SamShouldBeLast: android.content.Context#bindIsolatedService(android.content.Intent, int, String, java.util.concurrent.Executor, android.content.ServiceConnection): + +SamShouldBeLast: android.content.Context#bindService(android.content.Intent, int, java.util.concurrent.Executor, android.content.ServiceConnection): + +SamShouldBeLast: android.content.ContextWrapper#bindIsolatedService(android.content.Intent, int, String, java.util.concurrent.Executor, android.content.ServiceConnection): + +SamShouldBeLast: android.content.ContextWrapper#bindService(android.content.Intent, int, java.util.concurrent.Executor, android.content.ServiceConnection): + +SamShouldBeLast: android.content.IntentFilter#dump(android.util.Printer, String): + +SamShouldBeLast: android.content.pm.ApplicationInfo#dump(android.util.Printer, String): + +SamShouldBeLast: android.content.pm.LauncherApps#registerPackageInstallerSessionCallback(java.util.concurrent.Executor, android.content.pm.PackageInstaller.SessionCallback): + +SamShouldBeLast: android.content.pm.PackageItemInfo#dumpBack(android.util.Printer, String): + +SamShouldBeLast: android.content.pm.PackageItemInfo#dumpFront(android.util.Printer, String): + +SamShouldBeLast: android.content.pm.ResolveInfo#dump(android.util.Printer, String): + +SamShouldBeLast: android.location.Location#dump(android.util.Printer, String): + +SamShouldBeLast: android.location.LocationManager#addNmeaListener(android.location.OnNmeaMessageListener, android.os.Handler): + +SamShouldBeLast: android.location.LocationManager#registerGnssMeasurementsCallback(java.util.concurrent.Executor, android.location.GnssMeasurementsEvent.Callback): + +SamShouldBeLast: android.location.LocationManager#registerGnssNavigationMessageCallback(java.util.concurrent.Executor, android.location.GnssNavigationMessage.Callback): + +SamShouldBeLast: android.location.LocationManager#registerGnssStatusCallback(java.util.concurrent.Executor, android.location.GnssStatus.Callback): + +SamShouldBeLast: android.location.LocationManager#requestLocationUpdates(String, long, float, android.location.LocationListener, android.os.Looper): + +SamShouldBeLast: android.location.LocationManager#requestLocationUpdates(String, long, float, java.util.concurrent.Executor, android.location.LocationListener): + +SamShouldBeLast: android.location.LocationManager#requestLocationUpdates(android.location.LocationRequest, java.util.concurrent.Executor, android.location.LocationListener): + +SamShouldBeLast: android.location.LocationManager#requestLocationUpdates(long, float, android.location.Criteria, android.location.LocationListener, android.os.Looper): + +SamShouldBeLast: android.location.LocationManager#requestLocationUpdates(long, float, android.location.Criteria, java.util.concurrent.Executor, android.location.LocationListener): + +SamShouldBeLast: android.location.LocationManager#requestSingleUpdate(String, android.location.LocationListener, android.os.Looper): + +SamShouldBeLast: android.location.LocationManager#requestSingleUpdate(android.location.Criteria, android.location.LocationListener, android.os.Looper): + +SamShouldBeLast: android.media.AudioFocusRequest.Builder#setOnAudioFocusChangeListener(android.media.AudioManager.OnAudioFocusChangeListener, android.os.Handler): + +SamShouldBeLast: android.media.AudioManager#requestAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener, int, int): + +SamShouldBeLast: android.media.AudioRecord#addOnRoutingChangedListener(android.media.AudioRouting.OnRoutingChangedListener, android.os.Handler): + +SamShouldBeLast: android.media.AudioRecord#registerAudioRecordingCallback(java.util.concurrent.Executor, android.media.AudioManager.AudioRecordingCallback): + +SamShouldBeLast: android.media.AudioRecordingMonitor#registerAudioRecordingCallback(java.util.concurrent.Executor, android.media.AudioManager.AudioRecordingCallback): + +SamShouldBeLast: android.media.AudioRouting#addOnRoutingChangedListener(android.media.AudioRouting.OnRoutingChangedListener, android.os.Handler): + +SamShouldBeLast: android.media.AudioTrack#addOnRoutingChangedListener(android.media.AudioRouting.OnRoutingChangedListener, android.os.Handler): + SAM-compatible parameters (such as parameter 1, "listener", in android.media.AudioTrack.addOnRoutingChangedListener) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions +SamShouldBeLast: android.media.MediaPlayer#setOnImsRxNoticeListener(android.media.MediaPlayer.OnImsRxNoticeListener, android.os.Handler): + SAM-compatible parameters (such as parameter 1, "listener", in android.media.MediaPlayer.setOnImsRxNoticeListener) should be last to improve Kotlin interoperability; see https://kotlinlang.org/docs/reference/java-interop.html#sam-conversions +SamShouldBeLast: android.media.MediaRecorder#addOnRoutingChangedListener(android.media.AudioRouting.OnRoutingChangedListener, android.os.Handler): + +SamShouldBeLast: android.media.MediaRecorder#registerAudioRecordingCallback(java.util.concurrent.Executor, android.media.AudioManager.AudioRecordingCallback): + +SamShouldBeLast: android.media.session.MediaSessionManager#addOnActiveSessionsChangedListener(android.media.session.MediaSessionManager.OnActiveSessionsChangedListener, android.content.ComponentName): + +SamShouldBeLast: android.media.session.MediaSessionManager#addOnActiveSessionsChangedListener(android.media.session.MediaSessionManager.OnActiveSessionsChangedListener, android.content.ComponentName, android.os.Handler): + +SamShouldBeLast: android.media.session.MediaSessionManager#addOnSession2TokensChangedListener(android.media.session.MediaSessionManager.OnSession2TokensChangedListener, android.os.Handler): + +SamShouldBeLast: android.media.session.MediaSessionManager#registerCallback(java.util.concurrent.Executor, android.media.session.MediaSessionManager.Callback): + +SamShouldBeLast: android.net.ConnectivityManager#createSocketKeepalive(android.net.Network, android.net.IpSecManager.UdpEncapsulationSocket, java.net.InetAddress, java.net.InetAddress, java.util.concurrent.Executor, android.net.SocketKeepalive.Callback): + +SamShouldBeLast: android.net.wifi.WifiManager#startLocalOnlyHotspot(android.net.wifi.SoftApConfiguration, java.util.concurrent.Executor, android.net.wifi.WifiManager.LocalOnlyHotspotCallback): + +SamShouldBeLast: android.net.wifi.rtt.WifiRttManager#startRanging(android.net.wifi.rtt.RangingRequest, java.util.concurrent.Executor, android.net.wifi.rtt.RangingResultCallback): + +SamShouldBeLast: android.nfc.NfcAdapter#enableReaderMode(android.app.Activity, android.nfc.NfcAdapter.ReaderCallback, int, android.os.Bundle): + +SamShouldBeLast: android.nfc.NfcAdapter#ignore(android.nfc.Tag, int, android.nfc.NfcAdapter.OnTagRemovedListener, android.os.Handler): + +SamShouldBeLast: android.nfc.NfcAdapter#setBeamPushUrisCallback(android.nfc.NfcAdapter.CreateBeamUrisCallback, android.app.Activity): + +SamShouldBeLast: android.nfc.NfcAdapter#setNdefPushMessageCallback(android.nfc.NfcAdapter.CreateNdefMessageCallback, android.app.Activity, android.app.Activity...): + +SamShouldBeLast: android.nfc.NfcAdapter#setOnNdefPushCompleteCallback(android.nfc.NfcAdapter.OnNdefPushCompleteCallback, android.app.Activity, android.app.Activity...): + +SamShouldBeLast: android.os.Binder#attachInterface(android.os.IInterface, String): + +SamShouldBeLast: android.os.Binder#linkToDeath(android.os.IBinder.DeathRecipient, int): + +SamShouldBeLast: android.os.Binder#unlinkToDeath(android.os.IBinder.DeathRecipient, int): + +SamShouldBeLast: android.os.Handler#dump(android.util.Printer, String): + +SamShouldBeLast: android.os.Handler#postAtTime(Runnable, Object, long): + +SamShouldBeLast: android.os.Handler#postAtTime(Runnable, long): + +SamShouldBeLast: android.os.Handler#postDelayed(Runnable, Object, long): + +SamShouldBeLast: android.os.Handler#postDelayed(Runnable, long): + +SamShouldBeLast: android.os.Handler#removeCallbacks(Runnable, Object): + +SamShouldBeLast: android.os.IBinder#linkToDeath(android.os.IBinder.DeathRecipient, int): + +SamShouldBeLast: android.os.IBinder#unlinkToDeath(android.os.IBinder.DeathRecipient, int): + +SamShouldBeLast: android.os.RecoverySystem#verifyPackage(java.io.File, android.os.RecoverySystem.ProgressListener, java.io.File): + +SamShouldBeLast: android.telephony.MbmsDownloadSession#addProgressListener(android.telephony.mbms.DownloadRequest, java.util.concurrent.Executor, android.telephony.mbms.DownloadProgressListener): + +SamShouldBeLast: android.telephony.MbmsDownloadSession#addStatusListener(android.telephony.mbms.DownloadRequest, java.util.concurrent.Executor, android.telephony.mbms.DownloadStatusListener): + +SamShouldBeLast: android.telephony.MbmsDownloadSession#create(android.content.Context, java.util.concurrent.Executor, android.telephony.mbms.MbmsDownloadSessionCallback): + +SamShouldBeLast: android.telephony.MbmsDownloadSession#create(android.content.Context, java.util.concurrent.Executor, int, android.telephony.mbms.MbmsDownloadSessionCallback): + +SamShouldBeLast: android.telephony.MbmsGroupCallSession#create(android.content.Context, int, java.util.concurrent.Executor, android.telephony.mbms.MbmsGroupCallSessionCallback): + +SamShouldBeLast: android.telephony.MbmsGroupCallSession#create(android.content.Context, java.util.concurrent.Executor, android.telephony.mbms.MbmsGroupCallSessionCallback): + +SamShouldBeLast: android.telephony.MbmsGroupCallSession#startGroupCall(long, java.util.List<java.lang.Integer>, java.util.List<java.lang.Integer>, java.util.concurrent.Executor, android.telephony.mbms.GroupCallCallback): + +SamShouldBeLast: android.telephony.MbmsStreamingSession#create(android.content.Context, java.util.concurrent.Executor, android.telephony.mbms.MbmsStreamingSessionCallback): + +SamShouldBeLast: android.telephony.MbmsStreamingSession#create(android.content.Context, java.util.concurrent.Executor, int, android.telephony.mbms.MbmsStreamingSessionCallback): + +SamShouldBeLast: android.telephony.MbmsStreamingSession#startStreaming(android.telephony.mbms.StreamingServiceInfo, java.util.concurrent.Executor, android.telephony.mbms.StreamingServiceCallback): + +SamShouldBeLast: android.telephony.SmsManager#getSmsMessagesForFinancialApp(android.os.Bundle, java.util.concurrent.Executor, android.telephony.SmsManager.FinancialSmsCallback): + +SamShouldBeLast: android.telephony.SubscriptionManager#addOnOpportunisticSubscriptionsChangedListener(java.util.concurrent.Executor, android.telephony.SubscriptionManager.OnOpportunisticSubscriptionsChangedListener): + +SamShouldBeLast: android.telephony.TelephonyManager#requestCellInfoUpdate(java.util.concurrent.Executor, android.telephony.TelephonyManager.CellInfoCallback): + +SamShouldBeLast: android.telephony.TelephonyManager#requestNetworkScan(android.telephony.NetworkScanRequest, java.util.concurrent.Executor, android.telephony.TelephonyScanManager.NetworkScanCallback): + +SamShouldBeLast: android.telephony.TelephonyManager#setPreferredOpportunisticDataSubscription(int, boolean, java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Integer>): + +SamShouldBeLast: android.telephony.TelephonyManager#updateAvailableNetworks(java.util.List<android.telephony.AvailableNetworkInfo>, java.util.concurrent.Executor, java.util.function.Consumer<java.lang.Integer>): + +SamShouldBeLast: android.view.View#postDelayed(Runnable, long): + +SamShouldBeLast: android.view.View#postOnAnimationDelayed(Runnable, long): + +SamShouldBeLast: android.view.View#scheduleDrawable(android.graphics.drawable.Drawable, Runnable, long): + +SamShouldBeLast: android.view.Window#addOnFrameMetricsAvailableListener(android.view.Window.OnFrameMetricsAvailableListener, android.os.Handler): + +SamShouldBeLast: android.view.accessibility.AccessibilityManager#addAccessibilityStateChangeListener(android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener, android.os.Handler): + +SamShouldBeLast: android.view.accessibility.AccessibilityManager#addTouchExplorationStateChangeListener(android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener, android.os.Handler): + +SamShouldBeLast: android.webkit.WebChromeClient#onShowFileChooser(android.webkit.WebView, android.webkit.ValueCallback<android.net.Uri[]>, android.webkit.WebChromeClient.FileChooserParams): + +SamShouldBeLast: android.webkit.WebView#setWebViewRenderProcessClient(java.util.concurrent.Executor, android.webkit.WebViewRenderProcessClient): + + + +ServiceName: android.Manifest.permission#BIND_ATTENTION_SERVICE: + +ServiceName: android.Manifest.permission#BIND_AUGMENTED_AUTOFILL_SERVICE: + +ServiceName: android.Manifest.permission#BIND_CELL_BROADCAST_SERVICE: + +ServiceName: android.Manifest.permission#BIND_CONTENT_CAPTURE_SERVICE: + +ServiceName: android.Manifest.permission#BIND_CONTENT_SUGGESTIONS_SERVICE: + +ServiceName: android.Manifest.permission#BIND_EUICC_SERVICE: + +ServiceName: android.Manifest.permission#BIND_EXTERNAL_STORAGE_SERVICE: + +ServiceName: android.Manifest.permission#BIND_IMS_SERVICE: + +ServiceName: android.Manifest.permission#BIND_NETWORK_RECOMMENDATION_SERVICE: + +ServiceName: android.Manifest.permission#BIND_NOTIFICATION_ASSISTANT_SERVICE: + +ServiceName: android.Manifest.permission#BIND_PHONE_ACCOUNT_SUGGESTION_SERVICE: + +ServiceName: android.Manifest.permission#BIND_PRINT_RECOMMENDATION_SERVICE: + +ServiceName: android.Manifest.permission#BIND_RESOLVER_RANKER_SERVICE: + +ServiceName: android.Manifest.permission#BIND_RUNTIME_PERMISSION_PRESENTER_SERVICE: + +ServiceName: android.Manifest.permission#BIND_SETTINGS_SUGGESTIONS_SERVICE: + +ServiceName: android.Manifest.permission#BIND_SOUND_TRIGGER_DETECTION_SERVICE: + +ServiceName: android.Manifest.permission#BIND_TELEPHONY_DATA_SERVICE: + +ServiceName: android.Manifest.permission#BIND_TELEPHONY_NETWORK_SERVICE: + +ServiceName: android.Manifest.permission#BIND_TEXTCLASSIFIER_SERVICE: + +ServiceName: android.Manifest.permission#BIND_TV_REMOTE_SERVICE: + +ServiceName: android.Manifest.permission#PROVIDE_RESOLVER_RANKER_SERVICE: + +ServiceName: android.Manifest.permission#REQUEST_NOTIFICATION_ASSISTANT_SERVICE: + +ServiceName: android.provider.DeviceConfig#NAMESPACE_PACKAGE_MANAGER_SERVICE: + + + +UserHandle: android.companion.CompanionDeviceManager#isDeviceAssociated(String, android.net.MacAddress, android.os.UserHandle): + + + +UserHandleName: android.telephony.CellBroadcastIntents#sendOrderedBroadcastForBackgroundReceivers(android.content.Context, android.os.UserHandle, android.content.Intent, String, String, android.content.BroadcastReceiver, android.os.Handler, int, String, android.os.Bundle): + diff --git a/boot/Android.bp b/boot/Android.bp index 83a46c522317..b10ca2043c68 100644 --- a/boot/Android.bp +++ b/boot/Android.bp @@ -72,10 +72,6 @@ custom_platform_bootclasspath { module: "art-bootclasspath-fragment", }, { - apex: "com.android.btservices", - module: "com.android.btservices-bootclasspath-fragment", - }, - { apex: "com.android.configinfrastructure", module: "com.android.configinfrastructure-bootclasspath-fragment", }, diff --git a/boot/hiddenapi/hiddenapi-max-target-o.txt b/boot/hiddenapi/hiddenapi-max-target-o.txt index 3c16915cf71f..eddb1621a4fa 100644 --- a/boot/hiddenapi/hiddenapi-max-target-o.txt +++ b/boot/hiddenapi/hiddenapi-max-target-o.txt @@ -9733,6 +9733,2812 @@ Landroid/appwidget/PendingHostUpdate;->viewId:I Landroid/appwidget/PendingHostUpdate;->views:Landroid/widget/RemoteViews; Landroid/appwidget/PendingHostUpdate;->widgetInfo:Landroid/appwidget/AppWidgetProviderInfo; Landroid/appwidget/PendingHostUpdate;->writeNullParcelable(Landroid/os/Parcelable;Landroid/os/Parcel;I)V +Landroid/bluetooth/BluetoothA2dp;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;)V +Landroid/bluetooth/BluetoothA2dp;->ACTION_AVRCP_CONNECTION_STATE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothA2dp;->DBG:Z +Landroid/bluetooth/BluetoothA2dp;->doBind()Z +Landroid/bluetooth/BluetoothA2dp;->enableDisableOptionalCodecs(Landroid/bluetooth/BluetoothDevice;Z)V +Landroid/bluetooth/BluetoothA2dp;->isAvrcpAbsoluteVolumeSupported()Z +Landroid/bluetooth/BluetoothA2dp;->isEnabled()Z +Landroid/bluetooth/BluetoothA2dp;->isValidDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothA2dp;->log(Ljava/lang/String;)V +Landroid/bluetooth/BluetoothA2dp;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothA2dp;->mBluetoothStateChangeCallback:Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothA2dp;->mConnection:Landroid/content/ServiceConnection; +Landroid/bluetooth/BluetoothA2dp;->mContext:Landroid/content/Context; +Landroid/bluetooth/BluetoothA2dp;->mService:Landroid/bluetooth/IBluetoothA2dp; +Landroid/bluetooth/BluetoothA2dp;->mServiceListener:Landroid/bluetooth/BluetoothProfile$ServiceListener; +Landroid/bluetooth/BluetoothA2dp;->mServiceLock:Ljava/util/concurrent/locks/ReentrantReadWriteLock; +Landroid/bluetooth/BluetoothA2dp;->setAvrcpAbsoluteVolume(I)V +Landroid/bluetooth/BluetoothA2dp;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/BluetoothA2dp;->shouldSendVolumeKeys(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothA2dp;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothA2dp;->VDBG:Z +Landroid/bluetooth/BluetoothA2dpSink;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;)V +Landroid/bluetooth/BluetoothA2dpSink;->ACTION_AUDIO_CONFIG_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothA2dpSink;->ACTION_CONNECTION_STATE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothA2dpSink;->ACTION_PLAYING_STATE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothA2dpSink;->close()V +Landroid/bluetooth/BluetoothA2dpSink;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothA2dpSink;->DBG:Z +Landroid/bluetooth/BluetoothA2dpSink;->doBind()Z +Landroid/bluetooth/BluetoothA2dpSink;->EXTRA_AUDIO_CONFIG:Ljava/lang/String; +Landroid/bluetooth/BluetoothA2dpSink;->getAudioConfig(Landroid/bluetooth/BluetoothDevice;)Landroid/bluetooth/BluetoothAudioConfig; +Landroid/bluetooth/BluetoothA2dpSink;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/BluetoothA2dpSink;->isA2dpPlaying(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothA2dpSink;->isEnabled()Z +Landroid/bluetooth/BluetoothA2dpSink;->isValidDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothA2dpSink;->log(Ljava/lang/String;)V +Landroid/bluetooth/BluetoothA2dpSink;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothA2dpSink;->mBluetoothStateChangeCallback:Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothA2dpSink;->mConnection:Landroid/content/ServiceConnection; +Landroid/bluetooth/BluetoothA2dpSink;->mContext:Landroid/content/Context; +Landroid/bluetooth/BluetoothA2dpSink;->mService:Landroid/bluetooth/IBluetoothA2dpSink; +Landroid/bluetooth/BluetoothA2dpSink;->mServiceListener:Landroid/bluetooth/BluetoothProfile$ServiceListener; +Landroid/bluetooth/BluetoothA2dpSink;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/BluetoothA2dpSink;->stateToString(I)Ljava/lang/String; +Landroid/bluetooth/BluetoothA2dpSink;->STATE_NOT_PLAYING:I +Landroid/bluetooth/BluetoothA2dpSink;->STATE_PLAYING:I +Landroid/bluetooth/BluetoothA2dpSink;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothA2dpSink;->VDBG:Z +Landroid/bluetooth/BluetoothActivityEnergyInfo;-><init>(JIJJJJ)V +Landroid/bluetooth/BluetoothActivityEnergyInfo;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/BluetoothActivityEnergyInfo;->BT_STACK_STATE_INVALID:I +Landroid/bluetooth/BluetoothActivityEnergyInfo;->BT_STACK_STATE_STATE_ACTIVE:I +Landroid/bluetooth/BluetoothActivityEnergyInfo;->BT_STACK_STATE_STATE_IDLE:I +Landroid/bluetooth/BluetoothActivityEnergyInfo;->BT_STACK_STATE_STATE_SCANNING:I +Landroid/bluetooth/BluetoothActivityEnergyInfo;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/BluetoothActivityEnergyInfo;->getBluetoothStackState()I +Landroid/bluetooth/BluetoothActivityEnergyInfo;->getControllerEnergyUsed()J +Landroid/bluetooth/BluetoothActivityEnergyInfo;->getControllerIdleTimeMillis()J +Landroid/bluetooth/BluetoothActivityEnergyInfo;->getControllerRxTimeMillis()J +Landroid/bluetooth/BluetoothActivityEnergyInfo;->getControllerTxTimeMillis()J +Landroid/bluetooth/BluetoothActivityEnergyInfo;->getTimeStamp()J +Landroid/bluetooth/BluetoothActivityEnergyInfo;->getUidTraffic()[Landroid/bluetooth/UidTraffic; +Landroid/bluetooth/BluetoothActivityEnergyInfo;->isValid()Z +Landroid/bluetooth/BluetoothActivityEnergyInfo;->mBluetoothStackState:I +Landroid/bluetooth/BluetoothActivityEnergyInfo;->mControllerEnergyUsed:J +Landroid/bluetooth/BluetoothActivityEnergyInfo;->mControllerIdleTimeMs:J +Landroid/bluetooth/BluetoothActivityEnergyInfo;->mControllerRxTimeMs:J +Landroid/bluetooth/BluetoothActivityEnergyInfo;->mControllerTxTimeMs:J +Landroid/bluetooth/BluetoothActivityEnergyInfo;->mTimestamp:J +Landroid/bluetooth/BluetoothActivityEnergyInfo;->mUidTraffic:[Landroid/bluetooth/UidTraffic; +Landroid/bluetooth/BluetoothActivityEnergyInfo;->setUidTraffic([Landroid/bluetooth/UidTraffic;)V +Landroid/bluetooth/BluetoothAdapter$BluetoothStateChangeCallback;->onBluetoothStateChange(Z)V +Landroid/bluetooth/BluetoothAdapter$StateChangeCallbackWrapper;->mCallback:Landroid/bluetooth/BluetoothAdapter$BluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothAdapter$StateChangeCallbackWrapper;->onBluetoothStateChange(Z)V +Landroid/bluetooth/BluetoothAdapter;-><init>(Landroid/bluetooth/IBluetoothManager;)V +Landroid/bluetooth/BluetoothAdapter;->ACTION_BLE_ACL_CONNECTED:Ljava/lang/String; +Landroid/bluetooth/BluetoothAdapter;->ACTION_BLE_ACL_DISCONNECTED:Ljava/lang/String; +Landroid/bluetooth/BluetoothAdapter;->ACTION_BLUETOOTH_ADDRESS_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothAdapter;->ACTION_REQUEST_DISABLE:Ljava/lang/String; +Landroid/bluetooth/BluetoothAdapter;->ADDRESS_LENGTH:I +Landroid/bluetooth/BluetoothAdapter;->BLUETOOTH_MANAGER_SERVICE:Ljava/lang/String; +Landroid/bluetooth/BluetoothAdapter;->changeApplicationBluetoothState(ZLandroid/bluetooth/BluetoothAdapter$BluetoothStateChangeCallback;)Z +Landroid/bluetooth/BluetoothAdapter;->createNewRfcommSocketAndRecord(Ljava/lang/String;Ljava/util/UUID;ZZ)Landroid/bluetooth/BluetoothServerSocket; +Landroid/bluetooth/BluetoothAdapter;->DBG:Z +Landroid/bluetooth/BluetoothAdapter;->DEFAULT_MAC_ADDRESS:Ljava/lang/String; +Landroid/bluetooth/BluetoothAdapter;->EXTRA_BLUETOOTH_ADDRESS:Ljava/lang/String; +Landroid/bluetooth/BluetoothAdapter;->getBluetoothClass()Landroid/bluetooth/BluetoothClass; +Landroid/bluetooth/BluetoothAdapter;->getControllerActivityEnergyInfo(I)Landroid/bluetooth/BluetoothActivityEnergyInfo; +Landroid/bluetooth/BluetoothAdapter;->getDiscoveryEndMillis()J +Landroid/bluetooth/BluetoothAdapter;->getLeAccess()Z +Landroid/bluetooth/BluetoothAdapter;->getMaxConnectedAudioDevices()I +Landroid/bluetooth/BluetoothAdapter;->getPeriodicAdvertisingManager()Landroid/bluetooth/le/PeriodicAdvertisingManager; +Landroid/bluetooth/BluetoothAdapter;->getSupportedProfiles()Ljava/util/List; +Landroid/bluetooth/BluetoothAdapter;->isHardwareTrackingFiltersAvailable()Z +Landroid/bluetooth/BluetoothAdapter;->LE_PSM_CHARACTERISTIC_UUID:Ljava/util/UUID; +Landroid/bluetooth/BluetoothAdapter;->listenUsingEncryptedRfcommOn(I)Landroid/bluetooth/BluetoothServerSocket; +Landroid/bluetooth/BluetoothAdapter;->listenUsingInsecureL2capCoc(I)Landroid/bluetooth/BluetoothServerSocket; +Landroid/bluetooth/BluetoothAdapter;->listenUsingInsecureL2capOn(I)Landroid/bluetooth/BluetoothServerSocket; +Landroid/bluetooth/BluetoothAdapter;->listenUsingInsecureRfcommOn(I)Landroid/bluetooth/BluetoothServerSocket; +Landroid/bluetooth/BluetoothAdapter;->listenUsingL2capCoc(I)Landroid/bluetooth/BluetoothServerSocket; +Landroid/bluetooth/BluetoothAdapter;->listenUsingL2capOn(I)Landroid/bluetooth/BluetoothServerSocket; +Landroid/bluetooth/BluetoothAdapter;->listenUsingL2capOn(IZZ)Landroid/bluetooth/BluetoothServerSocket; +Landroid/bluetooth/BluetoothAdapter;->listenUsingRfcommOn(I)Landroid/bluetooth/BluetoothServerSocket; +Landroid/bluetooth/BluetoothAdapter;->listenUsingScoOn()Landroid/bluetooth/BluetoothServerSocket; +Landroid/bluetooth/BluetoothAdapter;->mLeScanClients:Ljava/util/Map; +Landroid/bluetooth/BluetoothAdapter;->mLock:Ljava/lang/Object; +Landroid/bluetooth/BluetoothAdapter;->mManagerCallback:Landroid/bluetooth/IBluetoothManagerCallback; +Landroid/bluetooth/BluetoothAdapter;->mManagerService:Landroid/bluetooth/IBluetoothManager; +Landroid/bluetooth/BluetoothAdapter;->mProxyServiceStateCallbacks:Ljava/util/ArrayList; +Landroid/bluetooth/BluetoothAdapter;->mServiceLock:Ljava/util/concurrent/locks/ReentrantReadWriteLock; +Landroid/bluetooth/BluetoothAdapter;->mToken:Landroid/os/IBinder; +Landroid/bluetooth/BluetoothAdapter;->nameForState(I)Ljava/lang/String; +Landroid/bluetooth/BluetoothAdapter;->readOutOfBandData()Landroid/util/Pair; +Landroid/bluetooth/BluetoothAdapter;->removeServiceStateCallback(Landroid/bluetooth/IBluetoothManagerCallback;)V +Landroid/bluetooth/BluetoothAdapter;->requestControllerActivityEnergyInfo(Landroid/os/ResultReceiver;)V +Landroid/bluetooth/BluetoothAdapter;->sAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothAdapter;->sBluetoothLeAdvertiser:Landroid/bluetooth/le/BluetoothLeAdvertiser; +Landroid/bluetooth/BluetoothAdapter;->sBluetoothLeScanner:Landroid/bluetooth/le/BluetoothLeScanner; +Landroid/bluetooth/BluetoothAdapter;->setBluetoothClass(Landroid/bluetooth/BluetoothClass;)Z +Landroid/bluetooth/BluetoothAdapter;->SOCKET_CHANNEL_AUTO_STATIC_NO_SDP:I +Landroid/bluetooth/BluetoothAdapter;->sPeriodicAdvertisingManager:Landroid/bluetooth/le/PeriodicAdvertisingManager; +Landroid/bluetooth/BluetoothAdapter;->STATE_BLE_ON:I +Landroid/bluetooth/BluetoothAdapter;->STATE_BLE_TURNING_OFF:I +Landroid/bluetooth/BluetoothAdapter;->STATE_BLE_TURNING_ON:I +Landroid/bluetooth/BluetoothAdapter;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothAdapter;->toDeviceSet([Landroid/bluetooth/BluetoothDevice;)Ljava/util/Set; +Landroid/bluetooth/BluetoothAdapter;->VDBG:Z +Landroid/bluetooth/BluetoothAssignedNumbers;-><init>()V +Landroid/bluetooth/BluetoothAudioConfig;-><init>(III)V +Landroid/bluetooth/BluetoothAudioConfig;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/BluetoothAudioConfig;->getAudioFormat()I +Landroid/bluetooth/BluetoothAudioConfig;->getChannelConfig()I +Landroid/bluetooth/BluetoothAudioConfig;->getSampleRate()I +Landroid/bluetooth/BluetoothAudioConfig;->mAudioFormat:I +Landroid/bluetooth/BluetoothAudioConfig;->mChannelConfig:I +Landroid/bluetooth/BluetoothAudioConfig;->mSampleRate:I +Landroid/bluetooth/BluetoothAvrcp;-><init>()V +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_0:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_1:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_2:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_3:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_4:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_5:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_6:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_7:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_8:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_9:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_ANGLE:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_BACKWARD:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_CHAN_DOWN:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_CHAN_UP:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_CLEAR:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_CONT_MENU:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_DISP_INFO:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_DOT:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_DOWN:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_EJECT:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_ENTER:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_EXIT:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_F1:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_F2:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_F3:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_F4:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_F5:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_FAST_FOR:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_FAV_MENU:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_FORWARD:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_HELP:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_INPUT_SEL:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_LEFT:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_LEFT_DOWN:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_LEFT_UP:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_MUTE:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_PAGE_DOWN:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_PAGE_UP:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_PAUSE:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_PLAY:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_POWER:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_PREV_CHAN:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_RECORD:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_REWIND:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_RIGHT:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_RIGHT_DOWN:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_RIGHT_UP:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_ROOT_MENU:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_SELECT:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_SETUP_MENU:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_SOUND_SEL:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_STOP:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_SUBPICT:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_UP:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_VENDOR:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_VOL_DOWN:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_ID_VOL_UP:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_KEYPRESSED_RELEASE:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_STATE_PRESS:I +Landroid/bluetooth/BluetoothAvrcp;->PASSTHROUGH_STATE_RELEASE:I +Landroid/bluetooth/BluetoothAvrcpController;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;)V +Landroid/bluetooth/BluetoothAvrcpController;->ACTION_CONNECTION_STATE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothAvrcpController;->ACTION_PLAYER_SETTING:Ljava/lang/String; +Landroid/bluetooth/BluetoothAvrcpController;->close()V +Landroid/bluetooth/BluetoothAvrcpController;->DBG:Z +Landroid/bluetooth/BluetoothAvrcpController;->doBind()Z +Landroid/bluetooth/BluetoothAvrcpController;->EXTRA_PLAYER_SETTING:Ljava/lang/String; +Landroid/bluetooth/BluetoothAvrcpController;->getPlayerSettings(Landroid/bluetooth/BluetoothDevice;)Landroid/bluetooth/BluetoothAvrcpPlayerSettings; +Landroid/bluetooth/BluetoothAvrcpController;->isEnabled()Z +Landroid/bluetooth/BluetoothAvrcpController;->isValidDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothAvrcpController;->log(Ljava/lang/String;)V +Landroid/bluetooth/BluetoothAvrcpController;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothAvrcpController;->mBluetoothStateChangeCallback:Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothAvrcpController;->mConnection:Landroid/content/ServiceConnection; +Landroid/bluetooth/BluetoothAvrcpController;->mContext:Landroid/content/Context; +Landroid/bluetooth/BluetoothAvrcpController;->mService:Landroid/bluetooth/IBluetoothAvrcpController; +Landroid/bluetooth/BluetoothAvrcpController;->mServiceListener:Landroid/bluetooth/BluetoothProfile$ServiceListener; +Landroid/bluetooth/BluetoothAvrcpController;->sendGroupNavigationCmd(Landroid/bluetooth/BluetoothDevice;II)V +Landroid/bluetooth/BluetoothAvrcpController;->setPlayerApplicationSetting(Landroid/bluetooth/BluetoothAvrcpPlayerSettings;)Z +Landroid/bluetooth/BluetoothAvrcpController;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothAvrcpController;->VDBG:Z +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;-><init>(I)V +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->addSettingValue(II)V +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->getSettings()I +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->getSettingValue(I)I +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->mSettings:I +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->mSettingsValue:Ljava/util/Map; +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->SETTING_EQUALIZER:I +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->SETTING_REPEAT:I +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->SETTING_SCAN:I +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->SETTING_SHUFFLE:I +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->STATE_ALL_TRACK:I +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->STATE_GROUP:I +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->STATE_INVALID:I +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->STATE_OFF:I +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->STATE_ON:I +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->STATE_SINGLE_TRACK:I +Landroid/bluetooth/BluetoothAvrcpPlayerSettings;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothClass$Device$Major;->BITMASK:I +Landroid/bluetooth/BluetoothClass$Device;->BITMASK:I +Landroid/bluetooth/BluetoothClass$Device;->PERIPHERAL_KEYBOARD:I +Landroid/bluetooth/BluetoothClass$Device;->PERIPHERAL_KEYBOARD_POINTING:I +Landroid/bluetooth/BluetoothClass$Device;->PERIPHERAL_NON_KEYBOARD_NON_POINTING:I +Landroid/bluetooth/BluetoothClass$Device;->PERIPHERAL_POINTING:I +Landroid/bluetooth/BluetoothClass$Service;->BITMASK:I +Landroid/bluetooth/BluetoothClass;->ERROR:I +Landroid/bluetooth/BluetoothClass;->getClassOfDevice()I +Landroid/bluetooth/BluetoothClass;->getClassOfDeviceBytes()[B +Landroid/bluetooth/BluetoothClass;->mClass:I +Landroid/bluetooth/BluetoothClass;->PROFILE_A2DP_SINK:I +Landroid/bluetooth/BluetoothClass;->PROFILE_HID:I +Landroid/bluetooth/BluetoothClass;->PROFILE_NAP:I +Landroid/bluetooth/BluetoothClass;->PROFILE_OPP:I +Landroid/bluetooth/BluetoothClass;->PROFILE_PANU:I +Landroid/bluetooth/BluetoothCodecConfig;->appendCapabilityToString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; +Landroid/bluetooth/BluetoothCodecConfig;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/BluetoothCodecConfig;->getCodecName()Ljava/lang/String; +Landroid/bluetooth/BluetoothCodecConfig;->isMandatoryCodec()Z +Landroid/bluetooth/BluetoothCodecConfig;->isValid()Z +Landroid/bluetooth/BluetoothCodecConfig;->mBitsPerSample:I +Landroid/bluetooth/BluetoothCodecConfig;->mChannelMode:I +Landroid/bluetooth/BluetoothCodecConfig;->mCodecPriority:I +Landroid/bluetooth/BluetoothCodecConfig;->mCodecSpecific1:J +Landroid/bluetooth/BluetoothCodecConfig;->mCodecSpecific2:J +Landroid/bluetooth/BluetoothCodecConfig;->mCodecSpecific3:J +Landroid/bluetooth/BluetoothCodecConfig;->mCodecSpecific4:J +Landroid/bluetooth/BluetoothCodecConfig;->mCodecType:I +Landroid/bluetooth/BluetoothCodecConfig;->mSampleRate:I +Landroid/bluetooth/BluetoothCodecConfig;->sameAudioFeedingParameters(Landroid/bluetooth/BluetoothCodecConfig;)Z +Landroid/bluetooth/BluetoothCodecStatus;-><init>(Landroid/bluetooth/BluetoothCodecConfig;[Landroid/bluetooth/BluetoothCodecConfig;[Landroid/bluetooth/BluetoothCodecConfig;)V +Landroid/bluetooth/BluetoothCodecStatus;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/BluetoothCodecStatus;->mCodecConfig:Landroid/bluetooth/BluetoothCodecConfig; +Landroid/bluetooth/BluetoothCodecStatus;->mCodecsLocalCapabilities:[Landroid/bluetooth/BluetoothCodecConfig; +Landroid/bluetooth/BluetoothCodecStatus;->mCodecsSelectableCapabilities:[Landroid/bluetooth/BluetoothCodecConfig; +Landroid/bluetooth/BluetoothCodecStatus;->sameCapabilities([Landroid/bluetooth/BluetoothCodecConfig;[Landroid/bluetooth/BluetoothCodecConfig;)Z +Landroid/bluetooth/BluetoothDevice;->ACTION_BATTERY_LEVEL_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->ACTION_CONNECTION_ACCESS_CANCEL:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->ACTION_CONNECTION_ACCESS_REPLY:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->ACTION_CONNECTION_ACCESS_REQUEST:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->ACTION_MAS_INSTANCE:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->ACTION_NAME_FAILED:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->BATTERY_LEVEL_UNKNOWN:I +Landroid/bluetooth/BluetoothDevice;->BOND_SUCCESS:I +Landroid/bluetooth/BluetoothDevice;->CONNECTION_ACCESS_NO:I +Landroid/bluetooth/BluetoothDevice;->CONNECTION_ACCESS_YES:I +Landroid/bluetooth/BluetoothDevice;->CONNECTION_STATE_CONNECTED:I +Landroid/bluetooth/BluetoothDevice;->CONNECTION_STATE_DISCONNECTED:I +Landroid/bluetooth/BluetoothDevice;->CONNECTION_STATE_ENCRYPTED_BREDR:I +Landroid/bluetooth/BluetoothDevice;->CONNECTION_STATE_ENCRYPTED_LE:I +Landroid/bluetooth/BluetoothDevice;->createBondOutOfBand(ILandroid/bluetooth/OobData;)Z +Landroid/bluetooth/BluetoothDevice;->createInsecureL2capCocSocket(II)Landroid/bluetooth/BluetoothSocket; +Landroid/bluetooth/BluetoothDevice;->createInsecureL2capSocket(I)Landroid/bluetooth/BluetoothSocket; +Landroid/bluetooth/BluetoothDevice;->createL2capCocSocket(II)Landroid/bluetooth/BluetoothSocket; +Landroid/bluetooth/BluetoothDevice;->createL2capSocket(I)Landroid/bluetooth/BluetoothSocket; +Landroid/bluetooth/BluetoothDevice;->DBG:Z +Landroid/bluetooth/BluetoothDevice;->EXTRA_ACCESS_REQUEST_TYPE:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->EXTRA_ALWAYS_ALLOWED:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->EXTRA_BATTERY_LEVEL:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->EXTRA_CLASS_NAME:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->EXTRA_CONNECTION_ACCESS_RESULT:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->EXTRA_MAS_INSTANCE:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->EXTRA_PACKAGE_NAME:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->EXTRA_SDP_RECORD:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->getSimAccessPermission()I +Landroid/bluetooth/BluetoothDevice;->isBluetoothEnabled()Z +Landroid/bluetooth/BluetoothDevice;->mAddress:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->PAIRING_VARIANT_CONSENT:I +Landroid/bluetooth/BluetoothDevice;->PAIRING_VARIANT_DISPLAY_PASSKEY:I +Landroid/bluetooth/BluetoothDevice;->PAIRING_VARIANT_DISPLAY_PIN:I +Landroid/bluetooth/BluetoothDevice;->PAIRING_VARIANT_OOB_CONSENT:I +Landroid/bluetooth/BluetoothDevice;->PAIRING_VARIANT_PASSKEY:I +Landroid/bluetooth/BluetoothDevice;->PAIRING_VARIANT_PIN_16_DIGITS:I +Landroid/bluetooth/BluetoothDevice;->REQUEST_TYPE_MESSAGE_ACCESS:I +Landroid/bluetooth/BluetoothDevice;->REQUEST_TYPE_PHONEBOOK_ACCESS:I +Landroid/bluetooth/BluetoothDevice;->REQUEST_TYPE_PROFILE_CONNECTION:I +Landroid/bluetooth/BluetoothDevice;->REQUEST_TYPE_SIM_ACCESS:I +Landroid/bluetooth/BluetoothDevice;->sdpSearch(Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/BluetoothDevice;->setDeviceOutOfBandData([B[B)Z +Landroid/bluetooth/BluetoothDevice;->setRemoteOutOfBandData()Z +Landroid/bluetooth/BluetoothDevice;->sService:Landroid/bluetooth/IBluetooth; +Landroid/bluetooth/BluetoothDevice;->sStateChangeCallback:Landroid/bluetooth/IBluetoothManagerCallback; +Landroid/bluetooth/BluetoothDevice;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_AUTH_CANCELED:I +Landroid/bluetooth/BluetoothDevice;->UNBOND_REASON_REMOVED:I +Landroid/bluetooth/BluetoothDevicePicker;->ACTION_DEVICE_SELECTED:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevicePicker;->ACTION_LAUNCH:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevicePicker;->EXTRA_FILTER_TYPE:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevicePicker;->EXTRA_LAUNCH_CLASS:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevicePicker;->EXTRA_LAUNCH_PACKAGE:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevicePicker;->EXTRA_NEED_AUTH:Ljava/lang/String; +Landroid/bluetooth/BluetoothDevicePicker;->FILTER_TYPE_ALL:I +Landroid/bluetooth/BluetoothDevicePicker;->FILTER_TYPE_AUDIO:I +Landroid/bluetooth/BluetoothDevicePicker;->FILTER_TYPE_NAP:I +Landroid/bluetooth/BluetoothDevicePicker;->FILTER_TYPE_PANU:I +Landroid/bluetooth/BluetoothDevicePicker;->FILTER_TYPE_TRANSFER:I +Landroid/bluetooth/BluetoothGatt;-><init>(Landroid/bluetooth/IBluetoothGatt;Landroid/bluetooth/BluetoothDevice;IZI)V +Landroid/bluetooth/BluetoothGatt;->AUTHENTICATION_MITM:I +Landroid/bluetooth/BluetoothGatt;->AUTHENTICATION_NONE:I +Landroid/bluetooth/BluetoothGatt;->AUTHENTICATION_NO_MITM:I +Landroid/bluetooth/BluetoothGatt;->AUTH_RETRY_STATE_IDLE:I +Landroid/bluetooth/BluetoothGatt;->AUTH_RETRY_STATE_MITM:I +Landroid/bluetooth/BluetoothGatt;->AUTH_RETRY_STATE_NO_MITM:I +Landroid/bluetooth/BluetoothGatt;->CONN_STATE_CLOSED:I +Landroid/bluetooth/BluetoothGatt;->CONN_STATE_CONNECTED:I +Landroid/bluetooth/BluetoothGatt;->CONN_STATE_CONNECTING:I +Landroid/bluetooth/BluetoothGatt;->CONN_STATE_DISCONNECTING:I +Landroid/bluetooth/BluetoothGatt;->CONN_STATE_IDLE:I +Landroid/bluetooth/BluetoothGatt;->DBG:Z +Landroid/bluetooth/BluetoothGatt;->discoverServiceByUuid(Ljava/util/UUID;)Z +Landroid/bluetooth/BluetoothGatt;->getCharacteristicById(Landroid/bluetooth/BluetoothDevice;I)Landroid/bluetooth/BluetoothGattCharacteristic; +Landroid/bluetooth/BluetoothGatt;->getDescriptorById(Landroid/bluetooth/BluetoothDevice;I)Landroid/bluetooth/BluetoothGattDescriptor; +Landroid/bluetooth/BluetoothGatt;->getService(Landroid/bluetooth/BluetoothDevice;Ljava/util/UUID;I)Landroid/bluetooth/BluetoothGattService; +Landroid/bluetooth/BluetoothGatt;->mBluetoothGattCallback:Landroid/bluetooth/IBluetoothGattCallback; +Landroid/bluetooth/BluetoothGatt;->mConnState:I +Landroid/bluetooth/BluetoothGatt;->mDevice:Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/BluetoothGatt;->mHandler:Landroid/os/Handler; +Landroid/bluetooth/BluetoothGatt;->mOpportunistic:Z +Landroid/bluetooth/BluetoothGatt;->mPhy:I +Landroid/bluetooth/BluetoothGatt;->mServices:Ljava/util/List; +Landroid/bluetooth/BluetoothGatt;->mStateLock:Ljava/lang/Object; +Landroid/bluetooth/BluetoothGatt;->readUsingCharacteristicUuid(Ljava/util/UUID;II)Z +Landroid/bluetooth/BluetoothGatt;->registerApp(Landroid/bluetooth/BluetoothGattCallback;Landroid/os/Handler;)Z +Landroid/bluetooth/BluetoothGatt;->requestLeConnectionUpdate(IIIIII)Z +Landroid/bluetooth/BluetoothGatt;->runOrQueueCallback(Ljava/lang/Runnable;)V +Landroid/bluetooth/BluetoothGatt;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothGatt;->VDBG:Z +Landroid/bluetooth/BluetoothGattCallback;->onConnectionUpdated(Landroid/bluetooth/BluetoothGatt;IIII)V +Landroid/bluetooth/BluetoothGattCharacteristic;-><init>(Landroid/bluetooth/BluetoothGattService;Ljava/util/UUID;III)V +Landroid/bluetooth/BluetoothGattCharacteristic;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/BluetoothGattCharacteristic;-><init>(Ljava/util/UUID;III)V +Landroid/bluetooth/BluetoothGattCharacteristic;->bytesToFloat(BB)F +Landroid/bluetooth/BluetoothGattCharacteristic;->bytesToFloat(BBBB)F +Landroid/bluetooth/BluetoothGattCharacteristic;->getDescriptor(Ljava/util/UUID;I)Landroid/bluetooth/BluetoothGattDescriptor; +Landroid/bluetooth/BluetoothGattCharacteristic;->getKeySize()I +Landroid/bluetooth/BluetoothGattCharacteristic;->getTypeLen(I)I +Landroid/bluetooth/BluetoothGattCharacteristic;->initCharacteristic(Landroid/bluetooth/BluetoothGattService;Ljava/util/UUID;III)V +Landroid/bluetooth/BluetoothGattCharacteristic;->intToSignedBits(II)I +Landroid/bluetooth/BluetoothGattCharacteristic;->mKeySize:I +Landroid/bluetooth/BluetoothGattCharacteristic;->mPermissions:I +Landroid/bluetooth/BluetoothGattCharacteristic;->mProperties:I +Landroid/bluetooth/BluetoothGattCharacteristic;->mUuid:Ljava/util/UUID; +Landroid/bluetooth/BluetoothGattCharacteristic;->mValue:[B +Landroid/bluetooth/BluetoothGattCharacteristic;->mWriteType:I +Landroid/bluetooth/BluetoothGattCharacteristic;->setInstanceId(I)V +Landroid/bluetooth/BluetoothGattCharacteristic;->unsignedBytesToInt(BB)I +Landroid/bluetooth/BluetoothGattCharacteristic;->unsignedBytesToInt(BBBB)I +Landroid/bluetooth/BluetoothGattCharacteristic;->unsignedByteToInt(B)I +Landroid/bluetooth/BluetoothGattCharacteristic;->unsignedToSigned(II)I +Landroid/bluetooth/BluetoothGattDescriptor;-><init>(Landroid/bluetooth/BluetoothGattCharacteristic;Ljava/util/UUID;II)V +Landroid/bluetooth/BluetoothGattDescriptor;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/BluetoothGattDescriptor;-><init>(Ljava/util/UUID;II)V +Landroid/bluetooth/BluetoothGattDescriptor;->getInstanceId()I +Landroid/bluetooth/BluetoothGattDescriptor;->initDescriptor(Landroid/bluetooth/BluetoothGattCharacteristic;Ljava/util/UUID;II)V +Landroid/bluetooth/BluetoothGattDescriptor;->mPermissions:I +Landroid/bluetooth/BluetoothGattDescriptor;->mUuid:Ljava/util/UUID; +Landroid/bluetooth/BluetoothGattDescriptor;->mValue:[B +Landroid/bluetooth/BluetoothGattDescriptor;->setInstanceId(I)V +Landroid/bluetooth/BluetoothGattIncludedService;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/BluetoothGattIncludedService;-><init>(Ljava/util/UUID;II)V +Landroid/bluetooth/BluetoothGattIncludedService;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/BluetoothGattIncludedService;->getInstanceId()I +Landroid/bluetooth/BluetoothGattIncludedService;->getType()I +Landroid/bluetooth/BluetoothGattIncludedService;->getUuid()Ljava/util/UUID; +Landroid/bluetooth/BluetoothGattIncludedService;->mInstanceId:I +Landroid/bluetooth/BluetoothGattIncludedService;->mServiceType:I +Landroid/bluetooth/BluetoothGattIncludedService;->mUuid:Ljava/util/UUID; +Landroid/bluetooth/BluetoothGattServer;-><init>(Landroid/bluetooth/IBluetoothGatt;I)V +Landroid/bluetooth/BluetoothGattServer;->CALLBACK_REG_TIMEOUT:I +Landroid/bluetooth/BluetoothGattServer;->DBG:Z +Landroid/bluetooth/BluetoothGattServer;->getCharacteristicByHandle(I)Landroid/bluetooth/BluetoothGattCharacteristic; +Landroid/bluetooth/BluetoothGattServer;->getDescriptorByHandle(I)Landroid/bluetooth/BluetoothGattDescriptor; +Landroid/bluetooth/BluetoothGattServer;->getService(Ljava/util/UUID;II)Landroid/bluetooth/BluetoothGattService; +Landroid/bluetooth/BluetoothGattServer;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothGattServer;->mBluetoothGattServerCallback:Landroid/bluetooth/IBluetoothGattServerCallback; +Landroid/bluetooth/BluetoothGattServer;->mCallback:Landroid/bluetooth/BluetoothGattServerCallback; +Landroid/bluetooth/BluetoothGattServer;->mPendingService:Landroid/bluetooth/BluetoothGattService; +Landroid/bluetooth/BluetoothGattServer;->mServerIf:I +Landroid/bluetooth/BluetoothGattServer;->mServerIfLock:Ljava/lang/Object; +Landroid/bluetooth/BluetoothGattServer;->mService:Landroid/bluetooth/IBluetoothGatt; +Landroid/bluetooth/BluetoothGattServer;->mServices:Ljava/util/List; +Landroid/bluetooth/BluetoothGattServer;->mTransport:I +Landroid/bluetooth/BluetoothGattServer;->registerCallback(Landroid/bluetooth/BluetoothGattServerCallback;)Z +Landroid/bluetooth/BluetoothGattServer;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothGattServer;->unregisterCallback()V +Landroid/bluetooth/BluetoothGattServer;->VDBG:Z +Landroid/bluetooth/BluetoothGattServerCallback;->onConnectionUpdated(Landroid/bluetooth/BluetoothDevice;IIII)V +Landroid/bluetooth/BluetoothGattService;-><init>(Landroid/bluetooth/BluetoothDevice;Ljava/util/UUID;II)V +Landroid/bluetooth/BluetoothGattService;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/BluetoothGattService;-><init>(Ljava/util/UUID;II)V +Landroid/bluetooth/BluetoothGattService;->addIncludedService(Landroid/bluetooth/BluetoothGattService;)V +Landroid/bluetooth/BluetoothGattService;->getCharacteristic(Ljava/util/UUID;I)Landroid/bluetooth/BluetoothGattCharacteristic; +Landroid/bluetooth/BluetoothGattService;->getDevice()Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/BluetoothGattService;->getHandles()I +Landroid/bluetooth/BluetoothGattService;->isAdvertisePreferred()Z +Landroid/bluetooth/BluetoothGattService;->mAdvertisePreferred:Z +Landroid/bluetooth/BluetoothGattService;->mHandles:I +Landroid/bluetooth/BluetoothGattService;->mInstanceId:I +Landroid/bluetooth/BluetoothGattService;->mServiceType:I +Landroid/bluetooth/BluetoothGattService;->mUuid:Ljava/util/UUID; +Landroid/bluetooth/BluetoothGattService;->setDevice(Landroid/bluetooth/BluetoothDevice;)V +Landroid/bluetooth/BluetoothGattService;->setHandles(I)V +Landroid/bluetooth/BluetoothHeadset;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;)V +Landroid/bluetooth/BluetoothHeadset;->ACTION_HF_INDICATORS_VALUE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadset;->clccResponse(IIIIZLjava/lang/String;I)V +Landroid/bluetooth/BluetoothHeadset;->DBG:Z +Landroid/bluetooth/BluetoothHeadset;->doBind()Z +Landroid/bluetooth/BluetoothHeadset;->doUnbind()V +Landroid/bluetooth/BluetoothHeadset;->EXTRA_HF_INDICATORS_IND_ID:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadset;->EXTRA_HF_INDICATORS_IND_VALUE:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadset;->getAudioRouteAllowed()Z +Landroid/bluetooth/BluetoothHeadset;->isAudioOn()Z +Landroid/bluetooth/BluetoothHeadset;->isBluetoothVoiceDialingEnabled(Landroid/content/Context;)Z +Landroid/bluetooth/BluetoothHeadset;->isDisabled()Z +Landroid/bluetooth/BluetoothHeadset;->isInbandRingingEnabled()Z +Landroid/bluetooth/BluetoothHeadset;->isInbandRingingSupported(Landroid/content/Context;)Z +Landroid/bluetooth/BluetoothHeadset;->isValidDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHeadset;->log(Ljava/lang/String;)V +Landroid/bluetooth/BluetoothHeadset;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothHeadset;->mBluetoothStateChangeCallback:Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothHeadset;->mConnection:Landroid/bluetooth/IBluetoothProfileServiceConnection; +Landroid/bluetooth/BluetoothHeadset;->mContext:Landroid/content/Context; +Landroid/bluetooth/BluetoothHeadset;->MESSAGE_HEADSET_SERVICE_CONNECTED:I +Landroid/bluetooth/BluetoothHeadset;->MESSAGE_HEADSET_SERVICE_DISCONNECTED:I +Landroid/bluetooth/BluetoothHeadset;->mHandler:Landroid/os/Handler; +Landroid/bluetooth/BluetoothHeadset;->mService:Landroid/bluetooth/IBluetoothHeadset; +Landroid/bluetooth/BluetoothHeadset;->mServiceListener:Landroid/bluetooth/BluetoothProfile$ServiceListener; +Landroid/bluetooth/BluetoothHeadset;->setAudioRouteAllowed(Z)V +Landroid/bluetooth/BluetoothHeadset;->setForceScoAudio(Z)V +Landroid/bluetooth/BluetoothHeadset;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadset;->VDBG:Z +Landroid/bluetooth/BluetoothHeadset;->VENDOR_SPECIFIC_HEADSET_EVENT_IPHONEACCEV:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadset;->VENDOR_SPECIFIC_HEADSET_EVENT_IPHONEACCEV_BATTERY_LEVEL:I +Landroid/bluetooth/BluetoothHeadset;->VENDOR_SPECIFIC_HEADSET_EVENT_XAPL:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadset;->VENDOR_SPECIFIC_HEADSET_EVENT_XEVENT:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadset;->VENDOR_SPECIFIC_HEADSET_EVENT_XEVENT_BATTERY_LEVEL:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;)V +Landroid/bluetooth/BluetoothHeadsetClient;->ACTION_AG_EVENT:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->ACTION_AUDIO_STATE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->ACTION_CALL_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->ACTION_CONNECTION_STATE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->ACTION_LAST_VTAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->ACTION_RESULT:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->ACTION_RESULT_ERROR:I +Landroid/bluetooth/BluetoothHeadsetClient;->ACTION_RESULT_ERROR_BLACKLISTED:I +Landroid/bluetooth/BluetoothHeadsetClient;->ACTION_RESULT_ERROR_BUSY:I +Landroid/bluetooth/BluetoothHeadsetClient;->ACTION_RESULT_ERROR_CME:I +Landroid/bluetooth/BluetoothHeadsetClient;->ACTION_RESULT_ERROR_DELAYED:I +Landroid/bluetooth/BluetoothHeadsetClient;->ACTION_RESULT_ERROR_NO_ANSWER:I +Landroid/bluetooth/BluetoothHeadsetClient;->ACTION_RESULT_ERROR_NO_CARRIER:I +Landroid/bluetooth/BluetoothHeadsetClient;->ACTION_RESULT_OK:I +Landroid/bluetooth/BluetoothHeadsetClient;->CALL_ACCEPT_HOLD:I +Landroid/bluetooth/BluetoothHeadsetClient;->CALL_ACCEPT_NONE:I +Landroid/bluetooth/BluetoothHeadsetClient;->CALL_ACCEPT_TERMINATE:I +Landroid/bluetooth/BluetoothHeadsetClient;->close()V +Landroid/bluetooth/BluetoothHeadsetClient;->CME_CORPORATE_PERSONALIZATION_PIN_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_CORPORATE_PERSONALIZATION_PUK_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_DIAL_STRING_TOO_LONG:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_EAP_NOT_SUPPORTED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_EMERGENCY_SERVICE_ONLY:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_HIDDEN_KEY_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_INCORRECT_PARAMETERS:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_INCORRECT_PASSWORD:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_INVALID_CHARACTER_IN_DIAL_STRING:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_INVALID_CHARACTER_IN_TEXT_STRING:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_INVALID_INDEX:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_MEMORY_FAILURE:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_MEMORY_FULL:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_NETWORK_PERSONALIZATION_PIN_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_NETWORK_PERSONALIZATION_PUK_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_NETWORK_SUBSET_PERSONALIZATION_PIN_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_NETWORK_SUBSET_PERSONALIZATION_PUK_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_NETWORK_TIMEOUT:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_NOT_FOUND:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_NOT_SUPPORTED_FOR_VOIP:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_NO_CONNECTION_TO_PHONE:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_NO_NETWORK_SERVICE:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_NO_SIMULTANOUS_VOIP_CS_CALLS:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_OPERATION_NOT_ALLOWED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_OPERATION_NOT_SUPPORTED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_PHFSIM_PIN_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_PHFSIM_PUK_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_PHONE_FAILURE:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_PHSIM_PIN_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_SERVICE_PROVIDER_PERSONALIZATION_PIN_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_SERVICE_PROVIDER_PERSONALIZATION_PUK_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_SIM_BUSY:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_SIM_FAILURE:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_SIM_NOT_INSERTED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_SIM_PIN2_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_SIM_PIN_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_SIM_PUK2_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_SIM_PUK_REQUIRED:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_SIM_WRONG:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_SIP_RESPONSE_CODE:I +Landroid/bluetooth/BluetoothHeadsetClient;->CME_TEXT_STRING_TOO_LONG:I +Landroid/bluetooth/BluetoothHeadsetClient;->connectAudio(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHeadsetClient;->DBG:Z +Landroid/bluetooth/BluetoothHeadsetClient;->dial(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;)Landroid/bluetooth/BluetoothHeadsetClientCall; +Landroid/bluetooth/BluetoothHeadsetClient;->disconnectAudio(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHeadsetClient;->doBind()Z +Landroid/bluetooth/BluetoothHeadsetClient;->enterPrivateMode(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/BluetoothHeadsetClient;->explicitCallTransfer(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_AG_FEATURE_3WAY_CALLING:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_AG_FEATURE_ACCEPT_HELD_OR_WAITING_CALL:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_AG_FEATURE_ATTACH_NUMBER_TO_VT:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_AG_FEATURE_ECC:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_AG_FEATURE_MERGE:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_AG_FEATURE_MERGE_AND_DETACH:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_AG_FEATURE_REJECT_CALL:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_AG_FEATURE_RELEASE_AND_ACCEPT:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_AG_FEATURE_RELEASE_HELD_OR_WAITING_CALL:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_AG_FEATURE_RESPONSE_AND_HOLD:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_AG_FEATURE_VOICE_RECOGNITION:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_AUDIO_WBS:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_BATTERY_LEVEL:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_CALL:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_CME_CODE:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_IN_BAND_RING:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_NETWORK_ROAMING:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_NETWORK_SIGNAL_STRENGTH:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_NETWORK_STATUS:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_NUMBER:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_OPERATOR_NAME:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_RESULT_CODE:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_SUBSCRIBER_INFO:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->EXTRA_VOICE_RECOGNITION:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->getAudioRouteAllowed(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHeadsetClient;->getCurrentAgEvents(Landroid/bluetooth/BluetoothDevice;)Landroid/os/Bundle; +Landroid/bluetooth/BluetoothHeadsetClient;->getCurrentAgFeatures(Landroid/bluetooth/BluetoothDevice;)Landroid/os/Bundle; +Landroid/bluetooth/BluetoothHeadsetClient;->getCurrentCalls(Landroid/bluetooth/BluetoothDevice;)Ljava/util/List; +Landroid/bluetooth/BluetoothHeadsetClient;->getLastVoiceTagNumber(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHeadsetClient;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/BluetoothHeadsetClient;->holdCall(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHeadsetClient;->isEnabled()Z +Landroid/bluetooth/BluetoothHeadsetClient;->isValidDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHeadsetClient;->log(Ljava/lang/String;)V +Landroid/bluetooth/BluetoothHeadsetClient;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothHeadsetClient;->mBluetoothStateChangeCallback:Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothHeadsetClient;->mConnection:Landroid/content/ServiceConnection; +Landroid/bluetooth/BluetoothHeadsetClient;->mContext:Landroid/content/Context; +Landroid/bluetooth/BluetoothHeadsetClient;->mService:Landroid/bluetooth/IBluetoothHeadsetClient; +Landroid/bluetooth/BluetoothHeadsetClient;->mServiceListener:Landroid/bluetooth/BluetoothProfile$ServiceListener; +Landroid/bluetooth/BluetoothHeadsetClient;->sendDTMF(Landroid/bluetooth/BluetoothDevice;B)Z +Landroid/bluetooth/BluetoothHeadsetClient;->setAudioRouteAllowed(Landroid/bluetooth/BluetoothDevice;Z)V +Landroid/bluetooth/BluetoothHeadsetClient;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/BluetoothHeadsetClient;->startVoiceRecognition(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHeadsetClient;->STATE_AUDIO_CONNECTED:I +Landroid/bluetooth/BluetoothHeadsetClient;->STATE_AUDIO_CONNECTING:I +Landroid/bluetooth/BluetoothHeadsetClient;->STATE_AUDIO_DISCONNECTED:I +Landroid/bluetooth/BluetoothHeadsetClient;->stopVoiceRecognition(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHeadsetClient;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClient;->terminateCall(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHeadsetClientCall;)Z +Landroid/bluetooth/BluetoothHeadsetClient;->VDBG:Z +Landroid/bluetooth/BluetoothHeadsetClientCall;-><init>(Landroid/bluetooth/BluetoothDevice;IILjava/lang/String;ZZZ)V +Landroid/bluetooth/BluetoothHeadsetClientCall;-><init>(Landroid/bluetooth/BluetoothDevice;ILjava/util/UUID;ILjava/lang/String;ZZZ)V +Landroid/bluetooth/BluetoothHeadsetClientCall;->CALL_STATE_ACTIVE:I +Landroid/bluetooth/BluetoothHeadsetClientCall;->CALL_STATE_ALERTING:I +Landroid/bluetooth/BluetoothHeadsetClientCall;->CALL_STATE_DIALING:I +Landroid/bluetooth/BluetoothHeadsetClientCall;->CALL_STATE_HELD:I +Landroid/bluetooth/BluetoothHeadsetClientCall;->CALL_STATE_HELD_BY_RESPONSE_AND_HOLD:I +Landroid/bluetooth/BluetoothHeadsetClientCall;->CALL_STATE_INCOMING:I +Landroid/bluetooth/BluetoothHeadsetClientCall;->CALL_STATE_TERMINATED:I +Landroid/bluetooth/BluetoothHeadsetClientCall;->CALL_STATE_WAITING:I +Landroid/bluetooth/BluetoothHeadsetClientCall;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/BluetoothHeadsetClientCall;->getCreationElapsedMilli()J +Landroid/bluetooth/BluetoothHeadsetClientCall;->getDevice()Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/BluetoothHeadsetClientCall;->getUUID()Ljava/util/UUID; +Landroid/bluetooth/BluetoothHeadsetClientCall;->isInBandRing()Z +Landroid/bluetooth/BluetoothHeadsetClientCall;->mCreationElapsedMilli:J +Landroid/bluetooth/BluetoothHeadsetClientCall;->mDevice:Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/BluetoothHeadsetClientCall;->mId:I +Landroid/bluetooth/BluetoothHeadsetClientCall;->mInBandRing:Z +Landroid/bluetooth/BluetoothHeadsetClientCall;->mMultiParty:Z +Landroid/bluetooth/BluetoothHeadsetClientCall;->mNumber:Ljava/lang/String; +Landroid/bluetooth/BluetoothHeadsetClientCall;->mOutgoing:Z +Landroid/bluetooth/BluetoothHeadsetClientCall;->mState:I +Landroid/bluetooth/BluetoothHeadsetClientCall;->mUUID:Ljava/util/UUID; +Landroid/bluetooth/BluetoothHeadsetClientCall;->setMultiParty(Z)V +Landroid/bluetooth/BluetoothHeadsetClientCall;->setNumber(Ljava/lang/String;)V +Landroid/bluetooth/BluetoothHeadsetClientCall;->setState(I)V +Landroid/bluetooth/BluetoothHeadsetClientCall;->toString(Z)Ljava/lang/String; +Landroid/bluetooth/BluetoothHealth$BluetoothHealthCallbackWrapper;-><init>(Landroid/bluetooth/BluetoothHealthCallback;)V +Landroid/bluetooth/BluetoothHealth$BluetoothHealthCallbackWrapper;->mCallback:Landroid/bluetooth/BluetoothHealthCallback; +Landroid/bluetooth/BluetoothHealth$BluetoothHealthCallbackWrapper;->onHealthAppConfigurationStatusChange(Landroid/bluetooth/BluetoothHealthAppConfiguration;I)V +Landroid/bluetooth/BluetoothHealth$BluetoothHealthCallbackWrapper;->onHealthChannelStateChange(Landroid/bluetooth/BluetoothHealthAppConfiguration;Landroid/bluetooth/BluetoothDevice;IILandroid/os/ParcelFileDescriptor;I)V +Landroid/bluetooth/BluetoothHealth;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;)V +Landroid/bluetooth/BluetoothHealth;->CHANNEL_TYPE_ANY:I +Landroid/bluetooth/BluetoothHealth;->checkAppParam(Ljava/lang/String;IILandroid/bluetooth/BluetoothHealthCallback;)Z +Landroid/bluetooth/BluetoothHealth;->close()V +Landroid/bluetooth/BluetoothHealth;->connectChannelToSink(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;I)Z +Landroid/bluetooth/BluetoothHealth;->DBG:Z +Landroid/bluetooth/BluetoothHealth;->doBind()Z +Landroid/bluetooth/BluetoothHealth;->HEALTH_OPERATION_ERROR:I +Landroid/bluetooth/BluetoothHealth;->HEALTH_OPERATION_GENERIC_FAILURE:I +Landroid/bluetooth/BluetoothHealth;->HEALTH_OPERATION_INVALID_ARGS:I +Landroid/bluetooth/BluetoothHealth;->HEALTH_OPERATION_NOT_ALLOWED:I +Landroid/bluetooth/BluetoothHealth;->HEALTH_OPERATION_NOT_FOUND:I +Landroid/bluetooth/BluetoothHealth;->HEALTH_OPERATION_SUCCESS:I +Landroid/bluetooth/BluetoothHealth;->isEnabled()Z +Landroid/bluetooth/BluetoothHealth;->isValidDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHealth;->log(Ljava/lang/String;)V +Landroid/bluetooth/BluetoothHealth;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothHealth;->mBluetoothStateChangeCallback:Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothHealth;->mConnection:Landroid/content/ServiceConnection; +Landroid/bluetooth/BluetoothHealth;->mContext:Landroid/content/Context; +Landroid/bluetooth/BluetoothHealth;->mService:Landroid/bluetooth/IBluetoothHealth; +Landroid/bluetooth/BluetoothHealth;->mServiceListener:Landroid/bluetooth/BluetoothProfile$ServiceListener; +Landroid/bluetooth/BluetoothHealth;->registerAppConfiguration(Ljava/lang/String;IIILandroid/bluetooth/BluetoothHealthCallback;)Z +Landroid/bluetooth/BluetoothHealth;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothHealth;->VDBG:Z +Landroid/bluetooth/BluetoothHealthAppConfiguration;-><init>(Ljava/lang/String;I)V +Landroid/bluetooth/BluetoothHealthAppConfiguration;-><init>(Ljava/lang/String;III)V +Landroid/bluetooth/BluetoothHealthAppConfiguration;->getChannelType()I +Landroid/bluetooth/BluetoothHealthAppConfiguration;->mChannelType:I +Landroid/bluetooth/BluetoothHealthAppConfiguration;->mDataType:I +Landroid/bluetooth/BluetoothHealthAppConfiguration;->mName:Ljava/lang/String; +Landroid/bluetooth/BluetoothHealthAppConfiguration;->mRole:I +Landroid/bluetooth/BluetoothHealthCallback;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothHearingAid;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;)V +Landroid/bluetooth/BluetoothHearingAid;->ACTION_CONNECTION_STATE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothHearingAid;->ACTION_PLAYING_STATE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothHearingAid;->adjustVolume(I)V +Landroid/bluetooth/BluetoothHearingAid;->close()V +Landroid/bluetooth/BluetoothHearingAid;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHearingAid;->DBG:Z +Landroid/bluetooth/BluetoothHearingAid;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHearingAid;->doBind()V +Landroid/bluetooth/BluetoothHearingAid;->getDeviceMode(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/BluetoothHearingAid;->getDeviceSide(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/BluetoothHearingAid;->getHiSyncId(Landroid/bluetooth/BluetoothDevice;)J +Landroid/bluetooth/BluetoothHearingAid;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/BluetoothHearingAid;->getVolume()I +Landroid/bluetooth/BluetoothHearingAid;->HI_SYNC_ID_INVALID:J +Landroid/bluetooth/BluetoothHearingAid;->isEnabled()Z +Landroid/bluetooth/BluetoothHearingAid;->isValidDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHearingAid;->log(Ljava/lang/String;)V +Landroid/bluetooth/BluetoothHearingAid;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothHearingAid;->mBluetoothStateChangeCallback:Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothHearingAid;->mConnection:Landroid/content/ServiceConnection; +Landroid/bluetooth/BluetoothHearingAid;->mContext:Landroid/content/Context; +Landroid/bluetooth/BluetoothHearingAid;->MODE_BINAURAL:I +Landroid/bluetooth/BluetoothHearingAid;->MODE_MONAURAL:I +Landroid/bluetooth/BluetoothHearingAid;->mService:Landroid/bluetooth/IBluetoothHearingAid; +Landroid/bluetooth/BluetoothHearingAid;->mServiceListener:Landroid/bluetooth/BluetoothProfile$ServiceListener; +Landroid/bluetooth/BluetoothHearingAid;->mServiceLock:Ljava/util/concurrent/locks/ReentrantReadWriteLock; +Landroid/bluetooth/BluetoothHearingAid;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/BluetoothHearingAid;->setVolume(I)V +Landroid/bluetooth/BluetoothHearingAid;->SIDE_LEFT:I +Landroid/bluetooth/BluetoothHearingAid;->SIDE_RIGHT:I +Landroid/bluetooth/BluetoothHearingAid;->stateToString(I)Ljava/lang/String; +Landroid/bluetooth/BluetoothHearingAid;->STATE_NOT_PLAYING:I +Landroid/bluetooth/BluetoothHearingAid;->STATE_PLAYING:I +Landroid/bluetooth/BluetoothHearingAid;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothHearingAid;->VDBG:Z +Landroid/bluetooth/BluetoothHidDevice$Callback;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidDevice$CallbackWrapper;-><init>(Ljava/util/concurrent/Executor;Landroid/bluetooth/BluetoothHidDevice$Callback;)V +Landroid/bluetooth/BluetoothHidDevice$CallbackWrapper;->mCallback:Landroid/bluetooth/BluetoothHidDevice$Callback; +Landroid/bluetooth/BluetoothHidDevice$CallbackWrapper;->mExecutor:Ljava/util/concurrent/Executor; +Landroid/bluetooth/BluetoothHidDevice$CallbackWrapper;->onAppStatusChanged(Landroid/bluetooth/BluetoothDevice;Z)V +Landroid/bluetooth/BluetoothHidDevice$CallbackWrapper;->onConnectionStateChanged(Landroid/bluetooth/BluetoothDevice;I)V +Landroid/bluetooth/BluetoothHidDevice$CallbackWrapper;->onGetReport(Landroid/bluetooth/BluetoothDevice;BBI)V +Landroid/bluetooth/BluetoothHidDevice$CallbackWrapper;->onInterruptData(Landroid/bluetooth/BluetoothDevice;B[B)V +Landroid/bluetooth/BluetoothHidDevice$CallbackWrapper;->onSetProtocol(Landroid/bluetooth/BluetoothDevice;B)V +Landroid/bluetooth/BluetoothHidDevice$CallbackWrapper;->onSetReport(Landroid/bluetooth/BluetoothDevice;BB[B)V +Landroid/bluetooth/BluetoothHidDevice$CallbackWrapper;->onVirtualCableUnplug(Landroid/bluetooth/BluetoothDevice;)V +Landroid/bluetooth/BluetoothHidDevice;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;)V +Landroid/bluetooth/BluetoothHidDevice;->close()V +Landroid/bluetooth/BluetoothHidDevice;->doBind()Z +Landroid/bluetooth/BluetoothHidDevice;->doUnbind()V +Landroid/bluetooth/BluetoothHidDevice;->getUserAppName()Ljava/lang/String; +Landroid/bluetooth/BluetoothHidDevice;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothHidDevice;->mBluetoothStateChangeCallback:Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothHidDevice;->mConnection:Landroid/content/ServiceConnection; +Landroid/bluetooth/BluetoothHidDevice;->mContext:Landroid/content/Context; +Landroid/bluetooth/BluetoothHidDevice;->mService:Landroid/bluetooth/IBluetoothHidDevice; +Landroid/bluetooth/BluetoothHidDevice;->mServiceListener:Landroid/bluetooth/BluetoothProfile$ServiceListener; +Landroid/bluetooth/BluetoothHidDevice;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;->mDelayVariation:I +Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;->mLatency:I +Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;->mPeakBandwidth:I +Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;->mServiceType:I +Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;->mTokenBucketSize:I +Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;->mTokenRate:I +Landroid/bluetooth/BluetoothHidDeviceAppSdpSettings;->mDescription:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidDeviceAppSdpSettings;->mDescriptors:[B +Landroid/bluetooth/BluetoothHidDeviceAppSdpSettings;->mName:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidDeviceAppSdpSettings;->mProvider:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidDeviceAppSdpSettings;->mSubclass:B +Landroid/bluetooth/BluetoothHidHost;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;)V +Landroid/bluetooth/BluetoothHidHost;->ACTION_CONNECTION_STATE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidHost;->ACTION_HANDSHAKE:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidHost;->ACTION_IDLE_TIME_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidHost;->ACTION_PROTOCOL_MODE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidHost;->ACTION_REPORT:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidHost;->ACTION_VIRTUAL_UNPLUG_STATUS:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidHost;->close()V +Landroid/bluetooth/BluetoothHidHost;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHidHost;->DBG:Z +Landroid/bluetooth/BluetoothHidHost;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHidHost;->doBind()Z +Landroid/bluetooth/BluetoothHidHost;->EXTRA_IDLE_TIME:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidHost;->EXTRA_PROTOCOL_MODE:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidHost;->EXTRA_REPORT:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidHost;->EXTRA_REPORT_BUFFER_SIZE:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidHost;->EXTRA_REPORT_ID:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidHost;->EXTRA_REPORT_TYPE:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidHost;->EXTRA_STATUS:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidHost;->EXTRA_VIRTUAL_UNPLUG_STATUS:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidHost;->getIdleTime(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHidHost;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/BluetoothHidHost;->getProtocolMode(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHidHost;->getReport(Landroid/bluetooth/BluetoothDevice;BBI)Z +Landroid/bluetooth/BluetoothHidHost;->INPUT_CONNECT_FAILED_ALREADY_CONNECTED:I +Landroid/bluetooth/BluetoothHidHost;->INPUT_CONNECT_FAILED_ATTEMPT_FAILED:I +Landroid/bluetooth/BluetoothHidHost;->INPUT_DISCONNECT_FAILED_NOT_CONNECTED:I +Landroid/bluetooth/BluetoothHidHost;->INPUT_OPERATION_GENERIC_FAILURE:I +Landroid/bluetooth/BluetoothHidHost;->INPUT_OPERATION_SUCCESS:I +Landroid/bluetooth/BluetoothHidHost;->isEnabled()Z +Landroid/bluetooth/BluetoothHidHost;->isValidDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHidHost;->log(Ljava/lang/String;)V +Landroid/bluetooth/BluetoothHidHost;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothHidHost;->mBluetoothStateChangeCallback:Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothHidHost;->mConnection:Landroid/content/ServiceConnection; +Landroid/bluetooth/BluetoothHidHost;->mContext:Landroid/content/Context; +Landroid/bluetooth/BluetoothHidHost;->mService:Landroid/bluetooth/IBluetoothHidHost; +Landroid/bluetooth/BluetoothHidHost;->mServiceListener:Landroid/bluetooth/BluetoothProfile$ServiceListener; +Landroid/bluetooth/BluetoothHidHost;->PROTOCOL_BOOT_MODE:I +Landroid/bluetooth/BluetoothHidHost;->PROTOCOL_REPORT_MODE:I +Landroid/bluetooth/BluetoothHidHost;->PROTOCOL_UNSUPPORTED_MODE:I +Landroid/bluetooth/BluetoothHidHost;->REPORT_TYPE_FEATURE:B +Landroid/bluetooth/BluetoothHidHost;->REPORT_TYPE_INPUT:B +Landroid/bluetooth/BluetoothHidHost;->REPORT_TYPE_OUTPUT:B +Landroid/bluetooth/BluetoothHidHost;->sendData(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;)Z +Landroid/bluetooth/BluetoothHidHost;->setIdleTime(Landroid/bluetooth/BluetoothDevice;B)Z +Landroid/bluetooth/BluetoothHidHost;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/BluetoothHidHost;->setProtocolMode(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/BluetoothHidHost;->setReport(Landroid/bluetooth/BluetoothDevice;BLjava/lang/String;)Z +Landroid/bluetooth/BluetoothHidHost;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothHidHost;->VDBG:Z +Landroid/bluetooth/BluetoothHidHost;->virtualUnplug(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothHidHost;->VIRTUAL_UNPLUG_STATUS_FAIL:I +Landroid/bluetooth/BluetoothHidHost;->VIRTUAL_UNPLUG_STATUS_SUCCESS:I +Landroid/bluetooth/BluetoothInputStream;-><init>(Landroid/bluetooth/BluetoothSocket;)V +Landroid/bluetooth/BluetoothInputStream;->mSocket:Landroid/bluetooth/BluetoothSocket; +Landroid/bluetooth/BluetoothManager;-><init>(Landroid/content/Context;)V +Landroid/bluetooth/BluetoothManager;->DBG:Z +Landroid/bluetooth/BluetoothManager;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothManager;->openGattServer(Landroid/content/Context;Landroid/bluetooth/BluetoothGattServerCallback;I)Landroid/bluetooth/BluetoothGattServer; +Landroid/bluetooth/BluetoothManager;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothManager;->VDBG:Z +Landroid/bluetooth/BluetoothMap;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;)V +Landroid/bluetooth/BluetoothMap;->ACTION_CONNECTION_STATE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothMap;->close()V +Landroid/bluetooth/BluetoothMap;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothMap;->DBG:Z +Landroid/bluetooth/BluetoothMap;->doBind()Z +Landroid/bluetooth/BluetoothMap;->doesClassMatchSink(Landroid/bluetooth/BluetoothClass;)Z +Landroid/bluetooth/BluetoothMap;->getClient()Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/BluetoothMap;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/BluetoothMap;->getState()I +Landroid/bluetooth/BluetoothMap;->isConnected(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothMap;->isEnabled()Z +Landroid/bluetooth/BluetoothMap;->isValidDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothMap;->log(Ljava/lang/String;)V +Landroid/bluetooth/BluetoothMap;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothMap;->mBluetoothStateChangeCallback:Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothMap;->mConnection:Landroid/content/ServiceConnection; +Landroid/bluetooth/BluetoothMap;->mContext:Landroid/content/Context; +Landroid/bluetooth/BluetoothMap;->mService:Landroid/bluetooth/IBluetoothMap; +Landroid/bluetooth/BluetoothMap;->mServiceListener:Landroid/bluetooth/BluetoothProfile$ServiceListener; +Landroid/bluetooth/BluetoothMap;->RESULT_CANCELED:I +Landroid/bluetooth/BluetoothMap;->RESULT_FAILURE:I +Landroid/bluetooth/BluetoothMap;->RESULT_SUCCESS:I +Landroid/bluetooth/BluetoothMap;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/BluetoothMap;->STATE_ERROR:I +Landroid/bluetooth/BluetoothMap;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothMap;->VDBG:Z +Landroid/bluetooth/BluetoothMapClient;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;)V +Landroid/bluetooth/BluetoothMapClient;->ACTION_CONNECTION_STATE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothMapClient;->ACTION_MESSAGE_DELIVERED_SUCCESSFULLY:Ljava/lang/String; +Landroid/bluetooth/BluetoothMapClient;->ACTION_MESSAGE_RECEIVED:Ljava/lang/String; +Landroid/bluetooth/BluetoothMapClient;->ACTION_MESSAGE_SENT_SUCCESSFULLY:Ljava/lang/String; +Landroid/bluetooth/BluetoothMapClient;->close()V +Landroid/bluetooth/BluetoothMapClient;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothMapClient;->DBG:Z +Landroid/bluetooth/BluetoothMapClient;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothMapClient;->doBind()Z +Landroid/bluetooth/BluetoothMapClient;->EXTRA_MESSAGE_HANDLE:Ljava/lang/String; +Landroid/bluetooth/BluetoothMapClient;->EXTRA_SENDER_CONTACT_NAME:Ljava/lang/String; +Landroid/bluetooth/BluetoothMapClient;->EXTRA_SENDER_CONTACT_URI:Ljava/lang/String; +Landroid/bluetooth/BluetoothMapClient;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/BluetoothMapClient;->getUnreadMessages(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothMapClient;->isConnected(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothMapClient;->isEnabled()Z +Landroid/bluetooth/BluetoothMapClient;->isValidDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothMapClient;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothMapClient;->mBluetoothStateChangeCallback:Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothMapClient;->mConnection:Landroid/content/ServiceConnection; +Landroid/bluetooth/BluetoothMapClient;->mContext:Landroid/content/Context; +Landroid/bluetooth/BluetoothMapClient;->mService:Landroid/bluetooth/IBluetoothMapClient; +Landroid/bluetooth/BluetoothMapClient;->mServiceListener:Landroid/bluetooth/BluetoothProfile$ServiceListener; +Landroid/bluetooth/BluetoothMapClient;->RESULT_CANCELED:I +Landroid/bluetooth/BluetoothMapClient;->RESULT_FAILURE:I +Landroid/bluetooth/BluetoothMapClient;->RESULT_SUCCESS:I +Landroid/bluetooth/BluetoothMapClient;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/BluetoothMapClient;->STATE_ERROR:I +Landroid/bluetooth/BluetoothMapClient;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothMapClient;->VDBG:Z +Landroid/bluetooth/BluetoothMasInstance$MessageType;-><init>()V +Landroid/bluetooth/BluetoothMasInstance$MessageType;->EMAIL:I +Landroid/bluetooth/BluetoothMasInstance$MessageType;->MMS:I +Landroid/bluetooth/BluetoothMasInstance$MessageType;->SMS_CDMA:I +Landroid/bluetooth/BluetoothMasInstance$MessageType;->SMS_GSM:I +Landroid/bluetooth/BluetoothMasInstance;-><init>(ILjava/lang/String;II)V +Landroid/bluetooth/BluetoothMasInstance;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/BluetoothMasInstance;->getChannel()I +Landroid/bluetooth/BluetoothMasInstance;->getId()I +Landroid/bluetooth/BluetoothMasInstance;->getMsgTypes()I +Landroid/bluetooth/BluetoothMasInstance;->getName()Ljava/lang/String; +Landroid/bluetooth/BluetoothMasInstance;->mChannel:I +Landroid/bluetooth/BluetoothMasInstance;->mId:I +Landroid/bluetooth/BluetoothMasInstance;->mMsgTypes:I +Landroid/bluetooth/BluetoothMasInstance;->mName:Ljava/lang/String; +Landroid/bluetooth/BluetoothMasInstance;->msgSupported(I)Z +Landroid/bluetooth/BluetoothOutputStream;-><init>(Landroid/bluetooth/BluetoothSocket;)V +Landroid/bluetooth/BluetoothOutputStream;->mSocket:Landroid/bluetooth/BluetoothSocket; +Landroid/bluetooth/BluetoothPan;->ACTION_CONNECTION_STATE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothPan;->DBG:Z +Landroid/bluetooth/BluetoothPan;->EXTRA_LOCAL_ROLE:Ljava/lang/String; +Landroid/bluetooth/BluetoothPan;->LOCAL_NAP_ROLE:I +Landroid/bluetooth/BluetoothPan;->LOCAL_PANU_ROLE:I +Landroid/bluetooth/BluetoothPan;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothPan;->mConnection:Landroid/content/ServiceConnection; +Landroid/bluetooth/BluetoothPan;->mContext:Landroid/content/Context; +Landroid/bluetooth/BluetoothPan;->mPanService:Landroid/bluetooth/IBluetoothPan; +Landroid/bluetooth/BluetoothPan;->mServiceListener:Landroid/bluetooth/BluetoothProfile$ServiceListener; +Landroid/bluetooth/BluetoothPan;->mStateChangeCallback:Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothPan;->PAN_CONNECT_FAILED_ALREADY_CONNECTED:I +Landroid/bluetooth/BluetoothPan;->PAN_CONNECT_FAILED_ATTEMPT_FAILED:I +Landroid/bluetooth/BluetoothPan;->PAN_DISCONNECT_FAILED_NOT_CONNECTED:I +Landroid/bluetooth/BluetoothPan;->PAN_OPERATION_GENERIC_FAILURE:I +Landroid/bluetooth/BluetoothPan;->PAN_OPERATION_SUCCESS:I +Landroid/bluetooth/BluetoothPan;->PAN_ROLE_NONE:I +Landroid/bluetooth/BluetoothPan;->REMOTE_NAP_ROLE:I +Landroid/bluetooth/BluetoothPan;->REMOTE_PANU_ROLE:I +Landroid/bluetooth/BluetoothPan;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothPan;->VDBG:Z +Landroid/bluetooth/BluetoothPbap$ServiceListener;->onServiceConnected(Landroid/bluetooth/BluetoothPbap;)V +Landroid/bluetooth/BluetoothPbap$ServiceListener;->onServiceDisconnected()V +Landroid/bluetooth/BluetoothPbap;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothPbap$ServiceListener;)V +Landroid/bluetooth/BluetoothPbap;->ACTION_CONNECTION_STATE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothPbap;->close()V +Landroid/bluetooth/BluetoothPbap;->DBG:Z +Landroid/bluetooth/BluetoothPbap;->doBind()Z +Landroid/bluetooth/BluetoothPbap;->isConnected(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothPbap;->log(Ljava/lang/String;)V +Landroid/bluetooth/BluetoothPbap;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothPbap;->mBluetoothStateChangeCallback:Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothPbap;->mConnection:Landroid/content/ServiceConnection; +Landroid/bluetooth/BluetoothPbap;->mContext:Landroid/content/Context; +Landroid/bluetooth/BluetoothPbap;->mService:Landroid/bluetooth/IBluetoothPbap; +Landroid/bluetooth/BluetoothPbap;->mServiceListener:Landroid/bluetooth/BluetoothPbap$ServiceListener; +Landroid/bluetooth/BluetoothPbap;->RESULT_CANCELED:I +Landroid/bluetooth/BluetoothPbap;->RESULT_FAILURE:I +Landroid/bluetooth/BluetoothPbap;->RESULT_SUCCESS:I +Landroid/bluetooth/BluetoothPbap;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothPbapClient;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;)V +Landroid/bluetooth/BluetoothPbapClient;->ACTION_CONNECTION_STATE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothPbapClient;->close()V +Landroid/bluetooth/BluetoothPbapClient;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothPbapClient;->DBG:Z +Landroid/bluetooth/BluetoothPbapClient;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothPbapClient;->doBind()Z +Landroid/bluetooth/BluetoothPbapClient;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/BluetoothPbapClient;->isEnabled()Z +Landroid/bluetooth/BluetoothPbapClient;->isValidDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothPbapClient;->log(Ljava/lang/String;)V +Landroid/bluetooth/BluetoothPbapClient;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothPbapClient;->mBluetoothStateChangeCallback:Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothPbapClient;->mConnection:Landroid/content/ServiceConnection; +Landroid/bluetooth/BluetoothPbapClient;->mContext:Landroid/content/Context; +Landroid/bluetooth/BluetoothPbapClient;->mService:Landroid/bluetooth/IBluetoothPbapClient; +Landroid/bluetooth/BluetoothPbapClient;->mServiceListener:Landroid/bluetooth/BluetoothProfile$ServiceListener; +Landroid/bluetooth/BluetoothPbapClient;->RESULT_CANCELED:I +Landroid/bluetooth/BluetoothPbapClient;->RESULT_FAILURE:I +Landroid/bluetooth/BluetoothPbapClient;->RESULT_SUCCESS:I +Landroid/bluetooth/BluetoothPbapClient;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/BluetoothPbapClient;->STATE_ERROR:I +Landroid/bluetooth/BluetoothPbapClient;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothPbapClient;->VDBG:Z +Landroid/bluetooth/BluetoothProfile;->AVRCP:I +Landroid/bluetooth/BluetoothProfile;->getConnectionStateName(I)Ljava/lang/String; +Landroid/bluetooth/BluetoothProfile;->HEADSET_CLIENT:I +Landroid/bluetooth/BluetoothProfile;->HEARING_AID:I +Landroid/bluetooth/BluetoothProfile;->HID_HOST:I +Landroid/bluetooth/BluetoothProfile;->MAP:I +Landroid/bluetooth/BluetoothProfile;->MAP_CLIENT:I +Landroid/bluetooth/BluetoothProfile;->MAX_PROFILE_ID:I +Landroid/bluetooth/BluetoothProfile;->OPP:I +Landroid/bluetooth/BluetoothProfile;->PBAP:I +Landroid/bluetooth/BluetoothProfile;->PBAP_CLIENT:I +Landroid/bluetooth/BluetoothProtoEnums;-><init>()V +Landroid/bluetooth/BluetoothProtoEnums;->CONNECTION_STATE_CONNECTED:I +Landroid/bluetooth/BluetoothProtoEnums;->CONNECTION_STATE_CONNECTING:I +Landroid/bluetooth/BluetoothProtoEnums;->CONNECTION_STATE_DISCONNECTED:I +Landroid/bluetooth/BluetoothProtoEnums;->CONNECTION_STATE_DISCONNECTING:I +Landroid/bluetooth/BluetoothProtoEnums;->ENABLE_DISABLE_REASON_AIRPLANE_MODE:I +Landroid/bluetooth/BluetoothProtoEnums;->ENABLE_DISABLE_REASON_APPLICATION_REQUEST:I +Landroid/bluetooth/BluetoothProtoEnums;->ENABLE_DISABLE_REASON_CRASH:I +Landroid/bluetooth/BluetoothProtoEnums;->ENABLE_DISABLE_REASON_DISALLOWED:I +Landroid/bluetooth/BluetoothProtoEnums;->ENABLE_DISABLE_REASON_RESTARTED:I +Landroid/bluetooth/BluetoothProtoEnums;->ENABLE_DISABLE_REASON_RESTORE_USER_SETTING:I +Landroid/bluetooth/BluetoothProtoEnums;->ENABLE_DISABLE_REASON_START_ERROR:I +Landroid/bluetooth/BluetoothProtoEnums;->ENABLE_DISABLE_REASON_SYSTEM_BOOT:I +Landroid/bluetooth/BluetoothProtoEnums;->ENABLE_DISABLE_REASON_UNSPECIFIED:I +Landroid/bluetooth/BluetoothProtoEnums;->ENABLE_DISABLE_REASON_USER_SWITCH:I +Landroid/bluetooth/BluetoothSap;-><init>(Landroid/content/Context;Landroid/bluetooth/BluetoothProfile$ServiceListener;)V +Landroid/bluetooth/BluetoothSap;->ACTION_CONNECTION_STATE_CHANGED:Ljava/lang/String; +Landroid/bluetooth/BluetoothSap;->close()V +Landroid/bluetooth/BluetoothSap;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothSap;->DBG:Z +Landroid/bluetooth/BluetoothSap;->doBind()Z +Landroid/bluetooth/BluetoothSap;->getClient()Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/BluetoothSap;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/BluetoothSap;->getState()I +Landroid/bluetooth/BluetoothSap;->isConnected(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothSap;->isEnabled()Z +Landroid/bluetooth/BluetoothSap;->isValidDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/BluetoothSap;->log(Ljava/lang/String;)V +Landroid/bluetooth/BluetoothSap;->mAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/BluetoothSap;->mBluetoothStateChangeCallback:Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/BluetoothSap;->mConnection:Landroid/content/ServiceConnection; +Landroid/bluetooth/BluetoothSap;->mContext:Landroid/content/Context; +Landroid/bluetooth/BluetoothSap;->mService:Landroid/bluetooth/IBluetoothSap; +Landroid/bluetooth/BluetoothSap;->mServiceListener:Landroid/bluetooth/BluetoothProfile$ServiceListener; +Landroid/bluetooth/BluetoothSap;->RESULT_CANCELED:I +Landroid/bluetooth/BluetoothSap;->RESULT_SUCCESS:I +Landroid/bluetooth/BluetoothSap;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/BluetoothSap;->STATE_ERROR:I +Landroid/bluetooth/BluetoothSap;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothSap;->VDBG:Z +Landroid/bluetooth/BluetoothServerSocket;-><init>(IZZI)V +Landroid/bluetooth/BluetoothServerSocket;-><init>(IZZIZZ)V +Landroid/bluetooth/BluetoothServerSocket;-><init>(IZZLandroid/os/ParcelUuid;)V +Landroid/bluetooth/BluetoothServerSocket;->DBG:Z +Landroid/bluetooth/BluetoothServerSocket;->getChannel()I +Landroid/bluetooth/BluetoothServerSocket;->getPsm()I +Landroid/bluetooth/BluetoothServerSocket;->mChannel:I +Landroid/bluetooth/BluetoothServerSocket;->mHandler:Landroid/os/Handler; +Landroid/bluetooth/BluetoothServerSocket;->mMessage:I +Landroid/bluetooth/BluetoothServerSocket;->setChannel(I)V +Landroid/bluetooth/BluetoothServerSocket;->setCloseHandler(Landroid/os/Handler;I)V +Landroid/bluetooth/BluetoothServerSocket;->setServiceName(Ljava/lang/String;)V +Landroid/bluetooth/BluetoothServerSocket;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothSocket$SocketState;->CLOSED:Landroid/bluetooth/BluetoothSocket$SocketState; +Landroid/bluetooth/BluetoothSocket$SocketState;->CONNECTED:Landroid/bluetooth/BluetoothSocket$SocketState; +Landroid/bluetooth/BluetoothSocket$SocketState;->INIT:Landroid/bluetooth/BluetoothSocket$SocketState; +Landroid/bluetooth/BluetoothSocket$SocketState;->LISTENING:Landroid/bluetooth/BluetoothSocket$SocketState; +Landroid/bluetooth/BluetoothSocket$SocketState;->valueOf(Ljava/lang/String;)Landroid/bluetooth/BluetoothSocket$SocketState; +Landroid/bluetooth/BluetoothSocket$SocketState;->values()[Landroid/bluetooth/BluetoothSocket$SocketState; +Landroid/bluetooth/BluetoothSocket;-><init>(IIZZLandroid/bluetooth/BluetoothDevice;ILandroid/os/ParcelUuid;)V +Landroid/bluetooth/BluetoothSocket;-><init>(IIZZLandroid/bluetooth/BluetoothDevice;ILandroid/os/ParcelUuid;ZZ)V +Landroid/bluetooth/BluetoothSocket;-><init>(IIZZLjava/lang/String;I)V +Landroid/bluetooth/BluetoothSocket;-><init>(Landroid/bluetooth/BluetoothSocket;)V +Landroid/bluetooth/BluetoothSocket;->accept(I)Landroid/bluetooth/BluetoothSocket; +Landroid/bluetooth/BluetoothSocket;->acceptSocket(Ljava/lang/String;)Landroid/bluetooth/BluetoothSocket; +Landroid/bluetooth/BluetoothSocket;->available()I +Landroid/bluetooth/BluetoothSocket;->bindListen()I +Landroid/bluetooth/BluetoothSocket;->BTSOCK_FLAG_NO_SDP:I +Landroid/bluetooth/BluetoothSocket;->convertAddr([B)Ljava/lang/String; +Landroid/bluetooth/BluetoothSocket;->createL2capRxBuffer()V +Landroid/bluetooth/BluetoothSocket;->DBG:Z +Landroid/bluetooth/BluetoothSocket;->EBADFD:I +Landroid/bluetooth/BluetoothSocket;->fillL2capRxBuffer()I +Landroid/bluetooth/BluetoothSocket;->getPort()I +Landroid/bluetooth/BluetoothSocket;->getSecurityFlags()I +Landroid/bluetooth/BluetoothSocket;->mAddress:Ljava/lang/String; +Landroid/bluetooth/BluetoothSocket;->mAuth:Z +Landroid/bluetooth/BluetoothSocket;->mAuthMitm:Z +Landroid/bluetooth/BluetoothSocket;->MAX_L2CAP_PACKAGE_SIZE:I +Landroid/bluetooth/BluetoothSocket;->MAX_RFCOMM_CHANNEL:I +Landroid/bluetooth/BluetoothSocket;->mDevice:Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/BluetoothSocket;->mEncrypt:Z +Landroid/bluetooth/BluetoothSocket;->mExcludeSdp:Z +Landroid/bluetooth/BluetoothSocket;->mFd:I +Landroid/bluetooth/BluetoothSocket;->mInputStream:Landroid/bluetooth/BluetoothInputStream; +Landroid/bluetooth/BluetoothSocket;->mL2capBuffer:Ljava/nio/ByteBuffer; +Landroid/bluetooth/BluetoothSocket;->mMaxRxPacketSize:I +Landroid/bluetooth/BluetoothSocket;->mMaxTxPacketSize:I +Landroid/bluetooth/BluetoothSocket;->mMin16DigitPin:Z +Landroid/bluetooth/BluetoothSocket;->mOutputStream:Landroid/bluetooth/BluetoothOutputStream; +Landroid/bluetooth/BluetoothSocket;->mServiceName:Ljava/lang/String; +Landroid/bluetooth/BluetoothSocket;->mSocketIS:Ljava/io/InputStream; +Landroid/bluetooth/BluetoothSocket;->mSocketOS:Ljava/io/OutputStream; +Landroid/bluetooth/BluetoothSocket;->mSocketState:Landroid/bluetooth/BluetoothSocket$SocketState; +Landroid/bluetooth/BluetoothSocket;->mType:I +Landroid/bluetooth/BluetoothSocket;->mUuid:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothSocket;->PROXY_CONNECTION_TIMEOUT:I +Landroid/bluetooth/BluetoothSocket;->read([BII)I +Landroid/bluetooth/BluetoothSocket;->readAll(Ljava/io/InputStream;[B)I +Landroid/bluetooth/BluetoothSocket;->readInt(Ljava/io/InputStream;)I +Landroid/bluetooth/BluetoothSocket;->removeChannel()V +Landroid/bluetooth/BluetoothSocket;->requestMaximumTxDataLength()V +Landroid/bluetooth/BluetoothSocket;->SEC_FLAG_AUTH:I +Landroid/bluetooth/BluetoothSocket;->SEC_FLAG_AUTH_16_DIGIT:I +Landroid/bluetooth/BluetoothSocket;->SEC_FLAG_AUTH_MITM:I +Landroid/bluetooth/BluetoothSocket;->SEC_FLAG_ENCRYPT:I +Landroid/bluetooth/BluetoothSocket;->setExcludeSdp(Z)V +Landroid/bluetooth/BluetoothSocket;->setServiceName(Ljava/lang/String;)V +Landroid/bluetooth/BluetoothSocket;->SOCK_SIGNAL_SIZE:I +Landroid/bluetooth/BluetoothSocket;->TAG:Ljava/lang/String; +Landroid/bluetooth/BluetoothSocket;->TYPE_L2CAP_BREDR:I +Landroid/bluetooth/BluetoothSocket;->TYPE_L2CAP_LE:I +Landroid/bluetooth/BluetoothSocket;->VDBG:Z +Landroid/bluetooth/BluetoothSocket;->waitSocketSignal(Ljava/io/InputStream;)Ljava/lang/String; +Landroid/bluetooth/BluetoothSocket;->write([BII)I +Landroid/bluetooth/BluetoothUuid;-><init>()V +Landroid/bluetooth/BluetoothUuid;->AudioSource:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->AvrcpController:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->AvrcpTarget:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->BASE_UUID:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->BNEP:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->containsAllUuids([Landroid/os/ParcelUuid;[Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/BluetoothUuid;->getServiceIdentifierFromParcelUuid(Landroid/os/ParcelUuid;)I +Landroid/bluetooth/BluetoothUuid;->Handsfree_AG:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->HearingAid:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->Hid:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->HSP_AG:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->isAudioSink(Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/BluetoothUuid;->isAvrcpController(Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/BluetoothUuid;->isBnep(Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/BluetoothUuid;->isHandsfree(Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/BluetoothUuid;->isHeadset(Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/BluetoothUuid;->isInputDevice(Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/BluetoothUuid;->isMap(Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/BluetoothUuid;->isMas(Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/BluetoothUuid;->isMns(Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/BluetoothUuid;->isNap(Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/BluetoothUuid;->isPanu(Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/BluetoothUuid;->isSap(Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/BluetoothUuid;->MAP:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->MAS:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->MNS:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->PANU:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->parseUuidFrom([B)Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->PBAP_PCE:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->SAP:Landroid/os/ParcelUuid; +Landroid/bluetooth/BluetoothUuid;->uuidToBytes(Landroid/os/ParcelUuid;)[B +Landroid/bluetooth/BluetoothUuid;->UUID_BYTES_128_BIT:I +Landroid/bluetooth/BluetoothUuid;->UUID_BYTES_16_BIT:I +Landroid/bluetooth/BluetoothUuid;->UUID_BYTES_32_BIT:I +Landroid/bluetooth/IBluetooth$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetooth$Stub$Proxy;->cancelBondProcess(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->cancelDiscovery()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->createBond(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->createBondOutOfBand(Landroid/bluetooth/BluetoothDevice;ILandroid/bluetooth/OobData;)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->disable()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->enable()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->enableNoAutoConnect()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->factoryReset()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->fetchRemoteUuids(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getAdapterConnectionState()I +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getBatteryLevel(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getBluetoothClass()Landroid/bluetooth/BluetoothClass; +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getBondedDevices()[Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getBondState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getDiscoverableTimeout()I +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getDiscoveryEndMillis()J +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getLeMaximumAdvertisingDataLength()I +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getMaxConnectedAudioDevices()I +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getMessageAccessPermission(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getName()Ljava/lang/String; +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getPhonebookAccessPermission(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getProfileConnectionState(I)I +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getRemoteAlias(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String; +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getRemoteClass(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getRemoteName(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String; +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getRemoteType(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getRemoteUuids(Landroid/bluetooth/BluetoothDevice;)[Landroid/os/ParcelUuid; +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getScanMode()I +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getSimAccessPermission(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getSocketManager()Landroid/bluetooth/IBluetoothSocketManager; +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getState()I +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getSupportedProfiles()J +Landroid/bluetooth/IBluetooth$Stub$Proxy;->getUuids()[Landroid/os/ParcelUuid; +Landroid/bluetooth/IBluetooth$Stub$Proxy;->isActivityAndEnergyReportingSupported()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->isBondingInitiatedLocally(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->isDiscovering()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->isEnabled()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->isLe2MPhySupported()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->isLeCodedPhySupported()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->isLeExtendedAdvertisingSupported()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->isLePeriodicAdvertisingSupported()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->isMultiAdvertisementSupported()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->isOffloadedFilteringSupported()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->isOffloadedScanBatchingSupported()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetooth$Stub$Proxy;->onBrEdrDown()V +Landroid/bluetooth/IBluetooth$Stub$Proxy;->onLeServiceUp()V +Landroid/bluetooth/IBluetooth$Stub$Proxy;->registerCallback(Landroid/bluetooth/IBluetoothCallback;)V +Landroid/bluetooth/IBluetooth$Stub$Proxy;->removeBond(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->reportActivityInfo()Landroid/bluetooth/BluetoothActivityEnergyInfo; +Landroid/bluetooth/IBluetooth$Stub$Proxy;->requestActivityInfo(Landroid/os/ResultReceiver;)V +Landroid/bluetooth/IBluetooth$Stub$Proxy;->sdpSearch(Landroid/bluetooth/BluetoothDevice;Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->sendConnectionStateChange(Landroid/bluetooth/BluetoothDevice;III)V +Landroid/bluetooth/IBluetooth$Stub$Proxy;->setBluetoothClass(Landroid/bluetooth/BluetoothClass;)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->setDiscoverableTimeout(I)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->setMessageAccessPermission(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->setName(Ljava/lang/String;)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->setPairingConfirmation(Landroid/bluetooth/BluetoothDevice;Z)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->setPasskey(Landroid/bluetooth/BluetoothDevice;ZI[B)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->setPhonebookAccessPermission(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->setPin(Landroid/bluetooth/BluetoothDevice;ZI[B)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->setRemoteAlias(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->setScanMode(II)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->setSimAccessPermission(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->startDiscovery()Z +Landroid/bluetooth/IBluetooth$Stub$Proxy;->unregisterCallback(Landroid/bluetooth/IBluetoothCallback;)V +Landroid/bluetooth/IBluetooth$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_cancelBondProcess:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_cancelDiscovery:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_createBond:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_createBondOutOfBand:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_disable:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_enableNoAutoConnect:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_factoryReset:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_fetchRemoteUuids:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getAdapterConnectionState:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getAddress:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getBatteryLevel:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getBluetoothClass:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getBondedDevices:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getBondState:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getConnectionState:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getDiscoverableTimeout:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getDiscoveryEndMillis:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getLeMaximumAdvertisingDataLength:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getMaxConnectedAudioDevices:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getMessageAccessPermission:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getName:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getPhonebookAccessPermission:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getProfileConnectionState:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getRemoteAlias:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getRemoteClass:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getRemoteName:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getRemoteType:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getRemoteUuids:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getScanMode:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getSimAccessPermission:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getSocketManager:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getState:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getSupportedProfiles:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_getUuids:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_isActivityAndEnergyReportingSupported:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_isBondingInitiatedLocally:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_isDiscovering:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_isEnabled:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_isLe2MPhySupported:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_isLeCodedPhySupported:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_isLeExtendedAdvertisingSupported:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_isLePeriodicAdvertisingSupported:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_isMultiAdvertisementSupported:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_isOffloadedFilteringSupported:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_isOffloadedScanBatchingSupported:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_onBrEdrDown:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_onLeServiceUp:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_registerCallback:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_removeBond:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_reportActivityInfo:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_requestActivityInfo:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_sdpSearch:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_sendConnectionStateChange:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_setBluetoothClass:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_setDiscoverableTimeout:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_setMessageAccessPermission:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_setName:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_setPairingConfirmation:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_setPasskey:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_setPhonebookAccessPermission:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_setPin:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_setRemoteAlias:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_setScanMode:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_setSimAccessPermission:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_startDiscovery:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_unregisterCallback:I +Landroid/bluetooth/IBluetooth;->cancelBondProcess(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetooth;->cancelDiscovery()Z +Landroid/bluetooth/IBluetooth;->createBond(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetooth;->createBondOutOfBand(Landroid/bluetooth/BluetoothDevice;ILandroid/bluetooth/OobData;)Z +Landroid/bluetooth/IBluetooth;->disable()Z +Landroid/bluetooth/IBluetooth;->enable()Z +Landroid/bluetooth/IBluetooth;->enableNoAutoConnect()Z +Landroid/bluetooth/IBluetooth;->factoryReset()Z +Landroid/bluetooth/IBluetooth;->getAdapterConnectionState()I +Landroid/bluetooth/IBluetooth;->getBatteryLevel(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetooth;->getBluetoothClass()Landroid/bluetooth/BluetoothClass; +Landroid/bluetooth/IBluetooth;->getBondedDevices()[Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/IBluetooth;->getBondState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetooth;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetooth;->getDiscoverableTimeout()I +Landroid/bluetooth/IBluetooth;->getDiscoveryEndMillis()J +Landroid/bluetooth/IBluetooth;->getLeMaximumAdvertisingDataLength()I +Landroid/bluetooth/IBluetooth;->getMaxConnectedAudioDevices()I +Landroid/bluetooth/IBluetooth;->getMessageAccessPermission(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetooth;->getName()Ljava/lang/String; +Landroid/bluetooth/IBluetooth;->getPhonebookAccessPermission(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetooth;->getProfileConnectionState(I)I +Landroid/bluetooth/IBluetooth;->getRemoteClass(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetooth;->getRemoteName(Landroid/bluetooth/BluetoothDevice;)Ljava/lang/String; +Landroid/bluetooth/IBluetooth;->getRemoteType(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetooth;->getRemoteUuids(Landroid/bluetooth/BluetoothDevice;)[Landroid/os/ParcelUuid; +Landroid/bluetooth/IBluetooth;->getScanMode()I +Landroid/bluetooth/IBluetooth;->getSimAccessPermission(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetooth;->getSocketManager()Landroid/bluetooth/IBluetoothSocketManager; +Landroid/bluetooth/IBluetooth;->getState()I +Landroid/bluetooth/IBluetooth;->getSupportedProfiles()J +Landroid/bluetooth/IBluetooth;->getUuids()[Landroid/os/ParcelUuid; +Landroid/bluetooth/IBluetooth;->isActivityAndEnergyReportingSupported()Z +Landroid/bluetooth/IBluetooth;->isBondingInitiatedLocally(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetooth;->isDiscovering()Z +Landroid/bluetooth/IBluetooth;->isLe2MPhySupported()Z +Landroid/bluetooth/IBluetooth;->isLeCodedPhySupported()Z +Landroid/bluetooth/IBluetooth;->isLeExtendedAdvertisingSupported()Z +Landroid/bluetooth/IBluetooth;->isLePeriodicAdvertisingSupported()Z +Landroid/bluetooth/IBluetooth;->isMultiAdvertisementSupported()Z +Landroid/bluetooth/IBluetooth;->isOffloadedFilteringSupported()Z +Landroid/bluetooth/IBluetooth;->isOffloadedScanBatchingSupported()Z +Landroid/bluetooth/IBluetooth;->onBrEdrDown()V +Landroid/bluetooth/IBluetooth;->onLeServiceUp()V +Landroid/bluetooth/IBluetooth;->registerCallback(Landroid/bluetooth/IBluetoothCallback;)V +Landroid/bluetooth/IBluetooth;->removeBond(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetooth;->reportActivityInfo()Landroid/bluetooth/BluetoothActivityEnergyInfo; +Landroid/bluetooth/IBluetooth;->requestActivityInfo(Landroid/os/ResultReceiver;)V +Landroid/bluetooth/IBluetooth;->sdpSearch(Landroid/bluetooth/BluetoothDevice;Landroid/os/ParcelUuid;)Z +Landroid/bluetooth/IBluetooth;->setBluetoothClass(Landroid/bluetooth/BluetoothClass;)Z +Landroid/bluetooth/IBluetooth;->setDiscoverableTimeout(I)Z +Landroid/bluetooth/IBluetooth;->setMessageAccessPermission(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetooth;->setName(Ljava/lang/String;)Z +Landroid/bluetooth/IBluetooth;->setPairingConfirmation(Landroid/bluetooth/BluetoothDevice;Z)Z +Landroid/bluetooth/IBluetooth;->setPasskey(Landroid/bluetooth/BluetoothDevice;ZI[B)Z +Landroid/bluetooth/IBluetooth;->setPhonebookAccessPermission(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetooth;->setPin(Landroid/bluetooth/BluetoothDevice;ZI[B)Z +Landroid/bluetooth/IBluetooth;->setRemoteAlias(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;)Z +Landroid/bluetooth/IBluetooth;->setScanMode(II)Z +Landroid/bluetooth/IBluetooth;->setSimAccessPermission(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetooth;->startDiscovery()Z +Landroid/bluetooth/IBluetooth;->unregisterCallback(Landroid/bluetooth/IBluetoothCallback;)V +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->disableOptionalCodecs(Landroid/bluetooth/BluetoothDevice;)V +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->enableOptionalCodecs(Landroid/bluetooth/BluetoothDevice;)V +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->getActiveDevice()Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->getCodecStatus(Landroid/bluetooth/BluetoothDevice;)Landroid/bluetooth/BluetoothCodecStatus; +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->getOptionalCodecsEnabled(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->isA2dpPlaying(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->isAvrcpAbsoluteVolumeSupported()Z +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->setActiveDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->setAvrcpAbsoluteVolume(I)V +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->setCodecConfigPreference(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothCodecConfig;)V +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->setOptionalCodecsEnabled(Landroid/bluetooth/BluetoothDevice;I)V +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothA2dp$Stub$Proxy;->supportsOptionalCodecs(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothA2dp$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_connect:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_disableOptionalCodecs:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_disconnect:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_enableOptionalCodecs:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_getActiveDevice:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_getCodecStatus:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_getConnectedDevices:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_getConnectionState:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_getDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_getOptionalCodecsEnabled:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_getPriority:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_isA2dpPlaying:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_isAvrcpAbsoluteVolumeSupported:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_setActiveDevice:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_setAvrcpAbsoluteVolume:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_setCodecConfigPreference:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_setOptionalCodecsEnabled:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_setPriority:I +Landroid/bluetooth/IBluetoothA2dp$Stub;->TRANSACTION_supportsOptionalCodecs:I +Landroid/bluetooth/IBluetoothA2dp;->disableOptionalCodecs(Landroid/bluetooth/BluetoothDevice;)V +Landroid/bluetooth/IBluetoothA2dp;->enableOptionalCodecs(Landroid/bluetooth/BluetoothDevice;)V +Landroid/bluetooth/IBluetoothA2dp;->getActiveDevice()Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/IBluetoothA2dp;->getCodecStatus(Landroid/bluetooth/BluetoothDevice;)Landroid/bluetooth/BluetoothCodecStatus; +Landroid/bluetooth/IBluetoothA2dp;->getOptionalCodecsEnabled(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothA2dp;->isA2dpPlaying(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothA2dp;->isAvrcpAbsoluteVolumeSupported()Z +Landroid/bluetooth/IBluetoothA2dp;->setActiveDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothA2dp;->setAvrcpAbsoluteVolume(I)V +Landroid/bluetooth/IBluetoothA2dp;->setCodecConfigPreference(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothCodecConfig;)V +Landroid/bluetooth/IBluetoothA2dp;->setOptionalCodecsEnabled(Landroid/bluetooth/BluetoothDevice;I)V +Landroid/bluetooth/IBluetoothA2dp;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothA2dp;->supportsOptionalCodecs(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothA2dpSink$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothA2dpSink$Stub$Proxy;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothA2dpSink$Stub$Proxy;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothA2dpSink$Stub$Proxy;->getAudioConfig(Landroid/bluetooth/BluetoothDevice;)Landroid/bluetooth/BluetoothAudioConfig; +Landroid/bluetooth/IBluetoothA2dpSink$Stub$Proxy;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothA2dpSink$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothA2dpSink$Stub$Proxy;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothA2dpSink$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothA2dpSink$Stub$Proxy;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothA2dpSink$Stub$Proxy;->isA2dpPlaying(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothA2dpSink$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothA2dpSink$Stub$Proxy;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothA2dpSink$Stub;-><init>()V +Landroid/bluetooth/IBluetoothA2dpSink$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothA2dpSink; +Landroid/bluetooth/IBluetoothA2dpSink$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothA2dpSink$Stub;->TRANSACTION_connect:I +Landroid/bluetooth/IBluetoothA2dpSink$Stub;->TRANSACTION_disconnect:I +Landroid/bluetooth/IBluetoothA2dpSink$Stub;->TRANSACTION_getAudioConfig:I +Landroid/bluetooth/IBluetoothA2dpSink$Stub;->TRANSACTION_getConnectedDevices:I +Landroid/bluetooth/IBluetoothA2dpSink$Stub;->TRANSACTION_getConnectionState:I +Landroid/bluetooth/IBluetoothA2dpSink$Stub;->TRANSACTION_getDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothA2dpSink$Stub;->TRANSACTION_getPriority:I +Landroid/bluetooth/IBluetoothA2dpSink$Stub;->TRANSACTION_isA2dpPlaying:I +Landroid/bluetooth/IBluetoothA2dpSink$Stub;->TRANSACTION_setPriority:I +Landroid/bluetooth/IBluetoothA2dpSink;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothA2dpSink;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothA2dpSink;->getAudioConfig(Landroid/bluetooth/BluetoothDevice;)Landroid/bluetooth/BluetoothAudioConfig; +Landroid/bluetooth/IBluetoothA2dpSink;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothA2dpSink;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothA2dpSink;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothA2dpSink;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothA2dpSink;->isA2dpPlaying(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothA2dpSink;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothAvrcpController$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothAvrcpController$Stub$Proxy;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothAvrcpController$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothAvrcpController$Stub$Proxy;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothAvrcpController$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothAvrcpController$Stub$Proxy;->getPlayerSettings(Landroid/bluetooth/BluetoothDevice;)Landroid/bluetooth/BluetoothAvrcpPlayerSettings; +Landroid/bluetooth/IBluetoothAvrcpController$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothAvrcpController$Stub$Proxy;->sendGroupNavigationCmd(Landroid/bluetooth/BluetoothDevice;II)V +Landroid/bluetooth/IBluetoothAvrcpController$Stub$Proxy;->setPlayerApplicationSetting(Landroid/bluetooth/BluetoothAvrcpPlayerSettings;)Z +Landroid/bluetooth/IBluetoothAvrcpController$Stub;-><init>()V +Landroid/bluetooth/IBluetoothAvrcpController$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothAvrcpController; +Landroid/bluetooth/IBluetoothAvrcpController$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothAvrcpController$Stub;->TRANSACTION_getConnectedDevices:I +Landroid/bluetooth/IBluetoothAvrcpController$Stub;->TRANSACTION_getConnectionState:I +Landroid/bluetooth/IBluetoothAvrcpController$Stub;->TRANSACTION_getDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothAvrcpController$Stub;->TRANSACTION_getPlayerSettings:I +Landroid/bluetooth/IBluetoothAvrcpController$Stub;->TRANSACTION_sendGroupNavigationCmd:I +Landroid/bluetooth/IBluetoothAvrcpController$Stub;->TRANSACTION_setPlayerApplicationSetting:I +Landroid/bluetooth/IBluetoothAvrcpController;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothAvrcpController;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothAvrcpController;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothAvrcpController;->getPlayerSettings(Landroid/bluetooth/BluetoothDevice;)Landroid/bluetooth/BluetoothAvrcpPlayerSettings; +Landroid/bluetooth/IBluetoothAvrcpController;->sendGroupNavigationCmd(Landroid/bluetooth/BluetoothDevice;II)V +Landroid/bluetooth/IBluetoothAvrcpController;->setPlayerApplicationSetting(Landroid/bluetooth/BluetoothAvrcpPlayerSettings;)Z +Landroid/bluetooth/IBluetoothAvrcpTarget$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothAvrcpTarget$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothAvrcpTarget$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothAvrcpTarget$Stub$Proxy;->sendVolumeChanged(I)V +Landroid/bluetooth/IBluetoothAvrcpTarget$Stub;-><init>()V +Landroid/bluetooth/IBluetoothAvrcpTarget$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothAvrcpTarget; +Landroid/bluetooth/IBluetoothAvrcpTarget$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothAvrcpTarget$Stub;->TRANSACTION_sendVolumeChanged:I +Landroid/bluetooth/IBluetoothAvrcpTarget;->sendVolumeChanged(I)V +Landroid/bluetooth/IBluetoothCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothCallback$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothCallback$Stub$Proxy;->onBluetoothStateChange(II)V +Landroid/bluetooth/IBluetoothCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothCallback; +Landroid/bluetooth/IBluetoothCallback$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothCallback$Stub;->TRANSACTION_onBluetoothStateChange:I +Landroid/bluetooth/IBluetoothCallback;->onBluetoothStateChange(II)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->addService(ILandroid/bluetooth/BluetoothGattService;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->beginReliableWrite(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->clearServices(I)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->clientConnect(ILjava/lang/String;ZIZI)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->clientDisconnect(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->clientReadPhy(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->clientSetPreferredPhy(ILjava/lang/String;III)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->configureMTU(ILjava/lang/String;I)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->connectionParameterUpdate(ILjava/lang/String;I)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->disconnectAll()V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->discoverServiceByUuid(ILjava/lang/String;Landroid/os/ParcelUuid;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->discoverServices(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->enableAdvertisingSet(IZII)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->endReliableWrite(ILjava/lang/String;Z)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->flushPendingBatchResults(I)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->getOwnAddress(I)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->leConnectionUpdate(ILjava/lang/String;IIIIII)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->numHwTrackFiltersAvailable()I +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->readCharacteristic(ILjava/lang/String;II)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->readDescriptor(ILjava/lang/String;II)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->readRemoteRssi(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->readUsingCharacteristicUuid(ILjava/lang/String;Landroid/os/ParcelUuid;III)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->refreshDevice(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->registerClient(Landroid/os/ParcelUuid;Landroid/bluetooth/IBluetoothGattCallback;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->registerForNotification(ILjava/lang/String;IZ)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->registerScanner(Landroid/bluetooth/le/IScannerCallback;Landroid/os/WorkSource;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->registerServer(Landroid/os/ParcelUuid;Landroid/bluetooth/IBluetoothGattServerCallback;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->registerSync(Landroid/bluetooth/le/ScanResult;IILandroid/bluetooth/le/IPeriodicAdvertisingCallback;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->removeService(II)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->sendNotification(ILjava/lang/String;IZ[B)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->sendResponse(ILjava/lang/String;III[B)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->serverConnect(ILjava/lang/String;ZI)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->serverDisconnect(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->serverReadPhy(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->serverSetPreferredPhy(ILjava/lang/String;III)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->setAdvertisingData(ILandroid/bluetooth/le/AdvertiseData;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->setAdvertisingParameters(ILandroid/bluetooth/le/AdvertisingSetParameters;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->setPeriodicAdvertisingData(ILandroid/bluetooth/le/AdvertiseData;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->setPeriodicAdvertisingEnable(IZ)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->setPeriodicAdvertisingParameters(ILandroid/bluetooth/le/PeriodicAdvertisingParameters;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->setScanResponseData(ILandroid/bluetooth/le/AdvertiseData;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->startAdvertisingSet(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;IILandroid/bluetooth/le/IAdvertisingSetCallback;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->startScan(ILandroid/bluetooth/le/ScanSettings;Ljava/util/List;Ljava/util/List;Ljava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->startScanForIntent(Landroid/app/PendingIntent;Landroid/bluetooth/le/ScanSettings;Ljava/util/List;Ljava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->stopAdvertisingSet(Landroid/bluetooth/le/IAdvertisingSetCallback;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->stopScan(I)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->stopScanForIntent(Landroid/app/PendingIntent;Ljava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->unregAll()V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->unregisterClient(I)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->unregisterScanner(I)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->unregisterServer(I)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->unregisterSync(Landroid/bluetooth/le/IPeriodicAdvertisingCallback;)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->writeCharacteristic(ILjava/lang/String;III[B)V +Landroid/bluetooth/IBluetoothGatt$Stub$Proxy;->writeDescriptor(ILjava/lang/String;II[B)V +Landroid/bluetooth/IBluetoothGatt$Stub;-><init>()V +Landroid/bluetooth/IBluetoothGatt$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothGatt; +Landroid/bluetooth/IBluetoothGatt$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_addService:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_beginReliableWrite:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_clearServices:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_clientConnect:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_clientDisconnect:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_clientReadPhy:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_clientSetPreferredPhy:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_configureMTU:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_connectionParameterUpdate:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_disconnectAll:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_discoverServiceByUuid:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_discoverServices:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_enableAdvertisingSet:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_endReliableWrite:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_flushPendingBatchResults:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_getDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_getOwnAddress:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_leConnectionUpdate:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_numHwTrackFiltersAvailable:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_readCharacteristic:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_readDescriptor:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_readRemoteRssi:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_readUsingCharacteristicUuid:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_refreshDevice:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_registerClient:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_registerForNotification:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_registerScanner:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_registerServer:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_registerSync:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_removeService:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_sendNotification:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_sendResponse:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_serverConnect:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_serverDisconnect:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_serverReadPhy:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_serverSetPreferredPhy:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_setAdvertisingData:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_setAdvertisingParameters:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_setPeriodicAdvertisingData:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_setPeriodicAdvertisingEnable:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_setPeriodicAdvertisingParameters:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_setScanResponseData:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_startAdvertisingSet:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_startScan:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_startScanForIntent:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_stopAdvertisingSet:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_stopScan:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_stopScanForIntent:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_unregAll:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_unregisterClient:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_unregisterScanner:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_unregisterServer:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_unregisterSync:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_writeCharacteristic:I +Landroid/bluetooth/IBluetoothGatt$Stub;->TRANSACTION_writeDescriptor:I +Landroid/bluetooth/IBluetoothGatt;->addService(ILandroid/bluetooth/BluetoothGattService;)V +Landroid/bluetooth/IBluetoothGatt;->beginReliableWrite(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt;->clearServices(I)V +Landroid/bluetooth/IBluetoothGatt;->clientConnect(ILjava/lang/String;ZIZI)V +Landroid/bluetooth/IBluetoothGatt;->clientDisconnect(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt;->clientReadPhy(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt;->clientSetPreferredPhy(ILjava/lang/String;III)V +Landroid/bluetooth/IBluetoothGatt;->configureMTU(ILjava/lang/String;I)V +Landroid/bluetooth/IBluetoothGatt;->connectionParameterUpdate(ILjava/lang/String;I)V +Landroid/bluetooth/IBluetoothGatt;->disconnectAll()V +Landroid/bluetooth/IBluetoothGatt;->discoverServiceByUuid(ILjava/lang/String;Landroid/os/ParcelUuid;)V +Landroid/bluetooth/IBluetoothGatt;->discoverServices(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt;->enableAdvertisingSet(IZII)V +Landroid/bluetooth/IBluetoothGatt;->endReliableWrite(ILjava/lang/String;Z)V +Landroid/bluetooth/IBluetoothGatt;->flushPendingBatchResults(I)V +Landroid/bluetooth/IBluetoothGatt;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothGatt;->getOwnAddress(I)V +Landroid/bluetooth/IBluetoothGatt;->leConnectionUpdate(ILjava/lang/String;IIIIII)V +Landroid/bluetooth/IBluetoothGatt;->numHwTrackFiltersAvailable()I +Landroid/bluetooth/IBluetoothGatt;->readCharacteristic(ILjava/lang/String;II)V +Landroid/bluetooth/IBluetoothGatt;->readDescriptor(ILjava/lang/String;II)V +Landroid/bluetooth/IBluetoothGatt;->readRemoteRssi(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt;->readUsingCharacteristicUuid(ILjava/lang/String;Landroid/os/ParcelUuid;III)V +Landroid/bluetooth/IBluetoothGatt;->refreshDevice(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt;->registerForNotification(ILjava/lang/String;IZ)V +Landroid/bluetooth/IBluetoothGatt;->registerScanner(Landroid/bluetooth/le/IScannerCallback;Landroid/os/WorkSource;)V +Landroid/bluetooth/IBluetoothGatt;->registerServer(Landroid/os/ParcelUuid;Landroid/bluetooth/IBluetoothGattServerCallback;)V +Landroid/bluetooth/IBluetoothGatt;->registerSync(Landroid/bluetooth/le/ScanResult;IILandroid/bluetooth/le/IPeriodicAdvertisingCallback;)V +Landroid/bluetooth/IBluetoothGatt;->removeService(II)V +Landroid/bluetooth/IBluetoothGatt;->sendNotification(ILjava/lang/String;IZ[B)V +Landroid/bluetooth/IBluetoothGatt;->sendResponse(ILjava/lang/String;III[B)V +Landroid/bluetooth/IBluetoothGatt;->serverConnect(ILjava/lang/String;ZI)V +Landroid/bluetooth/IBluetoothGatt;->serverDisconnect(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt;->serverReadPhy(ILjava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt;->serverSetPreferredPhy(ILjava/lang/String;III)V +Landroid/bluetooth/IBluetoothGatt;->setAdvertisingData(ILandroid/bluetooth/le/AdvertiseData;)V +Landroid/bluetooth/IBluetoothGatt;->setAdvertisingParameters(ILandroid/bluetooth/le/AdvertisingSetParameters;)V +Landroid/bluetooth/IBluetoothGatt;->setPeriodicAdvertisingData(ILandroid/bluetooth/le/AdvertiseData;)V +Landroid/bluetooth/IBluetoothGatt;->setPeriodicAdvertisingEnable(IZ)V +Landroid/bluetooth/IBluetoothGatt;->setPeriodicAdvertisingParameters(ILandroid/bluetooth/le/PeriodicAdvertisingParameters;)V +Landroid/bluetooth/IBluetoothGatt;->setScanResponseData(ILandroid/bluetooth/le/AdvertiseData;)V +Landroid/bluetooth/IBluetoothGatt;->startAdvertisingSet(Landroid/bluetooth/le/AdvertisingSetParameters;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/AdvertiseData;Landroid/bluetooth/le/PeriodicAdvertisingParameters;Landroid/bluetooth/le/AdvertiseData;IILandroid/bluetooth/le/IAdvertisingSetCallback;)V +Landroid/bluetooth/IBluetoothGatt;->startScan(ILandroid/bluetooth/le/ScanSettings;Ljava/util/List;Ljava/util/List;Ljava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt;->startScanForIntent(Landroid/app/PendingIntent;Landroid/bluetooth/le/ScanSettings;Ljava/util/List;Ljava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt;->stopAdvertisingSet(Landroid/bluetooth/le/IAdvertisingSetCallback;)V +Landroid/bluetooth/IBluetoothGatt;->stopScan(I)V +Landroid/bluetooth/IBluetoothGatt;->stopScanForIntent(Landroid/app/PendingIntent;Ljava/lang/String;)V +Landroid/bluetooth/IBluetoothGatt;->unregAll()V +Landroid/bluetooth/IBluetoothGatt;->unregisterScanner(I)V +Landroid/bluetooth/IBluetoothGatt;->unregisterServer(I)V +Landroid/bluetooth/IBluetoothGatt;->unregisterSync(Landroid/bluetooth/le/IPeriodicAdvertisingCallback;)V +Landroid/bluetooth/IBluetoothGatt;->writeCharacteristic(ILjava/lang/String;III[B)V +Landroid/bluetooth/IBluetoothGatt;->writeDescriptor(ILjava/lang/String;II[B)V +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->onCharacteristicRead(Ljava/lang/String;II[B)V +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->onCharacteristicWrite(Ljava/lang/String;II)V +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->onClientConnectionState(IIZLjava/lang/String;)V +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->onClientRegistered(II)V +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->onConfigureMTU(Ljava/lang/String;II)V +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->onConnectionUpdated(Ljava/lang/String;IIII)V +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->onDescriptorRead(Ljava/lang/String;II[B)V +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->onDescriptorWrite(Ljava/lang/String;II)V +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->onExecuteWrite(Ljava/lang/String;I)V +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->onNotify(Ljava/lang/String;I[B)V +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->onPhyRead(Ljava/lang/String;III)V +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->onPhyUpdate(Ljava/lang/String;III)V +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->onReadRemoteRssi(Ljava/lang/String;II)V +Landroid/bluetooth/IBluetoothGattCallback$Stub$Proxy;->onSearchComplete(Ljava/lang/String;Ljava/util/List;I)V +Landroid/bluetooth/IBluetoothGattCallback$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothGattCallback$Stub;->TRANSACTION_onCharacteristicRead:I +Landroid/bluetooth/IBluetoothGattCallback$Stub;->TRANSACTION_onCharacteristicWrite:I +Landroid/bluetooth/IBluetoothGattCallback$Stub;->TRANSACTION_onClientConnectionState:I +Landroid/bluetooth/IBluetoothGattCallback$Stub;->TRANSACTION_onClientRegistered:I +Landroid/bluetooth/IBluetoothGattCallback$Stub;->TRANSACTION_onConfigureMTU:I +Landroid/bluetooth/IBluetoothGattCallback$Stub;->TRANSACTION_onConnectionUpdated:I +Landroid/bluetooth/IBluetoothGattCallback$Stub;->TRANSACTION_onDescriptorRead:I +Landroid/bluetooth/IBluetoothGattCallback$Stub;->TRANSACTION_onDescriptorWrite:I +Landroid/bluetooth/IBluetoothGattCallback$Stub;->TRANSACTION_onExecuteWrite:I +Landroid/bluetooth/IBluetoothGattCallback$Stub;->TRANSACTION_onNotify:I +Landroid/bluetooth/IBluetoothGattCallback$Stub;->TRANSACTION_onPhyRead:I +Landroid/bluetooth/IBluetoothGattCallback$Stub;->TRANSACTION_onPhyUpdate:I +Landroid/bluetooth/IBluetoothGattCallback$Stub;->TRANSACTION_onReadRemoteRssi:I +Landroid/bluetooth/IBluetoothGattCallback$Stub;->TRANSACTION_onSearchComplete:I +Landroid/bluetooth/IBluetoothGattCallback;->onCharacteristicRead(Ljava/lang/String;II[B)V +Landroid/bluetooth/IBluetoothGattCallback;->onCharacteristicWrite(Ljava/lang/String;II)V +Landroid/bluetooth/IBluetoothGattCallback;->onClientConnectionState(IIZLjava/lang/String;)V +Landroid/bluetooth/IBluetoothGattCallback;->onClientRegistered(II)V +Landroid/bluetooth/IBluetoothGattCallback;->onConfigureMTU(Ljava/lang/String;II)V +Landroid/bluetooth/IBluetoothGattCallback;->onConnectionUpdated(Ljava/lang/String;IIII)V +Landroid/bluetooth/IBluetoothGattCallback;->onDescriptorRead(Ljava/lang/String;II[B)V +Landroid/bluetooth/IBluetoothGattCallback;->onDescriptorWrite(Ljava/lang/String;II)V +Landroid/bluetooth/IBluetoothGattCallback;->onExecuteWrite(Ljava/lang/String;I)V +Landroid/bluetooth/IBluetoothGattCallback;->onNotify(Ljava/lang/String;I[B)V +Landroid/bluetooth/IBluetoothGattCallback;->onPhyRead(Ljava/lang/String;III)V +Landroid/bluetooth/IBluetoothGattCallback;->onPhyUpdate(Ljava/lang/String;III)V +Landroid/bluetooth/IBluetoothGattCallback;->onReadRemoteRssi(Ljava/lang/String;II)V +Landroid/bluetooth/IBluetoothGattCallback;->onSearchComplete(Ljava/lang/String;Ljava/util/List;I)V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;->onCharacteristicReadRequest(Ljava/lang/String;IIZI)V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;->onCharacteristicWriteRequest(Ljava/lang/String;IIIZZI[B)V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;->onConnectionUpdated(Ljava/lang/String;IIII)V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;->onDescriptorReadRequest(Ljava/lang/String;IIZI)V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;->onDescriptorWriteRequest(Ljava/lang/String;IIIZZI[B)V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;->onExecuteWrite(Ljava/lang/String;IZ)V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;->onMtuChanged(Ljava/lang/String;I)V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;->onNotificationSent(Ljava/lang/String;I)V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;->onPhyRead(Ljava/lang/String;III)V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;->onPhyUpdate(Ljava/lang/String;III)V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;->onServerConnectionState(IIZLjava/lang/String;)V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;->onServerRegistered(II)V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub$Proxy;->onServiceAdded(ILandroid/bluetooth/BluetoothGattService;)V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;-><init>()V +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothGattServerCallback; +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;->TRANSACTION_onCharacteristicReadRequest:I +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;->TRANSACTION_onCharacteristicWriteRequest:I +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;->TRANSACTION_onConnectionUpdated:I +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;->TRANSACTION_onDescriptorReadRequest:I +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;->TRANSACTION_onDescriptorWriteRequest:I +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;->TRANSACTION_onExecuteWrite:I +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;->TRANSACTION_onMtuChanged:I +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;->TRANSACTION_onNotificationSent:I +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;->TRANSACTION_onPhyRead:I +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;->TRANSACTION_onPhyUpdate:I +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;->TRANSACTION_onServerConnectionState:I +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;->TRANSACTION_onServerRegistered:I +Landroid/bluetooth/IBluetoothGattServerCallback$Stub;->TRANSACTION_onServiceAdded:I +Landroid/bluetooth/IBluetoothGattServerCallback;->onCharacteristicReadRequest(Ljava/lang/String;IIZI)V +Landroid/bluetooth/IBluetoothGattServerCallback;->onCharacteristicWriteRequest(Ljava/lang/String;IIIZZI[B)V +Landroid/bluetooth/IBluetoothGattServerCallback;->onConnectionUpdated(Ljava/lang/String;IIII)V +Landroid/bluetooth/IBluetoothGattServerCallback;->onDescriptorReadRequest(Ljava/lang/String;IIZI)V +Landroid/bluetooth/IBluetoothGattServerCallback;->onDescriptorWriteRequest(Ljava/lang/String;IIIZZI[B)V +Landroid/bluetooth/IBluetoothGattServerCallback;->onExecuteWrite(Ljava/lang/String;IZ)V +Landroid/bluetooth/IBluetoothGattServerCallback;->onMtuChanged(Ljava/lang/String;I)V +Landroid/bluetooth/IBluetoothGattServerCallback;->onNotificationSent(Ljava/lang/String;I)V +Landroid/bluetooth/IBluetoothGattServerCallback;->onPhyRead(Ljava/lang/String;III)V +Landroid/bluetooth/IBluetoothGattServerCallback;->onPhyUpdate(Ljava/lang/String;III)V +Landroid/bluetooth/IBluetoothGattServerCallback;->onServerConnectionState(IIZLjava/lang/String;)V +Landroid/bluetooth/IBluetoothGattServerCallback;->onServerRegistered(II)V +Landroid/bluetooth/IBluetoothGattServerCallback;->onServiceAdded(ILandroid/bluetooth/BluetoothGattService;)V +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->clccResponse(IIIIZLjava/lang/String;I)V +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->connectAudio()Z +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->disconnectAudio()Z +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->getActiveDevice()Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->getAudioRouteAllowed()Z +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->getAudioState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->isAudioConnected(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->isAudioOn()Z +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->isInbandRingingEnabled()Z +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->phoneStateChanged(IIILjava/lang/String;I)V +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->sendVendorSpecificResultCode(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;Ljava/lang/String;)Z +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->setActiveDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->setAudioRouteAllowed(Z)V +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->setForceScoAudio(Z)V +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->startScoUsingVirtualVoiceCall()Z +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->startVoiceRecognition(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->stopScoUsingVirtualVoiceCall()Z +Landroid/bluetooth/IBluetoothHeadset$Stub$Proxy;->stopVoiceRecognition(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadset$Stub;-><init>()V +Landroid/bluetooth/IBluetoothHeadset$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_clccResponse:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_connect:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_connectAudio:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_disconnect:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_disconnectAudio:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_getActiveDevice:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_getAudioRouteAllowed:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_getAudioState:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_getConnectedDevices:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_getConnectionState:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_getDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_getPriority:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_isAudioConnected:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_isAudioOn:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_isInbandRingingEnabled:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_phoneStateChanged:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_sendVendorSpecificResultCode:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_setActiveDevice:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_setAudioRouteAllowed:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_setForceScoAudio:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_setPriority:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_startScoUsingVirtualVoiceCall:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_startVoiceRecognition:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_stopScoUsingVirtualVoiceCall:I +Landroid/bluetooth/IBluetoothHeadset$Stub;->TRANSACTION_stopVoiceRecognition:I +Landroid/bluetooth/IBluetoothHeadset;->clccResponse(IIIIZLjava/lang/String;I)V +Landroid/bluetooth/IBluetoothHeadset;->connectAudio()Z +Landroid/bluetooth/IBluetoothHeadset;->disconnectAudio()Z +Landroid/bluetooth/IBluetoothHeadset;->getActiveDevice()Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/IBluetoothHeadset;->getAudioRouteAllowed()Z +Landroid/bluetooth/IBluetoothHeadset;->getAudioState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHeadset;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothHeadset;->isAudioConnected(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadset;->isAudioOn()Z +Landroid/bluetooth/IBluetoothHeadset;->isInbandRingingEnabled()Z +Landroid/bluetooth/IBluetoothHeadset;->phoneStateChanged(IIILjava/lang/String;I)V +Landroid/bluetooth/IBluetoothHeadset;->sendVendorSpecificResultCode(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;Ljava/lang/String;)Z +Landroid/bluetooth/IBluetoothHeadset;->setActiveDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadset;->setAudioRouteAllowed(Z)V +Landroid/bluetooth/IBluetoothHeadset;->setForceScoAudio(Z)V +Landroid/bluetooth/IBluetoothHeadset;->startScoUsingVirtualVoiceCall()Z +Landroid/bluetooth/IBluetoothHeadset;->startVoiceRecognition(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadset;->stopScoUsingVirtualVoiceCall()Z +Landroid/bluetooth/IBluetoothHeadset;->stopVoiceRecognition(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->acceptCall(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->connectAudio(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->dial(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;)Landroid/bluetooth/BluetoothHeadsetClientCall; +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->disconnectAudio(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->enterPrivateMode(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->explicitCallTransfer(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->getAudioRouteAllowed(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->getAudioState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->getCurrentAgEvents(Landroid/bluetooth/BluetoothDevice;)Landroid/os/Bundle; +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->getCurrentAgFeatures(Landroid/bluetooth/BluetoothDevice;)Landroid/os/Bundle; +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->getCurrentCalls(Landroid/bluetooth/BluetoothDevice;)Ljava/util/List; +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->getLastVoiceTagNumber(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->holdCall(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->rejectCall(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->sendDTMF(Landroid/bluetooth/BluetoothDevice;B)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->setAudioRouteAllowed(Landroid/bluetooth/BluetoothDevice;Z)V +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->startVoiceRecognition(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->stopVoiceRecognition(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub$Proxy;->terminateCall(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHeadsetClientCall;)Z +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;-><init>()V +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothHeadsetClient; +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_acceptCall:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_connect:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_connectAudio:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_dial:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_disconnect:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_disconnectAudio:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_enterPrivateMode:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_explicitCallTransfer:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_getAudioRouteAllowed:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_getAudioState:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_getConnectedDevices:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_getConnectionState:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_getCurrentAgEvents:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_getCurrentAgFeatures:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_getCurrentCalls:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_getDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_getLastVoiceTagNumber:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_getPriority:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_holdCall:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_rejectCall:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_sendDTMF:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_setAudioRouteAllowed:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_setPriority:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_startVoiceRecognition:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_stopVoiceRecognition:I +Landroid/bluetooth/IBluetoothHeadsetClient$Stub;->TRANSACTION_terminateCall:I +Landroid/bluetooth/IBluetoothHeadsetClient;->acceptCall(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothHeadsetClient;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient;->connectAudio(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient;->dial(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;)Landroid/bluetooth/BluetoothHeadsetClientCall; +Landroid/bluetooth/IBluetoothHeadsetClient;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient;->disconnectAudio(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient;->enterPrivateMode(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothHeadsetClient;->explicitCallTransfer(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient;->getAudioRouteAllowed(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient;->getAudioState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHeadsetClient;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothHeadsetClient;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHeadsetClient;->getCurrentAgEvents(Landroid/bluetooth/BluetoothDevice;)Landroid/os/Bundle; +Landroid/bluetooth/IBluetoothHeadsetClient;->getCurrentAgFeatures(Landroid/bluetooth/BluetoothDevice;)Landroid/os/Bundle; +Landroid/bluetooth/IBluetoothHeadsetClient;->getCurrentCalls(Landroid/bluetooth/BluetoothDevice;)Ljava/util/List; +Landroid/bluetooth/IBluetoothHeadsetClient;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothHeadsetClient;->getLastVoiceTagNumber(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHeadsetClient;->holdCall(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient;->rejectCall(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient;->sendDTMF(Landroid/bluetooth/BluetoothDevice;B)Z +Landroid/bluetooth/IBluetoothHeadsetClient;->setAudioRouteAllowed(Landroid/bluetooth/BluetoothDevice;Z)V +Landroid/bluetooth/IBluetoothHeadsetClient;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothHeadsetClient;->startVoiceRecognition(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient;->stopVoiceRecognition(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHeadsetClient;->terminateCall(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHeadsetClientCall;)Z +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->answerCall()Z +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->cdmaSetSecondCallState(Z)V +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->cdmaSwapSecondCallState()V +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->getNetworkOperator()Ljava/lang/String; +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->getSubscriberNumber()Ljava/lang/String; +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->hangupCall()Z +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->listCurrentCalls()Z +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->processChld(I)Z +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->queryPhoneState()Z +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->sendDtmf(I)Z +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub$Proxy;->updateBtHandsfreeAfterRadioTechnologyChange()V +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub;-><init>()V +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothHeadsetPhone; +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub;->TRANSACTION_answerCall:I +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub;->TRANSACTION_cdmaSetSecondCallState:I +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub;->TRANSACTION_cdmaSwapSecondCallState:I +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub;->TRANSACTION_getNetworkOperator:I +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub;->TRANSACTION_getSubscriberNumber:I +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub;->TRANSACTION_hangupCall:I +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub;->TRANSACTION_listCurrentCalls:I +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub;->TRANSACTION_processChld:I +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub;->TRANSACTION_queryPhoneState:I +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub;->TRANSACTION_sendDtmf:I +Landroid/bluetooth/IBluetoothHeadsetPhone$Stub;->TRANSACTION_updateBtHandsfreeAfterRadioTechnologyChange:I +Landroid/bluetooth/IBluetoothHeadsetPhone;->answerCall()Z +Landroid/bluetooth/IBluetoothHeadsetPhone;->cdmaSetSecondCallState(Z)V +Landroid/bluetooth/IBluetoothHeadsetPhone;->cdmaSwapSecondCallState()V +Landroid/bluetooth/IBluetoothHeadsetPhone;->getNetworkOperator()Ljava/lang/String; +Landroid/bluetooth/IBluetoothHeadsetPhone;->getSubscriberNumber()Ljava/lang/String; +Landroid/bluetooth/IBluetoothHeadsetPhone;->hangupCall()Z +Landroid/bluetooth/IBluetoothHeadsetPhone;->listCurrentCalls()Z +Landroid/bluetooth/IBluetoothHeadsetPhone;->processChld(I)Z +Landroid/bluetooth/IBluetoothHeadsetPhone;->queryPhoneState()Z +Landroid/bluetooth/IBluetoothHeadsetPhone;->sendDtmf(I)Z +Landroid/bluetooth/IBluetoothHeadsetPhone;->updateBtHandsfreeAfterRadioTechnologyChange()V +Landroid/bluetooth/IBluetoothHealth$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothHealth$Stub$Proxy;->connectChannelToSink(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;I)Z +Landroid/bluetooth/IBluetoothHealth$Stub$Proxy;->connectChannelToSource(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;)Z +Landroid/bluetooth/IBluetoothHealth$Stub$Proxy;->disconnectChannel(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;I)Z +Landroid/bluetooth/IBluetoothHealth$Stub$Proxy;->getConnectedHealthDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothHealth$Stub$Proxy;->getHealthDeviceConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHealth$Stub$Proxy;->getHealthDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothHealth$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothHealth$Stub$Proxy;->getMainChannelFd(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;)Landroid/os/ParcelFileDescriptor; +Landroid/bluetooth/IBluetoothHealth$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothHealth$Stub$Proxy;->registerAppConfiguration(Landroid/bluetooth/BluetoothHealthAppConfiguration;Landroid/bluetooth/IBluetoothHealthCallback;)Z +Landroid/bluetooth/IBluetoothHealth$Stub$Proxy;->unregisterAppConfiguration(Landroid/bluetooth/BluetoothHealthAppConfiguration;)Z +Landroid/bluetooth/IBluetoothHealth$Stub;-><init>()V +Landroid/bluetooth/IBluetoothHealth$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothHealth; +Landroid/bluetooth/IBluetoothHealth$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothHealth$Stub;->TRANSACTION_connectChannelToSink:I +Landroid/bluetooth/IBluetoothHealth$Stub;->TRANSACTION_connectChannelToSource:I +Landroid/bluetooth/IBluetoothHealth$Stub;->TRANSACTION_disconnectChannel:I +Landroid/bluetooth/IBluetoothHealth$Stub;->TRANSACTION_getConnectedHealthDevices:I +Landroid/bluetooth/IBluetoothHealth$Stub;->TRANSACTION_getHealthDeviceConnectionState:I +Landroid/bluetooth/IBluetoothHealth$Stub;->TRANSACTION_getHealthDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothHealth$Stub;->TRANSACTION_getMainChannelFd:I +Landroid/bluetooth/IBluetoothHealth$Stub;->TRANSACTION_registerAppConfiguration:I +Landroid/bluetooth/IBluetoothHealth$Stub;->TRANSACTION_unregisterAppConfiguration:I +Landroid/bluetooth/IBluetoothHealth;->connectChannelToSink(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;I)Z +Landroid/bluetooth/IBluetoothHealth;->connectChannelToSource(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;)Z +Landroid/bluetooth/IBluetoothHealth;->disconnectChannel(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;I)Z +Landroid/bluetooth/IBluetoothHealth;->getConnectedHealthDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothHealth;->getHealthDeviceConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHealth;->getHealthDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothHealth;->getMainChannelFd(Landroid/bluetooth/BluetoothDevice;Landroid/bluetooth/BluetoothHealthAppConfiguration;)Landroid/os/ParcelFileDescriptor; +Landroid/bluetooth/IBluetoothHealth;->registerAppConfiguration(Landroid/bluetooth/BluetoothHealthAppConfiguration;Landroid/bluetooth/IBluetoothHealthCallback;)Z +Landroid/bluetooth/IBluetoothHealth;->unregisterAppConfiguration(Landroid/bluetooth/BluetoothHealthAppConfiguration;)Z +Landroid/bluetooth/IBluetoothHealthCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothHealthCallback$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothHealthCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothHealthCallback$Stub$Proxy;->onHealthAppConfigurationStatusChange(Landroid/bluetooth/BluetoothHealthAppConfiguration;I)V +Landroid/bluetooth/IBluetoothHealthCallback$Stub$Proxy;->onHealthChannelStateChange(Landroid/bluetooth/BluetoothHealthAppConfiguration;Landroid/bluetooth/BluetoothDevice;IILandroid/os/ParcelFileDescriptor;I)V +Landroid/bluetooth/IBluetoothHealthCallback$Stub;-><init>()V +Landroid/bluetooth/IBluetoothHealthCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothHealthCallback; +Landroid/bluetooth/IBluetoothHealthCallback$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothHealthCallback$Stub;->TRANSACTION_onHealthAppConfigurationStatusChange:I +Landroid/bluetooth/IBluetoothHealthCallback$Stub;->TRANSACTION_onHealthChannelStateChange:I +Landroid/bluetooth/IBluetoothHealthCallback;->onHealthAppConfigurationStatusChange(Landroid/bluetooth/BluetoothHealthAppConfiguration;I)V +Landroid/bluetooth/IBluetoothHealthCallback;->onHealthChannelStateChange(Landroid/bluetooth/BluetoothHealthAppConfiguration;Landroid/bluetooth/BluetoothDevice;IILandroid/os/ParcelFileDescriptor;I)V +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->adjustVolume(I)V +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->getActiveDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->getDeviceMode(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->getDeviceSide(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->getHiSyncId(Landroid/bluetooth/BluetoothDevice;)J +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->getVolume()I +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->setActiveDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothHearingAid$Stub$Proxy;->setVolume(I)V +Landroid/bluetooth/IBluetoothHearingAid$Stub;-><init>()V +Landroid/bluetooth/IBluetoothHearingAid$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothHearingAid; +Landroid/bluetooth/IBluetoothHearingAid$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothHearingAid$Stub;->TRANSACTION_adjustVolume:I +Landroid/bluetooth/IBluetoothHearingAid$Stub;->TRANSACTION_connect:I +Landroid/bluetooth/IBluetoothHearingAid$Stub;->TRANSACTION_disconnect:I +Landroid/bluetooth/IBluetoothHearingAid$Stub;->TRANSACTION_getActiveDevices:I +Landroid/bluetooth/IBluetoothHearingAid$Stub;->TRANSACTION_getConnectedDevices:I +Landroid/bluetooth/IBluetoothHearingAid$Stub;->TRANSACTION_getConnectionState:I +Landroid/bluetooth/IBluetoothHearingAid$Stub;->TRANSACTION_getDeviceMode:I +Landroid/bluetooth/IBluetoothHearingAid$Stub;->TRANSACTION_getDeviceSide:I +Landroid/bluetooth/IBluetoothHearingAid$Stub;->TRANSACTION_getDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothHearingAid$Stub;->TRANSACTION_getHiSyncId:I +Landroid/bluetooth/IBluetoothHearingAid$Stub;->TRANSACTION_getPriority:I +Landroid/bluetooth/IBluetoothHearingAid$Stub;->TRANSACTION_getVolume:I +Landroid/bluetooth/IBluetoothHearingAid$Stub;->TRANSACTION_setActiveDevice:I +Landroid/bluetooth/IBluetoothHearingAid$Stub;->TRANSACTION_setPriority:I +Landroid/bluetooth/IBluetoothHearingAid$Stub;->TRANSACTION_setVolume:I +Landroid/bluetooth/IBluetoothHearingAid;->adjustVolume(I)V +Landroid/bluetooth/IBluetoothHearingAid;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHearingAid;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHearingAid;->getActiveDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothHearingAid;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothHearingAid;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHearingAid;->getDeviceMode(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHearingAid;->getDeviceSide(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHearingAid;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothHearingAid;->getHiSyncId(Landroid/bluetooth/BluetoothDevice;)J +Landroid/bluetooth/IBluetoothHearingAid;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHearingAid;->getVolume()I +Landroid/bluetooth/IBluetoothHearingAid;->HI_SYNC_ID_INVALID:I +Landroid/bluetooth/IBluetoothHearingAid;->MODE_BINAURAL:I +Landroid/bluetooth/IBluetoothHearingAid;->MODE_MONAURAL:I +Landroid/bluetooth/IBluetoothHearingAid;->setActiveDevice(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHearingAid;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothHearingAid;->setVolume(I)V +Landroid/bluetooth/IBluetoothHearingAid;->SIDE_LEFT:I +Landroid/bluetooth/IBluetoothHearingAid;->SIDE_RIGHT:I +Landroid/bluetooth/IBluetoothHidDevice$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothHidDevice$Stub$Proxy;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHidDevice$Stub$Proxy;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHidDevice$Stub$Proxy;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothHidDevice$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHidDevice$Stub$Proxy;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothHidDevice$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothHidDevice$Stub$Proxy;->getUserAppName()Ljava/lang/String; +Landroid/bluetooth/IBluetoothHidDevice$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothHidDevice$Stub$Proxy;->registerApp(Landroid/bluetooth/BluetoothHidDeviceAppSdpSettings;Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;Landroid/bluetooth/IBluetoothHidDeviceCallback;)Z +Landroid/bluetooth/IBluetoothHidDevice$Stub$Proxy;->replyReport(Landroid/bluetooth/BluetoothDevice;BB[B)Z +Landroid/bluetooth/IBluetoothHidDevice$Stub$Proxy;->reportError(Landroid/bluetooth/BluetoothDevice;B)Z +Landroid/bluetooth/IBluetoothHidDevice$Stub$Proxy;->sendReport(Landroid/bluetooth/BluetoothDevice;I[B)Z +Landroid/bluetooth/IBluetoothHidDevice$Stub$Proxy;->unplug(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHidDevice$Stub$Proxy;->unregisterApp()Z +Landroid/bluetooth/IBluetoothHidDevice$Stub;-><init>()V +Landroid/bluetooth/IBluetoothHidDevice$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothHidDevice; +Landroid/bluetooth/IBluetoothHidDevice$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothHidDevice$Stub;->TRANSACTION_connect:I +Landroid/bluetooth/IBluetoothHidDevice$Stub;->TRANSACTION_disconnect:I +Landroid/bluetooth/IBluetoothHidDevice$Stub;->TRANSACTION_getConnectedDevices:I +Landroid/bluetooth/IBluetoothHidDevice$Stub;->TRANSACTION_getConnectionState:I +Landroid/bluetooth/IBluetoothHidDevice$Stub;->TRANSACTION_getDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothHidDevice$Stub;->TRANSACTION_getUserAppName:I +Landroid/bluetooth/IBluetoothHidDevice$Stub;->TRANSACTION_registerApp:I +Landroid/bluetooth/IBluetoothHidDevice$Stub;->TRANSACTION_replyReport:I +Landroid/bluetooth/IBluetoothHidDevice$Stub;->TRANSACTION_reportError:I +Landroid/bluetooth/IBluetoothHidDevice$Stub;->TRANSACTION_sendReport:I +Landroid/bluetooth/IBluetoothHidDevice$Stub;->TRANSACTION_unplug:I +Landroid/bluetooth/IBluetoothHidDevice$Stub;->TRANSACTION_unregisterApp:I +Landroid/bluetooth/IBluetoothHidDevice;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHidDevice;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHidDevice;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothHidDevice;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHidDevice;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothHidDevice;->getUserAppName()Ljava/lang/String; +Landroid/bluetooth/IBluetoothHidDevice;->registerApp(Landroid/bluetooth/BluetoothHidDeviceAppSdpSettings;Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;Landroid/bluetooth/BluetoothHidDeviceAppQosSettings;Landroid/bluetooth/IBluetoothHidDeviceCallback;)Z +Landroid/bluetooth/IBluetoothHidDevice;->replyReport(Landroid/bluetooth/BluetoothDevice;BB[B)Z +Landroid/bluetooth/IBluetoothHidDevice;->reportError(Landroid/bluetooth/BluetoothDevice;B)Z +Landroid/bluetooth/IBluetoothHidDevice;->sendReport(Landroid/bluetooth/BluetoothDevice;I[B)Z +Landroid/bluetooth/IBluetoothHidDevice;->unplug(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHidDevice;->unregisterApp()Z +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub$Proxy;->onAppStatusChanged(Landroid/bluetooth/BluetoothDevice;Z)V +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub$Proxy;->onConnectionStateChanged(Landroid/bluetooth/BluetoothDevice;I)V +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub$Proxy;->onGetReport(Landroid/bluetooth/BluetoothDevice;BBI)V +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub$Proxy;->onInterruptData(Landroid/bluetooth/BluetoothDevice;B[B)V +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub$Proxy;->onSetProtocol(Landroid/bluetooth/BluetoothDevice;B)V +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub$Proxy;->onSetReport(Landroid/bluetooth/BluetoothDevice;BB[B)V +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub$Proxy;->onVirtualCableUnplug(Landroid/bluetooth/BluetoothDevice;)V +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothHidDeviceCallback; +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub;->TRANSACTION_onAppStatusChanged:I +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub;->TRANSACTION_onConnectionStateChanged:I +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub;->TRANSACTION_onGetReport:I +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub;->TRANSACTION_onInterruptData:I +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub;->TRANSACTION_onSetProtocol:I +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub;->TRANSACTION_onSetReport:I +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub;->TRANSACTION_onVirtualCableUnplug:I +Landroid/bluetooth/IBluetoothHidDeviceCallback;->onAppStatusChanged(Landroid/bluetooth/BluetoothDevice;Z)V +Landroid/bluetooth/IBluetoothHidDeviceCallback;->onConnectionStateChanged(Landroid/bluetooth/BluetoothDevice;I)V +Landroid/bluetooth/IBluetoothHidDeviceCallback;->onGetReport(Landroid/bluetooth/BluetoothDevice;BBI)V +Landroid/bluetooth/IBluetoothHidDeviceCallback;->onInterruptData(Landroid/bluetooth/BluetoothDevice;B[B)V +Landroid/bluetooth/IBluetoothHidDeviceCallback;->onSetProtocol(Landroid/bluetooth/BluetoothDevice;B)V +Landroid/bluetooth/IBluetoothHidDeviceCallback;->onSetReport(Landroid/bluetooth/BluetoothDevice;BB[B)V +Landroid/bluetooth/IBluetoothHidDeviceCallback;->onVirtualCableUnplug(Landroid/bluetooth/BluetoothDevice;)V +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->getIdleTime(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->getProtocolMode(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->getReport(Landroid/bluetooth/BluetoothDevice;BBI)Z +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->sendData(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;)Z +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->setIdleTime(Landroid/bluetooth/BluetoothDevice;B)Z +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->setProtocolMode(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->setReport(Landroid/bluetooth/BluetoothDevice;BLjava/lang/String;)Z +Landroid/bluetooth/IBluetoothHidHost$Stub$Proxy;->virtualUnplug(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHidHost$Stub;-><init>()V +Landroid/bluetooth/IBluetoothHidHost$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothHidHost; +Landroid/bluetooth/IBluetoothHidHost$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothHidHost$Stub;->TRANSACTION_connect:I +Landroid/bluetooth/IBluetoothHidHost$Stub;->TRANSACTION_disconnect:I +Landroid/bluetooth/IBluetoothHidHost$Stub;->TRANSACTION_getConnectedDevices:I +Landroid/bluetooth/IBluetoothHidHost$Stub;->TRANSACTION_getConnectionState:I +Landroid/bluetooth/IBluetoothHidHost$Stub;->TRANSACTION_getDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothHidHost$Stub;->TRANSACTION_getIdleTime:I +Landroid/bluetooth/IBluetoothHidHost$Stub;->TRANSACTION_getPriority:I +Landroid/bluetooth/IBluetoothHidHost$Stub;->TRANSACTION_getProtocolMode:I +Landroid/bluetooth/IBluetoothHidHost$Stub;->TRANSACTION_getReport:I +Landroid/bluetooth/IBluetoothHidHost$Stub;->TRANSACTION_sendData:I +Landroid/bluetooth/IBluetoothHidHost$Stub;->TRANSACTION_setIdleTime:I +Landroid/bluetooth/IBluetoothHidHost$Stub;->TRANSACTION_setPriority:I +Landroid/bluetooth/IBluetoothHidHost$Stub;->TRANSACTION_setProtocolMode:I +Landroid/bluetooth/IBluetoothHidHost$Stub;->TRANSACTION_setReport:I +Landroid/bluetooth/IBluetoothHidHost$Stub;->TRANSACTION_virtualUnplug:I +Landroid/bluetooth/IBluetoothHidHost;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHidHost;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHidHost;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothHidHost;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHidHost;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothHidHost;->getIdleTime(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHidHost;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothHidHost;->getProtocolMode(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothHidHost;->getReport(Landroid/bluetooth/BluetoothDevice;BBI)Z +Landroid/bluetooth/IBluetoothHidHost;->sendData(Landroid/bluetooth/BluetoothDevice;Ljava/lang/String;)Z +Landroid/bluetooth/IBluetoothHidHost;->setIdleTime(Landroid/bluetooth/BluetoothDevice;B)Z +Landroid/bluetooth/IBluetoothHidHost;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothHidHost;->setProtocolMode(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothHidHost;->setReport(Landroid/bluetooth/BluetoothDevice;BLjava/lang/String;)Z +Landroid/bluetooth/IBluetoothHidHost;->virtualUnplug(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->bindBluetoothProfileService(ILandroid/bluetooth/IBluetoothProfileServiceConnection;)Z +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->disable(Ljava/lang/String;Z)Z +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->enable(Ljava/lang/String;)Z +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->enableNoAutoConnect(Ljava/lang/String;)Z +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->getAddress()Ljava/lang/String; +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->getBluetoothGatt()Landroid/bluetooth/IBluetoothGatt; +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->getName()Ljava/lang/String; +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->getState()I +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->isBleAppPresent()Z +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->isBleScanAlwaysAvailable()Z +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->isEnabled()Z +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->registerAdapter(Landroid/bluetooth/IBluetoothManagerCallback;)Landroid/bluetooth/IBluetooth; +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->registerStateChangeCallback(Landroid/bluetooth/IBluetoothStateChangeCallback;)V +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->unbindBluetoothProfileService(ILandroid/bluetooth/IBluetoothProfileServiceConnection;)V +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->unregisterAdapter(Landroid/bluetooth/IBluetoothManagerCallback;)V +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->unregisterStateChangeCallback(Landroid/bluetooth/IBluetoothStateChangeCallback;)V +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;->updateBleAppCount(Landroid/os/IBinder;ZLjava/lang/String;)I +Landroid/bluetooth/IBluetoothManager$Stub;-><init>()V +Landroid/bluetooth/IBluetoothManager$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_bindBluetoothProfileService:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_disable:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_enableNoAutoConnect:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_getAddress:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_getBluetoothGatt:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_getName:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_getState:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_isBleAppPresent:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_isBleScanAlwaysAvailable:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_isEnabled:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_registerAdapter:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_registerStateChangeCallback:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_unbindBluetoothProfileService:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_unregisterAdapter:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_unregisterStateChangeCallback:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_updateBleAppCount:I +Landroid/bluetooth/IBluetoothManager;->bindBluetoothProfileService(ILandroid/bluetooth/IBluetoothProfileServiceConnection;)Z +Landroid/bluetooth/IBluetoothManager;->disable(Ljava/lang/String;Z)Z +Landroid/bluetooth/IBluetoothManager;->enable(Ljava/lang/String;)Z +Landroid/bluetooth/IBluetoothManager;->enableNoAutoConnect(Ljava/lang/String;)Z +Landroid/bluetooth/IBluetoothManager;->getAddress()Ljava/lang/String; +Landroid/bluetooth/IBluetoothManager;->getName()Ljava/lang/String; +Landroid/bluetooth/IBluetoothManager;->getState()I +Landroid/bluetooth/IBluetoothManager;->isBleAppPresent()Z +Landroid/bluetooth/IBluetoothManager;->isBleScanAlwaysAvailable()Z +Landroid/bluetooth/IBluetoothManager;->isEnabled()Z +Landroid/bluetooth/IBluetoothManager;->registerAdapter(Landroid/bluetooth/IBluetoothManagerCallback;)Landroid/bluetooth/IBluetooth; +Landroid/bluetooth/IBluetoothManager;->unbindBluetoothProfileService(ILandroid/bluetooth/IBluetoothProfileServiceConnection;)V +Landroid/bluetooth/IBluetoothManager;->unregisterAdapter(Landroid/bluetooth/IBluetoothManagerCallback;)V +Landroid/bluetooth/IBluetoothManager;->updateBleAppCount(Landroid/os/IBinder;ZLjava/lang/String;)I +Landroid/bluetooth/IBluetoothManagerCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothManagerCallback$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothManagerCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothManagerCallback$Stub$Proxy;->onBluetoothServiceDown()V +Landroid/bluetooth/IBluetoothManagerCallback$Stub$Proxy;->onBluetoothServiceUp(Landroid/bluetooth/IBluetooth;)V +Landroid/bluetooth/IBluetoothManagerCallback$Stub$Proxy;->onBrEdrDown()V +Landroid/bluetooth/IBluetoothManagerCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothManagerCallback; +Landroid/bluetooth/IBluetoothManagerCallback$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothManagerCallback$Stub;->TRANSACTION_onBluetoothServiceDown:I +Landroid/bluetooth/IBluetoothManagerCallback$Stub;->TRANSACTION_onBluetoothServiceUp:I +Landroid/bluetooth/IBluetoothManagerCallback$Stub;->TRANSACTION_onBrEdrDown:I +Landroid/bluetooth/IBluetoothManagerCallback;->onBluetoothServiceDown()V +Landroid/bluetooth/IBluetoothManagerCallback;->onBluetoothServiceUp(Landroid/bluetooth/IBluetooth;)V +Landroid/bluetooth/IBluetoothManagerCallback;->onBrEdrDown()V +Landroid/bluetooth/IBluetoothMap$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothMap$Stub$Proxy;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothMap$Stub$Proxy;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothMap$Stub$Proxy;->getClient()Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/IBluetoothMap$Stub$Proxy;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothMap$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothMap$Stub$Proxy;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothMap$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothMap$Stub$Proxy;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothMap$Stub$Proxy;->getState()I +Landroid/bluetooth/IBluetoothMap$Stub$Proxy;->isConnected(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothMap$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothMap$Stub$Proxy;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothMap$Stub;-><init>()V +Landroid/bluetooth/IBluetoothMap$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothMap; +Landroid/bluetooth/IBluetoothMap$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothMap$Stub;->TRANSACTION_connect:I +Landroid/bluetooth/IBluetoothMap$Stub;->TRANSACTION_disconnect:I +Landroid/bluetooth/IBluetoothMap$Stub;->TRANSACTION_getClient:I +Landroid/bluetooth/IBluetoothMap$Stub;->TRANSACTION_getConnectedDevices:I +Landroid/bluetooth/IBluetoothMap$Stub;->TRANSACTION_getConnectionState:I +Landroid/bluetooth/IBluetoothMap$Stub;->TRANSACTION_getDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothMap$Stub;->TRANSACTION_getPriority:I +Landroid/bluetooth/IBluetoothMap$Stub;->TRANSACTION_getState:I +Landroid/bluetooth/IBluetoothMap$Stub;->TRANSACTION_isConnected:I +Landroid/bluetooth/IBluetoothMap$Stub;->TRANSACTION_setPriority:I +Landroid/bluetooth/IBluetoothMap;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothMap;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothMap;->getClient()Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/IBluetoothMap;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothMap;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothMap;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothMap;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothMap;->getState()I +Landroid/bluetooth/IBluetoothMap;->isConnected(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothMap;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothMapClient$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothMapClient$Stub$Proxy;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothMapClient$Stub$Proxy;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothMapClient$Stub$Proxy;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothMapClient$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothMapClient$Stub$Proxy;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothMapClient$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothMapClient$Stub$Proxy;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothMapClient$Stub$Proxy;->getUnreadMessages(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothMapClient$Stub$Proxy;->isConnected(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothMapClient$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothMapClient$Stub$Proxy;->sendMessage(Landroid/bluetooth/BluetoothDevice;[Landroid/net/Uri;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;)Z +Landroid/bluetooth/IBluetoothMapClient$Stub$Proxy;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothMapClient$Stub;-><init>()V +Landroid/bluetooth/IBluetoothMapClient$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothMapClient; +Landroid/bluetooth/IBluetoothMapClient$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothMapClient$Stub;->TRANSACTION_connect:I +Landroid/bluetooth/IBluetoothMapClient$Stub;->TRANSACTION_disconnect:I +Landroid/bluetooth/IBluetoothMapClient$Stub;->TRANSACTION_getConnectedDevices:I +Landroid/bluetooth/IBluetoothMapClient$Stub;->TRANSACTION_getConnectionState:I +Landroid/bluetooth/IBluetoothMapClient$Stub;->TRANSACTION_getDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothMapClient$Stub;->TRANSACTION_getPriority:I +Landroid/bluetooth/IBluetoothMapClient$Stub;->TRANSACTION_getUnreadMessages:I +Landroid/bluetooth/IBluetoothMapClient$Stub;->TRANSACTION_isConnected:I +Landroid/bluetooth/IBluetoothMapClient$Stub;->TRANSACTION_sendMessage:I +Landroid/bluetooth/IBluetoothMapClient$Stub;->TRANSACTION_setPriority:I +Landroid/bluetooth/IBluetoothMapClient;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothMapClient;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothMapClient;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothMapClient;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothMapClient;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothMapClient;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothMapClient;->getUnreadMessages(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothMapClient;->isConnected(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothMapClient;->sendMessage(Landroid/bluetooth/BluetoothDevice;[Landroid/net/Uri;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;)Z +Landroid/bluetooth/IBluetoothMapClient;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothPan$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothPan$Stub$Proxy;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothPan$Stub$Proxy;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothPan$Stub$Proxy;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothPan$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothPan$Stub$Proxy;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothPan$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothPan$Stub$Proxy;->isTetheringOn()Z +Landroid/bluetooth/IBluetoothPan$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothPan$Stub$Proxy;->setBluetoothTethering(Z)V +Landroid/bluetooth/IBluetoothPan$Stub;-><init>()V +Landroid/bluetooth/IBluetoothPan$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothPan; +Landroid/bluetooth/IBluetoothPan$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothPan$Stub;->TRANSACTION_connect:I +Landroid/bluetooth/IBluetoothPan$Stub;->TRANSACTION_disconnect:I +Landroid/bluetooth/IBluetoothPan$Stub;->TRANSACTION_getConnectedDevices:I +Landroid/bluetooth/IBluetoothPan$Stub;->TRANSACTION_getConnectionState:I +Landroid/bluetooth/IBluetoothPan$Stub;->TRANSACTION_getDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothPan$Stub;->TRANSACTION_isTetheringOn:I +Landroid/bluetooth/IBluetoothPan$Stub;->TRANSACTION_setBluetoothTethering:I +Landroid/bluetooth/IBluetoothPan;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothPan;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothPan;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothPan;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothPan;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothPan;->isTetheringOn()Z +Landroid/bluetooth/IBluetoothPan;->setBluetoothTethering(Z)V +Landroid/bluetooth/IBluetoothPbap$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothPbap$Stub$Proxy;->disconnect(Landroid/bluetooth/BluetoothDevice;)V +Landroid/bluetooth/IBluetoothPbap$Stub$Proxy;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothPbap$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothPbap$Stub$Proxy;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothPbap$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothPbap$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothPbap$Stub;-><init>()V +Landroid/bluetooth/IBluetoothPbap$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothPbap$Stub;->TRANSACTION_disconnect:I +Landroid/bluetooth/IBluetoothPbap$Stub;->TRANSACTION_getConnectedDevices:I +Landroid/bluetooth/IBluetoothPbap$Stub;->TRANSACTION_getConnectionState:I +Landroid/bluetooth/IBluetoothPbap$Stub;->TRANSACTION_getDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothPbap;->disconnect(Landroid/bluetooth/BluetoothDevice;)V +Landroid/bluetooth/IBluetoothPbap;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothPbap;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothPbap;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothPbapClient$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothPbapClient$Stub$Proxy;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothPbapClient$Stub$Proxy;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothPbapClient$Stub$Proxy;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothPbapClient$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothPbapClient$Stub$Proxy;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothPbapClient$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothPbapClient$Stub$Proxy;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothPbapClient$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothPbapClient$Stub$Proxy;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothPbapClient$Stub;-><init>()V +Landroid/bluetooth/IBluetoothPbapClient$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothPbapClient; +Landroid/bluetooth/IBluetoothPbapClient$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothPbapClient$Stub;->TRANSACTION_connect:I +Landroid/bluetooth/IBluetoothPbapClient$Stub;->TRANSACTION_disconnect:I +Landroid/bluetooth/IBluetoothPbapClient$Stub;->TRANSACTION_getConnectedDevices:I +Landroid/bluetooth/IBluetoothPbapClient$Stub;->TRANSACTION_getConnectionState:I +Landroid/bluetooth/IBluetoothPbapClient$Stub;->TRANSACTION_getDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothPbapClient$Stub;->TRANSACTION_getPriority:I +Landroid/bluetooth/IBluetoothPbapClient$Stub;->TRANSACTION_setPriority:I +Landroid/bluetooth/IBluetoothPbapClient;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothPbapClient;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothPbapClient;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothPbapClient;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothPbapClient;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothPbapClient;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothPbapClient;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothProfileServiceConnection$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothProfileServiceConnection$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothProfileServiceConnection$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothProfileServiceConnection$Stub$Proxy;->onServiceConnected(Landroid/content/ComponentName;Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothProfileServiceConnection$Stub$Proxy;->onServiceDisconnected(Landroid/content/ComponentName;)V +Landroid/bluetooth/IBluetoothProfileServiceConnection$Stub;-><init>()V +Landroid/bluetooth/IBluetoothProfileServiceConnection$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothProfileServiceConnection; +Landroid/bluetooth/IBluetoothProfileServiceConnection$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothProfileServiceConnection$Stub;->TRANSACTION_onServiceConnected:I +Landroid/bluetooth/IBluetoothProfileServiceConnection$Stub;->TRANSACTION_onServiceDisconnected:I +Landroid/bluetooth/IBluetoothProfileServiceConnection;->onServiceConnected(Landroid/content/ComponentName;Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothProfileServiceConnection;->onServiceDisconnected(Landroid/content/ComponentName;)V +Landroid/bluetooth/IBluetoothSap$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothSap$Stub$Proxy;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothSap$Stub$Proxy;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothSap$Stub$Proxy;->getClient()Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/IBluetoothSap$Stub$Proxy;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothSap$Stub$Proxy;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothSap$Stub$Proxy;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothSap$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothSap$Stub$Proxy;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothSap$Stub$Proxy;->getState()I +Landroid/bluetooth/IBluetoothSap$Stub$Proxy;->isConnected(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothSap$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothSap$Stub$Proxy;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothSap$Stub;-><init>()V +Landroid/bluetooth/IBluetoothSap$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothSap; +Landroid/bluetooth/IBluetoothSap$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothSap$Stub;->TRANSACTION_connect:I +Landroid/bluetooth/IBluetoothSap$Stub;->TRANSACTION_disconnect:I +Landroid/bluetooth/IBluetoothSap$Stub;->TRANSACTION_getClient:I +Landroid/bluetooth/IBluetoothSap$Stub;->TRANSACTION_getConnectedDevices:I +Landroid/bluetooth/IBluetoothSap$Stub;->TRANSACTION_getConnectionState:I +Landroid/bluetooth/IBluetoothSap$Stub;->TRANSACTION_getDevicesMatchingConnectionStates:I +Landroid/bluetooth/IBluetoothSap$Stub;->TRANSACTION_getPriority:I +Landroid/bluetooth/IBluetoothSap$Stub;->TRANSACTION_getState:I +Landroid/bluetooth/IBluetoothSap$Stub;->TRANSACTION_isConnected:I +Landroid/bluetooth/IBluetoothSap$Stub;->TRANSACTION_setPriority:I +Landroid/bluetooth/IBluetoothSap;->connect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothSap;->disconnect(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothSap;->getClient()Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/IBluetoothSap;->getConnectedDevices()Ljava/util/List; +Landroid/bluetooth/IBluetoothSap;->getConnectionState(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothSap;->getDevicesMatchingConnectionStates([I)Ljava/util/List; +Landroid/bluetooth/IBluetoothSap;->getPriority(Landroid/bluetooth/BluetoothDevice;)I +Landroid/bluetooth/IBluetoothSap;->getState()I +Landroid/bluetooth/IBluetoothSap;->isConnected(Landroid/bluetooth/BluetoothDevice;)Z +Landroid/bluetooth/IBluetoothSap;->setPriority(Landroid/bluetooth/BluetoothDevice;I)Z +Landroid/bluetooth/IBluetoothSocketManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothSocketManager$Stub$Proxy;->connectSocket(Landroid/bluetooth/BluetoothDevice;ILandroid/os/ParcelUuid;II)Landroid/os/ParcelFileDescriptor; +Landroid/bluetooth/IBluetoothSocketManager$Stub$Proxy;->createSocketChannel(ILjava/lang/String;Landroid/os/ParcelUuid;II)Landroid/os/ParcelFileDescriptor; +Landroid/bluetooth/IBluetoothSocketManager$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothSocketManager$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothSocketManager$Stub$Proxy;->requestMaximumTxDataLength(Landroid/bluetooth/BluetoothDevice;)V +Landroid/bluetooth/IBluetoothSocketManager$Stub;-><init>()V +Landroid/bluetooth/IBluetoothSocketManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothSocketManager; +Landroid/bluetooth/IBluetoothSocketManager$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothSocketManager$Stub;->TRANSACTION_connectSocket:I +Landroid/bluetooth/IBluetoothSocketManager$Stub;->TRANSACTION_createSocketChannel:I +Landroid/bluetooth/IBluetoothSocketManager$Stub;->TRANSACTION_requestMaximumTxDataLength:I +Landroid/bluetooth/IBluetoothSocketManager;->connectSocket(Landroid/bluetooth/BluetoothDevice;ILandroid/os/ParcelUuid;II)Landroid/os/ParcelFileDescriptor; +Landroid/bluetooth/IBluetoothSocketManager;->createSocketChannel(ILjava/lang/String;Landroid/os/ParcelUuid;II)Landroid/os/ParcelFileDescriptor; +Landroid/bluetooth/IBluetoothSocketManager;->requestMaximumTxDataLength(Landroid/bluetooth/BluetoothDevice;)V +Landroid/bluetooth/IBluetoothStateChangeCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothStateChangeCallback$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/IBluetoothStateChangeCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/IBluetoothStateChangeCallback$Stub$Proxy;->onBluetoothStateChange(Z)V +Landroid/bluetooth/IBluetoothStateChangeCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothStateChangeCallback; +Landroid/bluetooth/IBluetoothStateChangeCallback$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/IBluetoothStateChangeCallback$Stub;->TRANSACTION_onBluetoothStateChange:I +Landroid/bluetooth/IBluetoothStateChangeCallback;->onBluetoothStateChange(Z)V +Landroid/bluetooth/le/AdvertiseCallback;->ADVERTISE_SUCCESS:I +Landroid/bluetooth/le/AdvertiseData$Builder;->mIncludeDeviceName:Z +Landroid/bluetooth/le/AdvertiseData$Builder;->mIncludeTxPowerLevel:Z +Landroid/bluetooth/le/AdvertiseData$Builder;->mManufacturerSpecificData:Landroid/util/SparseArray; +Landroid/bluetooth/le/AdvertiseData$Builder;->mServiceData:Ljava/util/Map; +Landroid/bluetooth/le/AdvertiseData$Builder;->mServiceUuids:Ljava/util/List; +Landroid/bluetooth/le/AdvertiseData;-><init>(Ljava/util/List;Landroid/util/SparseArray;Ljava/util/Map;ZZ)V +Landroid/bluetooth/le/AdvertiseData;->mIncludeDeviceName:Z +Landroid/bluetooth/le/AdvertiseData;->mIncludeTxPowerLevel:Z +Landroid/bluetooth/le/AdvertiseData;->mManufacturerSpecificData:Landroid/util/SparseArray; +Landroid/bluetooth/le/AdvertiseData;->mServiceData:Ljava/util/Map; +Landroid/bluetooth/le/AdvertiseData;->mServiceUuids:Ljava/util/List; +Landroid/bluetooth/le/AdvertiseSettings$Builder;->mConnectable:Z +Landroid/bluetooth/le/AdvertiseSettings$Builder;->mMode:I +Landroid/bluetooth/le/AdvertiseSettings$Builder;->mTimeoutMillis:I +Landroid/bluetooth/le/AdvertiseSettings$Builder;->mTxPowerLevel:I +Landroid/bluetooth/le/AdvertiseSettings;-><init>(IIZI)V +Landroid/bluetooth/le/AdvertiseSettings;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/le/AdvertiseSettings;->LIMITED_ADVERTISING_MAX_MILLIS:I +Landroid/bluetooth/le/AdvertiseSettings;->mAdvertiseConnectable:Z +Landroid/bluetooth/le/AdvertiseSettings;->mAdvertiseMode:I +Landroid/bluetooth/le/AdvertiseSettings;->mAdvertiseTimeoutMillis:I +Landroid/bluetooth/le/AdvertiseSettings;->mAdvertiseTxPowerLevel:I +Landroid/bluetooth/le/AdvertisingSet;-><init>(ILandroid/bluetooth/IBluetoothManager;)V +Landroid/bluetooth/le/AdvertisingSet;->getAdvertiserId()I +Landroid/bluetooth/le/AdvertisingSet;->getOwnAddress()V +Landroid/bluetooth/le/AdvertisingSet;->mAdvertiserId:I +Landroid/bluetooth/le/AdvertisingSet;->mGatt:Landroid/bluetooth/IBluetoothGatt; +Landroid/bluetooth/le/AdvertisingSet;->setAdvertiserId(I)V +Landroid/bluetooth/le/AdvertisingSet;->TAG:Ljava/lang/String; +Landroid/bluetooth/le/AdvertisingSetCallback;->onOwnAddressRead(Landroid/bluetooth/le/AdvertisingSet;ILjava/lang/String;)V +Landroid/bluetooth/le/AdvertisingSetParameters$Builder;->mConnectable:Z +Landroid/bluetooth/le/AdvertisingSetParameters$Builder;->mIncludeTxPower:Z +Landroid/bluetooth/le/AdvertisingSetParameters$Builder;->mInterval:I +Landroid/bluetooth/le/AdvertisingSetParameters$Builder;->mIsAnonymous:Z +Landroid/bluetooth/le/AdvertisingSetParameters$Builder;->mIsLegacy:Z +Landroid/bluetooth/le/AdvertisingSetParameters$Builder;->mPrimaryPhy:I +Landroid/bluetooth/le/AdvertisingSetParameters$Builder;->mScannable:Z +Landroid/bluetooth/le/AdvertisingSetParameters$Builder;->mSecondaryPhy:I +Landroid/bluetooth/le/AdvertisingSetParameters$Builder;->mTxPowerLevel:I +Landroid/bluetooth/le/AdvertisingSetParameters;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/le/AdvertisingSetParameters;-><init>(ZZZZZIIII)V +Landroid/bluetooth/le/AdvertisingSetParameters;->LIMITED_ADVERTISING_MAX_MILLIS:I +Landroid/bluetooth/le/AdvertisingSetParameters;->mConnectable:Z +Landroid/bluetooth/le/AdvertisingSetParameters;->mIncludeTxPower:Z +Landroid/bluetooth/le/AdvertisingSetParameters;->mInterval:I +Landroid/bluetooth/le/AdvertisingSetParameters;->mIsAnonymous:Z +Landroid/bluetooth/le/AdvertisingSetParameters;->mIsLegacy:Z +Landroid/bluetooth/le/AdvertisingSetParameters;->mPrimaryPhy:I +Landroid/bluetooth/le/AdvertisingSetParameters;->mScannable:Z +Landroid/bluetooth/le/AdvertisingSetParameters;->mSecondaryPhy:I +Landroid/bluetooth/le/AdvertisingSetParameters;->mTxPowerLevel:I +Landroid/bluetooth/le/BluetoothLeAdvertiser;-><init>(Landroid/bluetooth/IBluetoothManager;)V +Landroid/bluetooth/le/BluetoothLeAdvertiser;->byteLength([B)I +Landroid/bluetooth/le/BluetoothLeAdvertiser;->cleanup()V +Landroid/bluetooth/le/BluetoothLeAdvertiser;->FLAGS_FIELD_BYTES:I +Landroid/bluetooth/le/BluetoothLeAdvertiser;->mAdvertisingSets:Ljava/util/Map; +Landroid/bluetooth/le/BluetoothLeAdvertiser;->MANUFACTURER_SPECIFIC_DATA_LENGTH:I +Landroid/bluetooth/le/BluetoothLeAdvertiser;->MAX_ADVERTISING_DATA_BYTES:I +Landroid/bluetooth/le/BluetoothLeAdvertiser;->MAX_LEGACY_ADVERTISING_DATA_BYTES:I +Landroid/bluetooth/le/BluetoothLeAdvertiser;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/le/BluetoothLeAdvertiser;->mBluetoothManager:Landroid/bluetooth/IBluetoothManager; +Landroid/bluetooth/le/BluetoothLeAdvertiser;->mCallbackWrappers:Ljava/util/Map; +Landroid/bluetooth/le/BluetoothLeAdvertiser;->mHandler:Landroid/os/Handler; +Landroid/bluetooth/le/BluetoothLeAdvertiser;->mLegacyAdvertisers:Ljava/util/Map; +Landroid/bluetooth/le/BluetoothLeAdvertiser;->OVERHEAD_BYTES_PER_FIELD:I +Landroid/bluetooth/le/BluetoothLeAdvertiser;->postStartFailure(Landroid/bluetooth/le/AdvertiseCallback;I)V +Landroid/bluetooth/le/BluetoothLeAdvertiser;->postStartSetFailure(Landroid/os/Handler;Landroid/bluetooth/le/AdvertisingSetCallback;I)V +Landroid/bluetooth/le/BluetoothLeAdvertiser;->postStartSuccess(Landroid/bluetooth/le/AdvertiseCallback;Landroid/bluetooth/le/AdvertiseSettings;)V +Landroid/bluetooth/le/BluetoothLeAdvertiser;->TAG:Ljava/lang/String; +Landroid/bluetooth/le/BluetoothLeAdvertiser;->totalBytes(Landroid/bluetooth/le/AdvertiseData;Z)I +Landroid/bluetooth/le/BluetoothLeAdvertiser;->wrap(Landroid/bluetooth/le/AdvertisingSetCallback;Landroid/os/Handler;)Landroid/bluetooth/le/IAdvertisingSetCallback; +Landroid/bluetooth/le/BluetoothLeAdvertiser;->wrapOldCallback(Landroid/bluetooth/le/AdvertiseCallback;Landroid/bluetooth/le/AdvertiseSettings;)Landroid/bluetooth/le/AdvertisingSetCallback; +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->flushPendingBatchResults()V +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->mBluetoothGatt:Landroid/bluetooth/IBluetoothGatt; +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->mFilters:Ljava/util/List; +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->mResultStorages:Ljava/util/List; +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->mScanCallback:Landroid/bluetooth/le/ScanCallback; +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->mScannerId:I +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->mSettings:Landroid/bluetooth/le/ScanSettings; +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->mWorkSource:Landroid/os/WorkSource; +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->onBatchScanResults(Ljava/util/List;)V +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->onFoundOrLost(ZLandroid/bluetooth/le/ScanResult;)V +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->onScanManagerErrorCallback(I)V +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->onScannerRegistered(II)V +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->onScanResult(Landroid/bluetooth/le/ScanResult;)V +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->REGISTRATION_CALLBACK_TIMEOUT_MILLIS:I +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->startRegistration()V +Landroid/bluetooth/le/BluetoothLeScanner$BleScanCallbackWrapper;->stopLeScan()V +Landroid/bluetooth/le/BluetoothLeScanner;-><init>(Landroid/bluetooth/IBluetoothManager;)V +Landroid/bluetooth/le/BluetoothLeScanner;->cleanup()V +Landroid/bluetooth/le/BluetoothLeScanner;->DBG:Z +Landroid/bluetooth/le/BluetoothLeScanner;->isHardwareResourcesAvailableForScan(Landroid/bluetooth/le/ScanSettings;)Z +Landroid/bluetooth/le/BluetoothLeScanner;->isSettingsAndFilterComboAllowed(Landroid/bluetooth/le/ScanSettings;Ljava/util/List;)Z +Landroid/bluetooth/le/BluetoothLeScanner;->isSettingsConfigAllowedForScan(Landroid/bluetooth/le/ScanSettings;)Z +Landroid/bluetooth/le/BluetoothLeScanner;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/le/BluetoothLeScanner;->mBluetoothManager:Landroid/bluetooth/IBluetoothManager; +Landroid/bluetooth/le/BluetoothLeScanner;->mHandler:Landroid/os/Handler; +Landroid/bluetooth/le/BluetoothLeScanner;->mLeScanClients:Ljava/util/Map; +Landroid/bluetooth/le/BluetoothLeScanner;->postCallbackError(Landroid/bluetooth/le/ScanCallback;I)V +Landroid/bluetooth/le/BluetoothLeScanner;->postCallbackErrorOrReturn(Landroid/bluetooth/le/ScanCallback;I)I +Landroid/bluetooth/le/BluetoothLeScanner;->startScan(Ljava/util/List;Landroid/bluetooth/le/ScanSettings;Landroid/os/WorkSource;Landroid/bluetooth/le/ScanCallback;Landroid/app/PendingIntent;Ljava/util/List;)I +Landroid/bluetooth/le/BluetoothLeScanner;->TAG:Ljava/lang/String; +Landroid/bluetooth/le/BluetoothLeScanner;->VDBG:Z +Landroid/bluetooth/le/BluetoothLeUtils;-><init>()V +Landroid/bluetooth/le/BluetoothLeUtils;->checkAdapterStateOn(Landroid/bluetooth/BluetoothAdapter;)V +Landroid/bluetooth/le/BluetoothLeUtils;->equals(Landroid/util/SparseArray;Landroid/util/SparseArray;)Z +Landroid/bluetooth/le/BluetoothLeUtils;->equals(Ljava/util/Map;Ljava/util/Map;)Z +Landroid/bluetooth/le/BluetoothLeUtils;->toString(Landroid/util/SparseArray;)Ljava/lang/String; +Landroid/bluetooth/le/BluetoothLeUtils;->toString(Ljava/util/Map;)Ljava/lang/String; +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub$Proxy;->onAdvertisingDataSet(II)V +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub$Proxy;->onAdvertisingEnabled(IZI)V +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub$Proxy;->onAdvertisingParametersUpdated(III)V +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub$Proxy;->onAdvertisingSetStarted(III)V +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub$Proxy;->onAdvertisingSetStopped(I)V +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub$Proxy;->onOwnAddressRead(IILjava/lang/String;)V +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub$Proxy;->onPeriodicAdvertisingDataSet(II)V +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub$Proxy;->onPeriodicAdvertisingEnabled(IZI)V +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub$Proxy;->onPeriodicAdvertisingParametersUpdated(II)V +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub$Proxy;->onScanResponseDataSet(II)V +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub;-><init>()V +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/le/IAdvertisingSetCallback; +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub;->TRANSACTION_onAdvertisingDataSet:I +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub;->TRANSACTION_onAdvertisingEnabled:I +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub;->TRANSACTION_onAdvertisingParametersUpdated:I +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub;->TRANSACTION_onAdvertisingSetStarted:I +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub;->TRANSACTION_onAdvertisingSetStopped:I +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub;->TRANSACTION_onOwnAddressRead:I +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub;->TRANSACTION_onPeriodicAdvertisingDataSet:I +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub;->TRANSACTION_onPeriodicAdvertisingEnabled:I +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub;->TRANSACTION_onPeriodicAdvertisingParametersUpdated:I +Landroid/bluetooth/le/IAdvertisingSetCallback$Stub;->TRANSACTION_onScanResponseDataSet:I +Landroid/bluetooth/le/IAdvertisingSetCallback;->onAdvertisingDataSet(II)V +Landroid/bluetooth/le/IAdvertisingSetCallback;->onAdvertisingEnabled(IZI)V +Landroid/bluetooth/le/IAdvertisingSetCallback;->onAdvertisingParametersUpdated(III)V +Landroid/bluetooth/le/IAdvertisingSetCallback;->onAdvertisingSetStarted(III)V +Landroid/bluetooth/le/IAdvertisingSetCallback;->onAdvertisingSetStopped(I)V +Landroid/bluetooth/le/IAdvertisingSetCallback;->onOwnAddressRead(IILjava/lang/String;)V +Landroid/bluetooth/le/IAdvertisingSetCallback;->onPeriodicAdvertisingDataSet(II)V +Landroid/bluetooth/le/IAdvertisingSetCallback;->onPeriodicAdvertisingEnabled(IZI)V +Landroid/bluetooth/le/IAdvertisingSetCallback;->onPeriodicAdvertisingParametersUpdated(II)V +Landroid/bluetooth/le/IAdvertisingSetCallback;->onScanResponseDataSet(II)V +Landroid/bluetooth/le/IPeriodicAdvertisingCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/le/IPeriodicAdvertisingCallback$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/le/IPeriodicAdvertisingCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/le/IPeriodicAdvertisingCallback$Stub$Proxy;->onPeriodicAdvertisingReport(Landroid/bluetooth/le/PeriodicAdvertisingReport;)V +Landroid/bluetooth/le/IPeriodicAdvertisingCallback$Stub$Proxy;->onSyncEstablished(ILandroid/bluetooth/BluetoothDevice;IIII)V +Landroid/bluetooth/le/IPeriodicAdvertisingCallback$Stub$Proxy;->onSyncLost(I)V +Landroid/bluetooth/le/IPeriodicAdvertisingCallback$Stub;-><init>()V +Landroid/bluetooth/le/IPeriodicAdvertisingCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/le/IPeriodicAdvertisingCallback; +Landroid/bluetooth/le/IPeriodicAdvertisingCallback$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/le/IPeriodicAdvertisingCallback$Stub;->TRANSACTION_onPeriodicAdvertisingReport:I +Landroid/bluetooth/le/IPeriodicAdvertisingCallback$Stub;->TRANSACTION_onSyncEstablished:I +Landroid/bluetooth/le/IPeriodicAdvertisingCallback$Stub;->TRANSACTION_onSyncLost:I +Landroid/bluetooth/le/IPeriodicAdvertisingCallback;->onPeriodicAdvertisingReport(Landroid/bluetooth/le/PeriodicAdvertisingReport;)V +Landroid/bluetooth/le/IPeriodicAdvertisingCallback;->onSyncEstablished(ILandroid/bluetooth/BluetoothDevice;IIII)V +Landroid/bluetooth/le/IPeriodicAdvertisingCallback;->onSyncLost(I)V +Landroid/bluetooth/le/IScannerCallback$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/le/IScannerCallback$Stub$Proxy;->getInterfaceDescriptor()Ljava/lang/String; +Landroid/bluetooth/le/IScannerCallback$Stub$Proxy;->mRemote:Landroid/os/IBinder; +Landroid/bluetooth/le/IScannerCallback$Stub$Proxy;->onBatchScanResults(Ljava/util/List;)V +Landroid/bluetooth/le/IScannerCallback$Stub$Proxy;->onFoundOrLost(ZLandroid/bluetooth/le/ScanResult;)V +Landroid/bluetooth/le/IScannerCallback$Stub$Proxy;->onScanManagerErrorCallback(I)V +Landroid/bluetooth/le/IScannerCallback$Stub$Proxy;->onScannerRegistered(II)V +Landroid/bluetooth/le/IScannerCallback$Stub$Proxy;->onScanResult(Landroid/bluetooth/le/ScanResult;)V +Landroid/bluetooth/le/IScannerCallback$Stub;-><init>()V +Landroid/bluetooth/le/IScannerCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/le/IScannerCallback; +Landroid/bluetooth/le/IScannerCallback$Stub;->DESCRIPTOR:Ljava/lang/String; +Landroid/bluetooth/le/IScannerCallback$Stub;->TRANSACTION_onBatchScanResults:I +Landroid/bluetooth/le/IScannerCallback$Stub;->TRANSACTION_onFoundOrLost:I +Landroid/bluetooth/le/IScannerCallback$Stub;->TRANSACTION_onScanManagerErrorCallback:I +Landroid/bluetooth/le/IScannerCallback$Stub;->TRANSACTION_onScannerRegistered:I +Landroid/bluetooth/le/IScannerCallback$Stub;->TRANSACTION_onScanResult:I +Landroid/bluetooth/le/IScannerCallback;->onBatchScanResults(Ljava/util/List;)V +Landroid/bluetooth/le/IScannerCallback;->onFoundOrLost(ZLandroid/bluetooth/le/ScanResult;)V +Landroid/bluetooth/le/IScannerCallback;->onScanManagerErrorCallback(I)V +Landroid/bluetooth/le/IScannerCallback;->onScannerRegistered(II)V +Landroid/bluetooth/le/IScannerCallback;->onScanResult(Landroid/bluetooth/le/ScanResult;)V +Landroid/bluetooth/le/PeriodicAdvertisingCallback;-><init>()V +Landroid/bluetooth/le/PeriodicAdvertisingCallback;->onPeriodicAdvertisingReport(Landroid/bluetooth/le/PeriodicAdvertisingReport;)V +Landroid/bluetooth/le/PeriodicAdvertisingCallback;->onSyncEstablished(ILandroid/bluetooth/BluetoothDevice;IIII)V +Landroid/bluetooth/le/PeriodicAdvertisingCallback;->onSyncLost(I)V +Landroid/bluetooth/le/PeriodicAdvertisingCallback;->SYNC_NO_RESOURCES:I +Landroid/bluetooth/le/PeriodicAdvertisingCallback;->SYNC_NO_RESPONSE:I +Landroid/bluetooth/le/PeriodicAdvertisingCallback;->SYNC_SUCCESS:I +Landroid/bluetooth/le/PeriodicAdvertisingManager;-><init>(Landroid/bluetooth/IBluetoothManager;)V +Landroid/bluetooth/le/PeriodicAdvertisingManager;->mBluetoothAdapter:Landroid/bluetooth/BluetoothAdapter; +Landroid/bluetooth/le/PeriodicAdvertisingManager;->mBluetoothManager:Landroid/bluetooth/IBluetoothManager; +Landroid/bluetooth/le/PeriodicAdvertisingManager;->mCallbackWrappers:Ljava/util/Map; +Landroid/bluetooth/le/PeriodicAdvertisingManager;->registerSync(Landroid/bluetooth/le/ScanResult;IILandroid/bluetooth/le/PeriodicAdvertisingCallback;)V +Landroid/bluetooth/le/PeriodicAdvertisingManager;->registerSync(Landroid/bluetooth/le/ScanResult;IILandroid/bluetooth/le/PeriodicAdvertisingCallback;Landroid/os/Handler;)V +Landroid/bluetooth/le/PeriodicAdvertisingManager;->SKIP_MAX:I +Landroid/bluetooth/le/PeriodicAdvertisingManager;->SKIP_MIN:I +Landroid/bluetooth/le/PeriodicAdvertisingManager;->SYNC_STARTING:I +Landroid/bluetooth/le/PeriodicAdvertisingManager;->TAG:Ljava/lang/String; +Landroid/bluetooth/le/PeriodicAdvertisingManager;->TIMEOUT_MAX:I +Landroid/bluetooth/le/PeriodicAdvertisingManager;->TIMEOUT_MIN:I +Landroid/bluetooth/le/PeriodicAdvertisingManager;->unregisterSync(Landroid/bluetooth/le/PeriodicAdvertisingCallback;)V +Landroid/bluetooth/le/PeriodicAdvertisingManager;->wrap(Landroid/bluetooth/le/PeriodicAdvertisingCallback;Landroid/os/Handler;)Landroid/bluetooth/le/IPeriodicAdvertisingCallback; +Landroid/bluetooth/le/PeriodicAdvertisingParameters$Builder;->mIncludeTxPower:Z +Landroid/bluetooth/le/PeriodicAdvertisingParameters$Builder;->mInterval:I +Landroid/bluetooth/le/PeriodicAdvertisingParameters;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/le/PeriodicAdvertisingParameters;-><init>(ZI)V +Landroid/bluetooth/le/PeriodicAdvertisingParameters;->INTERVAL_MAX:I +Landroid/bluetooth/le/PeriodicAdvertisingParameters;->INTERVAL_MIN:I +Landroid/bluetooth/le/PeriodicAdvertisingParameters;->mIncludeTxPower:Z +Landroid/bluetooth/le/PeriodicAdvertisingParameters;->mInterval:I +Landroid/bluetooth/le/PeriodicAdvertisingReport;-><init>(IIIILandroid/bluetooth/le/ScanRecord;)V +Landroid/bluetooth/le/PeriodicAdvertisingReport;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/le/PeriodicAdvertisingReport;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/le/PeriodicAdvertisingReport;->DATA_COMPLETE:I +Landroid/bluetooth/le/PeriodicAdvertisingReport;->DATA_INCOMPLETE_TRUNCATED:I +Landroid/bluetooth/le/PeriodicAdvertisingReport;->getData()Landroid/bluetooth/le/ScanRecord; +Landroid/bluetooth/le/PeriodicAdvertisingReport;->getDataStatus()I +Landroid/bluetooth/le/PeriodicAdvertisingReport;->getRssi()I +Landroid/bluetooth/le/PeriodicAdvertisingReport;->getSyncHandle()I +Landroid/bluetooth/le/PeriodicAdvertisingReport;->getTimestampNanos()J +Landroid/bluetooth/le/PeriodicAdvertisingReport;->getTxPower()I +Landroid/bluetooth/le/PeriodicAdvertisingReport;->mData:Landroid/bluetooth/le/ScanRecord; +Landroid/bluetooth/le/PeriodicAdvertisingReport;->mDataStatus:I +Landroid/bluetooth/le/PeriodicAdvertisingReport;->mRssi:I +Landroid/bluetooth/le/PeriodicAdvertisingReport;->mSyncHandle:I +Landroid/bluetooth/le/PeriodicAdvertisingReport;->mTimestampNanos:J +Landroid/bluetooth/le/PeriodicAdvertisingReport;->mTxPower:I +Landroid/bluetooth/le/PeriodicAdvertisingReport;->readFromParcel(Landroid/os/Parcel;)V +Landroid/bluetooth/le/ResultStorageDescriptor;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/le/ResultStorageDescriptor;->mLength:I +Landroid/bluetooth/le/ResultStorageDescriptor;->mOffset:I +Landroid/bluetooth/le/ResultStorageDescriptor;->mType:I +Landroid/bluetooth/le/ResultStorageDescriptor;->ReadFromParcel(Landroid/os/Parcel;)V +Landroid/bluetooth/le/ScanCallback;->NO_ERROR:I +Landroid/bluetooth/le/ScanCallback;->SCAN_FAILED_OUT_OF_HARDWARE_RESOURCES:I +Landroid/bluetooth/le/ScanCallback;->SCAN_FAILED_SCANNING_TOO_FREQUENTLY:I +Landroid/bluetooth/le/ScanFilter$Builder;->mDeviceAddress:Ljava/lang/String; +Landroid/bluetooth/le/ScanFilter$Builder;->mDeviceName:Ljava/lang/String; +Landroid/bluetooth/le/ScanFilter$Builder;->mManufacturerData:[B +Landroid/bluetooth/le/ScanFilter$Builder;->mManufacturerDataMask:[B +Landroid/bluetooth/le/ScanFilter$Builder;->mManufacturerId:I +Landroid/bluetooth/le/ScanFilter$Builder;->mServiceData:[B +Landroid/bluetooth/le/ScanFilter$Builder;->mServiceDataMask:[B +Landroid/bluetooth/le/ScanFilter$Builder;->mServiceDataUuid:Landroid/os/ParcelUuid; +Landroid/bluetooth/le/ScanFilter$Builder;->mServiceUuid:Landroid/os/ParcelUuid; +Landroid/bluetooth/le/ScanFilter$Builder;->mUuidMask:Landroid/os/ParcelUuid; +Landroid/bluetooth/le/ScanFilter;-><init>(Ljava/lang/String;Ljava/lang/String;Landroid/os/ParcelUuid;Landroid/os/ParcelUuid;Landroid/os/ParcelUuid;[B[BI[B[B)V +Landroid/bluetooth/le/ScanFilter;->EMPTY:Landroid/bluetooth/le/ScanFilter; +Landroid/bluetooth/le/ScanFilter;->isAllFieldsEmpty()Z +Landroid/bluetooth/le/ScanFilter;->matchesPartialData([B[B[B)Z +Landroid/bluetooth/le/ScanFilter;->matchesServiceUuid(Ljava/util/UUID;Ljava/util/UUID;Ljava/util/UUID;)Z +Landroid/bluetooth/le/ScanFilter;->matchesServiceUuids(Landroid/os/ParcelUuid;Landroid/os/ParcelUuid;Ljava/util/List;)Z +Landroid/bluetooth/le/ScanFilter;->mDeviceAddress:Ljava/lang/String; +Landroid/bluetooth/le/ScanFilter;->mDeviceName:Ljava/lang/String; +Landroid/bluetooth/le/ScanFilter;->mManufacturerData:[B +Landroid/bluetooth/le/ScanFilter;->mManufacturerDataMask:[B +Landroid/bluetooth/le/ScanFilter;->mManufacturerId:I +Landroid/bluetooth/le/ScanFilter;->mServiceData:[B +Landroid/bluetooth/le/ScanFilter;->mServiceDataMask:[B +Landroid/bluetooth/le/ScanFilter;->mServiceDataUuid:Landroid/os/ParcelUuid; +Landroid/bluetooth/le/ScanFilter;->mServiceUuid:Landroid/os/ParcelUuid; +Landroid/bluetooth/le/ScanFilter;->mServiceUuidMask:Landroid/os/ParcelUuid; +Landroid/bluetooth/le/ScanRecord;-><init>(Ljava/util/List;Landroid/util/SparseArray;Ljava/util/Map;IILjava/lang/String;[B)V +Landroid/bluetooth/le/ScanRecord;->DATA_TYPE_FLAGS:I +Landroid/bluetooth/le/ScanRecord;->DATA_TYPE_LOCAL_NAME_COMPLETE:I +Landroid/bluetooth/le/ScanRecord;->DATA_TYPE_LOCAL_NAME_SHORT:I +Landroid/bluetooth/le/ScanRecord;->DATA_TYPE_MANUFACTURER_SPECIFIC_DATA:I +Landroid/bluetooth/le/ScanRecord;->DATA_TYPE_SERVICE_DATA_128_BIT:I +Landroid/bluetooth/le/ScanRecord;->DATA_TYPE_SERVICE_DATA_16_BIT:I +Landroid/bluetooth/le/ScanRecord;->DATA_TYPE_SERVICE_DATA_32_BIT:I +Landroid/bluetooth/le/ScanRecord;->DATA_TYPE_SERVICE_UUIDS_128_BIT_COMPLETE:I +Landroid/bluetooth/le/ScanRecord;->DATA_TYPE_SERVICE_UUIDS_128_BIT_PARTIAL:I +Landroid/bluetooth/le/ScanRecord;->DATA_TYPE_SERVICE_UUIDS_16_BIT_COMPLETE:I +Landroid/bluetooth/le/ScanRecord;->DATA_TYPE_SERVICE_UUIDS_16_BIT_PARTIAL:I +Landroid/bluetooth/le/ScanRecord;->DATA_TYPE_SERVICE_UUIDS_32_BIT_COMPLETE:I +Landroid/bluetooth/le/ScanRecord;->DATA_TYPE_SERVICE_UUIDS_32_BIT_PARTIAL:I +Landroid/bluetooth/le/ScanRecord;->DATA_TYPE_TX_POWER_LEVEL:I +Landroid/bluetooth/le/ScanRecord;->extractBytes([BII)[B +Landroid/bluetooth/le/ScanRecord;->mAdvertiseFlags:I +Landroid/bluetooth/le/ScanRecord;->mBytes:[B +Landroid/bluetooth/le/ScanRecord;->mDeviceName:Ljava/lang/String; +Landroid/bluetooth/le/ScanRecord;->mManufacturerSpecificData:Landroid/util/SparseArray; +Landroid/bluetooth/le/ScanRecord;->mServiceData:Ljava/util/Map; +Landroid/bluetooth/le/ScanRecord;->mServiceUuids:Ljava/util/List; +Landroid/bluetooth/le/ScanRecord;->mTxPowerLevel:I +Landroid/bluetooth/le/ScanRecord;->parseServiceUuid([BIIILjava/util/List;)I +Landroid/bluetooth/le/ScanRecord;->TAG:Ljava/lang/String; +Landroid/bluetooth/le/ScanResult;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/le/ScanResult;->ET_CONNECTABLE_MASK:I +Landroid/bluetooth/le/ScanResult;->ET_LEGACY_MASK:I +Landroid/bluetooth/le/ScanResult;->mAdvertisingSid:I +Landroid/bluetooth/le/ScanResult;->mDevice:Landroid/bluetooth/BluetoothDevice; +Landroid/bluetooth/le/ScanResult;->mEventType:I +Landroid/bluetooth/le/ScanResult;->mPeriodicAdvertisingInterval:I +Landroid/bluetooth/le/ScanResult;->mPrimaryPhy:I +Landroid/bluetooth/le/ScanResult;->mRssi:I +Landroid/bluetooth/le/ScanResult;->mScanRecord:Landroid/bluetooth/le/ScanRecord; +Landroid/bluetooth/le/ScanResult;->mSecondaryPhy:I +Landroid/bluetooth/le/ScanResult;->mTimestampNanos:J +Landroid/bluetooth/le/ScanResult;->mTxPower:I +Landroid/bluetooth/le/ScanResult;->readFromParcel(Landroid/os/Parcel;)V +Landroid/bluetooth/le/ScanSettings$Builder;->isValidCallbackType(I)Z +Landroid/bluetooth/le/ScanSettings$Builder;->mCallbackType:I +Landroid/bluetooth/le/ScanSettings$Builder;->mLegacy:Z +Landroid/bluetooth/le/ScanSettings$Builder;->mMatchMode:I +Landroid/bluetooth/le/ScanSettings$Builder;->mNumOfMatchesPerFilter:I +Landroid/bluetooth/le/ScanSettings$Builder;->mPhy:I +Landroid/bluetooth/le/ScanSettings$Builder;->mReportDelayMillis:J +Landroid/bluetooth/le/ScanSettings$Builder;->mScanMode:I +Landroid/bluetooth/le/ScanSettings$Builder;->mScanResultType:I +Landroid/bluetooth/le/ScanSettings;-><init>(IIIJIIZI)V +Landroid/bluetooth/le/ScanSettings;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/le/ScanSettings;->getMatchMode()I +Landroid/bluetooth/le/ScanSettings;->getNumOfMatches()I +Landroid/bluetooth/le/ScanSettings;->mCallbackType:I +Landroid/bluetooth/le/ScanSettings;->mLegacy:Z +Landroid/bluetooth/le/ScanSettings;->mMatchMode:I +Landroid/bluetooth/le/ScanSettings;->mNumOfMatchesPerFilter:I +Landroid/bluetooth/le/ScanSettings;->mPhy:I +Landroid/bluetooth/le/ScanSettings;->mReportDelayMillis:J +Landroid/bluetooth/le/ScanSettings;->mScanMode:I +Landroid/bluetooth/le/ScanSettings;->mScanResultType:I +Landroid/bluetooth/le/TruncatedFilter;->mFilter:Landroid/bluetooth/le/ScanFilter; +Landroid/bluetooth/le/TruncatedFilter;->mStorageDescriptors:Ljava/util/List; +Landroid/bluetooth/OobData;-><init>()V +Landroid/bluetooth/OobData;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/OobData;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/OobData;->getLeBluetoothDeviceAddress()[B +Landroid/bluetooth/OobData;->getLeSecureConnectionsConfirmation()[B +Landroid/bluetooth/OobData;->getLeSecureConnectionsRandom()[B +Landroid/bluetooth/OobData;->getSecurityManagerTk()[B +Landroid/bluetooth/OobData;->mLeBluetoothDeviceAddress:[B +Landroid/bluetooth/OobData;->mLeSecureConnectionsConfirmation:[B +Landroid/bluetooth/OobData;->mLeSecureConnectionsRandom:[B +Landroid/bluetooth/OobData;->mSecurityManagerTk:[B +Landroid/bluetooth/OobData;->setLeBluetoothDeviceAddress([B)V +Landroid/bluetooth/OobData;->setLeSecureConnectionsConfirmation([B)V +Landroid/bluetooth/OobData;->setLeSecureConnectionsRandom([B)V +Landroid/bluetooth/OobData;->setSecurityManagerTk([B)V +Landroid/bluetooth/SdpMasRecord$MessageType;-><init>()V +Landroid/bluetooth/SdpMasRecord$MessageType;->EMAIL:I +Landroid/bluetooth/SdpMasRecord$MessageType;->MMS:I +Landroid/bluetooth/SdpMasRecord$MessageType;->SMS_CDMA:I +Landroid/bluetooth/SdpMasRecord$MessageType;->SMS_GSM:I +Landroid/bluetooth/SdpMasRecord;-><init>(IIIIIILjava/lang/String;)V +Landroid/bluetooth/SdpMasRecord;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/SdpMasRecord;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/SdpMasRecord;->getL2capPsm()I +Landroid/bluetooth/SdpMasRecord;->getMasInstanceId()I +Landroid/bluetooth/SdpMasRecord;->getProfileVersion()I +Landroid/bluetooth/SdpMasRecord;->getRfcommCannelNumber()I +Landroid/bluetooth/SdpMasRecord;->getServiceName()Ljava/lang/String; +Landroid/bluetooth/SdpMasRecord;->getSupportedFeatures()I +Landroid/bluetooth/SdpMasRecord;->getSupportedMessageTypes()I +Landroid/bluetooth/SdpMasRecord;->mL2capPsm:I +Landroid/bluetooth/SdpMasRecord;->mMasInstanceId:I +Landroid/bluetooth/SdpMasRecord;->mProfileVersion:I +Landroid/bluetooth/SdpMasRecord;->mRfcommChannelNumber:I +Landroid/bluetooth/SdpMasRecord;->mServiceName:Ljava/lang/String; +Landroid/bluetooth/SdpMasRecord;->msgSupported(I)Z +Landroid/bluetooth/SdpMasRecord;->mSupportedFeatures:I +Landroid/bluetooth/SdpMasRecord;->mSupportedMessageTypes:I +Landroid/bluetooth/SdpMnsRecord;-><init>(IIIILjava/lang/String;)V +Landroid/bluetooth/SdpMnsRecord;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/SdpMnsRecord;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/SdpMnsRecord;->getL2capPsm()I +Landroid/bluetooth/SdpMnsRecord;->getProfileVersion()I +Landroid/bluetooth/SdpMnsRecord;->getRfcommChannelNumber()I +Landroid/bluetooth/SdpMnsRecord;->getServiceName()Ljava/lang/String; +Landroid/bluetooth/SdpMnsRecord;->getSupportedFeatures()I +Landroid/bluetooth/SdpMnsRecord;->mL2capPsm:I +Landroid/bluetooth/SdpMnsRecord;->mProfileVersion:I +Landroid/bluetooth/SdpMnsRecord;->mRfcommChannelNumber:I +Landroid/bluetooth/SdpMnsRecord;->mServiceName:Ljava/lang/String; +Landroid/bluetooth/SdpMnsRecord;->mSupportedFeatures:I +Landroid/bluetooth/SdpOppOpsRecord;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/SdpOppOpsRecord;-><init>(Ljava/lang/String;III[B)V +Landroid/bluetooth/SdpOppOpsRecord;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/SdpOppOpsRecord;->getFormatsList()[B +Landroid/bluetooth/SdpOppOpsRecord;->getL2capPsm()I +Landroid/bluetooth/SdpOppOpsRecord;->getProfileVersion()I +Landroid/bluetooth/SdpOppOpsRecord;->getRfcommChannel()I +Landroid/bluetooth/SdpOppOpsRecord;->getServiceName()Ljava/lang/String; +Landroid/bluetooth/SdpOppOpsRecord;->mFormatsList:[B +Landroid/bluetooth/SdpOppOpsRecord;->mL2capPsm:I +Landroid/bluetooth/SdpOppOpsRecord;->mProfileVersion:I +Landroid/bluetooth/SdpOppOpsRecord;->mRfcommChannel:I +Landroid/bluetooth/SdpOppOpsRecord;->mServiceName:Ljava/lang/String; +Landroid/bluetooth/SdpPseRecord;-><init>(IIIIILjava/lang/String;)V +Landroid/bluetooth/SdpPseRecord;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/SdpPseRecord;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/SdpPseRecord;->getL2capPsm()I +Landroid/bluetooth/SdpPseRecord;->getProfileVersion()I +Landroid/bluetooth/SdpPseRecord;->getRfcommChannelNumber()I +Landroid/bluetooth/SdpPseRecord;->getServiceName()Ljava/lang/String; +Landroid/bluetooth/SdpPseRecord;->getSupportedFeatures()I +Landroid/bluetooth/SdpPseRecord;->getSupportedRepositories()I +Landroid/bluetooth/SdpPseRecord;->mL2capPsm:I +Landroid/bluetooth/SdpPseRecord;->mProfileVersion:I +Landroid/bluetooth/SdpPseRecord;->mRfcommChannelNumber:I +Landroid/bluetooth/SdpPseRecord;->mServiceName:Ljava/lang/String; +Landroid/bluetooth/SdpPseRecord;->mSupportedFeatures:I +Landroid/bluetooth/SdpPseRecord;->mSupportedRepositories:I +Landroid/bluetooth/SdpRecord;-><init>(I[B)V +Landroid/bluetooth/SdpRecord;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/SdpRecord;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/SdpRecord;->getRawData()[B +Landroid/bluetooth/SdpRecord;->getRawSize()I +Landroid/bluetooth/SdpRecord;->mRawData:[B +Landroid/bluetooth/SdpRecord;->mRawSize:I +Landroid/bluetooth/SdpSapsRecord;-><init>(IILjava/lang/String;)V +Landroid/bluetooth/SdpSapsRecord;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/SdpSapsRecord;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/SdpSapsRecord;->getProfileVersion()I +Landroid/bluetooth/SdpSapsRecord;->getRfcommCannelNumber()I +Landroid/bluetooth/SdpSapsRecord;->getServiceName()Ljava/lang/String; +Landroid/bluetooth/SdpSapsRecord;->mProfileVersion:I +Landroid/bluetooth/SdpSapsRecord;->mRfcommChannelNumber:I +Landroid/bluetooth/SdpSapsRecord;->mServiceName:Ljava/lang/String; +Landroid/bluetooth/UidTraffic;-><init>(I)V +Landroid/bluetooth/UidTraffic;-><init>(IJJ)V +Landroid/bluetooth/UidTraffic;-><init>(Landroid/os/Parcel;)V +Landroid/bluetooth/UidTraffic;->addRxBytes(J)V +Landroid/bluetooth/UidTraffic;->addTxBytes(J)V +Landroid/bluetooth/UidTraffic;->CREATOR:Landroid/os/Parcelable$Creator; +Landroid/bluetooth/UidTraffic;->getRxBytes()J +Landroid/bluetooth/UidTraffic;->getTxBytes()J +Landroid/bluetooth/UidTraffic;->getUid()I +Landroid/bluetooth/UidTraffic;->mAppUid:I +Landroid/bluetooth/UidTraffic;->mRxBytes:J +Landroid/bluetooth/UidTraffic;->mTxBytes:J +Landroid/bluetooth/UidTraffic;->setRxBytes(J)V +Landroid/bluetooth/UidTraffic;->setTxBytes(J)V Landroid/companion/AssociationRequest$Builder;->mDeviceFilters:Ljava/util/ArrayList; Landroid/companion/AssociationRequest$Builder;->mSingleDevice:Z Landroid/companion/AssociationRequest;-><init>(Landroid/os/Parcel;)V diff --git a/boot/hiddenapi/hiddenapi-max-target-r-loprio.txt b/boot/hiddenapi/hiddenapi-max-target-r-loprio.txt index f5184e7963d7..bcacf99d9e32 100644 --- a/boot/hiddenapi/hiddenapi-max-target-r-loprio.txt +++ b/boot/hiddenapi/hiddenapi-max-target-r-loprio.txt @@ -3,6 +3,8 @@ Landroid/app/IActivityManager$Stub$Proxy;->updatePersistentConfiguration(Landroi Landroid/app/IActivityManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/IActivityManager; Landroid/app/IInstrumentationWatcher$Stub;-><init>()V Landroid/app/INotificationManager$Stub;->TRANSACTION_enqueueNotificationWithTag:I +Landroid/bluetooth/IBluetooth$Stub;->TRANSACTION_enable:I +Landroid/bluetooth/IBluetoothManager$Stub;->TRANSACTION_enable:I Landroid/companion/ICompanionDeviceDiscoveryService$Stub;-><init>()V Landroid/content/om/IOverlayManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/om/IOverlayManager; Landroid/content/pm/IPackageManager$Stub;->TRANSACTION_getApplicationInfo:I diff --git a/boot/hiddenapi/hiddenapi-unsupported.txt b/boot/hiddenapi/hiddenapi-unsupported.txt index 26dc7003a828..cc1c83b4907e 100644 --- a/boot/hiddenapi/hiddenapi-unsupported.txt +++ b/boot/hiddenapi/hiddenapi-unsupported.txt @@ -62,6 +62,18 @@ Landroid/app/job/IJobService$Stub;-><init>()V Landroid/app/job/IJobService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/job/IJobService; Landroid/app/trust/ITrustManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V Landroid/app/usage/IUsageStatsManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/app/usage/IUsageStatsManager; +Landroid/bluetooth/IBluetooth$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetooth; +Landroid/bluetooth/IBluetoothA2dp$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothA2dp; +Landroid/bluetooth/IBluetoothCallback$Stub;-><init>()V +Landroid/bluetooth/IBluetoothGattCallback$Stub;-><init>()V +Landroid/bluetooth/IBluetoothGattCallback$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothGattCallback; +Landroid/bluetooth/IBluetoothHeadset$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothHeadset; +Landroid/bluetooth/IBluetoothHidDeviceCallback$Stub;-><init>()V +Landroid/bluetooth/IBluetoothManager$Stub$Proxy;-><init>(Landroid/os/IBinder;)V +Landroid/bluetooth/IBluetoothManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothManager; +Landroid/bluetooth/IBluetoothManagerCallback$Stub;-><init>()V +Landroid/bluetooth/IBluetoothPbap$Stub;->asInterface(Landroid/os/IBinder;)Landroid/bluetooth/IBluetoothPbap; +Landroid/bluetooth/IBluetoothStateChangeCallback$Stub;-><init>()V Landroid/content/IClipboard$Stub$Proxy;-><init>(Landroid/os/IBinder;)V Landroid/content/IClipboard$Stub;->asInterface(Landroid/os/IBinder;)Landroid/content/IClipboard; Landroid/content/IContentService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V diff --git a/cmds/app_process/Android.bp b/cmds/app_process/Android.bp index a1575173ded6..42f0b3f4813d 100644 --- a/cmds/app_process/Android.bp +++ b/cmds/app_process/Android.bp @@ -42,6 +42,7 @@ cc_binary { shared_libs: [ "libandroid_runtime", + "libbase", "libbinder", "libcutils", "libdl", diff --git a/cmds/app_process/app_main.cpp b/cmds/app_process/app_main.cpp index 28db61f7d98a..ea2020f4c365 100644 --- a/cmds/app_process/app_main.cpp +++ b/cmds/app_process/app_main.cpp @@ -21,8 +21,11 @@ #include <cutils/properties.h> #include <cutils/trace.h> #include <android_runtime/AndroidRuntime.h> +#include <android-base/properties.h> #include <private/android_filesystem_config.h> // for AID_SYSTEM +using android::base::GetProperty; + namespace android { static void app_usage() @@ -172,6 +175,16 @@ static const char ZYGOTE_NICE_NAME[] = "zygote"; int main(int argc, char* const argv[]) { + std::string bootmode = GetProperty("ro.bootmode", ""); + std::string buildType = GetProperty("ro.build.type", ""); + + if (((strncmp(bootmode.c_str(), "ffbm-00", 7) == 0) + || (strncmp(bootmode.c_str(), "ffbm-01", 7) == 0)) + && ((strncmp(buildType.c_str(), "eng", 3) == 0) + || (strncmp(buildType.c_str(), "userdebug", 9) == 0))) { + return 0; + } + if (!LOG_NDEBUG) { String8 argv_String; for (int i = 0; i < argc; ++i) { diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index a8b6c0b70804..2858e3d15e38 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -271,7 +271,9 @@ static void* decodeImage(const void* encodedData, size_t dataLength, AndroidBitm const size_t size = outInfo->stride * outInfo->height; void* pixels = malloc(size); int result = AImageDecoder_decodeImage(decoder, pixels, outInfo->stride, size); - AImageDecoder_delete(decoder); + // TODO(b/180130969) Fix ~ImageDecoder() so that AImageDecoder_delete stops + // causing a segfault, then add back this call to AImageDecoder_delete(). + //AImageDecoder_delete(decoder); if (result != ANDROID_IMAGE_DECODER_SUCCESS) { free(pixels); @@ -724,6 +726,18 @@ bool BootAnimation::findBootAnimationFileInternal(const std::vector<std::string> } void BootAnimation::findBootAnimationFile() { + + std::string custAnimProp = !mShuttingDown ? + android::base::GetProperty("persist.sys.customanim.boot", ""): + android::base::GetProperty("persist.sys.customanim.shutdown", ""); + const char *custAnim = custAnimProp.c_str(); + ALOGD("Animation customzation path: %s", custAnim); + if (access(custAnim, R_OK) == 0) { + mZipFileName = custAnim; + ALOGD("%sAnimation customzation path: %s", mShuttingDown ? "Shutdown" : "Boot", mZipFileName.c_str()); + return; + } + const bool playDarkAnim = android::base::GetIntProperty("ro.boot.theme", 0) == 1; static const std::vector<std::string> bootFiles = { APEX_BOOTANIMATION_FILE, playDarkAnim ? PRODUCT_BOOTANIMATION_DARK_FILE : PRODUCT_BOOTANIMATION_FILE, diff --git a/cmds/screencap/screencap.cpp b/cmds/screencap/screencap.cpp index 863efffe3807..56d52afb034a 100644 --- a/cmds/screencap/screencap.cpp +++ b/cmds/screencap/screencap.cpp @@ -97,6 +97,7 @@ static status_t notifyMediaScanner(const char* fileName) { (char*) "android.intent.action.MEDIA_SCANNER_SCAN_FILE", (char*) "-d", &filePath[0], + (char*) "--async", nullptr }; diff --git a/cmds/svc/svc.sh b/cmds/svc/svc.sh index a2c9de32b3d0..6540677fbcb5 100755 --- a/cmds/svc/svc.sh +++ b/cmds/svc/svc.sh @@ -33,6 +33,29 @@ if [ "x$1" == "xdata" ]; then exit 1 fi +if [ "x$1" == "xciwlan" ]; then + if [ "x$2" == "xenable" ]; then + if [ "x$3" == "x-s" ]; then + exec cmd phone ciwlan enable -s $4 + else + exec cmd phone ciwlan enable + fi + elif [ "x$2" == "xdisable" ]; then + if [ "x$3" == "x-s" ]; then + exec cmd phone ciwlan disable -s $4 + else + exec cmd phone ciwlan disable + fi + else + echo "Enable/Disable C_IWLAN" + echo "" + echo "usage: svc ciwlan enable/disable [-s SLOT_ID]" + echo "" + echo "-s: the slotId to perform the action on. If not provided, the slotId of the DDS will be used." + fi + exit 1 +fi + # `svc bluetooth` has been migrated to BluetoothShellCommand, # simply perform translation to `cmd bluetooth set-bluetooth-enabled` here. if [ "x$1" == "xbluetooth" ]; then @@ -54,4 +77,3 @@ fi export CLASSPATH=/system/framework/svc.jar exec app_process /system/bin com.android.commands.svc.Svc "$@" - diff --git a/core/api/current.txt b/core/api/current.txt index 288ab479c0fb..acf88ac238cc 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -126,6 +126,7 @@ package android { field public static final String LAUNCH_MULTI_PANE_SETTINGS_DEEP_LINK = "android.permission.LAUNCH_MULTI_PANE_SETTINGS_DEEP_LINK"; field public static final String LOADER_USAGE_STATS = "android.permission.LOADER_USAGE_STATS"; field public static final String LOCATION_HARDWARE = "android.permission.LOCATION_HARDWARE"; + field public static final String MANAGE_CROSS_DEVICE = "deviceintegration.permission.MANAGE_CROSS_DEVICE"; field public static final String MANAGE_DEVICE_LOCK_STATE = "android.permission.MANAGE_DEVICE_LOCK_STATE"; field public static final String MANAGE_DEVICE_POLICY_ACCESSIBILITY = "android.permission.MANAGE_DEVICE_POLICY_ACCESSIBILITY"; field public static final String MANAGE_DEVICE_POLICY_ACCOUNT_MANAGEMENT = "android.permission.MANAGE_DEVICE_POLICY_ACCOUNT_MANAGEMENT"; @@ -5292,6 +5293,19 @@ package android.app { field public static final int DELIVERY_GROUP_POLICY_MOST_RECENT = 1; // 0x1 } + public class CrossDeviceManager { + method public static int getCrossDeviceVersion(); + method public static int getMaxFps(int); + method public static boolean isCallerAllowed(@NonNull android.content.Context); + method public static boolean isFeatureSupported(@NonNull String); + method @RequiresPermission(android.Manifest.permission.MANAGE_CROSS_DEVICE) public static void notifyConnectionStateChange(boolean); + field public static final int APP_FEATURE_TYPE_MULTIPLE_APPS = 2; // 0x2 + field public static final int APP_FEATURE_TYPE_PHONE_SCREEN_ONLY = 1; // 0x1 + field public static final int APP_FEATURE_TYPE_UNKNOWN = 0; // 0x0 + field public static final String FEATURE_BASIC = "feature_basic"; + field public static final String FEATURE_REMOTE_APPS = "feature_remote_apps"; + } + public class DatePickerDialog extends android.app.AlertDialog implements android.widget.DatePicker.OnDateChangedListener android.content.DialogInterface.OnClickListener { ctor public DatePickerDialog(@NonNull android.content.Context); ctor public DatePickerDialog(@NonNull android.content.Context, @StyleRes int); @@ -7121,6 +7135,50 @@ package android.app { method @NonNull public android.app.RemoteInput.Builder setLabel(@Nullable CharSequence); } + public final class RemoteTaskConstants { + ctor public RemoteTaskConstants(); + field public static final int DEVICE_AVAILABILITY_STATE_CONSTRAINED = 4; // 0x4 + field public static final int DEVICE_AVAILABILITY_STATE_CRITICAL = 16; // 0x10 + field public static final int DEVICE_AVAILABILITY_STATE_FREE = 8; // 0x8 + field public static final int FLAG_TASK_LAUNCH_SCENARIO_ATOA = 102; // 0x66 + field public static final int FLAG_TASK_LAUNCH_SCENARIO_CLIENT = 100; // 0x64 + field public static final int FLAG_TASK_LAUNCH_SCENARIO_COMMON = 0; // 0x0 + field public static final int FLAG_TASK_LAUNCH_SCENARIO_DUP = 2; // 0x2 + field public static final int FLAG_TASK_LAUNCH_SCENARIO_EDGE = 103; // 0x67 + field public static final int FLAG_TASK_LAUNCH_SCENARIO_MDTOVD = 101; // 0x65 + field public static final int FLAG_TASK_LAUNCH_SCENARIO_VDTOMD = 1; // 0x1 + field public static final int REMOTE_TASK_FLAG_DEFAULT = 0; // 0x0 + field public static final int REMOTE_TASK_FLAG_LAUNCH = 32; // 0x20 + } + + public final class RemoteTaskInfo implements android.os.Parcelable { + method @NonNull public static android.app.RemoteTaskInfo create(@Nullable String, @Nullable String, int, int); + method public int describeContents(); + method public int getDisplayId(); + method @Nullable public String getPackageName(); + method public int getTaskId(); + method @Nullable public String getUuid(); + method public void setDisplayId(int); + method public void setPackageName(@Nullable String); + method public void setTaskId(int); + method public void setUuid(@Nullable String); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.RemoteTaskInfo> CREATOR; + } + + public final class RemoteTaskParams implements android.os.Parcelable { + method @NonNull public static android.app.RemoteTaskParams create(@Nullable String, int, int); + method public int describeContents(); + method public int getDisplayId(); + method public int getLaunchScenario(); + method @Nullable public String getUuid(); + method public void setDisplayId(int); + method public void setLaunchScenario(int); + method public void setUuid(@Nullable String); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.RemoteTaskParams> CREATOR; + } + 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); @@ -7308,6 +7366,31 @@ package android.app { field @NonNull public static final android.os.Parcelable.Creator<android.app.SyncNotedAppOp> CREATOR; } + public final class SystemTaskContext implements android.os.Parcelable { + method @Nullable public static android.app.SystemTaskContext create(@Nullable String, @Nullable String, int, @Nullable String, int, int, int, boolean, boolean); + method public int describeContents(); + method public int getDisplayId(); + method public int getLaunchFlag(); + method @Nullable public String getLaunchFromPackage(); + method public int getReuseDisplayId(); + method @Nullable public String getSecurityToken(); + method public int getSourceDisplayId(); + method @Nullable public String getUuid(); + method public boolean isEdgeCase(); + method public boolean isHomeIntent(); + method public void setDisplayId(int); + method public void setEdgeCase(boolean); + method public void setHomeIntent(boolean); + method public void setLaunchFlag(int); + method public void setLaunchFromPackage(@Nullable String); + method public void setResueDisplayId(int); + method public void setSecurityToken(@Nullable String); + method public void setSourceDisplayId(int); + method public void setUuid(@Nullable String); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.app.SystemTaskContext> CREATOR; + } + @Deprecated public class TabActivity extends android.app.ActivityGroup { ctor @Deprecated public TabActivity(); method @Deprecated public android.widget.TabHost getTabHost(); @@ -24202,6 +24285,7 @@ package android.media { 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 HE_AAC_PS = 8; // 0x8 field public static final int OPUS = 7; // 0x7 field public static final int VORBIS = 6; // 0x6 } diff --git a/core/api/system-current.txt b/core/api/system-current.txt index ace7d59c9a45..9c252aea7cc8 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -16995,6 +16995,7 @@ package android.telephony.ims.stub { public class ImsUtImplBase { ctor public ImsUtImplBase(); method public void close(); + method public int queryCFForServiceClass(int, String, int); method public int queryCallBarring(int); method public int queryCallBarringForServiceClass(int, int); method public int queryCallForward(int, String); diff --git a/core/api/system-lint-baseline.txt b/core/api/system-lint-baseline.txt index 025e8629fc20..0aaa4669f10e 100644 --- a/core/api/system-lint-baseline.txt +++ b/core/api/system-lint-baseline.txt @@ -1,4 +1,8 @@ // Baseline format: 1.0 +AcronymName: android.telephony.ims.stub.ImsUtImplBase#queryCFForServiceClass(int, String, int): + Acronyms should not be capitalized in method names: was `queryCFForServiceClass`, should this be `queryCfForServiceClass`? + + ArrayReturn: android.view.contentcapture.ViewNode#getAutofillOptions(): Method should return Collection<CharSequence> (or subclass) instead of raw array; was `java.lang.CharSequence[]` @@ -54,6 +58,9 @@ MissingNullability: android.service.notification.NotificationAssistantService#at MissingNullability: android.telephony.NetworkService#onUnbind(android.content.Intent) parameter #0: Missing nullability on parameter `intent` in method `onUnbind` MissingNullability: android.telephony.data.DataService#onUnbind(android.content.Intent) parameter #0: + +MissingNullability: android.telephony.ims.stub.ImsUtImplBase#queryCFForServiceClass(int, String, int) parameter #1: + Missing nullability on parameter `number` in method `queryCFForServiceClass` Missing nullability on parameter `intent` in method `onUnbind` MissingNullability: android.telephony.mbms.DownloadRequest.Builder#setServiceId(String): Missing nullability on method `setServiceId` return diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java index 821a23cb0e48..c8ae8ff33e1f 100644 --- a/core/java/android/accounts/AccountManager.java +++ b/core/java/android/accounts/AccountManager.java @@ -585,6 +585,7 @@ public class AccountManager { * @return The account's password, null if none or if the account doesn't exist */ public String getPassword(final Account account) { + android.util.SeempLog.record(22); if (account == null) throw new IllegalArgumentException("account is null"); try { return mService.getPassword(account); @@ -615,6 +616,7 @@ public class AccountManager { * @return The user data, null if the account, key doesn't exist, or the user is locked */ public String getUserData(final Account account, final String key) { + android.util.SeempLog.record(23); return mUserDataCache.query(new AccountKeyData(account,key)); } @@ -857,6 +859,7 @@ public class AccountManager { return new Future2Task<String>(handler, callback) { @Override public void doWork() throws RemoteException { + android.util.SeempLog.record(31); mService.getAuthTokenLabel(mResponse, accountType, authTokenType); } @@ -909,6 +912,7 @@ public class AccountManager { return new Future2Task<Boolean>(handler, callback) { @Override public void doWork() throws RemoteException { + android.util.SeempLog.record(31); mService.hasFeatures( mResponse, account, features, userId, mContext.getOpPackageName()); } @@ -970,6 +974,7 @@ public class AccountManager { return new Future2Task<Account[]>(handler, callback) { @Override public void doWork() throws RemoteException { + android.util.SeempLog.record(31); mService.getAccountsByFeatures(mResponse, type, features, mContext.getOpPackageName()); } @@ -1014,6 +1019,7 @@ public class AccountManager { * already exists, the account is null, the user is locked, or another error occurs. */ public boolean addAccountExplicitly(Account account, String password, Bundle userdata) { + android.util.SeempLog.record(24); if (account == null) throw new IllegalArgumentException("account is null"); try { return mService.addAccountExplicitly( @@ -1238,6 +1244,7 @@ public class AccountManager { return new Future2Task<Account>(handler, callback) { @Override public void doWork() throws RemoteException { + android.util.SeempLog.record(31); mService.renameAccount(mResponse, account, newName); } @Override @@ -1299,6 +1306,7 @@ public class AccountManager { @Deprecated public AccountManagerFuture<Boolean> removeAccount(final Account account, AccountManagerCallback<Boolean> callback, Handler handler) { + android.util.SeempLog.record(25); return removeAccountAsUser(account, callback, handler, mContext.getUser()); } @@ -1346,6 +1354,7 @@ public class AccountManager { @UserHandleAware public AccountManagerFuture<Bundle> removeAccount(final Account account, final Activity activity, AccountManagerCallback<Bundle> callback, Handler handler) { + android.util.SeempLog.record(28); return removeAccountAsUser(account, activity, callback, handler, mContext.getUser()); } @@ -1365,6 +1374,7 @@ public class AccountManager { return new Future2Task<Boolean>(handler, callback) { @Override public void doWork() throws RemoteException { + android.util.SeempLog.record(31); mService.removeAccountAsUser(mResponse, account, false, userHandle.getIdentifier()); } @Override @@ -1391,6 +1401,7 @@ public class AccountManager { return new AmsTask(activity, handler, callback) { @Override public void doWork() throws RemoteException { + android.util.SeempLog.record(34); mService.removeAccountAsUser(mResponse, account, activity != null, userHandle.getIdentifier()); } @@ -1504,6 +1515,7 @@ public class AccountManager { * @param password The password to set, null to clear the password */ public void setPassword(final Account account, final String password) { + android.util.SeempLog.record(26); if (account == null) throw new IllegalArgumentException("account is null"); try { mService.setPassword(account, password); @@ -1532,6 +1544,7 @@ public class AccountManager { * @param account The account whose password to clear */ public void clearPassword(final Account account) { + android.util.SeempLog.record(27); if (account == null) throw new IllegalArgumentException("account is null"); try { mService.clearPassword(account); @@ -1559,6 +1572,7 @@ public class AccountManager { * @param value String value to set, {@code null} to clear this user data key */ public void setUserData(final Account account, final String key, final String value) { + android.util.SeempLog.record(28); if (account == null) throw new IllegalArgumentException("account is null"); if (key == null) throw new IllegalArgumentException("key is null"); try { @@ -1709,6 +1723,7 @@ public class AccountManager { return new AmsTask(activity, handler, callback) { @Override public void doWork() throws RemoteException { + android.util.SeempLog.record(31); mService.getAuthToken(mResponse, account, authTokenType, false /* notifyOnAuthFailure */, true /* expectActivityLaunch */, optionsIn); @@ -1880,6 +1895,7 @@ public class AccountManager { return new AmsTask(null, handler, callback) { @Override public void doWork() throws RemoteException { + android.util.SeempLog.record(31); mService.getAuthToken(mResponse, account, authTokenType, notifyAuthFailure, false /* expectActivityLaunch */, optionsIn); } @@ -1942,6 +1958,7 @@ public class AccountManager { final Bundle addAccountOptions, final Activity activity, AccountManagerCallback<Bundle> callback, Handler handler) { if (Process.myUserHandle().equals(mContext.getUser())) { + android.util.SeempLog.record(29); if (accountType == null) throw new IllegalArgumentException("accountType is null"); final Bundle optionsIn = new Bundle(); if (addAccountOptions != null) { @@ -1952,6 +1969,7 @@ public class AccountManager { return new AmsTask(activity, handler, callback) { @Override public void doWork() throws RemoteException { + android.util.SeempLog.record(31); mService.addAccount(mResponse, accountType, authTokenType, requiredFeatures, activity != null, optionsIn); } @@ -1981,6 +1999,7 @@ public class AccountManager { return new AmsTask(activity, handler, callback) { @Override public void doWork() throws RemoteException { + android.util.SeempLog.record(31); mService.addAccountAsUser(mResponse, accountType, authTokenType, requiredFeatures, activity != null, optionsIn, userHandle.getIdentifier()); } @@ -2030,6 +2049,7 @@ public class AccountManager { return new Future2Task<Boolean>(handler, callback) { @Override public void doWork() throws RemoteException { + android.util.SeempLog.record(34); mService.copyAccountToUser( mResponse, account, fromUser.getIdentifier(), toUser.getIdentifier()); } @@ -2129,6 +2149,7 @@ public class AccountManager { return new AmsTask(activity, handler, callback) { @Override public void doWork() throws RemoteException { + android.util.SeempLog.record(31); mService.confirmCredentialsAsUser(mResponse, account, options, activity != null, userId); } @@ -2242,10 +2263,12 @@ public class AccountManager { public AccountManagerFuture<Bundle> editProperties(final String accountType, final Activity activity, final AccountManagerCallback<Bundle> callback, final Handler handler) { + android.util.SeempLog.record(30); if (accountType == null) throw new IllegalArgumentException("accountType is null"); return new AmsTask(activity, handler, callback) { @Override public void doWork() throws RemoteException { + android.util.SeempLog.record(31); mService.editProperties(mResponse, accountType, activity != null); } }.start(); @@ -2672,6 +2695,7 @@ public class AccountManager { @Override public void doWork() throws RemoteException { + android.util.SeempLog.record(31); getAccountByTypeAndFeatures(mAccountType, mFeatures, new AccountManagerCallback<Bundle>() { @Override diff --git a/core/java/android/app/ActivityManagerInternal.java b/core/java/android/app/ActivityManagerInternal.java index 021f932c562c..be5b9a873279 100644 --- a/core/java/android/app/ActivityManagerInternal.java +++ b/core/java/android/app/ActivityManagerInternal.java @@ -924,6 +924,9 @@ public abstract class ActivityManagerInternal { */ public abstract @TempAllowListType int getPushMessagingOverQuotaBehavior(); + // Starts a process as empty. + public abstract int startActivityAsUserEmpty(Bundle options); + /** * Return the startForeground() grace period after calling startForegroundService(). */ diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java index 2ae721648656..e8de3e120624 100644 --- a/core/java/android/app/ActivityOptions.java +++ b/core/java/android/app/ActivityOptions.java @@ -43,6 +43,7 @@ import android.graphics.Bitmap.Config; import android.graphics.Rect; import android.hardware.HardwareBuffer; import android.os.Bundle; +import android.os.DeviceIntegrationUtils; import android.os.Handler; import android.os.IBinder; import android.os.IRemoteCallback; @@ -525,6 +526,11 @@ public class ActivityOptions extends ComponentOptions { MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED; private boolean mDisableStartingWindow; + private int mRemoteTaskFlag; + private String mRemoteTaskUUID; + private String mRemoteTaskSecurityToken; + private int mRemoteTaskLaunchScenario; + /** * Create an ActivityOptions specifying a custom animation to run when * the activity is displayed. @@ -1338,6 +1344,12 @@ public class ActivityOptions extends ComponentOptions { KEY_PENDING_INTENT_CREATOR_BACKGROUND_ACTIVITY_START_MODE, MODE_BACKGROUND_ACTIVITY_START_SYSTEM_DEFINED); mDisableStartingWindow = opts.getBoolean(KEY_DISABLE_STARTING_WINDOW); + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + mRemoteTaskFlag = opts.getInt(RemoteTaskConstants.KEY_REMOTE_TASK_LAUNCH_OPTION, RemoteTaskConstants.REMOTE_TASK_FLAG_DEFAULT); + mRemoteTaskUUID = opts.getString(RemoteTaskConstants.KEY_REMOTE_TASK_UUID, null); + mRemoteTaskSecurityToken = opts.getString(RemoteTaskConstants.KEY_REMOTE_TASK_SECURITY_TOKEN, null); + mRemoteTaskLaunchScenario = RemoteTaskConstants.FLAG_TASK_LAUNCH_SCENARIO_COMMON; + } } /** @@ -1811,6 +1823,62 @@ public class ActivityOptions extends ComponentOptions { } /** + * @hide + */ + public int getRemoteTaskFlag() { + return mRemoteTaskFlag; + } + + /** + * @hide + */ + public void setRemoteTaskFlag(int remoteTaskFlag) { + this.mRemoteTaskFlag = remoteTaskFlag; + } + + /** + * @hide + */ + public String getRemoteUuid() { + return mRemoteTaskUUID; + } + + /** + * @hide + */ + public void setRemoteUuid(String remoteUUID) { + this.mRemoteTaskUUID = remoteUUID; + } + + /** + * @hide + */ + public String getRemoteSecurityToken() { + return mRemoteTaskSecurityToken; + } + + /** + * @hide + */ + public void setRemoteSecurityToken(String remoteSecurityToken) { + this.mRemoteTaskSecurityToken = remoteSecurityToken; + } + + /** + * @hide + */ + public int getRemoteTaskLaunchScenario() { + return mRemoteTaskLaunchScenario; + } + + /** + * @hide + */ + public void setRemoteTaskLaunchScenario(int remoteTaskLaunchScenario) { + this.mRemoteTaskLaunchScenario = remoteTaskLaunchScenario; + } + + /** * Specifies intent flags to be applied for any activity started from a PendingIntent. * * @hide @@ -2379,6 +2447,17 @@ public class ActivityOptions extends ComponentOptions { if (mDisableStartingWindow) { b.putBoolean(KEY_DISABLE_STARTING_WINDOW, mDisableStartingWindow); } + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + if (mRemoteTaskFlag != RemoteTaskConstants.REMOTE_TASK_FLAG_DEFAULT) { + b.putInt(RemoteTaskConstants.KEY_REMOTE_TASK_LAUNCH_OPTION, mRemoteTaskFlag); + } + if (mRemoteTaskUUID != null) { + b.putString(RemoteTaskConstants.KEY_REMOTE_TASK_UUID, mRemoteTaskUUID); + } + if (mRemoteTaskSecurityToken != null) { + b.putString(RemoteTaskConstants.KEY_REMOTE_TASK_SECURITY_TOKEN, mRemoteTaskSecurityToken); + } + } return b; } diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 41c58ef67e65..657147b78a91 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -169,6 +169,7 @@ import android.system.StructStat; import android.telephony.TelephonyFrameworkInitializer; import android.util.AndroidRuntimeException; import android.util.ArrayMap; +import android.util.BoostFramework; import android.util.DisplayMetrics; import android.util.EventLog; import android.util.Log; @@ -6692,6 +6693,8 @@ public final class ActivityThread extends ClientTransactionHandler @UnsupportedAppUsage private void handleBindApplication(AppBindData data) { + long st_bindApp = SystemClock.uptimeMillis(); + BoostFramework ux_perf = null; // Register the UI Thread as a sensitive thread to the runtime. VMRuntime.registerSensitiveThread(); // In the case the stack depth property exists, pass it down to the runtime. @@ -6819,10 +6822,17 @@ public final class ActivityThread extends ClientTransactionHandler /** * Switch this process to density compatibility mode if needed. */ - if ((data.appInfo.flags&ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES) + if ((data.appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES) == 0) { mDensityCompatMode = true; Bitmap.setDefaultDensity(DisplayMetrics.DENSITY_DEFAULT); + } else { + int overrideDensity = data.appInfo.getOverrideDensity(); + if(overrideDensity != 0) { + Log.d(TAG, "override app density from " + DisplayMetrics.DENSITY_DEVICE + " to " + overrideDensity); + mDensityCompatMode = true; + Bitmap.setDefaultDensity(overrideDensity); + } } mConfigurationController.updateDefaultDensity(data.config.densityDpi); @@ -6897,6 +6907,15 @@ public final class ActivityThread extends ClientTransactionHandler } if (!Process.isIsolated()) { + final int old_mask = StrictMode.allowThreadDiskWritesMask(); + try { + ux_perf = new BoostFramework(appContext); + } finally { + StrictMode.setThreadPolicyMask(old_mask); + } + } + + if (!Process.isIsolated()) { final int oldMask = StrictMode.allowThreadDiskWritesMask(); try { setupGraphicsSupport(appContext); @@ -7032,6 +7051,33 @@ public final class ActivityThread extends ClientTransactionHandler throw e.rethrowFromSystemServer(); } } + long end_bindApp = SystemClock.uptimeMillis(); + int bindApp_dur = (int) (end_bindApp - st_bindApp); + String pkg_name = null; + if (appContext != null) { + pkg_name = appContext.getPackageName(); + } + if (ux_perf != null && !Process.isIsolated() && pkg_name != null) { + String pkgDir = null; + try + { + String codePath = appContext.getPackageCodePath(); + pkgDir = codePath.substring(0, codePath.lastIndexOf('/')); + } + catch(Exception e) + { + Slog.e(TAG, "HeavyGameThread () : Exception_1 = " + e); + } + if (ux_perf.board_first_api_lvl < BoostFramework.VENDOR_T_API_LEVEL && + ux_perf.board_api_lvl < BoostFramework.VENDOR_T_API_LEVEL) { + ux_perf.perfUXEngine_events(BoostFramework.UXE_EVENT_BINDAPP, 0, + pkg_name, + bindApp_dur, + pkgDir); + } else { + ux_perf.perfEvent(BoostFramework.VENDOR_HINT_BINDAPP, pkg_name, 2, bindApp_dur, 0); + } + } try { mgr.finishAttachApplication(mStartSeq); diff --git a/core/java/android/app/CrossDeviceManager.java b/core/java/android/app/CrossDeviceManager.java new file mode 100644 index 000000000000..4c7a8a078810 --- /dev/null +++ b/core/java/android/app/CrossDeviceManager.java @@ -0,0 +1,373 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app; + +import android.Manifest; +import android.annotation.NonNull; +import android.annotation.RequiresPermission; +import android.annotation.SystemService; +import android.content.Context; +import android.os.Bundle; +import android.os.Binder; +import android.os.IBinder; +import android.os.RemoteException; +import android.os.ServiceManager; +import android.os.SystemProperties; +import android.util.Log; +import android.util.Singleton; +import android.view.InputEvent; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import static android.content.pm.PackageManager.PERMISSION_GRANTED; + +/** + * This class given the information about, and interactive with Cross Device functions. + * Those clients that have been authorized can communicate with {@link com.android.server.wm.CrossDeviceService} + * through this class: + * <p> + * CrossDeviceManager manager = context.getSystemService("cross_device_service"); + */ +@SystemService(Context.CROSS_DEVICE_SERVICE) +public class CrossDeviceManager { + private static final String TAG = CrossDeviceManager.class.getSimpleName(); + + public static final String FEATURE_BASIC = "feature_basic"; + public static final String FEATURE_REMOTE_APPS = "feature_remote_apps"; + + public static final int APP_FEATURE_TYPE_UNKNOWN = 0; + public static final int APP_FEATURE_TYPE_PHONE_SCREEN_ONLY = 1; + public static final int APP_FEATURE_TYPE_MULTIPLE_APPS = 2; + private static final int CROSS_DEVICE_VERSION = 1; + + @NonNull + private static final List<String> CROSS_DEVICE_ALLOW_LIST = new ArrayList<>(Collections.singletonList("com.microsoft.deviceintegrationservice")); + + /** + * {@hide} + */ + public CrossDeviceManager() { } + + /** @hide */ + public static ICrossDeviceService getService() { + return SINGLETON.get(); + } + + private static final Singleton<ICrossDeviceService> SINGLETON = new Singleton<ICrossDeviceService>() { + @Override + protected ICrossDeviceService create() { + final IBinder binder = ServiceManager.getService(Context.CROSS_DEVICE_SERVICE); + return ICrossDeviceService.Stub.asInterface(binder); + } + }; + + /** + * <p> + * Check if the feature is supported. + */ + public static boolean isFeatureSupported(@NonNull String featureName) { + switch (featureName) { + case FEATURE_BASIC: + case FEATURE_REMOTE_APPS: + // Here can be optimized to change the return value; + return true; + default: + return false; + } + } + + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public static void notifyConnectionStateChange(boolean isConnected) { + Log.d(TAG, "Connection State Changed: " + (isConnected ? "Connected" : "Disconnected")); + } + + /** + * <p> + * Get Max Fps with appsFeatureType + */ + public static int getMaxFps(int appsFeatureType) { + switch (appsFeatureType) { + case APP_FEATURE_TYPE_PHONE_SCREEN_ONLY: + // This is for devices on which isFeatureSupported(FEATURE_REMOTE_APPS) returns false + return 30; + case APP_FEATURE_TYPE_MULTIPLE_APPS: + // This is for devices on which isFeatureSupported(FEATURE_REMOTE_APPS) returns true + return 30; + default: + return 15; + } + } + + /** + * <p> + * Check if the caller is supported. + */ + public static boolean isCallerAllowed(@NonNull Context context) { + final Context appContext = context.getApplicationContext(); + final int callingUid = Binder.getCallingUid(); + final String callingPackage = appContext.getPackageManager().getNameForUid(callingUid); + + int result = appContext.checkCallingOrSelfPermission(Manifest.permission.MANAGE_CROSS_DEVICE); + if (result != PERMISSION_GRANTED) { + Log.e(TAG, "permission.MANAGE_CROSS_DEVICE is not granted: " + callingPackage); + return false; + } + + if (!CROSS_DEVICE_ALLOW_LIST.contains(callingPackage)) { + Log.e(TAG, "CROSS_DEVICE_ALLOW_LIST does not contain: " + callingPackage); + return false; + } + + return true; + } + + /** + * <p> + * get cross device version + */ + public static int getCrossDeviceVersion() { + return CROSS_DEVICE_VERSION; + } + + /** + * {@hide} + * <p> + * Inject input event + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public void injectInputEvent(InputEvent event, int injectInputEventModeAsync) { + try { + getService().injectInputEvent(event, injectInputEventModeAsync); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * {@hide} + * <p> + * Get top running package name which will be used by input injection + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public String getTopRunningPackageName() { + try { + return getService().getTopRunningPackageName(); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * {@hide} + * <p> + * Wake up phone when injecting input from main display + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public void wakeUp(long time) { + try { + getService().wakeUp(time); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * {@hide} + * <p> + * Update white list. + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public void updateBackgroundActivityList(List<String> activityList) { + try { + getService().updateBackgroundActivityList(activityList); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * {@hide} + * <p> + * check white list. + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public void isFromBackgroundWhiteList() { + try { + getService().isFromBackgroundWhiteList(); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * {@hide} + * <p> + * check white list. + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public void isFromBackgroundWhiteListByUid(int uid) { + try { + getService().isFromBackgroundWhiteListByUid(uid); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * {@hide} + * <p> + * get device temperature + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public Bundle getDeviceTemperature() { + try { + return getService().getDeviceTemperature(); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * {@hide} + * <p> + * get the threshold of overheat + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public Bundle getOverheatThreshold() { + try { + return getService().getOverheatThreshold(); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * + * {@hide}<p> + * get the threshold of resume overheat + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public Bundle getResumeOverheatThreshold() { + try { + return getService().getResumeOverheatThreshold(); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * {@hide} + * <p> + * get the maximum app count of Suspend + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public Bundle getMaximumAppCount() { + try { + return getService().getMaximumAppCount(); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * {@hide} + * <p> + * Is app touch required + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public boolean isTouchRequired(String packageName) { + try { + return getService().isTouchRequired(packageName); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * {@hide} + * <p> + * Get {@link #android.app.IRemoteTaskInstanceBroker} + * @return IRemoteTaskInstanceBroker stub + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public IRemoteTaskInstanceBroker getRemoteTaskInstanceBroker() { + try { + return getService().getRemoteTaskInstanceBroker(); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * {@hide} + * <p> + * Client who want to handle remote task lifecycle event should register a + * {@link IRemoteTaskHandler} into Service at the beginning. + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public void registerRemoteTaskHandler(IRemoteTaskHandler handler) { + try { + getService().registerRemoteTaskHandler(handler); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * {@hide} + * <p> + * Unregister {@link IRemoteTaskHandler} from {@link com.android.server.wm.CrossDeviceService} + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public void unRegisterRemoteTaskHandler(IRemoteTaskHandler handler) { + try { + getService().unRegisterRemoteTaskHandler(handler); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * {@hide} + * <p> + * Set media projection permission granted + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public void setPermissionGranted(int uid) { + try { + getService().setPermissionGranted(uid); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + + /** + * {@hide} + * <p> + * Get media projection permission granted status + */ + @RequiresPermission(Manifest.permission.MANAGE_CROSS_DEVICE) + public boolean getPermissionGranted(int uid) { + try { + return getService().getPermissionGranted(uid); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } +} diff --git a/core/java/android/app/ICrossDeviceService.aidl b/core/java/android/app/ICrossDeviceService.aidl new file mode 100644 index 000000000000..a99ddbf8f8e2 --- /dev/null +++ b/core/java/android/app/ICrossDeviceService.aidl @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app; + +import android.app.IRemoteTaskHandler; +import android.app.IRemoteTaskInstanceBroker; +import android.view.InputEvent; +import android.os.Bundle; + +import java.util.List; + +/** {@hide} */ +interface ICrossDeviceService { + /** + * Inject input event. + * @param event Input event + * @param injectInputEventModeAsync Inject input event mode + */ + void injectInputEvent(in InputEvent event, int injectInputEventModeAsync); + + /** + * Get package name running in main display + * for input injection optimization + * @return top running package name + */ + String getTopRunningPackageName(); + + /** + * Wake up phone + * @param time wake up time + */ + void wakeUp(long time); + + /** + * Update white list for this service + * @param activityList activity list + */ + void updateBackgroundActivityList(in List<String> activityList); + + /** + * Check white list for this service with current binder caller + * @return true if call user id is in white list, false otherwise + */ + boolean isFromBackgroundWhiteList(); + + /** + * Check white list for this service + * @param uid caller user id that need to be check from white list + * @return true if call user id is in white list, false otherwise + */ + boolean isFromBackgroundWhiteListByUid(int uid); + + /** + * get device temperature + * @return device temperature + */ + Bundle getDeviceTemperature(); + + /** + * Check if touch is required + * @Param packageName app package name + * @return true if touch is required + */ + boolean isTouchRequired(String packageName); + + /** + * Get {@link #android.app.IRemoteTaskInstanceBroker} + * @return IRemoteTaskInstanceBroker stub + */ + IRemoteTaskInstanceBroker getRemoteTaskInstanceBroker(); + + /** + * Register remote task handler + * @param handler remote task handler + */ + void registerRemoteTaskHandler(in IRemoteTaskHandler handler); + + /** + * Unregister remote task handler + * @param handler remote task handler + */ + void unRegisterRemoteTaskHandler(in IRemoteTaskHandler handler); + + /** + * get the threshold of overheat + * @return OverheatThreshold + */ + Bundle getOverheatThreshold(); + + /** + * get the threshold of resume overheat + * @return ResumeOverheatThreshold + */ + Bundle getResumeOverheatThreshold(); + + /** + * get the maximum app count of Suspend + * @return SuspendDefaultCacheSize + */ + Bundle getMaximumAppCount(); + + /** + * Set media projection permission granted + * @param uid user id to be grant permission + */ + void setPermissionGranted(int uid); + + /** + * Get media projection permission granted + * @param uid user id to get permission grant status + * @return true if permission granted, false otherwise + */ + boolean getPermissionGranted(int uid); +}
\ No newline at end of file diff --git a/core/java/android/app/IRemoteTaskHandler.aidl b/core/java/android/app/IRemoteTaskHandler.aidl new file mode 100644 index 000000000000..1e70f16e40a7 --- /dev/null +++ b/core/java/android/app/IRemoteTaskHandler.aidl @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app; + +import android.app.SystemTaskContext; +import android.app.RemoteTaskParams; +import android.app.RemoteTaskInfo; +import android.content.Intent; + +import java.util.List; + +/** {@hide} */ +interface IRemoteTaskHandler { + + /** + * Call service to verify remote task + * @param context remote task context + * @return remote task options + */ + RemoteTaskParams verifyRemoteTask(in SystemTaskContext taskContext); + + /** + * Get current remote task info list + * @return remote task info list + */ + List getRemoteTaskInfoList(); + + /** + * Call service to start a new remote task + * @param taskInfo remote task informations + */ + oneway void activateRemoteTask(in RemoteTaskInfo taskInfo); + + /** + * Notify service the remote task has been removed + * @param taskId remote task id to be removed + */ + oneway void notifyRemoteTaskRemoved(int taskId); + + /** + * Notify service the display of remote task is switched + * @param displayId current display id + */ + oneway void notifyDisplaySwitched(int displayId); + + /** + * Notify service the device availability state changed + * @param deviceAvailabilityState the device availability state value + */ + oneway void notifyDeviceAvailabilityStateChanged(int deviceAvailabilityState); + + /** + * Notify service an empty UUID remote task detected + * @param intent the intent of remote task + */ + oneway void notifyRemoteTaskEmptyUUIDetected(in Intent intent); + + /** + * Notify service new remote task failed to create + * @param uuid uuid of remote task + * @param reason reason of the fail + */ + oneway void notifyRemoteTaskCreationFailed(in String uuid, int reason); + + /** + * Notify remote task service to handle showing secure content changed + * + * @param taskId remote task id + * @param isShowingSecuredContent if remote task is showing secure content + */ + oneway void notifyRemoteShowingSecuredContentChanged(int taskId, boolean isShowingSecuredContent); + + /** + * Notify that client app is died + */ + oneway void notifyClientDied(); +}
\ No newline at end of file diff --git a/core/java/android/app/IRemoteTaskInstanceBroker.aidl b/core/java/android/app/IRemoteTaskInstanceBroker.aidl new file mode 100644 index 000000000000..b474504a2c20 --- /dev/null +++ b/core/java/android/app/IRemoteTaskInstanceBroker.aidl @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app; + +import android.graphics.Rect; + +/** {@hide} */ +interface IRemoteTaskInstanceBroker { + /** + * Get current orientation status of remote task + * @Param taskId task id + * @return orientation state value + */ + int getOrientation(int taskId); + + /** + * Get remote task bounds + * @Param taskId task id + * @return remote task bounds + */ + Rect getRemoteTaskBounds(int taskId); + + /** + * Check if remote task instance is showing secure content + * @Param taskId task id + * @return true if current remote task instance is showing secure content + */ + boolean isRemoteTaskInstanceShowingSecuredContent(int taskId); + + /** + * Remove remote task + * @Param taskId task id + */ + oneway void removeRemoteTask(int taskId); + + /** + * Notify remote display orientation changed + * @Param taskId task id + * @param newOrientation new orientation state + */ + oneway void notifyRemoteDisplayOrientationChanged(int taskId, int newOrientation); +}
\ No newline at end of file diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java index e31486f18dbf..c4946cb237b4 100644 --- a/core/java/android/app/Instrumentation.java +++ b/core/java/android/app/Instrumentation.java @@ -525,6 +525,7 @@ public class Instrumentation { */ @NonNull public Activity startActivitySync(@NonNull Intent intent, @Nullable Bundle options) { + android.util.SeempLog.record_str(376, intent.toString()); validateNotAppThread(); final Activity activity; @@ -1837,6 +1838,7 @@ public class Instrumentation { public ActivityResult execStartActivity( Context who, IBinder contextThread, IBinder token, Activity target, Intent intent, int requestCode, Bundle options) { + android.util.SeempLog.record_str(377, intent.toString()); IApplicationThread whoThread = (IApplicationThread) contextThread; Uri referrer = target != null ? target.onProvideReferrer() : null; if (referrer != null) { @@ -1913,6 +1915,7 @@ public class Instrumentation { public int execStartActivitiesAsUser(Context who, IBinder contextThread, IBinder token, Activity target, Intent[] intents, Bundle options, int userId) { + android.util.SeempLog.record_str(378, intents.toString()); IApplicationThread whoThread = (IApplicationThread) contextThread; if (mActivityMonitors != null) { synchronized (mSync) { @@ -1988,6 +1991,7 @@ public class Instrumentation { public ActivityResult execStartActivity( Context who, IBinder contextThread, IBinder token, String target, Intent intent, int requestCode, Bundle options) { + android.util.SeempLog.record_str(377, intent.toString()); IApplicationThread whoThread = (IApplicationThread) contextThread; if (mActivityMonitors != null) { synchronized (mSync) { @@ -2059,6 +2063,7 @@ public class Instrumentation { public ActivityResult execStartActivity( Context who, IBinder contextThread, IBinder token, String resultWho, Intent intent, int requestCode, Bundle options, UserHandle user) { + android.util.SeempLog.record_str(377, intent.toString()); IApplicationThread whoThread = (IApplicationThread) contextThread; if (mActivityMonitors != null) { synchronized (mSync) { @@ -2160,6 +2165,7 @@ public class Instrumentation { public void execStartActivityFromAppTask( Context who, IBinder contextThread, IAppTask appTask, Intent intent, Bundle options) { + android.util.SeempLog.record_str(380, intent.toString()); IApplicationThread whoThread = (IApplicationThread) contextThread; if (mActivityMonitors != null) { synchronized (mSync) { diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java index 705b5ee84d01..51423339abd0 100644 --- a/core/java/android/app/PendingIntent.java +++ b/core/java/android/app/PendingIntent.java @@ -53,6 +53,7 @@ import android.os.Parcel; import android.os.Parcelable; import android.os.RemoteException; import android.os.UserHandle; +import android.os.SystemProperties; import android.util.AndroidException; import android.util.ArraySet; import android.util.Log; @@ -169,6 +170,7 @@ public final class PendingIntent implements Parcelable { @EnabledAfter(targetSdkVersion = android.os.Build.VERSION_CODES.R) static final long PENDING_INTENT_EXPLICIT_MUTABILITY_REQUIRED = 160794467L; + /** @hide */ @ChangeId @EnabledSince(targetSdkVersion = android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE) diff --git a/core/java/android/app/RemoteTaskConstants.java b/core/java/android/app/RemoteTaskConstants.java new file mode 100644 index 000000000000..348fe391eb48 --- /dev/null +++ b/core/java/android/app/RemoteTaskConstants.java @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app; + +import android.annotation.SuppressLint; + +@SuppressLint("StaticUtils") +public final class RemoteTaskConstants { + /** + * device temperature + * + * @hide + */ + public static final String DEVICE_TEMPERATURE = "deviceintegration:device.temperature"; + + /** + * threshold for overheat + * + * @hide + */ + public static final String OVERHEAT_THRESHOLD = "deviceintegration:overheat.suspend.threshold"; + + /** + * threshold for resuming from overheat + * + * @hide + */ + public static final String RESUME_OVERHEAT_THRESHOLD = "deviceintegration:overheat.resume.threshold"; + + /** + * the maximum concurrent running app count + * + * @hide + */ + public static final String MAXIMUM_RUNNING_APP_COUNT = "deviceintegration:maximum.app.count"; + + /** + * UUID for each remote task + * + * @hide + */ + public static final String KEY_REMOTE_TASK_UUID = "deviceintegration:remotetask.uuid"; + + /** + * security token for each remote task + * + * @hide + */ + public static final String KEY_REMOTE_TASK_SECURITY_TOKEN = "deviceintegration:remotetask.security.token"; + + /** + * Key for identifying remote task + * + * @hide + */ + public static final String KEY_REMOTE_TASK_LAUNCH_OPTION = "deviceintegration:remotetask.launchOption"; + + /** + * value for remote task, REMOTE_TASK_FLAG_LAUNCH means we need start this task as + * remote task. + */ + public static final int REMOTE_TASK_FLAG_LAUNCH = 32; + public static final int REMOTE_TASK_FLAG_DEFAULT = 0; + + /** + * value for device availability state + */ + /* Device availability constrained, New invocations will be denied */ + @SuppressLint("OverlappingConstants") + public static final int DEVICE_AVAILABILITY_STATE_CONSTRAINED = 4; + /* Device availability free, New invocations are acceptable */ + @SuppressLint("OverlappingConstants") + public static final int DEVICE_AVAILABILITY_STATE_FREE = 8; + /* Device availability critical, Current handlers will be killed */ + @SuppressLint("OverlappingConstants") + public static final int DEVICE_AVAILABILITY_STATE_CRITICAL = 16; + + /** + * Flag for task launch scenarios + */ + private static final int FIRST_LOCAL_TASK_LAUNCH_SCENARIO_FLAG = 0; + private static final int FIRST_REMOTE_TASK_LAUNCH_SCENARIO_FLAG = 100; + + @SuppressLint("OverlappingConstants") + public static final int FLAG_TASK_LAUNCH_SCENARIO_COMMON = FIRST_LOCAL_TASK_LAUNCH_SCENARIO_FLAG; + @SuppressLint("OverlappingConstants") + public static final int FLAG_TASK_LAUNCH_SCENARIO_VDTOMD = FIRST_LOCAL_TASK_LAUNCH_SCENARIO_FLAG + 1; + @SuppressLint("OverlappingConstants") + public static final int FLAG_TASK_LAUNCH_SCENARIO_DUP = FIRST_LOCAL_TASK_LAUNCH_SCENARIO_FLAG + 2; + + @SuppressLint("OverlappingConstants") + public static final int FLAG_TASK_LAUNCH_SCENARIO_CLIENT = FIRST_REMOTE_TASK_LAUNCH_SCENARIO_FLAG; + @SuppressLint("OverlappingConstants") + public static final int FLAG_TASK_LAUNCH_SCENARIO_MDTOVD = FIRST_REMOTE_TASK_LAUNCH_SCENARIO_FLAG + 1; + @SuppressLint("OverlappingConstants") + public static final int FLAG_TASK_LAUNCH_SCENARIO_ATOA = FIRST_REMOTE_TASK_LAUNCH_SCENARIO_FLAG + 2; + @SuppressLint("OverlappingConstants") + public static final int FLAG_TASK_LAUNCH_SCENARIO_EDGE = FIRST_REMOTE_TASK_LAUNCH_SCENARIO_FLAG + 3; +} diff --git a/core/java/android/app/RemoteTaskInfo.aidl b/core/java/android/app/RemoteTaskInfo.aidl new file mode 100644 index 000000000000..5e7447a85f51 --- /dev/null +++ b/core/java/android/app/RemoteTaskInfo.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app; + +parcelable RemoteTaskInfo;
\ No newline at end of file diff --git a/core/java/android/app/RemoteTaskInfo.java b/core/java/android/app/RemoteTaskInfo.java new file mode 100644 index 000000000000..f13e632d9efb --- /dev/null +++ b/core/java/android/app/RemoteTaskInfo.java @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app; + +import android.os.Parcel; +import android.os.Parcelable; +import android.annotation.NonNull; +import android.annotation.Nullable; + +/** + * Helper class for building a remote task info that can be used as parameter of + * {@link com.app.ICrossDeviceService#activateRemoteTask(android.app.RemoteTaskInfo) + * to declare the remote task detail information that has been activated. + */ +public final class RemoteTaskInfo implements Parcelable { + private String uuid; + private String packageName; + private int displayId; + private int taskId; + + private RemoteTaskInfo(@Nullable String uuid, @Nullable String packageName,int displayId, int taskId) { + this.uuid = uuid; + this.packageName = packageName; + this.displayId = displayId; + this.taskId = taskId; + } + + public static @NonNull RemoteTaskInfo create(@Nullable String uuid, @Nullable String packageName,int displayId, int taskId) { + return new RemoteTaskInfo(uuid, packageName, displayId, taskId); + } + + private RemoteTaskInfo(Parcel in) { + uuid = in.readString(); + packageName = in.readString(); + displayId = in.readInt(); + taskId = in.readInt(); + } + + public @Nullable String getUuid() { + return uuid; + } + + public void setUuid(@Nullable String uuid) { + this.uuid = uuid; + } + + public @Nullable String getPackageName() { + return packageName; + } + + public void setPackageName(@Nullable String packageName) { + this.packageName = packageName; + } + + public int getDisplayId() { + return displayId; + } + + public void setDisplayId(int displayId) { + this.displayId = displayId; + } + + public int getTaskId() { + return taskId; + } + + public void setTaskId(int taskId) { + this.taskId = taskId; + } + + public static final @NonNull Creator<RemoteTaskInfo> CREATOR = new Creator<RemoteTaskInfo>() { + @Override + public RemoteTaskInfo createFromParcel(Parcel in) { + return new RemoteTaskInfo(in); + } + + @Override + public RemoteTaskInfo[] newArray(int size) { + return new RemoteTaskInfo[size]; + } + }; + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + dest.writeString(uuid); + dest.writeString(packageName); + dest.writeInt(displayId); + dest.writeInt(taskId); + } +} diff --git a/core/java/android/app/RemoteTaskParams.aidl b/core/java/android/app/RemoteTaskParams.aidl new file mode 100644 index 000000000000..5899956cd5bf --- /dev/null +++ b/core/java/android/app/RemoteTaskParams.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app; + +parcelable RemoteTaskParams;
\ No newline at end of file diff --git a/core/java/android/app/RemoteTaskParams.java b/core/java/android/app/RemoteTaskParams.java new file mode 100644 index 000000000000..beec09e15229 --- /dev/null +++ b/core/java/android/app/RemoteTaskParams.java @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app; + +import android.os.Parcel; +import android.os.Parcelable; +import android.annotation.NonNull; +import android.annotation.Nullable; + +/** + * Helper class for building a remote task options that can be used as return value + * {@link com.app.IRemoteTaskHandler#verifyRemoteTask(android.app.SystemTaskContext) + */ +public final class RemoteTaskParams implements Parcelable { + + private String uuid; + private int launchScenario; + private int displayId; + + private RemoteTaskParams(@Nullable String uuid, int launchScenario,int displayId) { + this.uuid = uuid; + this.launchScenario = launchScenario; + this.displayId = displayId; + } + + public static @NonNull RemoteTaskParams create(@Nullable String uuid, int launchScenario,int displayId) { + return new RemoteTaskParams(uuid, launchScenario, displayId); + } + + private RemoteTaskParams(Parcel in) { + uuid = in.readString(); + launchScenario = in.readInt(); + displayId = in.readInt(); + } + + public @Nullable String getUuid() { + return uuid; + } + + public void setUuid(@Nullable String uuid) { + this.uuid = uuid; + } + + public int getLaunchScenario() { + return launchScenario; + } + + public void setLaunchScenario(int launchScenario) { + this.launchScenario = launchScenario; + } + + public int getDisplayId() { + return displayId; + } + + public void setDisplayId(int displayId) { + this.displayId = displayId; + } + + public static final @NonNull Creator<RemoteTaskParams> CREATOR = new Parcelable.Creator<RemoteTaskParams>() { + @Override + public RemoteTaskParams createFromParcel(Parcel in) { + return new RemoteTaskParams(in); + } + + @Override + public RemoteTaskParams[] newArray(int size) { + return new RemoteTaskParams[size]; + } + }; + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + dest.writeString(uuid); + dest.writeInt(launchScenario); + dest.writeInt(displayId); + } +} diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java index 4f5da99d539a..002218a7cc0a 100644 --- a/core/java/android/app/SystemServiceRegistry.java +++ b/core/java/android/app/SystemServiceRegistry.java @@ -164,6 +164,7 @@ import android.os.BatteryStats; import android.os.BatteryStatsManager; import android.os.BugreportManager; import android.os.Build; +import android.os.DeviceIntegrationUtils; import android.os.DropBoxManager; import android.os.HardwarePropertiesManager; import android.os.IBatteryPropertiesRegistrar; @@ -1547,6 +1548,19 @@ public final class SystemServiceRegistry { return new AmbientContextManager(ctx.getOuterContext(), manager); }}); + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + registerService(Context.CROSS_DEVICE_SERVICE, CrossDeviceManager.class, + new CachedServiceFetcher<CrossDeviceManager>() { + @Override + public CrossDeviceManager createService(ContextImpl ctx) + throws ServiceNotFoundException { + // Check the service and throw an exception if not found + ServiceManager.getServiceOrThrow(Context.CROSS_DEVICE_SERVICE); + return new CrossDeviceManager(); + } + }); + } + registerService(Context.WEARABLE_SENSING_SERVICE, WearableSensingManager.class, new CachedServiceFetcher<WearableSensingManager>() { @Override diff --git a/core/java/android/app/SystemTaskContext.aidl b/core/java/android/app/SystemTaskContext.aidl new file mode 100644 index 000000000000..95c768d3641a --- /dev/null +++ b/core/java/android/app/SystemTaskContext.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app; + +parcelable SystemTaskContext;
\ No newline at end of file diff --git a/core/java/android/app/SystemTaskContext.java b/core/java/android/app/SystemTaskContext.java new file mode 100644 index 000000000000..89e435ab40b3 --- /dev/null +++ b/core/java/android/app/SystemTaskContext.java @@ -0,0 +1,176 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.app; + +import android.os.Parcel; +import android.os.Parcelable; +import android.annotation.NonNull; +import android.annotation.Nullable; + +/** + * Helper class for building a remote task context that can be used with + * {@link com.app.IRemoteTaskHandler#verifyRemoteTask(android.app.SystemTaskContext) + */ +public final class SystemTaskContext implements Parcelable { + + private String uuid; + private String securityToken; + private int launchFlag; + private String launchFromPackage; + private int displayId; + private int sourceDisplayId; + private int reuseDisplayId; + private boolean isHomeIntent; + private boolean isEdgeCase; + + private SystemTaskContext(@Nullable String uuid, @Nullable String securityToken, + int launchFlag, @Nullable String launchPackage, + int displayId, int sourceDisplayId, int reuseDisplayId, + boolean isHomeIntent, boolean isEdgeCase) { + this.uuid = uuid; + this.securityToken = securityToken; + this.launchFlag = launchFlag; + this.launchFromPackage = launchPackage; + this.displayId = displayId; + this.sourceDisplayId = sourceDisplayId; + this.reuseDisplayId = reuseDisplayId; + this.isHomeIntent = isHomeIntent; + this.isEdgeCase = isEdgeCase; + } + + public static @Nullable SystemTaskContext create(@Nullable String uuid, @Nullable String securityToken, + int launchFlag, @Nullable String launchPackage, + int displayId, int sourceDisplayId, int reuseDisplayId, + boolean isHomeIntent, boolean isEdgeCase) { + return new SystemTaskContext(uuid, securityToken, launchFlag, launchPackage, displayId, sourceDisplayId, + reuseDisplayId, isHomeIntent, isEdgeCase); + } + + private SystemTaskContext(Parcel in) { + uuid = in.readString(); + securityToken = in.readString(); + launchFlag = in.readInt(); + launchFromPackage = in.readString(); + displayId = in.readInt(); + sourceDisplayId = in.readInt(); + reuseDisplayId = in.readInt(); + isHomeIntent = in.readBoolean(); + isEdgeCase = in.readBoolean(); + } + + public @Nullable String getUuid() { + return uuid; + } + + public void setUuid(@Nullable String uuid) { + this.uuid = uuid; + } + + public @Nullable String getSecurityToken() { + return securityToken; + } + + public void setSecurityToken(@Nullable String securityToken) { + this.securityToken = securityToken; + } + + public int getLaunchFlag() { + return launchFlag; + } + + public void setLaunchFlag(int launchFlag) { + this.launchFlag = launchFlag; + } + + public @Nullable String getLaunchFromPackage() { + return launchFromPackage; + } + + public void setLaunchFromPackage(@Nullable String launchFromPackage) { + this.launchFromPackage = launchFromPackage; + } + + public int getDisplayId() { + return displayId; + } + + public void setDisplayId(int displayId) { + this.displayId = displayId; + } + + public int getSourceDisplayId() { + return sourceDisplayId; + } + + public void setSourceDisplayId(int sourceDisplayId) { + this.sourceDisplayId = sourceDisplayId; + } + + public int getReuseDisplayId() { + return reuseDisplayId; + } + + public void setResueDisplayId(int reuseDisplayId) { + this.reuseDisplayId = reuseDisplayId; + } + + public boolean isHomeIntent() { + return isHomeIntent; + } + + public void setHomeIntent(boolean isHomeIntent) { + this.isHomeIntent = isHomeIntent; + } + + public boolean isEdgeCase() { + return isEdgeCase; + } + + public void setEdgeCase(boolean isEdgeCase) { + this.isEdgeCase = isEdgeCase; + } + + public static final @NonNull Creator<SystemTaskContext> CREATOR = new Parcelable.Creator<SystemTaskContext>() { + @Override + public SystemTaskContext createFromParcel(Parcel in) { + return new SystemTaskContext(in); + } + + @Override + public SystemTaskContext[] newArray(int size) { + return new SystemTaskContext[size]; + } + }; + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + dest.writeString(uuid); + dest.writeString(securityToken); + dest.writeInt(launchFlag); + dest.writeString(launchFromPackage); + dest.writeInt(displayId); + dest.writeInt(sourceDisplayId); + dest.writeInt(reuseDisplayId); + dest.writeBoolean(isHomeIntent); + dest.writeBoolean(isEdgeCase); + } +} diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java index ee888ed7d872..0a8710b55c39 100644 --- a/core/java/android/app/WallpaperManager.java +++ b/core/java/android/app/WallpaperManager.java @@ -752,7 +752,7 @@ public class WallpaperManager { cmProxy.doColorManagement(decoder, info); } })); - } catch (OutOfMemoryError | IOException e) { + } catch (OutOfMemoryError | IOException | ArrayIndexOutOfBoundsException e) { Log.w(TAG, "Can't decode file", e); } } diff --git a/core/java/android/bluetooth/BluetoothDeviceGroup.java b/core/java/android/bluetooth/BluetoothDeviceGroup.java new file mode 100644 index 000000000000..a0215829c8f0 --- /dev/null +++ b/core/java/android/bluetooth/BluetoothDeviceGroup.java @@ -0,0 +1,892 @@ +/****************************************************************************** + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +package android.bluetooth; + +import android.annotation.RequiresPermission; +import android.bluetooth.annotations.RequiresBluetoothConnectPermission; +import android.bluetooth.annotations.RequiresBluetoothScanPermission; +import android.compat.annotation.UnsupportedAppUsage; +import android.content.AttributionSource; +import android.annotation.SdkConstant; +import android.annotation.SdkConstant.SdkConstantType; +import android.bluetooth.IBluetoothGroupCallback; +import android.content.Context; +import android.os.Binder; +import android.os.Handler; +import android.os.IBinder; +import android.os.ParcelUuid; +import android.os.RemoteException; +import android.util.Log; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + + +/** + * This class provides the public APIs to perform operations of + * the Group Identification Profile. + * + * <p> This class provides functionalities to enable communication with remote + * devices which are grouped together to achieve common use cases in + * synchronized manner. + * <p> BluetoothDeviceGroup is a proxy object for controlling the Bluetooth Group + * Service via IPC. Use {@link BluetoothAdapter#getProfileProxy} to get the BluetoothDeviceGroup + * proxy object. Use {@link BluetoothAdapter#closeProfileProxy} to close connection + * of the BluetoothDeviceGroup proxy object with the profile service. + * <p> BluetoothDeviceGroup proxy object can be used to identify and fetch Device Group. + * Also, API’s are exposed to get exclusive access of group devices for critical + * operations. Implement BluetoothGroupCallback to get results invoked API's. + * + * @hide + */ + + +public final class BluetoothDeviceGroup implements BluetoothProfile { + private static final String TAG = "BluetoothDeviceGroup"; + private static final boolean DBG = true; + private static final boolean VDBG = false; + + /** Group Client App is registerd for callbacks successfully */ + public static final int APP_REGISTRATION_SUCCESSFUL = 0; + /** Group Client App registration failed for callbacks */ + public static final int APP_REGISTRATION_FAILED = 1; + + /** Group Discovery Status when discovery is started */ + public static final int GROUP_DISCOVERY_STARTED = 0x00; + + /** Group Discovery Status when discovery is stopped */ + public static final int GROUP_DISCOVERY_STOPPED = 0x01; + + /** When Application starts Group discovery */ + public static final int DISCOVERY_STARTED_BY_APPL = 0x00; + + /** When Application stops Group discovery */ + public static final int DISCOVERY_STOPPED_BY_APPL = 0x01; + + /** When Group discovery is started as a result of + * change in Group property. */ + public static final int DISCOVERY_STARTED_GROUP_PROP_CHANGED = 0x02; + + /** When all devices of Group are discovered */ + public static final int DISCOVERY_COMPLETED = 0x03; + + /** Group discovery by timeeut. Group device not found in 10 sec. */ + public static final int DISCOVERY_STOPPED_BY_TIMEOUT = 0x04; + + /** Invalid params are provided for Group discovery */ + public static final int DISCOVERY_NOT_STARTED_INVALID_PARAMS = 0x05; + + /** Value to release Exclusive Access */ + public static final int ACCESS_RELEASED = 0x01; + + /** Value to acquire Exclusive Access */ + public static final int ACCESS_GRANTED = 0x02; + + /** When exclusive access is changed to #ACCESS_RELEASED for all reqested Group devices */ + public static final int EXCLUSIVE_ACCESS_RELEASED = 0x00; + + /** When exclusive access of the Group device is changed to #ACCESS_RELEASED by timeout */ + public static final int EXCLUSIVE_ACCESS_RELEASED_BY_TIMEOUT = 0x01; + + /** When exclusive access of all requested Group devices is changed to #ACCESS_GRANTED */ + public static final int ALL_DEVICES_GRANTED_ACCESS = 0x02; + + /** When exclusive access of some of the requested Group devices is changed to #ACCESS_GRANTED + * because of timeout in #setExclusiveAccess operation */ + public static final int SOME_GRANTED_ACCESS_REASON_TIMEOUT = 0x03; + + /** When access value of some of the requested Group devices is changed to #ACCESS_GRANTED + * because some of the Group devices were disconnected */ + public static final int SOME_GRANTED_ACCESS_REASON_DISCONNECTION = 0x04; + + /** When Exclusive Access couldnt be fetched as one of the Group devices denied + * to set value to #ACCESS_DENIED*/ + public static final int ACCESS_DENIED = 0x05; + + /** Suggests that invalid parameters are passed in #setExclusiveAccess request*/ + public static final int INVALID_ACCESS_REQ_PARAMS = 0x06; + + /** Invalid Group ID */ + public static final int INVALID_GROUP_ID = 0x10; + + /** MIN GROUP_ID Value*/ + public static final int GROUP_ID_MIN = 0x00; + /** MAX GROUP_ID Value*/ + public static final int GROUP_ID_MAX = 0x0F; + + /** Invalid APP ID */ + public static final int INVALID_APP_ID = 0x10; + + /** MIN APP_ID Value*/ + public static final int APP_ID_MIN = 0x00; + /** MAX APP_ID Value*/ + public static final int APP_ID_MAX = 0x0F; + + public static final String ACTION_CONNECTION_STATE_CHANGED = + "android.bluetooth.group.profile.action.CONNECTION_STATE_CHANGED"; + + private int mAppId; + private boolean mAppRegistered = false; + private Handler mHandler; + private BluetoothGroupCallback mCallback; + + private BluetoothAdapter mAdapter; + private final AttributionSource mAttributionSource; + private final BluetoothProfileConnector<IBluetoothDeviceGroup> mProfileConnector = + new BluetoothProfileConnector(this, BluetoothProfile.GROUP_CLIENT, + "BluetoothDeviceGroup", IBluetoothDeviceGroup.class.getName()) { + @Override + public IBluetoothDeviceGroup getServiceInterface(IBinder service) { + return IBluetoothDeviceGroup.Stub.asInterface(Binder.allowBlocking(service)); + } + }; + + /** + * Creates a BluetoothDeviceGroup proxy object for interacting with the local + * Bluetooth Service which handles Group operations. + * @hide + */ + /*package*/ BluetoothDeviceGroup(Context context, ServiceListener listener) { + mProfileConnector.connect(context, listener); + mAdapter = BluetoothAdapter.getDefaultAdapter(); + mAttributionSource = mAdapter.getAttributionSource(); + IBluetoothManager mgr = mAdapter.getBluetoothManager(); + if (mgr != null) { + try { + mgr.registerStateChangeCallback(mBluetoothStateChangeCallback); + } catch (RemoteException re) { + Log.e(TAG, "", re); + } + } + } + + private final IBluetoothStateChangeCallback mBluetoothStateChangeCallback = + new IBluetoothStateChangeCallback.Stub() { + public void onBluetoothStateChange(boolean up) { + if (!up) { + mAppRegistered = false; + } + } + }; + + /** + * Close this BluetoothGroupDevice client object. + * + * Application should call this method as soon as it is done with + * Group operations. + */ + public void close() { + if (VDBG) log("close()"); + + mAppRegistered = false; + final IBluetoothDeviceGroup service = getService(); + if (service != null) { + try { + service.unregisterGroupClientApp(mAppId, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + } + } + + mProfileConnector.disconnect(); + } + + /** + * @hide + */ + private IBluetoothDeviceGroup getService() { + return mProfileConnector.getService(); + } + + /** + * {@inheritDoc} + */ + @Override + public void finalize() { + close(); + } + + /** + * {@inheritDoc} + */ + @Override + public List<BluetoothDevice> getConnectedDevices() { + if (VDBG) log("getConnectedDevices()"); + + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) { + if (VDBG) log("getDevicesMatchingStates()"); + + return null; + } + + private boolean isEnabled() { + return mAdapter.getState() == BluetoothAdapter.STATE_ON; + } + + private static boolean isValidDevice(BluetoothDevice device) { + return device != null && + BluetoothAdapter.checkBluetoothAddress(device.getAddress()); + } + + /** + * {@inheritDoc} + */ + @Override + public int getConnectionState(BluetoothDevice device) { + if (VDBG) log("getState(" + device + ")"); + return BluetoothProfile.STATE_DISCONNECTED; + } + + private final IBluetoothGroupCallback.Stub mBluetoothGroupCallback = + new IBluetoothGroupCallback.Stub() { + + @Override + public void onGroupClientAppRegistered(int status, int appId) { + if (DBG) { + Log.d(TAG, "onGroupClientAppRegistered() - status=" + status + + " appId = " + appId); + } + + if (status != APP_REGISTRATION_SUCCESSFUL) { + mAppRegistered = false; + } + + mAppId = appId; + runOrQueueCallback(new Runnable() { + @Override + public void run() { + final BluetoothGroupCallback callback = mCallback; + if (callback != null) { + callback.onGroupClientAppRegistered(status, appId); + } + } + }); + } + + @Override + public void onGroupClientAppUnregistered(int status) { + if (DBG) { + Log.d(TAG, "onGroupClientAppUnregistered() - status=" + status + + " mAppId=" + mAppId); + } + } + + @Override + public void onConnectionStateChanged (int state, BluetoothDevice device) { + if (DBG) { + Log.d(TAG, "onConnectionStateChanged() - state = " + state + + " device = " + device); + } + + runOrQueueCallback(new Runnable() { + @Override + public void run() { + final BluetoothGroupCallback callback = mCallback; + if (callback != null) { + callback.onConnectionStateChanged(state, device); + } + } + }); + } + + @Override + public void onNewGroupFound(int groupId, BluetoothDevice device, + ParcelUuid uuid) { + if (DBG) { + Log.d(TAG, "onNewGroupFound() - appId = " + mAppId + + ", groupId = " + groupId + ", device: " + device + + ", Including service UUID: " + uuid.toString()); + } + + runOrQueueCallback(new Runnable() { + @Override + public void run() { + final BluetoothGroupCallback callback = mCallback; + if (callback != null) { + callback.onNewGroupFound(groupId, device, uuid.getUuid()); + } + } + }); + } + + @Override + public void onGroupDiscoveryStatusChanged(int groupId, int status, int reason) { + if (DBG) { + Log.d(TAG, "onGroupDiscoveryStatusChanged() - appId = " + mAppId + + ", groupId = " + groupId + ", status: " + status + + ", reason: " + reason); + } + + runOrQueueCallback(new Runnable() { + @Override + public void run() { + final BluetoothGroupCallback callback = mCallback; + if (callback != null) { + callback.onGroupDiscoveryStatusChanged(groupId, status, reason); + } + } + }); + } + + @Override + public void onGroupDeviceFound(int groupId, BluetoothDevice device) { + if (DBG) { + Log.d(TAG, "onGroupDeviceFound() - appId = " + mAppId + ", device = " + device); + } + + runOrQueueCallback(new Runnable() { + @Override + public void run() { + final BluetoothGroupCallback callback = mCallback; + if (callback != null) { + callback.onGroupDeviceFound(groupId, device); + } + } + }); + } + + @Override + public void onExclusiveAccessChanged(int groupId, int value, int status, + List<BluetoothDevice> devices) { + if (DBG) { + Log.d(TAG, "onExclusiveAccessChanged() - appId = " + mAppId + + ", groupId = " + groupId + ", value = " + value + + " accessStatus = " + status + ", devices: " + devices); + } + + runOrQueueCallback(new Runnable() { + @Override + public void run() { + final BluetoothGroupCallback callback = mCallback; + if (callback != null) { + callback.onExclusiveAccessChanged(groupId, value, status, devices); + } + } + }); + } + + @Override + public void onExclusiveAccessStatusFetched(int groupId, int accessValue) { + } + + @Override + public void onExclusiveAccessAvailable (int groupId, BluetoothDevice device) { + if (DBG) { + Log.d(TAG, "onExclusiveAccessAvailable() - appId = " + mAppId + + ", groupId = " + groupId + ", device: " + device); + } + + runOrQueueCallback(new Runnable() { + @Override + public void run() { + final BluetoothGroupCallback callback = mCallback; + if (callback != null) { + callback.onExclusiveAccessAvailable(groupId, device); + } + } + }); + } + }; + + /** + * Registers callbacks to be received by application on completion of + * required operations. + * + * @param callbacks Reference of BluetoothGroupCallback implemented in + * application. + * @param handler handler that will receive asynchronous callbacks. + * @return true, if operation was initiated successfully. + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public boolean registerGroupClientApp(BluetoothGroupCallback callbacks, Handler handler) { + if (DBG) log("registerGroupClientApp() mAppRegistered = " + mAppRegistered); + + /* Check if app is trying multiple registrations */ + if (mAppRegistered) { + Log.e(TAG, "App already registered."); + return false; + } + + mHandler = handler; + mCallback = callbacks; + + final IBluetoothDeviceGroup service = getService(); + if (service == null) { + Log.e(TAG, "Proxy not attached to Profile Service. Can't register App."); + return false; + } + + mAppRegistered = true; + try { + UUID uuid = UUID.randomUUID(); + service.registerGroupClientApp(new ParcelUuid(uuid), mBluetoothGroupCallback, + mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + } + return true; + } + + /** + * Starts discovery of the remaining Group devices which are part of the group. + * + * <p> This API should be called when onNewGroupFound() is received in the + * application and when given group is the required device group. This + * API can also be used to rediscover the undiscovered Group devices. + * + * <p> To the application that started group discovery, + * {@link BluetoothGroupCallback#onGroupDeviceFound} callback will be given when + * a new Group device is found and {@link BluetoothGroupCallback#onGroupDiscoveryStatusChanged} + * callback will be given when discovery is started. + * + * @param groupId Identifier of the Group for which group + * discovery has to be started. + * @return true, if operation was initiated successfully. + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public boolean startGroupDiscovery(int groupId) { + if (DBG) log("startGroupDiscovery() : groupId = " + groupId); + + if (!mAppRegistered) { + Log.e(TAG, "App not registered for Group operations." + + " Register App using registerGroupClientApp"); + return false; + } + + final IBluetoothDeviceGroup service = getService(); + if (service == null) { + Log.e(TAG, "Proxy is not attached to Profile Service. Can't start group discovery"); + return false; + } + + try { + UUID uuid = UUID.randomUUID(); + service.startGroupDiscovery(mAppId ,groupId, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + } + return true; + } + + /** + * Stops ongoing group discovery for Group identified by groupId. + * + * <p> {@link BluetoothGroupCallback#onGroupDiscoveryStatusChanged} is given + * when group discovery is stopped. + * + * @param groupId Identifier of the Group for which group + * discovery has to be stopped. + * @return true, if operation was initiated successfully. + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public boolean stopGroupDiscovery(int groupId) { + if (DBG) log("stopGroupDiscovery() : groupId = " + groupId); + + if (!mAppRegistered) { + Log.e(TAG, "App not registered for Group operations." + + " Register App using registerGroupClientApp"); + return false; + } + + final IBluetoothDeviceGroup service = getService(); + if (service == null) { + Log.e(TAG, "Proxy is not attached to Profile Service. Can't Stop group discovery"); + return false; + } + + try { + service.stopGroupDiscovery(mAppId ,groupId, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + } + return true; + } + + /** + * Fetches already discovered Groups. + * + * @return List of DeviceGroup that are already discovered. + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public List<DeviceGroup> getDiscoveredGroups() { + return getDiscoveredGroups(false); + } + + /** + * Fetches already discovered device groups. + * + * @param mPublicAddr All discovered device groups with public address of devices. + * @return List of Device Groups that are already discovered. + * @hide + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public List<DeviceGroup> getDiscoveredGroups(boolean mPublicAddr) { + if (DBG) log("getDiscoveredGroups()"); + + if (!mAppRegistered) { + Log.e(TAG, "App not registered for Group operations." + + " Register App using registerGroupClientApp"); + return null; + } + + final IBluetoothDeviceGroup service = getService(); + if (service == null) { + Log.e(TAG, "Proxy is not attached to Profile Service. Can't fetch Groups."); + return null; + } + + try { + List<DeviceGroup> groups = service.getDiscoveredGroups(mPublicAddr, mAttributionSource); + return groups; + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + } + + return null; + } + + /** + * Fetch details of a already discovered Group identified by groupId. + * + * @param groupId Identifier of the Group for which Group details are required. + * @return Required DeviceGroup. + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public DeviceGroup getGroup(int groupId) { + return getGroup(groupId, false); + } + + /** + * Fetch details of a already discovered Group identified by groupId. + * + * @param groupId Identifier of the device group for which group + * details are required. + * @param mPublicAddr DeviceGroup with Public Address of the group devices. + * @return Required DeviceGroup. + * @hide + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public DeviceGroup getGroup(int groupId, boolean mPublicAddr) { + if (DBG) log("getGroup() : groupId = " + groupId); + + if (!mAppRegistered) { + Log.e(TAG, "App not registered for Group operations." + + " Register App using registerGroupClientApp"); + return null; + } + + final IBluetoothDeviceGroup service = getService(); + if (service == null) { + Log.e(TAG, "Proxy is not attached to Profile Service. Can't fetch Group."); + return null; + } + + try { + DeviceGroup group = service.getDeviceGroup(groupId, mPublicAddr, mAttributionSource); + return group; + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + } + + return null; + } + + /** + * Get Group Identifier of the remote device to which it belongs. + * + * @param device BluetoothDevice instance of the remote device. + * @param uuid ParcelUuid of the primary service in which this + * Group Service is included. + * @return Group identifier of the required device. + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public int getRemoteDeviceGroupId (BluetoothDevice device, ParcelUuid uuid) { + return getRemoteDeviceGroupId(device, uuid, false); + } + + /** + * Get Group Identifier of the remote device to which it belongs. + * + * @param device BluetoothDevice instance of the remote device. + * @param uuid ParcelUuid of the primary service in which this + * Group Service is included. + * @param mPublicAddr Suggests that group identifier is required for passed + * public address of the remote device. + * @return Group identifier of the required group for the device + * @hide + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public int getRemoteDeviceGroupId (BluetoothDevice device, ParcelUuid uuid, + boolean mPublicAddr) { + if (DBG) log("getRemoteDeviceGroupId() : device = " + device); + + if (!mAppRegistered) { + Log.e(TAG, "App not registered for Group operations." + + " Register App using registerGroupClientApp"); + return INVALID_GROUP_ID; + } + + final IBluetoothDeviceGroup service = getService(); + if (service == null) { + Log.e(TAG, "Proxy is not attached to Profile Service." + + "Can't get group id for device."); + return INVALID_GROUP_ID; + } + + try { + return service.getRemoteDeviceGroupId(device, uuid, mPublicAddr, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + } + return INVALID_GROUP_ID; + } + + /** + * Suggests whether discovery for a given Group is ongoing. + * + * @param groupId Identifier of the Group for which discovery + * status is to be known. + * @return true, if group discovery is ongoing for mentioned group. + * Otherwise, false. + */ + @RequiresBluetoothScanPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) + public boolean isGroupDiscoveryInProgress (int groupId) { + if (DBG) log("isGroupDiscoveryInProgress() : groupId = " + groupId); + + if (!mAppRegistered) { + Log.e(TAG, "App not registered for Group operations." + + " Register App using registerGroupClientApp"); + return false; + } + + final IBluetoothDeviceGroup service = getService(); + if (service == null) { + Log.e(TAG, "Proxy is not attached to Profile Service.Can't get discovery status."); + return false; + } + + try { + return service.isGroupDiscoveryInProgress(groupId, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + } + return false; + } + + /** + * Acquires/Releases exclusive access of a given Group or subgroup. + * The result of this operation is returned in + * {@link BluetoothGroupCallback#onExclusiveAccessChanged} callback. + * + * @param groupId Identifier of the Group. + * @param devices List of BluetoothDevice for which access has to be changed. + * If this parameter is passed as null, all Group devices in the + * mentioned group will be considered for request. + * @param value Access which required to be changed. + * 0x01 – Access released ({@link #ACCESS_RELEASED}). + * 0x02 - Access granted ({@link #ACCESS_GRANTED}). + * @return true, if operation was initiated successfully. + */ + @RequiresPermission(allOf = { + android.Manifest.permission.BLUETOOTH_CONNECT, + android.Manifest.permission.BLUETOOTH_PRIVILEGED, + }) + public boolean setExclusiveAccess(int groupId, List<BluetoothDevice> devices, int value) { + if (DBG) log("setExclusiveAccess() : groupId = " + groupId + + ", access value: " + value); + + if (!mAppRegistered) { + Log.e(TAG, "App not registered for Group operations." + + " Register App using registerGroupClientApp"); + return false; + } + + final IBluetoothDeviceGroup service = getService(); + if (service == null) { + Log.e(TAG, "Proxy is not attached to Profile Service. Can't proceed."); + return false; + } + + try { + service.setExclusiveAccess(mAppId, groupId, devices, value, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + } + return true; + } + + /** + * Returns Status of the exclusive access for mentioned Group. + * + * @param groupId Identifier of the Group. + * @param devices List of BluetoothDevice for which access value has to be known. + * If this parameter is passed as null, all Group devices in the + * mentioned group will be queried for access status. + * @return true, if operation was initiated successfully. + * @hide + */ + @RequiresPermission(allOf = { + android.Manifest.permission.BLUETOOTH_CONNECT, + android.Manifest.permission.BLUETOOTH_PRIVILEGED, + }) + public boolean getExclusiveAccessStatus (int groupId, List<BluetoothDevice> devices) { + if (DBG) log("getExclusiveAccessStatus() : groupId = " + groupId); + + if (!mAppRegistered) { + Log.e(TAG, "App not registered for Group operations." + + " Register App using registerGroupClientApp"); + return false; + } + + final IBluetoothDeviceGroup service = getService(); + if (service == null) { + Log.e(TAG, "Proxy is not attached to Profile Service." + + " Can't get exclusive access status."); + return false; + } + + try { + service.getExclusiveAccessStatus(mAppId, groupId, devices, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + } + return true; + } + + /** + * Creates GATT Connection with remote device for Group Operations. + * + * <p> This API acts as trigger to start service discovery to identify + * new device group on remote device once connection has been established + * successfully. Application calling connect will get + * {@link BluetoothGroupCallback#onNewGroupFoundcallback} after + * {@link #onConnectionStateChanged} (once connection has been established + * and group discovery is completed.) + * + * @param device BluetoothDevice instance od remote device with which + * Connection is required to be established. + * @return true, if operation was initiated successfully. + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public boolean connect (BluetoothDevice device) { + if (DBG) log("connect : device = " + device); + + if (!mAppRegistered) { + Log.e(TAG, "App not registered for Group operations." + + " Register App using registerGroupClientApp"); + return false; + } + + final IBluetoothDeviceGroup service = getService(); + if (service == null) { + Log.e(TAG, "Proxy is not attached to Profile Service. Can't connect."); + return false; + } + + try { + service.connect(mAppId, device, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + } + return true; + } + + /** + * Initiates GATT disconnection for Group Operations. + * + * @param device BluetoothDevice instance of remote device. + * This API must be called if application is not + * interested in any Group operations. + * @return true, if operation was initiated successfully. + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public boolean disconnect (BluetoothDevice device) { + if (DBG) log("disconnect : device = " + device); + + if (!mAppRegistered) { + Log.e(TAG, "App not registered for Group operations." + + " Register App using registerGroupClientApp"); + return false; + } + + final IBluetoothDeviceGroup service = getService(); + if (service == null) { + Log.e(TAG, "Proxy is not attached to Profile Service. Can't disconnect"); + return false; + } + + try { + service.disconnect(mAppId, device, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + } + return true; + } + + private static void log(String msg) { + Log.d(TAG, msg); + } + + /** + * Queue the runnable on a {@link Handler} provided by the user, or execute the runnable + * immediately if no Handler was provided. + */ + private void runOrQueueCallback(final Runnable cb) { + if (mHandler == null) { + try { + cb.run(); + } catch (Exception ex) { + Log.w(TAG, "Unhandled exception in callback", ex); + } + } else { + mHandler.post(cb); + } + } +} diff --git a/core/java/android/bluetooth/BluetoothDun.java b/core/java/android/bluetooth/BluetoothDun.java new file mode 100644 index 000000000000..6b99b5bc235f --- /dev/null +++ b/core/java/android/bluetooth/BluetoothDun.java @@ -0,0 +1,296 @@ +/* +*Copyright (c) 2018, The Linux Foundation. All rights reserved. +* +*Redistribution and use in source and binary forms, with or without +*modification, are permitted provided that the following conditions are +*met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials provided +* with the distribution. +* * Neither the name of The Linux Foundation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +*THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +*WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +*MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +*ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +*BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +*CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +*SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +*WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +*OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +*IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + + +package android.bluetooth; + +import android.annotation.SdkConstant; +import android.annotation.SdkConstant.SdkConstantType; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.content.ServiceConnection; +import android.os.IBinder; +import android.os.RemoteException; +import android.util.Log; + +import java.util.ArrayList; +import java.util.List; + +/** + * This class provides the APIs to control the Bluetooth Dun + * Profile. + * + *<p>BluetoothDun is a proxy object for controlling the Bluetooth DUN + * Service via IPC. Use {@link BluetoothAdapter#getProfileProxy} to get + * the BluetoothDun proxy object. + * + *<p>Each method is protected with its appropriate permission. + *@hide + */ +public final class BluetoothDun implements BluetoothProfile { + private static final String TAG = "BluetoothDun"; + private static final boolean DBG = false; + private static final boolean VDBG = false; + + /** + * Intent used to broadcast the change in connection state of the Dun + * profile. + * + * <p>This intent will have 3 extras: + * <ul> + * <li> {@link #EXTRA_STATE} - The current state of the profile. </li> + * <li> {@link #EXTRA_PREVIOUS_STATE}- The previous state of the profile.</li> + * <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. </li> + * </ul> + * + * <p>{@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} can be any of + * {@link #STATE_DISCONNECTED}, {@link #STATE_CONNECTED}. + * + * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission to + * receive. + */ + @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + public static final String ACTION_CONNECTION_STATE_CHANGED = + "codeaurora.bluetooth.dun.profile.action.CONNECTION_STATE_CHANGED"; + + private Context mContext; + private ServiceListener mServiceListener; + private BluetoothAdapter mAdapter; + private IBluetoothDun mDunService; + + /** + * Create a BluetoothDun proxy object for interacting with the local + * Bluetooth Service which handles the Dun profile + * + */ + /*package*/ BluetoothDun(Context context, ServiceListener l) { + mContext = context; + mServiceListener = l; + mAdapter = BluetoothAdapter.getDefaultAdapter(); + try { + mAdapter.getBluetoothManager().registerStateChangeCallback(mStateChangeCallback); + } catch (RemoteException re) { + Log.w(TAG,"Unable to register BluetoothStateChangeCallback",re); + } + Log.d(TAG, "BluetoothDun() call bindService"); + doBind(); + } + + boolean doBind() { + Intent intent = new Intent(IBluetoothDun.class.getName()); + ComponentName comp = intent.resolveSystemService(mContext.getPackageManager(), 0); + intent.setComponent(comp); + if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0, + android.os.Process.myUserHandle())) { + Log.e(TAG, "Could not bind to Bluetooth Dun Service with " + intent); + return false; + } + return true; + } + + + public void close() { + if (VDBG) log("close()"); + mServiceListener = null; + IBluetoothManager mgr = mAdapter.getBluetoothManager(); + if (mgr != null) { + try { + mgr.unregisterStateChangeCallback(mStateChangeCallback); + } catch (RemoteException re) { + Log.w(TAG,"Unable to unregister BluetoothStateChangeCallback",re); + } + } + + synchronized (mConnection) { + if ( mDunService != null) { + try { + mDunService = null; + mContext.unbindService(mConnection); + } catch (Exception re) { + Log.e(TAG,"",re); + } + } + } + } + + protected void finalize() { + close(); + } + + private IBluetoothStateChangeCallback mStateChangeCallback = + new IBluetoothStateChangeCallback.Stub() { + + @Override + public void onBluetoothStateChange(boolean on) { + //Handle enable request to bind again. + Log.d(TAG, "onBluetoothStateChange on: " + on); + if (on) { + try { + if (mDunService == null) { + Log.d(TAG, "onBluetoothStateChange call bindService"); + doBind(); + } + } catch (IllegalStateException e) { + Log.e(TAG,"onBluetoothStateChange: could not bind to DUN service: ", e); + } catch (SecurityException e) { + Log.e(TAG,"onBluetoothStateChange: could not bind to DUN service: ", e); + } + } else { + if (VDBG) Log.d(TAG,"Unbinding service..."); + synchronized (mConnection) { + if ( mDunService != null) { + try { + mDunService = null; + mContext.unbindService(mConnection); + } catch (Exception re) { + Log.e(TAG,"",re); + } + } + } + } + } + }; + + /** + * Initiate disconnection from DUN server. + * + * <p> Once the disconnection is initiated by any device either local host + * or remote device, the state will transition from {@link #STATE_CONNECTED} + * to {@link #STATE_DISCONNECTED}. + * + * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN} + * permission. + * + * @param device Remote Bluetooth Device + * @return false on immediate error, + * true otherwise + * @hide + */ + public boolean disconnect(BluetoothDevice device) { + if (DBG) log("disconnect(" + device + ")"); + if (mDunService != null && isEnabled() && + isValidDevice(device)) { + try { + return mDunService.disconnect(device); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + return false; + } + } + if (mDunService == null) Log.w(TAG, "Proxy not attached to service"); + return false; + } + /** + * {@inheritDoc} + */ + public List<BluetoothDevice> getConnectedDevices() { + if (VDBG) log("getConnectedDevices()"); + if (mDunService != null && isEnabled()) { + try { + return mDunService.getConnectedDevices(); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + return new ArrayList<BluetoothDevice>(); + } + } + if (mDunService == null) Log.w(TAG, "Proxy not attached to service"); + return new ArrayList<BluetoothDevice>(); + } + + /** + * {@inheritDoc} + */ + public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) { + if (VDBG) log("getDevicesMatchingStates()"); + if (mDunService != null && isEnabled()) { + try { + return mDunService.getDevicesMatchingConnectionStates(states); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + return new ArrayList<BluetoothDevice>(); + } + } + if (mDunService == null) Log.w(TAG, "Proxy not attached to service"); + return new ArrayList<BluetoothDevice>(); + } + + /** + * {@inheritDoc} + */ + public int getConnectionState(BluetoothDevice device) { + if (VDBG) log("getState(" + device + ")"); + if (mDunService != null && isEnabled() + && isValidDevice(device)) { + try { + return mDunService.getConnectionState(device); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + return BluetoothProfile.STATE_DISCONNECTED; + } + } + if (mDunService == null) Log.w(TAG, "Proxy not attached to service"); + return BluetoothProfile.STATE_DISCONNECTED; + } + + private ServiceConnection mConnection = new ServiceConnection() { + public void onServiceConnected(ComponentName className, IBinder service) { + if (DBG) Log.d(TAG, "BluetoothDUN Proxy object connected"); + mDunService = IBluetoothDun.Stub.asInterface(service); + + if (mServiceListener != null) { + mServiceListener.onServiceConnected(BluetoothProfile.DUN, + BluetoothDun.this); + } + } + public void onServiceDisconnected(ComponentName className) { + if (DBG) Log.d(TAG, "BluetoothDUN Proxy object disconnected"); + mDunService = null; + if (mServiceListener != null) { + mServiceListener.onServiceDisconnected(BluetoothProfile.DUN); + } + } + }; + + private boolean isEnabled() { + if (mAdapter.getState() == BluetoothAdapter.STATE_ON) return true; + return false; + } + + private boolean isValidDevice(BluetoothDevice device) { + if (device == null) return false; + + if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true; + return false; + } + + private static void log(String msg) { + Log.d(TAG, msg); + } +} diff --git a/core/java/android/bluetooth/BluetoothGroupCallback.java b/core/java/android/bluetooth/BluetoothGroupCallback.java new file mode 100644 index 000000000000..a818cc77fd3a --- /dev/null +++ b/core/java/android/bluetooth/BluetoothGroupCallback.java @@ -0,0 +1,132 @@ +/****************************************************************************** + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +package android.bluetooth; + +import java.util.UUID; +import java.util.List; +/** + * This abstract class is used to implement {@link BluetoothDeviceGroup} callbacks. + * @hide + */ +public abstract class BluetoothGroupCallback { + /** + * This Callback gives connection state changed with specific group device. + * + * @param state Connection state of the {@link BluetoothProfile} group device. + * @param device Remote device for which connection state has changed. + */ + public void onConnectionStateChanged (int state, BluetoothDevice device) { + } + + /** + * This callback is given when application is registered for Group operation + * callbacks. This callback is given after {@link BluetoothDeviceGroup#registerGroupClientApp} + * is called. + * + * @param status Status of the group client app registration. + * @param appId Identifier of the application for group operations. + */ + public void onGroupClientAppRegistered(int status, int appId) { + } + + /** + * This callback is triggered when a new device group has been identified + * from one of the connected device. After this callback is received, application + * can choose to trigger discovery of device group using API + * {@link BluetoothDeviceGroup#startGroupDiscovery} + * + * @param groupId Identifier of the Device Group. + * @param device Remote device with which Device Group is found. + * @param uuid UUID of the primary Service for this Device Group Service. + */ + public void onNewGroupFound (int groupId, BluetoothDevice device, UUID uuid) { + } + + /** + * This Callback is triggered when device group discovery is either started/stopped. + * + * @param groupId Identifier of the device group. + * @param status Device Group Discovery status. + * {@link BluetoothDeviceGroup#GROUP_DISCOVERY_STARTED} + * or {@link BluetoothDeviceGroup#GROUP_DISCOVERY_STOPPED}. + * @param reason Reason for change in the discovery status. + */ + public void onGroupDiscoveryStatusChanged (int groupId, int status, int reason) { + } + + /** + * This callback is triggered when new group device has been found after group + * discovery has been started. This callback is given on discovery of every + * new group device. + * + * @param groupId Identifier of the device group. + * @param device {@link BluetoothDevice} instance of discovered group device. + */ + public void onGroupDeviceFound (int groupId, BluetoothDevice device) { + } + + /** + * This callback is triggered after exclusive access status of the group + * or subgroup has been changed after the request from application. + * + * @param groupId Identifier of the device group. + * @param value Changed value of the exclusive access. + * @param status Status associated with the exclusive access. + * @param devices List of devices for which exclusive access has been changed. + */ + public void onExclusiveAccessChanged (int groupId, int value, int status, + List<BluetoothDevice> devices) { + } + + /** + * This callback gives access status of requested group/subgroup once + * it is fetched. + * + * @param groupId Identifier of the device group. + * @param accessStatus Value of the Exclusive Access. + */ + public void onExclusiveAccessStatusFetched (int groupId, int accessStatus) { + } + + /** + * This callback is given to application when exclusive access is available + * for the device of a given group for which was denied earlier. + * <p> Exclusive Access is considered available when group device sends notification + * for access changed to BluetoothDeviceGroup#ACCESS_RELEASED. This callback is + * given to the application which has requested the access earlier and the request + * had failed as one of the group device had DENIED the access. + * + * @param groupId Identifier of the device group. + * @param device {@link BluetoothDevice} which has exclusive access available. + */ + public void onExclusiveAccessAvailable (int groupId, BluetoothDevice device) { + } + +}
\ No newline at end of file diff --git a/core/java/android/bluetooth/BluetoothVcp.java b/core/java/android/bluetooth/BluetoothVcp.java new file mode 100644 index 000000000000..fe23dca00ee0 --- /dev/null +++ b/core/java/android/bluetooth/BluetoothVcp.java @@ -0,0 +1,420 @@ +/* + *Copyright (c) 2020, The Linux Foundation. All rights reserved. + *Not a contribution + */ + +/* + * Copyright 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.bluetooth; + +import android.annotation.RequiresPermission; +import android.bluetooth.annotations.RequiresBluetoothConnectPermission; +import android.content.AttributionSource; +import android.content.Context; +import android.os.Binder; +import android.os.IBinder; +import android.os.RemoteException; +import android.util.Log; + +import java.util.ArrayList; +import java.util.List; + +/** + * This class provides the public APIs to control the Bluetooth VCP profile. + * + * <p>BluetoothVcp is a proxy object for controlling the Bluetooth VolumeControl + * Service via IPC. Use {@link BluetoothAdapter#getProfileProxy} to get + * the BluetoothVcp proxy object. + * + * {@hide} + */ +public final class BluetoothVcp implements BluetoothProfile { + private static final String TAG = "BluetoothVcp"; + private static final boolean DBG = true; + private static final boolean VDBG = true; + + /** + * Intent used to broadcast the change in connection state of the VCP + * profile. + * + * <p>This intent will have 3 extras: + * <ul> + * <li> {@link #EXTRA_STATE} - The current state of the profile. </li> + * <li> {@link #EXTRA_PREVIOUS_STATE}- The previous state of the profile.</li> + * <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. </li> + * </ul> + * + * <p>{@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} can be any of + * {@link #STATE_DISCONNECTED}, {@link #STATE_CONNECTING}, + * {@link #STATE_CONNECTED}, {@link #STATE_DISCONNECTING}. + * + * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission to + * receive. + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public static final String ACTION_CONNECTION_STATE_CHANGED = + "android.bluetooth.vcp.profile.action.CONNECTION_STATE_CHANGED"; + + /** + * Intent used to broadcast the volume change of the Volume Renderer device + * + * <p>This intent will have 1 extras: + * <ul> + * <li> {@link #EXTRA_VOLUME} - Current volume settings of Renderer device + * device. Range: 0 - 255. + * + * @hide + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public static final String ACTION_VOLUME_CHANGED = + "android.bluetooth.vcp.profile.action.VOLUME_CHANGED"; + + /** + * A int extra field in {@link #ACTION_VOLUME_CHANGED} + * intents that contains the volume of the Volume Renderer device. + */ + public static final String EXTRA_VOLUME = + "android.bluetooth.vcp.profile.extra.VOLUME"; + + /** + * Intent used to broadcast the mute change of the Volume Renderer device + * + * <p>This intent will have 1 extras: + * <ul> + * <li> {@link #EXTRA_MUTE} - Current mute status of Renderer device + * device. False: unmute, True: mute. + * + * @hide + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public static final String ACTION_MUTE_CHANGED = + "android.bluetooth.vcp.profile.action.MUTE_CHANGED"; + + /** + * A boolean extra field in {@link #ACTION_MUTE_CHANGED} + * intents that contains the mute status of the Volume Renderer device. + */ + public static final String EXTRA_MUTE = + "android.bluetooth.vcp.profile.extra.MUTE"; + + /** + * Intent used to broadcast the connection mode change of the VCP + * + * <p>This intent will have 1 extras: + * <ul> + * <li> {@link #EXTRA_MODE} - Current connection mode of VCP + * can be any of {@link #MODE_NONE}, {@link #MODE_UNICAST}, + * {@link #MODE_BROADCAST}, {@link #MODE_UNICAST_BROADCAST}, + * + * @hide + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public static final String ACTION_CONNECTION_MODE_CHANGED = + "android.bluetooth.vcp.profile.action.CONNECTION_MODE_CHANGED"; + + /** + * A int extra field in {@link #ACTION_CONNECTION_MODE_CHANGED} + * intents that contains the connection mode of the VCP. + */ + public static final String EXTRA_MODE = + "android.bluetooth.vcp.profile.extra.MODE"; + + /** None VCP connection */ + public static final int MODE_NONE = 0x00; + /** VCP connection setup with unicast mode */ + public static final int MODE_UNICAST = 0x01; + /** VCP connection setup with broadcast mode */ + public static final int MODE_BROADCAST = 0x02; + /** VCP connection setup with unicast and broadcast mode */ + public static final int MODE_UNICAST_BROADCAST = 0x03; + + public static final int A2DP = 0x0001; + public static final int HFP = 0x0002; + public static final int LE_MEDIA = 0x0010; + public static final int LE_VOICE = 0x2000; + + public static final int CALL_STREAM = 0; + public static final int MEDIA_STREAM = 1; + + private BluetoothAdapter mAdapter; + private final AttributionSource mAttributionSource; + private final BluetoothProfileConnector<IBluetoothVcp> mProfileConnector = + new BluetoothProfileConnector(this, BluetoothProfile.VCP, + "BluetoothVcp", IBluetoothVcp.class.getName()) { + @Override + public IBluetoothVcp getServiceInterface(IBinder service) { + return IBluetoothVcp.Stub.asInterface( + Binder.allowBlocking(service)); + } + }; + + /** + * Create a BluetoothVcp proxy object for interacting with the local + * Bluetooth VCP service. + */ + /*package*/ BluetoothVcp(Context context, ServiceListener listener) { + mAdapter = BluetoothAdapter.getDefaultAdapter(); + mProfileConnector.connect(context, listener); + mAttributionSource = mAdapter.getAttributionSource(); + } + + public void close() { + mProfileConnector.disconnect(); + } + + private IBluetoothVcp getService() { + return mProfileConnector.getService(); + } + + @Override + public void finalize() { + close(); + } + + /** + * {@inheritDoc} + */ + @Override + public List<BluetoothDevice> getConnectedDevices() { + if (VDBG) log("getConnectedDevices()"); + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) { + if (VDBG) log("getDevicesMatchingStates()"); + return null; + } + + /** + * {@inheritDoc} + */ + @Override + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public int getConnectionState(BluetoothDevice device) { + if (VDBG) log("getConnectionState(" + device + ")"); + final IBluetoothVcp service = + getService(); + if (service != null && isEnabled() && isValidDevice(device)) { + try { + return service.getConnectionState(device, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + return BluetoothProfile.STATE_DISCONNECTED; + } + } + if (service == null) Log.w(TAG, "Proxy not attached to service"); + return BluetoothProfile.STATE_DISCONNECTED; + } + + /** + * Get current VCP Connection mode + * + * @param device: remote device instance + * @return current connection mode of VCP: + * {@link #BluetoothVcp.MODE_NONE} if none VCP connection + * {@link #BluetoothVcp.MODE_UNICAST} if VCP is connected for unicast + * {@link #BluetoothVcp.MODE_BROADCAST} if VCP is connected for broadcast + * {@link #BluetoothVcp.MODE_UNICAST_BROADCAST} if VCP + * is connected for unicast and broadcast + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public int getConnectionMode(BluetoothDevice device) { + if (VDBG) log("getConnectionMode(" + device + ")"); + final IBluetoothVcp service = + getService(); + if (service != null && isEnabled() && isValidDevice(device)) { + try { + return service.getConnectionMode(device, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + return MODE_NONE; + } + } + if (service == null) Log.w(TAG, "Proxy not attached to service"); + return MODE_NONE; + } + + /** + * Set absolute volume to remote device via VCP connection + * + * @param device: remote device instance + * @prarm volume: requested volume settings for remote device + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public void setAbsoluteVolume(BluetoothDevice device, int volume) { + if (VDBG) log("setAbsoluteVolume(" + device + ")"); + final IBluetoothVcp service = + getService(); + if (service != null && isEnabled() && isValidDevice(device)) { + try { + service.setAbsoluteVolume(device, volume, mAttributionSource); + return; + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + return; + } + } + if (service == null) Log.w(TAG, "Proxy not attached to service"); + } + + /** + * Get current absolute volume of the remote device + * + * @param device: remote device instance + * @return current absolute volume of the remote device + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public int getAbsoluteVolume(BluetoothDevice device) { + if (VDBG) log("getAbsoluteVolume(" + device + ")"); + final IBluetoothVcp service = + getService(); + if (service != null && isEnabled() && isValidDevice(device)) { + try { + return service.getAbsoluteVolume(device, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + return -1; + } + } + if (service == null) Log.w(TAG, "Proxy not attached to service"); + return -1; + } + + /** + * Mute or unmute remote device via VCP connection + * + * @param device: remote device instance + * @prarm enableMute: true if mute, false if unmute + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public void setMute(BluetoothDevice device, boolean enableMute) { + if (VDBG) log("setMute(" + device + ")" +" enableMute: " + enableMute); + final IBluetoothVcp service = + getService(); + if (service != null && isEnabled() && isValidDevice(device)) { + try { + service.setMute(device, enableMute, mAttributionSource); + return; + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + return; + } + } + if (service == null) Log.w(TAG, "Proxy not attached to service"); + } + + /** + * Get mute status of remote device + * + * @param device: remote device instance + * @return current mute status of the remote device + * true if mute status, false if unmute status + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public boolean isMute(BluetoothDevice device) { + if (VDBG) log("isMute(" + device + ")"); + final IBluetoothVcp service = + getService(); + if (service != null && isEnabled() && isValidDevice(device)) { + try { + return service.isMute(device, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + return false; + } + } + if (service == null) Log.w(TAG, "Proxy not attached to service"); + return false; + } + + /** + * set active stream for a DuMo device + * + * @param device: remote device instance + * @param audioType: call/media audio + * @param profile: profile that is needed to be active + * @return success/failure + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public boolean setActiveProfile(BluetoothDevice device, int audioType, int profile) { + if (VDBG) log("setActiveProfile(" + device + ")"); + final IBluetoothVcp service = + getService(); + if (service != null && isEnabled() && isValidDevice(device)) { + try { + return service.setActiveProfile(device, audioType, profile, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + return false; + } + } + if (service == null) Log.w(TAG, "Proxy not attached to service"); + return false; + } + + /** + * set active stream for a DuMo device + * + * @param audioType: call/media audio + * @return ID of current active profile + */ + @RequiresBluetoothConnectPermission + @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) + public int getActiveProfile(int audioType) { + if (VDBG) log("getActiveProfile(" + audioType + ")"); + final IBluetoothVcp service = + getService(); + if (service != null && isEnabled()) { + try { + return service.getActiveProfile(audioType, mAttributionSource); + } catch (RemoteException e) { + Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable())); + return -1; + } + } + if (service == null) Log.w(TAG, "Proxy not attached to service"); + return -1; + } + + private boolean isEnabled() { + return mAdapter.getState() == BluetoothAdapter.STATE_ON; + } + + private static boolean isValidDevice(BluetoothDevice device) { + return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress()); + } + + private static void log(String msg) { + Log.d(TAG, msg); + } +} + diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java index b2cd7e90f291..a9eed2b60052 100644 --- a/core/java/android/content/ContentResolver.java +++ b/core/java/android/content/ContentResolver.java @@ -1114,6 +1114,7 @@ public abstract class ContentResolver implements ContentInterface { public final @Nullable Cursor query(@RequiresPermission.Read @NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) { + android.util.SeempLog.record_uri(13, uri); return query(uri, projection, selection, selectionArgs, sortOrder, null); } @@ -1200,6 +1201,7 @@ public abstract class ContentResolver implements ContentInterface { public final @Nullable Cursor query(final @RequiresPermission.Read @NonNull Uri uri, @Nullable String[] projection, @Nullable Bundle queryArgs, @Nullable CancellationSignal cancellationSignal) { + android.util.SeempLog.record_uri(13, uri); Objects.requireNonNull(uri, "uri"); try { @@ -2192,6 +2194,7 @@ public abstract class ContentResolver implements ContentInterface { @Override public final @Nullable Uri insert(@RequiresPermission.Write @NonNull Uri url, @Nullable ContentValues values, @Nullable Bundle extras) { + android.util.SeempLog.record_uri(37, url); Objects.requireNonNull(url, "url"); try { diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index 06635eedeb9a..d79a7275f905 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -4189,6 +4189,7 @@ public abstract class Context { //@hide: ATTESTATION_VERIFICATION_SERVICE, //@hide: SAFETY_CENTER_SERVICE, DISPLAY_HASH_SERVICE, + //@hide: CROSS_DEVICE_SERVICE, CREDENTIAL_SERVICE, DEVICE_LOCK_SERVICE, VIRTUALIZATION_SERVICE, @@ -4521,6 +4522,13 @@ public abstract class Context { /** * Use with {@link #getSystemService(String)} to retrieve a + * {@link CrossDeviceManager} for interacting with the Cross Device Service. + * @hide + */ + public static final String CROSS_DEVICE_SERVICE = "cross_device_service"; + + /** + * Use with {@link #getSystemService(String)} to retrieve a * {@link android.app.UriGrantsManager} for interacting with the global system state. * * @see #getSystemService(String) diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index e763e951fbc1..581ec8fb582f 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -3064,6 +3064,18 @@ public class Intent implements Parcelable, Cloneable { public static final String ACTION_PACKAGE_NEEDS_VERIFICATION = "android.intent.action.PACKAGE_NEEDS_VERIFICATION"; /** + * Broadcast Action: Sent to the optional package verifier when a package + * needs to be verified. The data contains the package URI. + * <p class="note"> + * This is a protected intent. + * </p> + * + * @hide + */ + @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + public static final String ACTION_PACKAGE_NEEDS_OPTIONAL_VERIFICATION = "com.qualcomm.qti.intent.action.PACKAGE_NEEDS_OPTIONAL_VERIFICATION"; + + /** * Broadcast Action: Sent to the system package verifier when a package is * verified. The data contains the package URI. * <p class="note"> @@ -12112,6 +12124,7 @@ public class Intent implements Parcelable, Cloneable { case ACTION_MEDIA_SCANNER_SCAN_FILE: case ACTION_PACKAGE_NEEDS_VERIFICATION: case ACTION_PACKAGE_NEEDS_INTEGRITY_VERIFICATION: + case ACTION_PACKAGE_NEEDS_OPTIONAL_VERIFICATION: case ACTION_PACKAGE_VERIFIED: case ACTION_PACKAGE_ENABLE_ROLLBACK: // Ignore legacy actions diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index 3487e0b1f3e8..2574dd152c7f 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -32,6 +32,8 @@ import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Environment; +import android.os.SystemProperties; +import android.util.DisplayMetrics; import android.os.Parcel; import android.os.Parcelable; import android.os.SystemClock; @@ -888,6 +890,19 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { public static final String METADATA_PRELOADED_FONTS = "preloaded_fonts"; /** + * Boolean indicating whether the resolution of the SurfaceView associated + * with this appplication can be overriden. + * {@hide} + */ + public int overrideRes = 0; + + /** + * In case, app needs different density than device density, set this value. + * {@hide} + */ + public int overrideDensity = 0; + + /** * The required smallest screen width the application can run on. If 0, * nothing has been specified. Comes from * {@link android.R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp @@ -1910,6 +1925,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { flags = orig.flags; privateFlags = orig.privateFlags; privateFlagsExt = orig.privateFlagsExt; + overrideRes = orig.overrideRes; + overrideDensity = orig.overrideDensity; requiresSmallestWidthDp = orig.requiresSmallestWidthDp; compatibleWidthLimitDp = orig.compatibleWidthLimitDp; largestWidthLimitDp = orig.largestWidthLimitDp; @@ -1997,6 +2014,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { dest.writeInt(flags); dest.writeInt(privateFlags); dest.writeInt(privateFlagsExt); + dest.writeInt(overrideRes); + dest.writeInt(overrideDensity); dest.writeInt(requiresSmallestWidthDp); dest.writeInt(compatibleWidthLimitDp); dest.writeInt(largestWidthLimitDp); @@ -2100,6 +2119,8 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { flags = source.readInt(); privateFlags = source.readInt(); privateFlagsExt = source.readInt(); + overrideRes = source.readInt(); + overrideDensity = source.readInt(); requiresSmallestWidthDp = source.readInt(); compatibleWidthLimitDp = source.readInt(); largestWidthLimitDp = source.readInt(); @@ -2660,6 +2681,11 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { return output.toArray(new String[output.size()]); } + /** @hide */ + public int getOverrideDensity() { + return overrideDensity; + } + /** {@hide} */ public void setCodePath(String codePath) { scanSourceDir = codePath; } /** {@hide} */ public void setBaseCodePath(String baseCodePath) { sourceDir = baseCodePath; } /** {@hide} */ public void setSplitCodePaths(String[] splitCodePaths) { splitSourceDirs = splitCodePaths; } @@ -2675,6 +2701,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { public void setRequestRawExternalStorageAccess(@Nullable Boolean value) { requestRawExternalStorageAccess = value; } + /** {@hide} */ public void setOverrideRes(int overrideResolution) { overrideRes = overrideResolution; } /** * Replaces {@link #mAppClassNamesByProcess}. This takes over the ownership of the passed map. @@ -2710,7 +2737,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { public int getMemtagMode() { return memtagMode; } - /** * Returns whether the application has requested automatic zero-initialization of native heap * memory allocations to be enabled or disabled. @@ -2807,4 +2833,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { privateFlagsExt &= ~PRIVATE_FLAG_EXT_ENABLE_ON_BACK_INVOKED_CALLBACK; } } + + /** {@hide} */ public int canOverrideRes() { return overrideRes; } } diff --git a/core/java/android/content/res/CompatibilityInfo.java b/core/java/android/content/res/CompatibilityInfo.java index 08ba5b6c268c..493b30c15d9e 100644 --- a/core/java/android/content/res/CompatibilityInfo.java +++ b/core/java/android/content/res/CompatibilityInfo.java @@ -35,6 +35,7 @@ import android.view.InsetsState; import android.view.MotionEvent; import android.view.WindowManager; import android.view.WindowManager.LayoutParams; +import android.util.Log; /** * CompatibilityInfo class keeps the information about the screen compatibility mode that the @@ -48,6 +49,8 @@ public class CompatibilityInfo implements Parcelable { public static final CompatibilityInfo DEFAULT_COMPATIBILITY_INFO = new CompatibilityInfo() { }; + static final String TAG = "CompatibilityInfo"; + /** * This is the number of pixels we would like to have along the * short axis of an app that needs to run on a normal size screen. @@ -176,11 +179,18 @@ public class CompatibilityInfo implements Parcelable { // Let the user decide. compatFlags |= NEEDS_SCREEN_COMPAT; } - - // Modern apps always support densities. - applicationDensity = DisplayMetrics.DENSITY_DEVICE; - applicationScale = 1.0f; - applicationInvertedScale = 1.0f; + int density = appInfo.getOverrideDensity(); + if(density != 0) { + applicationDensity = density; + applicationScale = DisplayMetrics.DENSITY_DEVICE / (float) applicationDensity; + applicationInvertedScale = 1.0f / applicationScale; + compatFlags |= SCALING_REQUIRED; + } else { + // Modern apps always support densities. + applicationDensity = DisplayMetrics.DENSITY_DEVICE; + applicationScale = 1.0f; + applicationInvertedScale = 1.0f; + } } else { /** @@ -267,20 +277,31 @@ public class CompatibilityInfo implements Parcelable { compatFlags |= NEVER_NEEDS_COMPAT; } - if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES) != 0) { - applicationDensity = DisplayMetrics.DENSITY_DEVICE; - applicationScale = 1.0f; - applicationInvertedScale = 1.0f; - } else { + int density = appInfo.getOverrideDensity(); + if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES) == 0) { applicationDensity = DisplayMetrics.DENSITY_DEFAULT; applicationScale = DisplayMetrics.DENSITY_DEVICE / (float) DisplayMetrics.DENSITY_DEFAULT; applicationInvertedScale = 1.0f / applicationScale; compatFlags |= SCALING_REQUIRED; + } else if((density != 0) || (overrideScale != 1.0f)) { + applicationScale = overrideScale; + applicationInvertedScale = 1.0f / overrideScale; + applicationDensity = (int) ((DisplayMetrics.DENSITY_DEVICE_STABLE + * applicationInvertedScale) + .5f); + compatFlags |= HAS_OVERRIDE_SCALING; + } else { + applicationDensity = DisplayMetrics.DENSITY_DEVICE; + applicationScale = 1.0f; + applicationInvertedScale = 1.0f; } } mCompatibilityFlags = compatFlags; + + Log.d(TAG, "mCompatibilityFlags - " + Integer.toHexString(mCompatibilityFlags)); + Log.d(TAG, "applicationDensity - " + applicationDensity); + Log.d(TAG, "applicationScale - " + applicationScale); } private CompatibilityInfo(int compFlags, diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java index ccc39b6080d7..5e2d84bea79d 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java @@ -50,6 +50,7 @@ import android.text.TextUtils; import android.util.Log; import android.view.Surface; import android.view.SurfaceHolder; +import android.os.SystemProperties; import com.android.internal.R; import com.android.internal.annotations.GuardedBy; @@ -168,6 +169,10 @@ public class Camera { private static final int CAMERA_MSG_RAW_IMAGE_NOTIFY = 0x200; private static final int CAMERA_MSG_PREVIEW_METADATA = 0x400; private static final int CAMERA_MSG_FOCUS_MOVE = 0x800; + /* ### QC ADD-ONS: START */ + private static final int CAMERA_MSG_STATS_DATA = 0x1000; + private static final int CAMERA_MSG_META_DATA = 0x2000; + /* ### QC ADD-ONS: END */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) private long mNativeContext; // accessed by native methods @@ -199,6 +204,17 @@ public class Camera { private boolean mShutterSoundEnabledFromApp = true; private static final int NO_ERROR = 0; + private static final int EACCESS = -13; + private static final int ENODEV = -19; + private static final int EBUSY = -16; + private static final int EINVAL = -22; + private static final int ENOSYS = -38; + private static final int EUSERS = -87; + private static final int EOPNOTSUPP = -95; + /* ### QC ADD-ONS: START */ + private CameraDataCallback mCameraDataCallback; + private CameraMetaDataCallback mCameraMetaDataCallback; + /* ### QC ADD-ONS: END */ /** * Broadcast Action: A new picture is taken by the camera, and the entry of @@ -276,7 +292,35 @@ public class Camera { * @return total number of accessible camera devices, or 0 if there are no * cameras or an error was encountered enumerating them. */ - public native static int getNumberOfCameras(); + public static int getNumberOfCameras() { + boolean exposeAuxCamera = false; + String packageName = ActivityThread.currentOpPackageName(); + /* Force to expose only two cameras + * if the package name does not falls in this bucket + */ + String packageList = SystemProperties.get("vendor.camera.aux.packagelist"); + if (packageList.length() > 0) { + TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(','); + splitter.setString(packageList); + for (String str : splitter) { + if (packageName.equals(str)) { + exposeAuxCamera = true; + break; + } + } + } + int numberOfCameras = _getNumberOfCameras(); + if (exposeAuxCamera == false && (numberOfCameras > 2)) { + numberOfCameras = 2; + } + return numberOfCameras; + } + + /** + * Returns the number of physical cameras available on this device. + */ + /** @hide */ + public native static int _getNumberOfCameras(); /** * Returns the information about a particular camera. @@ -287,6 +331,9 @@ public class Camera { * low-level failure). */ public static void getCameraInfo(int cameraId, CameraInfo cameraInfo) { + if(cameraId >= getNumberOfCameras()){ + throw new RuntimeException("Unknown camera ID"); + } boolean overrideToPortrait = CameraManager.shouldOverrideToPortrait( ActivityThread.currentApplication().getApplicationContext()); @@ -324,6 +371,17 @@ public class Camera { */ public static final int CAMERA_FACING_FRONT = 1; + /* ### QC ADD-ONS: START TBD*/ + /** @hide + * camera is in ZSL mode. + */ + public static final int CAMERA_SUPPORT_MODE_ZSL = 2; + + /** @hide + * camera is in non-ZSL mode. + */ + public static final int CAMERA_SUPPORT_MODE_NONZSL = 3; + /* ### QC ADD-ONS: END */ /** * The direction that the camera faces. It should be * CAMERA_FACING_BACK or CAMERA_FACING_FRONT. @@ -475,6 +533,10 @@ public class Camera { mPostviewCallback = null; mUsingPreviewAllocation = false; mZoomListener = null; + /* ### QC ADD-ONS: START */ + mCameraDataCallback = null; + mCameraMetaDataCallback = null; + /* ### QC ADD-ONS: END */ Looper looper; if ((looper = Looper.myLooper()) != null) { @@ -507,6 +569,9 @@ public class Camera { /** used by Camera#open, Camera#open(int) */ Camera(int cameraId) { + if(cameraId >= getNumberOfCameras()){ + throw new RuntimeException("Unknown camera ID"); + } int err = cameraInit(cameraId); if (checkInitErrors(err)) { if (err == -EACCES) { @@ -832,6 +897,7 @@ public class Camera { * @see android.media.MediaActionSound */ public final void setPreviewCallback(PreviewCallback cb) { + android.util.SeempLog.record(66); mPreviewCallback = cb; mOneShot = false; mWithBuffer = false; @@ -860,6 +926,7 @@ public class Camera { * @see android.media.MediaActionSound */ public final void setOneShotPreviewCallback(PreviewCallback cb) { + android.util.SeempLog.record(68); mPreviewCallback = cb; mOneShot = true; mWithBuffer = false; @@ -900,6 +967,7 @@ public class Camera { * @see android.media.MediaActionSound */ public final void setPreviewCallbackWithBuffer(PreviewCallback cb) { + android.util.SeempLog.record(67); mPreviewCallback = cb; mOneShot = false; mWithBuffer = true; @@ -1231,7 +1299,23 @@ public class Camera { mAutoFocusMoveCallback.onAutoFocusMoving(msg.arg1 == 0 ? false : true, mCamera); } return; + /* ### QC ADD-ONS: START */ + case CAMERA_MSG_STATS_DATA: + int statsdata[] = new int[257]; + for(int i =0; i<257; i++ ) { + statsdata[i] = byteToInt( (byte[])msg.obj, i*4); + } + if (mCameraDataCallback != null) { + mCameraDataCallback.onCameraData(statsdata, mCamera); + } + return; + case CAMERA_MSG_META_DATA: + if (mCameraMetaDataCallback != null) { + mCameraMetaDataCallback.onCameraMetaData((byte[])msg.obj, mCamera); + } + return; + /* ### QC ADD-ONS: END */ default: Log.e(TAG, "Unknown message type " + msg.what); return; @@ -1465,6 +1549,7 @@ public class Camera { */ public final void takePicture(ShutterCallback shutter, PictureCallback raw, PictureCallback jpeg) { + android.util.SeempLog.record(65); takePicture(shutter, raw, null, jpeg); } private native final void native_takePicture(int msgType); @@ -1503,6 +1588,7 @@ public class Camera { */ public final void takePicture(ShutterCallback shutter, PictureCallback raw, PictureCallback postview, PictureCallback jpeg) { + android.util.SeempLog.record(65); mShutterCallback = shutter; mRawImageCallback = raw; mPostviewCallback = postview; @@ -1972,6 +2058,23 @@ public class Camera { * as a set. Either they are all valid, or none of them are. */ public Point mouth = null; + + /** + * {@hide} + */ + public int smileDegree = 0; + /** + * {@hide} + */ + public int smileScore = 0; + /** + * {@hide} + */ + public int blinkDetected = 0; + /** + * {@hide} + */ + public int faceRecognised = 0; } /** @@ -2096,6 +2199,27 @@ public class Camera { return p; } + /** @hide + * Returns the current cct value of white balance. + * + * If it's in AWB mode, cct is determined by stats/awb module. + * + * If it's in Manual WB mode, it actually returns cct value + * set by user via {@link #setParameters(Camera.Parameters)}. + */ + public int getWBCurrentCCT() { + Parameters p = new Parameters(); + String s = native_getParameters(); + p.unflatten(s); + + int cct = 0; + if (p.getWBCurrentCCT() != null) { + cct = Integer.parseInt(p.getWBCurrentCCT()); + } + + return cct; + } + /** * Returns an empty {@link Parameters} for testing purpose. * @@ -2109,6 +2233,157 @@ public class Camera { return camera.new Parameters(); } + /* ### QC ADD-ONS: START */ + private static int byteToInt(byte[] b, int offset) { + int value = 0; + for (int i = 0; i < 4; i++) { + int shift = (4 - 1 - i) * 8; + value += (b[(3-i) + offset] & 0x000000FF) << shift; + } + return value; + } + /** @hide + * Handles the callback for when Camera Data is available. + * data is read from the camera. + */ + public interface CameraDataCallback { + /** + * Callback for when camera data is available. + * + * @param data a int array of the camera data + * @param camera the Camera service object + */ + void onCameraData(int[] data, Camera camera); + }; + + /** @hide + * Set camera histogram mode and registers a callback function to run. + * Only valid after startPreview() has been called. + * + * @param cb the callback to run + */ + public final void setHistogramMode(CameraDataCallback cb) + { + mCameraDataCallback = cb; + native_setHistogramMode(cb!=null); + } + private native final void native_setHistogramMode(boolean mode); + + /** @hide + * Set camera histogram command to send data. + * + */ + public final void sendHistogramData() + { + native_sendHistogramData(); + } + private native final void native_sendHistogramData(); + + /** @hide + * Handles the callback for when Camera Meta Data is available. + * Meta data is read from the camera. + */ + public interface CameraMetaDataCallback { + /** + * Callback for when camera meta data is available. + * + * @param data a byte array of the camera meta data + * @param camera the Camera service object + */ + void onCameraMetaData(byte[] data, Camera camera); + }; + + /** @hide + * Set camera meta data and registers a callback function to run. + * Only valid after startPreview() has been called. + * + * @param cb the callback to run + */ + public final void setMetadataCb(CameraMetaDataCallback cb) + { + mCameraMetaDataCallback = cb; + native_setMetadataCb(cb!=null); + } + private native final void native_setMetadataCb(boolean mode); + + /** @hide + * Set camera face detection command to send meta data. + */ + public final void sendMetaData() + { + native_sendMetaData(); + } + private native final void native_sendMetaData(); + + /** @hide + * Configure longshot mode. Available only in ZSL. + * + * @param enable enable/disable this mode + */ + public final void setLongshot(boolean enable) + { + native_setLongshot(enable); + } + private native final void native_setLongshot(boolean enable); + + /** @hide + * Handles the Touch Co-ordinate. + */ + public class Coordinate { + /** + * Sets the x,y co-ordinates for a touch event + * + * @param x the x co-ordinate (pixels) + * @param y the y co-ordinate (pixels) + */ + public Coordinate(int x, int y) { + xCoordinate = x; + yCoordinate = y; + } + /** + * Compares {@code obj} to this co-ordinate. + * + * @param obj the object to compare this co-ordinate with. + * @return {@code true} if the xCoordinate and yCoordinate of {@code obj} is the + * same as those of this coordinate. {@code false} otherwise. + */ + @Override + public boolean equals(Object obj) { + if (!(obj instanceof Coordinate)) { + return false; + } + Coordinate c = (Coordinate) obj; + return xCoordinate == c.xCoordinate && yCoordinate == c.yCoordinate; + } + + /** x co-ordinate for the touch event*/ + public int xCoordinate; + + /** y co-ordinate for the touch event */ + public int yCoordinate; + }; + + /** @hide + * Returns the current focus position. + * + * If it's in AF mode, it's the lens position after af is done. + * + * If it's in Manual Focus mode, it actually returns the value + * set by user via {@link #setParameters(Camera.Parameters)}. + */ + public int getCurrentFocusPosition() { + Parameters p = new Parameters(); + String s = native_getParameters(); + p.unflatten(s); + + int focus_pos = -1; + if (p.getCurrentFocusPosition() != null) { + focus_pos = Integer.parseInt(p.getCurrentFocusPosition()); + } + return focus_pos; + } + + /* ### QC ADD-ONS: END */ /** * Returns a copied {@link Parameters}; for shim use only. * @@ -2370,6 +2645,10 @@ public class Camera { public static final String WHITE_BALANCE_CLOUDY_DAYLIGHT = "cloudy-daylight"; public static final String WHITE_BALANCE_TWILIGHT = "twilight"; public static final String WHITE_BALANCE_SHADE = "shade"; + /** @hide + * wb manual cct mode. + */ + public static final String WHITE_BALANCE_MANUAL_CCT = "manual-cct"; // Values for color effect settings. public static final String EFFECT_NONE = "none"; @@ -2417,6 +2696,11 @@ public class Camera { */ public static final String FLASH_MODE_TORCH = "torch"; + /** @hide + * Scene mode is off. + */ + public static final String SCENE_MODE_ASD = "asd"; + /** * Scene mode is off. */ @@ -2493,6 +2777,14 @@ public class Camera { * Capture the naturally warm color of scenes lit by candles. */ public static final String SCENE_MODE_CANDLELIGHT = "candlelight"; + /** @hide + * SCENE_MODE_BACKLIGHT + **/ + public static final String SCENE_MODE_BACKLIGHT = "backlight"; + /** @hide + * SCENE_MODE_FLOWERS + **/ + public static final String SCENE_MODE_FLOWERS = "flowers"; /** * Applications are looking for a barcode. Camera driver will be @@ -2535,6 +2827,13 @@ public class Camera { */ public static final String FOCUS_MODE_FIXED = "fixed"; + /** @hide + * Normal focus mode. Applications should call + * {@link #autoFocus(AutoFocusCallback)} to start the focus in this + * mode. + */ + public static final String FOCUS_MODE_NORMAL = "normal"; + /** * Extended depth of field (EDOF). Focusing is done digitally and * continuously. Applications should not call {@link @@ -2587,6 +2886,11 @@ public class Camera { */ public static final String FOCUS_MODE_CONTINUOUS_PICTURE = "continuous-picture"; + /** @hide + * manual focus mode + */ + public static final String FOCUS_MODE_MANUAL_POSITION = "manual"; + // Indices for focus distance array. /** * The array index of near focus distance for use with @@ -2623,11 +2927,15 @@ public class Camera { // Formats for setPreviewFormat and setPictureFormat. private static final String PIXEL_FORMAT_YUV422SP = "yuv422sp"; private static final String PIXEL_FORMAT_YUV420SP = "yuv420sp"; + private static final String PIXEL_FORMAT_YUV420SP_ADRENO = "yuv420sp-adreno"; private static final String PIXEL_FORMAT_YUV422I = "yuv422i-yuyv"; private static final String PIXEL_FORMAT_YUV420P = "yuv420p"; private static final String PIXEL_FORMAT_RGB565 = "rgb565"; private static final String PIXEL_FORMAT_JPEG = "jpeg"; private static final String PIXEL_FORMAT_BAYER_RGGB = "bayer-rggb"; + private static final String PIXEL_FORMAT_RAW = "raw"; + private static final String PIXEL_FORMAT_YV12 = "yv12"; + private static final String PIXEL_FORMAT_NV12 = "nv12"; /** * Order matters: Keys that are {@link #set(String, String) set} later @@ -3447,8 +3755,11 @@ public class Camera { * parameters. */ public void removeGpsData() { + remove(KEY_QC_GPS_LATITUDE_REF); remove(KEY_GPS_LATITUDE); + remove(KEY_QC_GPS_LONGITUDE_REF); remove(KEY_GPS_LONGITUDE); + remove(KEY_QC_GPS_ALTITUDE_REF); remove(KEY_GPS_ALTITUDE); remove(KEY_GPS_TIMESTAMP); remove(KEY_GPS_PROCESSING_METHOD); @@ -4472,5 +4783,1231 @@ public class Camera { if (s1 != null && s1.equals(s2)) return true; return false; } + /* ### QC ADD-ONS: START */ + + /* ### QC ADDED PARAMETER KEYS*/ + private static final String KEY_QC_HFR_SIZE = "hfr-size"; + private static final String KEY_QC_PREVIEW_FRAME_RATE_MODE = "preview-frame-rate-mode"; + private static final String KEY_QC_PREVIEW_FRAME_RATE_AUTO_MODE = "frame-rate-auto"; + private static final String KEY_QC_PREVIEW_FRAME_RATE_FIXED_MODE = "frame-rate-fixed"; + private static final String KEY_QC_GPS_LATITUDE_REF = "gps-latitude-ref"; + private static final String KEY_QC_GPS_LONGITUDE_REF = "gps-longitude-ref"; + private static final String KEY_QC_GPS_ALTITUDE_REF = "gps-altitude-ref"; + private static final String KEY_QC_GPS_STATUS = "gps-status"; + private static final String KEY_QC_EXIF_DATETIME = "exif-datetime"; + private static final String KEY_QC_TOUCH_AF_AEC = "touch-af-aec"; + private static final String KEY_QC_TOUCH_INDEX_AEC = "touch-index-aec"; + private static final String KEY_QC_TOUCH_INDEX_AF = "touch-index-af"; + private static final String KEY_QC_MANUAL_FOCUS_POSITION = "manual-focus-position"; + private static final String KEY_QC_MANUAL_FOCUS_POS_TYPE = "manual-focus-pos-type"; + private static final String KEY_QC_SCENE_DETECT = "scene-detect"; + private static final String KEY_QC_ISO_MODE = "iso"; + private static final String KEY_QC_EXPOSURE_TIME = "exposure-time"; + private static final String KEY_QC_MIN_EXPOSURE_TIME = "min-exposure-time"; + private static final String KEY_QC_MAX_EXPOSURE_TIME = "max-exposure-time"; + private static final String KEY_QC_LENSSHADE = "lensshade"; + private static final String KEY_QC_HISTOGRAM = "histogram"; + private static final String KEY_QC_SKIN_TONE_ENHANCEMENT = "skinToneEnhancement"; + private static final String KEY_QC_AUTO_EXPOSURE = "auto-exposure"; + private static final String KEY_QC_SHARPNESS = "sharpness"; + private static final String KEY_QC_MAX_SHARPNESS = "max-sharpness"; + private static final String KEY_QC_CONTRAST = "contrast"; + private static final String KEY_QC_MAX_CONTRAST = "max-contrast"; + private static final String KEY_QC_SATURATION = "saturation"; + private static final String KEY_QC_MAX_SATURATION = "max-saturation"; + private static final String KEY_QC_DENOISE = "denoise"; + private static final String KEY_QC_CONTINUOUS_AF = "continuous-af"; + private static final String KEY_QC_SELECTABLE_ZONE_AF = "selectable-zone-af"; + private static final String KEY_QC_FACE_DETECTION = "face-detection"; + private static final String KEY_QC_MEMORY_COLOR_ENHANCEMENT = "mce"; + private static final String KEY_QC_REDEYE_REDUCTION = "redeye-reduction"; + private static final String KEY_QC_ZSL = "zsl"; + private static final String KEY_QC_CAMERA_MODE = "camera-mode"; + private static final String KEY_QC_VIDEO_HIGH_FRAME_RATE = "video-hfr"; + private static final String KEY_QC_VIDEO_HDR = "video-hdr"; + private static final String KEY_QC_POWER_MODE = "power-mode"; + private static final String KEY_QC_POWER_MODE_SUPPORTED = "power-mode-supported"; + private static final String KEY_QC_WB_MANUAL_CCT = "wb-manual-cct"; + private static final String KEY_QC_MIN_WB_CCT = "min-wb-cct"; + private static final String KEY_QC_MAX_WB_CCT = "max-wb-cct"; + private static final String KEY_QC_AUTO_HDR_ENABLE = "auto-hdr-enable"; + private static final String KEY_QC_VIDEO_ROTATION = "video-rotation"; + + /** @hide + * KEY_QC_AE_BRACKET_HDR + **/ + public static final String KEY_QC_AE_BRACKET_HDR = "ae-bracket-hdr"; + + /* ### QC ADDED PARAMETER VALUES*/ + + // Values for touch af/aec settings. + /** @hide + * TOUCH_AF_AEC_OFF + **/ + public static final String TOUCH_AF_AEC_OFF = "touch-off"; + /** @hide + * TOUCH_AF_AEC_ON + **/ + public static final String TOUCH_AF_AEC_ON = "touch-on"; + + // Values for auto exposure settings. + /** @hide + * Auto exposure frame-avg + **/ + public static final String AUTO_EXPOSURE_FRAME_AVG = "frame-average"; + /** @hide + * Auto exposure center weighted + **/ + public static final String AUTO_EXPOSURE_CENTER_WEIGHTED = "center-weighted"; + /** @hide + * Auto exposure spot metering + **/ + public static final String AUTO_EXPOSURE_SPOT_METERING = "spot-metering"; + + //Values for ISO settings + /** @hide + * ISO_AUTO + **/ + public static final String ISO_AUTO = "auto"; + /** @hide + * ISO_HJR + **/ + public static final String ISO_HJR = "ISO_HJR"; + /** @hide + * ISO_100 + **/ + public static final String ISO_100 = "ISO100"; + /** @hide + * ISO_200 + **/ + public static final String ISO_200 = "ISO200"; + /** @hide + * ISO_400 + **/ + public static final String ISO_400 = "ISO400"; + /** @hide + * ISO_800 + **/ + public static final String ISO_800 = "ISO800"; + /** @hide + * ISO_1600 + **/ + public static final String ISO_1600 = "ISO1600"; + + /** @hide + * ISO_3200 + **/ + public static final String ISO_3200 = "ISO3200"; + + //Values for Lens Shading + /** @hide + * LENSSHADE_ENABLE + **/ + public static final String LENSSHADE_ENABLE = "enable"; + /** @hide + * LENSSHADE_DISABLE + **/ + public static final String LENSSHADE_DISABLE= "disable"; + + //Values for Histogram + /** @hide + * Histogram enable + **/ + public static final String HISTOGRAM_ENABLE = "enable"; + /** @hide + * Histogram disable + **/ + public static final String HISTOGRAM_DISABLE= "disable"; + + //Values for Skin Tone Enhancement + /** @hide + * SKIN_TONE_ENHANCEMENT_ENABLE + **/ + public static final String SKIN_TONE_ENHANCEMENT_ENABLE = "enable"; + /** @hide + * SKIN_TONE_ENHANCEMENT_DISABLE + **/ + public static final String SKIN_TONE_ENHANCEMENT_DISABLE= "disable"; + + // Values for MCE settings. + /** @hide + * MCE_ENaBLE + **/ + public static final String MCE_ENABLE = "enable"; + /** @hide + * MCE_DISABLE + **/ + public static final String MCE_DISABLE = "disable"; + + // Values for ZSL settings. + /** @hide + * ZSL_ON + **/ + public static final String ZSL_ON = "on"; + /** @hide + * ZSL_OFF + **/ + public static final String ZSL_OFF = "off"; + + // Values for HDR Bracketing settings. + + /** @hide + * AEC bracketing off + **/ + public static final String AE_BRACKET_HDR_OFF = "Off"; + /** @hide + * AEC bracketing hdr + **/ + public static final String AE_BRACKET_HDR = "HDR"; + /** @hide + * AEC bracketing aec-bracket + **/ + public static final String AE_BRACKET = "AE-Bracket"; + + // Values for Power mode. + /** @hide + * LOW_POWER + **/ + public static final String LOW_POWER = "Low_Power"; + /** @hide + * NORMAL_POWER + **/ + public static final String NORMAL_POWER = "Normal_Power"; + + // Values for HFR settings. + /** @hide + * VIDEO_HFR_OFF + **/ + public static final String VIDEO_HFR_OFF = "off"; + /** @hide + * VIDEO_HFR_2X + **/ + public static final String VIDEO_HFR_2X = "60"; + /** @hide + * VIDEO_HFR_3X + **/ + public static final String VIDEO_HFR_3X = "90"; + /** @hide + * VIDEO_HFR_4X + **/ + public static final String VIDEO_HFR_4X = "120"; + + // Values for auto scene detection settings. + /** @hide + * SCENE_DETECT_OFF + **/ + public static final String SCENE_DETECT_OFF = "off"; + /** @hide + * SCENE_DETECT_ON + **/ + public static final String SCENE_DETECT_ON = "on"; + + //Values for Continuous AF + + /** @hide + * CAF off + **/ + public static final String CONTINUOUS_AF_OFF = "caf-off"; + /** @hide + * CAF on + **/ + public static final String CONTINUOUS_AF_ON = "caf-on"; + /** @hide + * Denoise off + **/ + public static final String DENOISE_OFF = "denoise-off"; + /** @hide + * Denoise on + **/ + public static final String DENOISE_ON = "denoise-on"; + + // Values for Redeye Reduction settings. + /** @hide + * REDEYE_REDUCTION_ENABLE + **/ + public static final String REDEYE_REDUCTION_ENABLE = "enable"; + /** @hide + * REDEYE_REDUCTION_DISABLE + **/ + public static final String REDEYE_REDUCTION_DISABLE = "disable"; + + // Values for selectable zone af settings. + /** @hide + * SELECTABLE_ZONE_AF_AUTO + **/ + public static final String SELECTABLE_ZONE_AF_AUTO = "auto"; + /** @hide + * SELECTABLE_ZONE_AF_SPOTMETERING + **/ + public static final String SELECTABLE_ZONE_AF_SPOTMETERING = "spot-metering"; + /** @hide + * SELECTABLE_ZONE_AF_CENTER_WEIGHTED + **/ + public static final String SELECTABLE_ZONE_AF_CENTER_WEIGHTED = "center-weighted"; + /** @hide + * SELECTABLE_ZONE_AF_FRAME_AVERAGE + **/ + public static final String SELECTABLE_ZONE_AF_FRAME_AVERAGE = "frame-average"; + + // Values for Face Detection settings. + /** @hide + * Face Detection off + **/ + public static final String FACE_DETECTION_OFF = "off"; + /** @hide + * Face Detction on + **/ + public static final String FACE_DETECTION_ON = "on"; + + // Values for video rotation settings. + + /** @hide + * VIDEO_ROTATION_0 + **/ + public static final String VIDEO_ROTATION_0 = "0"; + /** @hide + * VIDEO_ROTATION_90 + **/ + public static final String VIDEO_ROTATION_90 = "90"; + /** @hide + * VIDEO_ROTATION_180 + **/ + public static final String VIDEO_ROTATION_180 = "180"; + /** @hide + * VIDEO_ROTATION_270 + **/ + public static final String VIDEO_ROTATION_270 = "270"; + + /* ### QC ADDED PARAMETER APIS*/ + /** @hide + * Gets the supported preview sizes in high frame rate recording mode. + * + * @return a list of Size object. This method will always return a list + * with at least one element. + */ + public List<Size> getSupportedHfrSizes() { + String str = get(KEY_QC_HFR_SIZE + SUPPORTED_VALUES_SUFFIX); + return splitSize(str); + } + + /** @hide + * Gets the supported Touch AF/AEC setting. + * + * @return a List of TOUCH_AF_AEC_XXX string constants. null if TOUCH AF/AEC + * setting is not supported. + * + */ + public List<String> getSupportedTouchAfAec() { + String str = get(KEY_QC_TOUCH_AF_AEC + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** + * Gets the supported Touch AF/AEC setting. + * + * @return a List of TOUCH_AF_AEC_XXX string constants. null if TOUCH AF/AEC + * setting is not supported. + * + */ + + /** @hide + * Gets the supported frame rate modes. + * + * @return a List of FRAME_RATE_XXX_MODE string constant. null if this + * setting is not supported. + */ + public List<String> getSupportedPreviewFrameRateModes() { + String str = get(KEY_QC_PREVIEW_FRAME_RATE_MODE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported auto scene detection modes. + * + * @return a List of SCENE_DETECT_XXX string constant. null if scene detection + * setting is not supported. + * + */ + public List<String> getSupportedSceneDetectModes() { + String str = get(KEY_QC_SCENE_DETECT + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported ISO values. + * + * @return a List of FLASH_MODE_XXX string constants. null if flash mode + * setting is not supported. + */ + public List<String> getSupportedIsoValues() { + String str = get(KEY_QC_ISO_MODE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported Lensshade modes. + * + * @return a List of LENS_MODE_XXX string constants. null if lens mode + * setting is not supported. + */ + public List<String> getSupportedLensShadeModes() { + String str = get(KEY_QC_LENSSHADE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported Histogram modes. + * + * @return a List of HISTOGRAM_XXX string constants. null if histogram mode + * setting is not supported. + */ + public List<String> getSupportedHistogramModes() { + String str = get(KEY_QC_HISTOGRAM + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported Skin Tone Enhancement modes. + * + * @return a List of SKIN_TONE_ENHANCEMENT_XXX string constants. null if skin tone enhancement + * setting is not supported. + */ + public List<String> getSupportedSkinToneEnhancementModes() { + String str = get(KEY_QC_SKIN_TONE_ENHANCEMENT + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported auto exposure setting. + * + * @return a List of AUTO_EXPOSURE_XXX string constants. null if auto exposure + * setting is not supported. + */ + public List<String> getSupportedAutoexposure() { + String str = get(KEY_QC_AUTO_EXPOSURE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported MCE modes. + * + * @return a List of MCE_ENABLE/DISABLE string constants. null if MCE mode + * setting is not supported. + */ + public List<String> getSupportedMemColorEnhanceModes() { + String str = get(KEY_QC_MEMORY_COLOR_ENHANCEMENT + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported ZSL modes. + * + * @return a List of ZSL_OFF/OFF string constants. null if ZSL mode + * setting is not supported. + */ + public List<String> getSupportedZSLModes() { + String str = get(KEY_QC_ZSL + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported Video HDR modes. + * + * @return a List of Video HDR_OFF/OFF string constants. null if + * Video HDR mode setting is not supported. + */ + public List<String> getSupportedVideoHDRModes() { + String str = get(KEY_QC_VIDEO_HDR + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported HFR modes. + * + * @return a List of VIDEO_HFR_XXX string constants. null if hfr mode + * setting is not supported. + */ + public List<String> getSupportedVideoHighFrameRateModes() { + String str = get(KEY_QC_VIDEO_HIGH_FRAME_RATE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported Continuous AF modes. + * + * @return a List of CONTINUOUS_AF_XXX string constant. null if continuous AF + * setting is not supported. + * + */ + public List<String> getSupportedContinuousAfModes() { + String str = get(KEY_QC_CONTINUOUS_AF + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported DENOISE modes. + * + * @return a List of DENOISE_XXX string constant. null if DENOISE + * setting is not supported. + * + */ + public List<String> getSupportedDenoiseModes() { + String str = get(KEY_QC_DENOISE + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported selectable zone af setting. + * + * @return a List of SELECTABLE_ZONE_AF_XXX string constants. null if selectable zone af + * setting is not supported. + */ + public List<String> getSupportedSelectableZoneAf() { + String str = get(KEY_QC_SELECTABLE_ZONE_AF + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported face detection modes. + * + * @return a List of FACE_DETECTION_XXX string constant. null if face detection + * setting is not supported. + * + */ + public List<String> getSupportedFaceDetectionModes() { + String str = get(KEY_QC_FACE_DETECTION + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Gets the supported redeye reduction modes. + * + * @return a List of REDEYE_REDUCTION_XXX string constant. null if redeye reduction + * setting is not supported. + * + */ + public List<String> getSupportedRedeyeReductionModes() { + String str = get(KEY_QC_REDEYE_REDUCTION + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + /** @hide + * Sets GPS altitude reference. This will be stored in JPEG EXIF header. + * @param altRef reference GPS altitude in meters. + */ + public void setGpsAltitudeRef(double altRef) { + set(KEY_QC_GPS_ALTITUDE_REF, Double.toString(altRef)); + } + + /** @hide + * Sets GPS Status. This will be stored in JPEG EXIF header. + * + * @param status GPS status (UTC in seconds since January 1, + * 1970). + */ + public void setGpsStatus(double status) { + set(KEY_QC_GPS_STATUS, Double.toString(status)); + } + + /** @hide + * Sets the touch co-ordinate for Touch AEC. + * + * @param x the x co-ordinate of the touch event + * @param y the y co-ordinate of the touch event + * + */ + public void setTouchIndexAec(int x, int y) { + String v = Integer.toString(x) + "x" + Integer.toString(y); + set(KEY_QC_TOUCH_INDEX_AEC, v); + } + + /** @hide + * Returns the touch co-ordinates of the touch event. + * + * @return a Index object with the x and y co-ordinated + * for the touch event + * + */ + public Coordinate getTouchIndexAec() { + String pair = get(KEY_QC_TOUCH_INDEX_AEC); + return strToCoordinate(pair); + } + + /** @hide + * Sets the touch co-ordinate for Touch AF. + * + * @param x the x co-ordinate of the touch event + * @param y the y co-ordinate of the touch event + * + */ + public void setTouchIndexAf(int x, int y) { + String v = Integer.toString(x) + "x" + Integer.toString(y); + set(KEY_QC_TOUCH_INDEX_AF, v); + } + + /** @hide + * Returns the touch co-ordinates of the touch event. + * + * @return a Index object with the x and y co-ordinated + * for the touch event + * + */ + public Coordinate getTouchIndexAf() { + String pair = get(KEY_QC_TOUCH_INDEX_AF); + return strToCoordinate(pair); + } + /** @hide + * Set Sharpness Level + * + * @param sharpness level + */ + public void setSharpness(int sharpness){ + if((sharpness < 0) || (sharpness > getMaxSharpness()) ) + throw new IllegalArgumentException( + "Invalid Sharpness " + sharpness); + + set(KEY_QC_SHARPNESS, String.valueOf(sharpness)); + } + + /** @hide + * Set Contrast Level + * + * @param contrast level + */ + public void setContrast(int contrast){ + if((contrast < 0 ) || (contrast > getMaxContrast())) + throw new IllegalArgumentException( + "Invalid Contrast " + contrast); + + set(KEY_QC_CONTRAST, String.valueOf(contrast)); + } + + /** @hide + * Set Saturation Level + * + * @param saturation level + */ + public void setSaturation(int saturation){ + if((saturation < 0 ) || (saturation > getMaxSaturation())) + throw new IllegalArgumentException( + "Invalid Saturation " + saturation); + + set(KEY_QC_SATURATION, String.valueOf(saturation)); + } + + /** @hide + * @return true if full size video snapshot is supported. + */ + public boolean isPowerModeSupported() { + String str = get(KEY_QC_POWER_MODE_SUPPORTED); + return TRUE.equals(str); + } + + /** @hide + * Get Sharpness level + * + * @return sharpness level + */ + public int getSharpness(){ + return getInt(KEY_QC_SHARPNESS); + } + + /** @hide + * Get Max Sharpness Level + * + * @return max sharpness level + */ + public int getMaxSharpness(){ + return getInt(KEY_QC_MAX_SHARPNESS); + } + + /** @hide + * Get Contrast level + * + * @return contrast level + */ + public int getContrast(){ + return getInt(KEY_QC_CONTRAST); + } + + /** @hide + * Get Max Contrast Level + * + * @return max contrast level + */ + public int getMaxContrast(){ + return getInt(KEY_QC_MAX_CONTRAST); + } + + /** @hide + * Get Saturation level + * + * @return saturation level + */ + public int getSaturation(){ + return getInt(KEY_QC_SATURATION); + } + + /** @hide + * Get Max Saturation Level + * + * @return max contrast level + */ + public int getMaxSaturation(){ + return getInt(KEY_QC_MAX_SATURATION); + } + + /** @hide + * Sets GPS latitude reference coordinate. This will be stored in JPEG EXIF + * header. + * @param latRef GPS latitude reference coordinate. + */ + public void setGpsLatitudeRef(String latRef) { + set(KEY_QC_GPS_LATITUDE_REF, latRef); + } + + /** @hide + * Sets GPS longitude reference coordinate. This will be stored in JPEG EXIF + * header. + * @param lonRef GPS longitude reference coordinate. + */ + public void setGpsLongitudeRef(String lonRef) { + set(KEY_QC_GPS_LONGITUDE_REF, lonRef); + } + + /** @hide + * Sets system timestamp. This will be stored in JPEG EXIF header. + * + * @param dateTime current timestamp (UTC in seconds since January 1, + * 1970). + */ + public void setExifDateTime(String dateTime) { + set(KEY_QC_EXIF_DATETIME, dateTime); + } + + /** @hide + * Gets the current Touch AF/AEC setting. + * + * @return one of TOUCH_AF_AEC_XXX string constant. null if Touch AF/AEC + * setting is not supported. + * + */ + public String getTouchAfAec() { + return get(KEY_QC_TOUCH_AF_AEC); + } + + /** @hide + * Sets the current TOUCH AF/AEC setting. + * + * @param value TOUCH_AF_AEC_XXX string constants. + * + */ + public void setTouchAfAec(String value) { + set(KEY_QC_TOUCH_AF_AEC, value); + } + + /** @hide + * Gets the current redeye reduction setting. + * + * @return one of REDEYE_REDUCTION_XXX string constant. null if redeye reduction + * setting is not supported. + * + */ + public String getRedeyeReductionMode() { + return get(KEY_QC_REDEYE_REDUCTION); + } + + /** @hide + * Sets the redeye reduction. Other parameters may be changed after changing + * redeye reduction. After setting redeye reduction, + * applications should call getParameters to know if some parameters are + * changed. + * + * @param value REDEYE_REDUCTION_XXX string constants. + * + */ + public void setRedeyeReductionMode(String value) { + set(KEY_QC_REDEYE_REDUCTION, value); + } + + /** @hide + * Gets the frame rate mode setting. + * + * @return one of FRAME_RATE_XXX_MODE string constant. null if this + * setting is not supported. + */ + public String getPreviewFrameRateMode() { + return get(KEY_QC_PREVIEW_FRAME_RATE_MODE); + } + + /** @hide + * Sets the frame rate mode. + * + * @param value FRAME_RATE_XXX_MODE string constants. + */ + public void setPreviewFrameRateMode(String value) { + set(KEY_QC_PREVIEW_FRAME_RATE_MODE, value); + } + + /** @hide + * Gets the current auto scene detection setting. + * + * @return one of SCENE_DETECT_XXX string constant. null if auto scene detection + * setting is not supported. + * + */ + public String getSceneDetectMode() { + return get(KEY_QC_SCENE_DETECT); + } + + /** @hide + * Sets the auto scene detect. Other parameters may be changed after changing + * scene detect. After setting auto scene detection, + * applications should call getParameters to know if some parameters are + * changed. + * + * @param value SCENE_DETECT_XXX string constants. + * + */ + public void setSceneDetectMode(String value) { + set(KEY_QC_SCENE_DETECT, value); + } + + /** @hide + * Gets the current hdr bracketing mode setting. + * + * @return current hdr bracketing mode. + * @see #KEY_AE_BRACKET_OFF + * @see #KEY_AE_BRACKET_HDR + * @see #KEY_AE_BRACKET_BRACKATING + */ + public String getAEBracket() { + return get(KEY_QC_AE_BRACKET_HDR); + } + + /** @hide + * Sets the Power mode. + * + * @param value Power mode. + * @see #getPowerMode() + */ + public void setPowerMode(String value) { + set(KEY_QC_POWER_MODE, value); + } + + /** @hide + * Gets the current power mode setting. + * + * @return current power mode. null if power mode setting is not + * supported. + * @see #POWER_MODE_LOW + * @see #POWER_MODE_NORMAL + */ + public String getPowerMode() { + return get(KEY_QC_POWER_MODE); + } + + /** @hide + * Set HDR-Bracketing Level + * + * @param value HDR-Bracketing + */ + public void setAEBracket(String value){ + set(KEY_QC_AE_BRACKET_HDR, value); + } + + /** @hide + * Gets the current ISO setting. + * + * @return one of ISO_XXX string constant. null if ISO + * setting is not supported. + */ + public String getISOValue() { + return get(KEY_QC_ISO_MODE); + } + + /** @hide + * Sets the ISO. + * + * @param iso ISO_XXX string constant. + */ + public void setISOValue(String iso) { + set(KEY_QC_ISO_MODE, iso); + } + + /** @hide + * Sets the exposure time. + * + * @param value exposure time. + */ + public void setExposureTime(int value) { + set(KEY_QC_EXPOSURE_TIME, Integer.toString(value)); + } + + /** @hide + * Gets the current exposure time. + * + * @return exposure time. + */ + public String getExposureTime() { + return get(KEY_QC_EXPOSURE_TIME); + } + + /** @hide + * Gets the min supported exposure time. + * + * @return min supported exposure time. + */ + public String getMinExposureTime() { + return get(KEY_QC_MIN_EXPOSURE_TIME); + } + + /** @hide + * Gets the max supported exposure time. + * + * @return max supported exposure time. + */ + public String getMaxExposureTime() { + return get(KEY_QC_MAX_EXPOSURE_TIME); + } + + /** @hide + * Gets the current LensShade Mode. + * + * @return LensShade Mode + */ + public String getLensShade() { + return get(KEY_QC_LENSSHADE); + } + + /** @hide + * Sets the current LensShade Mode. + * + * @return LensShade Mode + */ + public void setLensShade(String lensshade) { + set(KEY_QC_LENSSHADE, lensshade); + } + + /** @hide + * Gets the current auto exposure setting. + * + * @return one of AUTO_EXPOSURE_XXX string constant. null if auto exposure + * setting is not supported. + */ + public String getAutoExposure() { + return get(KEY_QC_AUTO_EXPOSURE); + } + + /** @hide + * Sets the current auto exposure setting. + * + * @param value AUTO_EXPOSURE_XXX string constants. + */ + public void setAutoExposure(String value) { + set(KEY_QC_AUTO_EXPOSURE, value); + } + + /** @hide + * Gets the current MCE Mode. + * + * @return MCE value + */ + public String getMemColorEnhance() { + return get(KEY_QC_MEMORY_COLOR_ENHANCEMENT); + } + + /** @hide + * Sets the current MCE Mode. + * + * @return MCE Mode + */ + public void setMemColorEnhance(String mce) { + set(KEY_QC_MEMORY_COLOR_ENHANCEMENT, mce); + } + + /** @hide + * Set white balance manual cct value. + * + * @param cct user CCT setting. + */ + public void setWBManualCCT(int cct) { + set(KEY_QC_WB_MANUAL_CCT, Integer.toString(cct)); + } + + /** @hide + * Gets the WB min supported CCT. + * + * @return min cct value. + */ + public String getWBMinCCT() { + return get(KEY_QC_MIN_WB_CCT); + } + + /** @hide + * Gets the WB max supported CCT. + * + * @return max cct value. + */ + public String getMaxWBCCT() { + return get(KEY_QC_MAX_WB_CCT); + } + + /** @hide + * Gets the current WB CCT. + * + * @return CCT value + */ + public String getWBCurrentCCT() { + return get(KEY_QC_WB_MANUAL_CCT); + } + + /** @hide + * Gets the current ZSL Mode. + * + * @return ZSL mode value + */ + public String getZSLMode() { + return get(KEY_QC_ZSL); + } + + /** @hide + * Sets the current ZSL Mode. ZSL mode is set as a 0th bit in KEY_CAMERA_MODE. + * + * @return null + */ + public void setZSLMode(String zsl) { + set(KEY_QC_ZSL, zsl); + } + + /** @hide + * Sets the current Auto HDR Mode. + * @ auto_hdr auto hdr string for enable/disable + * @return null + */ + public void setAutoHDRMode(String auto_hdr){ + set(KEY_QC_AUTO_HDR_ENABLE,auto_hdr); + } + + /** @hide + * Gets the current Camera Mode Flag. Camera mode includes a + * flag(byte) which indicates different camera modes. + * For now support for ZSL added at bit0 + * + * @return Camera Mode. + */ + public String getCameraMode() { + return get(KEY_QC_CAMERA_MODE); + } + + /** @hide + * Sets the current Camera Mode. + * + * @return null + */ + public void setCameraMode(int cameraMode) { + set(KEY_QC_CAMERA_MODE, cameraMode); + } + + private static final int MANUAL_FOCUS_POS_TYPE_INDEX = 0; + private static final int MANUAL_FOCUS_POS_TYPE_DAC = 1; + /** @hide + * Set focus position. + * + * @param pos user setting of focus position. + */ + public void setFocusPosition(int type, int pos) { + set(KEY_QC_MANUAL_FOCUS_POS_TYPE, Integer.toString(type)); + set(KEY_QC_MANUAL_FOCUS_POSITION, Integer.toString(pos)); + } + + /** @hide + * Gets the current focus position. + * + * @return current focus position + */ + public String getCurrentFocusPosition() { + return get(KEY_QC_MANUAL_FOCUS_POSITION); + } + + + /** @hide + * Gets the current HFR Mode. + * + * @return VIDEO_HFR_XXX string constants + */ + public String getVideoHighFrameRate() { + return get(KEY_QC_VIDEO_HIGH_FRAME_RATE); + } + + /** @hide + * Sets the current HFR Mode. + * + * @param hfr VIDEO_HFR_XXX string constants + */ + public void setVideoHighFrameRate(String hfr) { + set(KEY_QC_VIDEO_HIGH_FRAME_RATE, hfr); + } + + /** @hide + * Gets the current Video HDR Mode. + * + * @return Video HDR mode value + */ + public String getVideoHDRMode() { + return get(KEY_QC_VIDEO_HDR); + } + + /** @hide + * Sets the current Video HDR Mode. + * + * @return null + */ + public void setVideoHDRMode(String videohdr) { + set(KEY_QC_VIDEO_HDR, videohdr); + } + + /** @hide + * Gets the current DENOISE setting. + * + * @return one of DENOISE_XXX string constant. null if Denoise + * setting is not supported. + * + */ + public String getDenoise() { + return get(KEY_QC_DENOISE); + } + + /** @hide + * Gets the current Continuous AF setting. + * + * @return one of CONTINUOUS_AF_XXX string constant. null if continuous AF + * setting is not supported. + * + */ + public String getContinuousAf() { + return get(KEY_QC_CONTINUOUS_AF); + } + + /** @hide + * Sets the current Denoise mode. + * @param value DENOISE_XXX string constants. + * + */ + + public void setDenoise(String value) { + set(KEY_QC_DENOISE, value); + } + + /** @hide + * Sets the current Continuous AF mode. + * @param value CONTINUOUS_AF_XXX string constants. + * + */ + public void setContinuousAf(String value) { + set(KEY_QC_CONTINUOUS_AF, value); + } + + /** @hide + * Gets the current selectable zone af setting. + * + * @return one of SELECTABLE_ZONE_AF_XXX string constant. null if selectable zone af + * setting is not supported. + */ + public String getSelectableZoneAf() { + return get(KEY_QC_SELECTABLE_ZONE_AF); + } + + /** @hide + * Sets the current selectable zone af setting. + * + * @param value SELECTABLE_ZONE_AF_XXX string constants. + */ + public void setSelectableZoneAf(String value) { + set(KEY_QC_SELECTABLE_ZONE_AF, value); + } + + /** @hide + * Gets the current face detection setting. + * + * @return one of FACE_DETECTION_XXX string constant. null if face detection + * setting is not supported. + * + */ + public String getFaceDetectionMode() { + return get(KEY_QC_FACE_DETECTION); + } + + /** @hide + * Sets the auto scene detect. Other settings like Touch AF/AEC might be + * changed after setting face detection. + * + * @param value FACE_DETECTION_XXX string constants. + * + */ + public void setFaceDetectionMode(String value) { + set(KEY_QC_FACE_DETECTION, value); + } + + /** @hide + * Gets the current video rotation setting. + * + * @return one of VIDEO_QC_ROTATION_XXX string constant. null if video rotation + * setting is not supported. + */ + public String getVideoRotation() { + return get(KEY_QC_VIDEO_ROTATION); + } + + /** @hide + * Sets the current video rotation setting. + * + * @param value VIDEO_QC_ROTATION_XXX string constants. + */ + public void setVideoRotation(String value) { + set(KEY_QC_VIDEO_ROTATION, value); + } + /** @hide + * Gets the supported video rotation modes. + * + * @return a List of VIDEO_QC_ROTATION_XXX string constant. null if this + * setting is not supported. + */ + public List<String> getSupportedVideoRotationValues() { + String str = get(KEY_QC_VIDEO_ROTATION + SUPPORTED_VALUES_SUFFIX); + return split(str); + } + + // Splits a comma delimited string to an ArrayList of Coordinate. + // Return null if the passing string is null or the Coordinate is 0. + private ArrayList<Coordinate> splitCoordinate(String str) { + if (str == null) return null; + TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(','); + splitter.setString(str); + ArrayList<Coordinate> coordinateList = new ArrayList<Coordinate>(); + for (String s : splitter) { + Coordinate coordinate = strToCoordinate(s); + if (coordinate != null) coordinateList.add(coordinate); + } + if (coordinateList.size() == 0) return null; + return coordinateList; + } + + // Parses a string (ex: "500x500") to Coordinate object. + // Return null if the passing string is null. + private Coordinate strToCoordinate(String str) { + if (str == null) return null; + + int pos = str.indexOf('x'); + if (pos != -1) { + String x = str.substring(0, pos); + String y = str.substring(pos + 1); + return new Coordinate(Integer.parseInt(x), + Integer.parseInt(y)); + } + Log.e(TAG, "Invalid Coordinate parameter string=" + str); + return null; + } + /* ### QC ADD-ONS: END */ }; } diff --git a/core/java/android/hardware/SystemSensorManager.java b/core/java/android/hardware/SystemSensorManager.java index d8ab6f7da82d..6c4bf2cb4984 100644 --- a/core/java/android/hardware/SystemSensorManager.java +++ b/core/java/android/hardware/SystemSensorManager.java @@ -240,6 +240,7 @@ public class SystemSensorManager extends SensorManager { @Override protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor, int delayUs, Handler handler, int maxBatchReportLatencyUs, int reservedFlags) { + android.util.SeempLog.record_sensor_rate(381, sensor, delayUs); if (listener == null || sensor == null) { Log.e(TAG, "sensor or listener is null"); return false; @@ -287,6 +288,7 @@ public class SystemSensorManager extends SensorManager { /** @hide */ @Override protected void unregisterListenerImpl(SensorEventListener listener, Sensor sensor) { + android.util.SeempLog.record_sensor(382, sensor); // Trigger Sensors should use the cancelTriggerSensor call. if (sensor != null && sensor.getReportingMode() == Sensor.REPORTING_MODE_ONE_SHOT) { return; diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java index 99b297abe92a..a00f288bce5e 100644 --- a/core/java/android/hardware/camera2/CameraDevice.java +++ b/core/java/android/hardware/camera2/CameraDevice.java @@ -244,6 +244,10 @@ public abstract class CameraDevice implements AutoCloseable { @NonNull CameraCaptureSession.StateCallback callback, @Nullable Handler handler) throws CameraAccessException; + /** @hide */ + public abstract void setVendorStreamConfigMode(int index) + throws CameraAccessException; + /** * <p>Create a new camera capture session by providing the target output set of Surfaces and * its corresponding surface configuration to the camera device.</p> @@ -819,28 +823,6 @@ public abstract class CameraDevice implements AutoCloseable { * </table><br> * The same logic applies to other hardware levels and capabilities. * </p> - * - * <p> Devices with the ULTRA_HIGH_RESOLUTION_SENSOR capability have some additional guarantees - * which clients can take advantage of : </p> - * - * <h5>Additional guaranteed combinations for ULTRA_HIGH_RESOLUTION sensors</h5> - * - * <table> - * <tr> <th colspan="3" id="rb">Target 1</th> <th colspan="3" id="rb">Target 2</th> <th colspan="3" id="rb">Target 3</th> <th rowspan="2">Sample use case(s)</th> </tr> - * <tr> <th>Type</th><th id="rb"> SC Map</th><th id="rb">Max size</th> <th>Type</th><th id="rb"> SC Map</th><th id="rb">Max size</th> <th>Type</th><th id="rb"> SC Map</th><th id="rb">Max size</th></tr> - * <tr> <td>{@code YUV / JPEG / RAW}</td><td id="rb">{@code MAX_RES}</td><td id="rb">{@code MAX}</td><td id="rb">{@code PRIV / YUV}</td><td id="rb">{@code DEFAULT}</td><td id="rb">{@code PREVIEW}</td><td colspan="3" id="rb"></td> <td>Ultra high res still image capture with preview</td> </tr> - * <tr> <td>{@code YUV / JPEG / RAW}</td><td id="rb">{@code MAX_RES}</td><td id="rb">{@code MAX}</td><td id="rb">{@code PRIV}</td><td id="rb">{@code DEFAULT}</td><td id="rb">{@code PREVIEW}</td><td id="rb">{@code PRIV / YUV}</td><td id="rb">{@code DEFAULT}</td><td id="rb">{@code RECORD}</td> <td>Ultra high res still capture with preview + app based RECORD size analysis</td> </tr> - * <tr> <td>{@code YUV / JPEG / RAW}</td><td id="rb">{@code MAX_RES}</td><td id="rb">{@code MAX}</td><td id="rb">{@code PRIV}</td><td id="rb">{@code DEFAULT}</td><td id="rb">{@code PREVIEW}</td><td id="rb">{@code JPEG / YUV / RAW}</td><td id="rb">{@code DEFAULT}</td><td id="rb">{@code MAX}</td> <td>Ultra high res still image capture with preview + default sensor pixel mode analysis stream</td> </tr> - * </table><br> - * - * <p> Here, SC Map, refers to the {@link StreamConfigurationMap}, the target stream sizes must - * be chosen from. {@code DEFAULT} refers to the default sensor pixel mode {@link - * StreamConfigurationMap} and {@code MAX_RES} refers to the maximum resolution {@link - * StreamConfigurationMap}. For {@code MAX_RES} streams, {@code MAX} in the {@code Max size} column refers to the maximum size from - * {@link StreamConfigurationMap#getOutputSizes} and {@link StreamConfigurationMap#getHighResolutionOutputSizes}. - * Note: The same capture request must not mix targets from - * {@link StreamConfigurationMap}s corresponding to different sensor pixel modes. </p> - * * <p> 10-bit output capable * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT} * devices support at least the following stream combinations: </p> @@ -1147,16 +1129,6 @@ public abstract class CameraDevice implements AutoCloseable { * <tr> <td>{@code PRIV}</td><td id="rb">{@code MULTI_RES}</td> <td>{@code PRIV}</td><td id="rb">{@code MULTI_RES}</td> <td>{@code YUV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code YUV}</td><td id="rb">{@code MULTI_RES}</td> <td></td><td id="rb"></td> <td>Maximum-resolution two-input ZSL in-app processing.</td> </tr> * <tr> <td>{@code PRIV}/{@code YUV}</td><td id="rb">{@code MULTI_RES}</td> <td>Same as input</td><td id="rb">{@code MULTI_RES}</td> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code YUV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code JPEG}</td><td id="rb">{@code MULTI_RES}</td> <td>ZSL still capture and in-app processing.</td> </tr> * </table><br> - * <p> Devices with the ULTRA_HIGH_RESOLUTION_SENSOR capability have some additional guarantees - * which clients can take advantage of : </p> - * <table> - * <tr><th colspan="13">Additional guaranteed combinations for ULTRA_HIGH_RESOLUTION sensors (YUV / PRIV inputs are guaranteed only if YUV / PRIVATE reprocessing are supported)</th></tr> - * <tr> <th colspan="3" id="rb">Input</th> <th colspan="3" id="rb">Target 1</th> <th colspan="3" id="rb">Target 2</th> <th colspan="3" id="rb">Target 3</th> <th rowspan="2">Sample use case(s)</th> </tr> - * <tr> <th>Type</th><th id="rb"> SC Map</th><th id="rb">Max size</th><th>Type</th><th id="rb"> SC Map</th><th id="rb">Max size</th> <th>Type</th><th id="rb"> SC Map</th><th id="rb">Max size</th> <th>Type</th><th id="rb"> SC Map</th><th id="rb">Max size</th></tr> - * <tr> <td>{@code RAW}</td><td id="rb">{@code MAX_RES}</td><td id="rb">{@code MAX}</td><td>{@code RAW}</td><td id="rb">{@code MAX_RES}</td><td id="rb">{@code MAX}</td><td id="rb">{@code PRIV / YUV}</td><td id="rb">{@code DEFAULT}</td><td id="rb">{@code PREVIEW}</td><td colspan="3" id="rb"></td> <td>RAW remosaic reprocessing with separate preview</td> </tr> - * <tr> <td>{@code RAW}</td><td id="rb">{@code MAX_RES}</td><td id="rb">{@code MAX}</td><td>{@code RAW}</td><td id="rb">{@code MAX_RES}</td><td id="rb">{@code MAX}</td><td id="rb">{@code PRIV / YUV}</td><td id="rb">{@code DEFAULT}</td><td id="rb">{@code PREVIEW}</td><td id="rb">{@code JPEG / YUV}</td><td id="rb">{@code MAX_RES}</td><td id="rb">{@code MAX}</td> <td>Ultra high res RAW -> JPEG / YUV with seperate preview</td> </tr> - * <tr> <td>{@code YUV / PRIV}</td><td id="rb">{@code MAX_RES}</td><td id="rb">{@code MAX}</td> <td>{@code YUV / PRIV}</td><td id="rb">{@code MAX_RES}</td><td id="rb">{@code MAX}</td><td id="rb">{@code YUV / PRIV}</td><td id="rb">{@code DEFAULT}</td><td id="rb">{@code PREVIEW}</td><td id="rb">{@code JPEG }</td><td id="rb">{@code MAX_RES}</td><td id="rb">{@code MAX}</td> <td> Ultra high res PRIV / YUV -> YUV / JPEG reprocessing with seperate preview</td> </tr> - * </table><br> * No additional mandatory stream combinations for RAW capability and LEVEL-3 hardware level. * </p> * diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java index 85f8ca66715b..203cb059737f 100644 --- a/core/java/android/hardware/camera2/CameraManager.java +++ b/core/java/android/hardware/camera2/CameraManager.java @@ -23,6 +23,7 @@ import android.annotation.RequiresPermission; import android.annotation.SystemApi; import android.annotation.SystemService; import android.annotation.TestApi; +import android.app.ActivityThread; import android.app.compat.CompatChanges; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledSince; @@ -54,6 +55,8 @@ import android.os.RemoteException; import android.os.ServiceManager; import android.os.ServiceSpecificException; import android.os.SystemProperties; +import android.text.TextUtils; +import android.util.Log; import android.util.ArrayMap; import android.util.ArraySet; import android.util.Log; @@ -1946,8 +1949,22 @@ public final class CameraManager { private String[] extractCameraIdListLocked() { String[] cameraIds = null; + boolean exposeAuxCamera = false; + String packageName = ActivityThread.currentOpPackageName(); + String packageList = SystemProperties.get("vendor.camera.aux.packagelist"); + if (packageList.length() > 0) { + TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(','); + splitter.setString(packageList); + for (String str : splitter) { + if (packageName.equals(str)) { + exposeAuxCamera = true; + break; + } + } + } int idCount = 0; for (int i = 0; i < mDeviceStatus.size(); i++) { + if(!exposeAuxCamera && (i == 2)) break; int status = mDeviceStatus.valueAt(i); if (status == ICameraServiceListener.STATUS_NOT_PRESENT || status == ICameraServiceListener.STATUS_ENUMERATING) continue; @@ -1956,6 +1973,7 @@ public final class CameraManager { cameraIds = new String[idCount]; idCount = 0; for (int i = 0; i < mDeviceStatus.size(); i++) { + if(!exposeAuxCamera && (i == 2)) break; int status = mDeviceStatus.valueAt(i); if (status == ICameraServiceListener.STATUS_NOT_PRESENT || status == ICameraServiceListener.STATUS_ENUMERATING) continue; @@ -2220,6 +2238,26 @@ public final class CameraManager { throw new IllegalArgumentException("cameraId was null"); } + /* Force to expose only two cameras + * if the package name does not falls in this bucket + */ + boolean exposeAuxCamera = false; + String packageName = ActivityThread.currentOpPackageName(); + String packageList = SystemProperties.get("vendor.camera.aux.packagelist"); + if (packageList.length() > 0) { + TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(','); + splitter.setString(packageList); + for (String str : splitter) { + if (packageName.equals(str)) { + exposeAuxCamera = true; + break; + } + } + } + if (exposeAuxCamera == false && (Integer.parseInt(cameraId) >= 2)) { + throw new IllegalArgumentException("invalid cameraId"); + } + ICameraService cameraService = getCameraService(); if (cameraService == null) { throw new CameraAccessException(CameraAccessException.CAMERA_DISCONNECTED, @@ -2488,6 +2526,30 @@ public final class CameraManager { } private void onStatusChangedLocked(int status, String id) { + /* Force to ignore the last mono/aux camera status update + * if the package name does not falls in this bucket + */ + boolean exposeMonoCamera = false; + String packageName = ActivityThread.currentOpPackageName(); + String packageList = SystemProperties.get("vendor.camera.aux.packagelist"); + if (packageList.length() > 0) { + TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(','); + splitter.setString(packageList); + for (String str : splitter) { + if (packageName.equals(str)) { + exposeMonoCamera = true; + break; + } + } + } + + if (exposeMonoCamera == false) { + if (Integer.parseInt(id) >= 2) { + Log.w(TAG, "[soar.cts] ignore the status update of camera: " + id); + return; + } + } + if (DEBUG) { Log.v(TAG, String.format("Camera id %s has status changed to 0x%x", id, status)); @@ -2634,6 +2696,31 @@ public final class CameraManager { String.format("Camera id %s has torch status changed to 0x%x", id, status)); } + /* Force to ignore the aux or composite camera torch status update + * if the package name does not falls in this bucket + */ + boolean exposeMonoCamera = false; + String packageName = ActivityThread.currentOpPackageName(); + String packageList = SystemProperties.get("vendor.camera.aux.packagelist"); + if (packageList.length() > 0) { + TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(','); + splitter.setString(packageList); + for (String str : splitter) { + if (packageName.equals(str)) { + exposeMonoCamera = true; + break; + } + } + } + + if (exposeMonoCamera == false) { + if (Integer.parseInt(id) >= 2) { + Log.w(TAG, "ignore the torch status update of camera: " + id); + return; + } + } + + if (!validTorchStatus(status)) { Log.e(TAG, String.format("Ignoring invalid device %s torch status 0x%x", id, status)); diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java index dfc27caa362c..2d5862f9aad3 100644 --- a/core/java/android/hardware/camera2/CameraMetadata.java +++ b/core/java/android/hardware/camera2/CameraMetadata.java @@ -1149,14 +1149,10 @@ public abstract class CameraMetadata<TKey> { * <code>{@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}</code> describes the streams supported in 'default' * mode. * The stream configurations supported in 'max resolution' mode are described by - * <code>{@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION android.scaler.streamConfigurationMapMaximumResolution}</code>. - * The maximum resolution mode pixel array size of a camera device - * (<code>{@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}</code>) with this capability, - * will be at least 24 megapixels.</p> + * <code>{@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION android.scaler.streamConfigurationMapMaximumResolution}</code>.</p> * * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION - * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES */ public static final int REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR = 16; diff --git a/core/java/android/hardware/camera2/impl/CameraAdvancedExtensionSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraAdvancedExtensionSessionImpl.java index 65d4b433f132..9861422102a2 100644 --- a/core/java/android/hardware/camera2/impl/CameraAdvancedExtensionSessionImpl.java +++ b/core/java/android/hardware/camera2/impl/CameraAdvancedExtensionSessionImpl.java @@ -1067,7 +1067,6 @@ public final class CameraAdvancedExtensionSessionImpl extends CameraExtensionSes } catch (IllegalStateException e) { Log.e(TAG, "Capture session closed!"); } - return seqId; } @@ -1091,7 +1090,6 @@ public final class CameraAdvancedExtensionSessionImpl extends CameraExtensionSes } catch (IllegalStateException e) { Log.e(TAG, "Capture session closed!"); } - return seqId; } diff --git a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java index b9eba9c1d541..b3b24cb78d38 100644 --- a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java +++ b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java @@ -222,7 +222,8 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession } else if (request.isReprocess() && !isReprocessable()) { throw new IllegalArgumentException("this capture session cannot handle reprocess " + "requests"); - } else if (request.isReprocess() && request.getReprocessableSessionId() != mId) { + } else if (!mDeviceImpl.isPrivilegedApp() && + request.isReprocess() && request.getReprocessableSessionId() != mId) { throw new IllegalArgumentException("capture request was created for another session"); } } diff --git a/core/java/android/hardware/camera2/impl/CameraConstrainedHighSpeedCaptureSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraConstrainedHighSpeedCaptureSessionImpl.java index 87553d8c42ab..bbac7e379615 100644 --- a/core/java/android/hardware/camera2/impl/CameraConstrainedHighSpeedCaptureSessionImpl.java +++ b/core/java/android/hardware/camera2/impl/CameraConstrainedHighSpeedCaptureSessionImpl.java @@ -26,11 +26,13 @@ import android.hardware.camera2.CameraOfflineSession.CameraOfflineSessionCallbac import android.hardware.camera2.CaptureRequest; import android.hardware.camera2.params.OutputConfiguration; import android.hardware.camera2.params.StreamConfigurationMap; +import android.hardware.camera2.params.HighSpeedVideoConfiguration; import android.hardware.camera2.utils.SurfaceUtils; import android.os.Handler; import android.os.ConditionVariable; import android.util.Range; import android.util.Log; +import android.util.Size; import android.view.Surface; import java.util.ArrayList; @@ -118,7 +120,7 @@ public class CameraConstrainedHighSpeedCaptureSessionImpl } Log.v(TAG, "previewFps: " + previewFps); - int requestListSize = fpsRange.getUpper() / previewFps; + int requestListSize = getHighSpeedRequestListSize(fpsRange, outputSurfaces); // If it's a preview, keep requestList size fixed = 1. if (fpsRange.getUpper() > fpsRange.getLower()) { requestListSize = 1; @@ -203,6 +205,34 @@ public class CameraConstrainedHighSpeedCaptureSessionImpl return true; } + private int getHighSpeedRequestListSize(Range<Integer> fpsRange, Collection<Surface> surfaces) { + int requestListSize = 0; + + for (Surface surface : surfaces) { + + if (SurfaceUtils.isSurfaceForHwVideoEncoder(surface)) { + Size surfaceSize = SurfaceUtils.getSurfaceSize(surface); + HighSpeedVideoConfiguration[] highSpeedVideoConfigurations = + mCharacteristics.get(CameraCharacteristics.CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS); + + // Get the batchsize for matching FPS & video size + for (HighSpeedVideoConfiguration config : highSpeedVideoConfigurations) { + if (config.getSize().equals(surfaceSize) && config.getFpsRange().equals(fpsRange)) { + requestListSize = config.getBatchSizeMax(); + break; + } + } + break; + } + } + + if (requestListSize == 0) { + // If cant' find the matching batch size, limit the preview to 30fps. + requestListSize = fpsRange.getUpper() / 30; + } + return requestListSize; + } + @Override public CameraDevice getDevice() { return mSessionImpl.getDevice(); diff --git a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java index e23bbc6c347d..a06620abf39b 100644 --- a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java +++ b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java @@ -16,11 +16,14 @@ package android.hardware.camera2.impl; +import static android.hardware.camera2.CameraAccessException.CAMERA_IN_USE; import static com.android.internal.util.function.pooled.PooledLambda.obtainRunnable; import android.annotation.NonNull; import android.content.Context; import android.hardware.ICameraService; +import android.app.ActivityThread; +import android.graphics.ImageFormat; import android.hardware.camera2.CameraAccessException; import android.hardware.camera2.CameraCaptureSession; import android.hardware.camera2.CameraCharacteristics; @@ -52,6 +55,8 @@ import android.os.Looper; import android.os.RemoteException; import android.os.ServiceSpecificException; import android.os.SystemClock; +import android.os.SystemProperties; +import android.text.TextUtils; import android.util.Log; import android.util.Range; import android.util.Size; @@ -83,7 +88,7 @@ public class CameraDeviceImpl extends CameraDevice private final boolean DEBUG = false; private static final int REQUEST_ID_NONE = -1; - + private int customOpMode = 0; // TODO: guard every function with if (!mRemoteDevice) check (if it was closed) private ICameraDeviceUserWrapper mRemoteDevice; private boolean mRemoteDeviceInit = false; @@ -151,6 +156,7 @@ public class CameraDeviceImpl extends CameraDevice private int mNextSessionId = 0; private final int mAppTargetSdkVersion; + private boolean mIsPrivilegedApp = false; private ExecutorService mOfflineSwitchService; private CameraOfflineSessionImpl mOfflineSessionImpl; @@ -301,6 +307,7 @@ public class CameraDeviceImpl extends CameraDevice } else { mTotalPartialCount = partialCount; } + mIsPrivilegedApp = checkPrivilegedAppList(); } public CameraDeviceCallbacks getCallbacks() { @@ -391,6 +398,10 @@ public class CameraDeviceImpl extends CameraDevice } } + public void setVendorStreamConfigMode(int fpsrange) { + customOpMode = fpsrange; + } + @Override public String getId() { return mCameraId; @@ -509,6 +520,7 @@ public class CameraDeviceImpl extends CameraDevice mConfiguredOutputs.put(streamId, outConfig); } } + operatingMode = (operatingMode | (customOpMode << 16)); int offlineStreamIds[]; if (sessionParams != null) { @@ -1527,6 +1539,27 @@ public class CameraDeviceImpl extends CameraDevice return false; } + private boolean checkPrivilegedAppList() { + String packageName = ActivityThread.currentOpPackageName(); + String packageList = SystemProperties.get("persist.vendor.camera.privapp.list"); + + if (packageList.length() > 0) { + TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(','); + splitter.setString(packageList); + for (String str : splitter) { + if (packageName.equals(str)) { + return true; + } + } + } + + return false; + } + + public boolean isPrivilegedApp() { + return mIsPrivilegedApp; + } + private void checkInputConfiguration(InputConfiguration inputConfig) { if (inputConfig == null) { return; @@ -1564,6 +1597,14 @@ public class CameraDeviceImpl extends CameraDevice inputConfig.getWidth() + "x" + inputConfig.getHeight() + " is not valid"); } } else { + /* + * don't check input format and size, + * if the package name is in the white list + */ + if (isPrivilegedApp()) { + Log.w(TAG, "ignore input format/size check for white listed app"); + return; + } if (!checkInputConfigurationWithStreamConfigurations(inputConfig, /*maxRes*/false) && !checkInputConfigurationWithStreamConfigurations(inputConfig, /*maxRes*/true)) { throw new IllegalArgumentException("Input config with format " + diff --git a/core/java/android/hardware/camera2/impl/CameraExtensionSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraExtensionSessionImpl.java index 9ebef0b59ece..92250e05d227 100644 --- a/core/java/android/hardware/camera2/impl/CameraExtensionSessionImpl.java +++ b/core/java/android/hardware/camera2/impl/CameraExtensionSessionImpl.java @@ -319,7 +319,6 @@ public final class CameraExtensionSessionImpl extends CameraExtensionSession { CameraExtensionCharacteristics.PROCESSING_INPUT_FORMAT); mPreviewImageProcessor.onResolutionUpdate(new Size(repeatingSurfaceInfo.mWidth, repeatingSurfaceInfo.mHeight)); - mPreviewImageProcessor.onOutputSurface(null, -1); mRepeatingRequestImageReader = ImageReader.newInstance(repeatingSurfaceInfo.mWidth, repeatingSurfaceInfo.mHeight, CameraExtensionCharacteristics.PROCESSING_INPUT_FORMAT, PREVIEW_QUEUE_SIZE, diff --git a/core/java/android/hardware/camera2/utils/SurfaceUtils.java b/core/java/android/hardware/camera2/utils/SurfaceUtils.java index 6c83057fdf29..9bab766f33de 100644 --- a/core/java/android/hardware/camera2/utils/SurfaceUtils.java +++ b/core/java/android/hardware/camera2/utils/SurfaceUtils.java @@ -34,6 +34,11 @@ import java.util.Collection; import java.util.Iterator; import java.util.List; +import android.app.ActivityThread; +import android.os.SystemProperties; +import android.text.TextUtils; + + /** * Various Surface utilities. */ @@ -241,7 +246,13 @@ public class SurfaceUtils { + " the size must be 1 or 2"); } + if (isPrivilegedApp()) { + //skip checks for privileged apps + return; + } + List<Size> highSpeedSizes = null; + if (fpsRange == null) { highSpeedSizes = Arrays.asList(config.getHighSpeedVideoSizes()); } else { @@ -303,4 +314,21 @@ public class SurfaceUtils { /*out*/int[/*2*/] dimens); private static native long nativeGetSurfaceId(Surface surface); + + private static boolean isPrivilegedApp() { + String packageName = ActivityThread.currentOpPackageName(); + String packageList = SystemProperties.get("persist.camera.privapp.list"); + + if (packageList.length() > 0) { + TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(','); + splitter.setString(packageList); + for (String str : splitter) { + if (packageName.equals(str)) { + return true; + } + } + } + + return false; + } } diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java index 21e4ab195f28..a8bd6ab9ddfb 100644 --- a/core/java/android/hardware/display/DisplayManager.java +++ b/core/java/android/hardware/display/DisplayManager.java @@ -38,6 +38,7 @@ import android.content.res.Resources; import android.graphics.Point; import android.media.projection.MediaProjection; import android.os.Build; +import android.os.DeviceIntegrationUtils; import android.os.Handler; import android.os.HandlerExecutor; import android.os.Looper; diff --git a/core/java/android/hardware/display/RemoteTaskHelper.java b/core/java/android/hardware/display/RemoteTaskHelper.java new file mode 100644 index 000000000000..998060e1e4ef --- /dev/null +++ b/core/java/android/hardware/display/RemoteTaskHelper.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.hardware.display; + +import android.os.IBinder; +import android.os.ServiceManager; +import android.os.RemoteException; +import android.content.Context; +import android.app.ICrossDeviceService; + +/** + * Manager communication with the Cross Device Service on behalf of + * Remote task issues. You're probably looking for {@link ICrossDeviceService}. + * + * @hide + */ +public class RemoteTaskHelper { + + public static boolean isFromRemoteTaskWhiteList() { + IBinder b = ServiceManager.getService(Context.CROSS_DEVICE_SERVICE); + if (b != null) { + ICrossDeviceService crossDeviceService = ICrossDeviceService.Stub.asInterface(b); + try { + return crossDeviceService.isFromBackgroundWhiteList(); + } catch (RemoteException ex) { + throw ex.rethrowFromSystemServer(); + } + } + return false; + } +}
\ No newline at end of file diff --git a/core/java/android/hardware/face/FaceManager.java b/core/java/android/hardware/face/FaceManager.java index 02212968cdb0..c9d58c75579f 100644 --- a/core/java/android/hardware/face/FaceManager.java +++ b/core/java/android/hardware/face/FaceManager.java @@ -906,10 +906,6 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan } } } - - // This is used as a last resort in case a vendor string is missing - // It should not happen for anything other than FACE_ERROR_VENDOR, but - // warn and use the default if all else fails. Slog.w(TAG, "Invalid error message: " + errMsg + ", " + vendorCode); return context.getString( com.android.internal.R.string.face_error_vendor_unknown); diff --git a/core/java/android/hardware/fingerprint/FingerprintManager.java b/core/java/android/hardware/fingerprint/FingerprintManager.java index 01977f6195ff..445ba4a94b1c 100644 --- a/core/java/android/hardware/fingerprint/FingerprintManager.java +++ b/core/java/android/hardware/fingerprint/FingerprintManager.java @@ -1677,10 +1677,6 @@ public class FingerprintManager implements BiometricAuthenticator, BiometricFing } } } - - // This is used as a last resort in case a vendor string is missing - // It should not happen for anything other than FINGERPRINT_ERROR_VENDOR, but - // warn and use the default if all else fails. Slog.w(TAG, "Invalid error message: " + errMsg + ", " + vendorCode); return context.getString( com.android.internal.R.string.fingerprint_error_vendor_unknown); diff --git a/core/java/android/nfc/INfcAdapter.aidl b/core/java/android/nfc/INfcAdapter.aidl index a6d8cafe8263..9e8674bbfbfd 100644 --- a/core/java/android/nfc/INfcAdapter.aidl +++ b/core/java/android/nfc/INfcAdapter.aidl @@ -1,4 +1,7 @@ /* + * Copyright (c) 2018, The Linux Foundation. All rights reserved. + * Not a Contribution. + * * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -32,6 +35,7 @@ import android.nfc.ITagRemovedCallback; import android.nfc.INfcDta; import android.nfc.NfcAntennaInfo; import android.os.Bundle; +import android.os.IBinder; /** * @hide @@ -43,6 +47,8 @@ interface INfcAdapter INfcFCardEmulation getNfcFCardEmulationInterface(); INfcAdapterExtras getNfcAdapterExtrasInterface(in String pkg); INfcDta getNfcDtaInterface(in String pkg); + IBinder getNfcAdapterVendorInterface(in String vendor); + int getState(); boolean disable(boolean saveState); boolean enable(); diff --git a/core/java/android/nfc/cardemulation/AidGroup.java b/core/java/android/nfc/cardemulation/AidGroup.java index 2436e57b74bc..d4c966be04b8 100644 --- a/core/java/android/nfc/cardemulation/AidGroup.java +++ b/core/java/android/nfc/cardemulation/AidGroup.java @@ -1,4 +1,7 @@ /* + * Copyright (c) 2018, The Linux Foundation. All rights reserved. + * Not a Contribution. + * * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -39,7 +42,7 @@ import java.util.List; * * @hide */ -public final class AidGroup implements Parcelable { +public class AidGroup implements Parcelable { /** * The maximum number of AIDs that can be present in any one group. */ @@ -48,11 +51,11 @@ public final class AidGroup implements Parcelable { static final String TAG = "AidGroup"; @UnsupportedAppUsage - final List<String> aids; + protected List<String> aids; @UnsupportedAppUsage - final String category; + protected String category; @UnsupportedAppUsage - final String description; + protected String description; /** * Creates a new AidGroup object. diff --git a/core/java/android/nfc/cardemulation/ApduServiceInfo.java b/core/java/android/nfc/cardemulation/ApduServiceInfo.java index 793a70e93f56..267658c4369e 100644 --- a/core/java/android/nfc/cardemulation/ApduServiceInfo.java +++ b/core/java/android/nfc/cardemulation/ApduServiceInfo.java @@ -1,4 +1,7 @@ /* + * Copyright (c) 2018, The Linux Foundation. All rights reserved. + * Not a Contribution. + * * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -49,24 +52,24 @@ import java.util.Map; /** * @hide */ -public final class ApduServiceInfo implements Parcelable { +public class ApduServiceInfo implements Parcelable { static final String TAG = "ApduServiceInfo"; /** * The service that implements this */ @UnsupportedAppUsage - final ResolveInfo mService; + protected ResolveInfo mService; /** * Description of the service */ - final String mDescription; + protected String mDescription; /** * Whether this service represents AIDs running on the host CPU */ - final boolean mOnHost; + protected boolean mOnHost; /** * Offhost reader name. @@ -84,18 +87,18 @@ public final class ApduServiceInfo implements Parcelable { * Mapping from category to static AID group */ @UnsupportedAppUsage - final HashMap<String, AidGroup> mStaticAidGroups; + protected HashMap<String, AidGroup> mStaticAidGroups; /** * Mapping from category to dynamic AID group */ @UnsupportedAppUsage - final HashMap<String, AidGroup> mDynamicAidGroups; + protected HashMap<String, AidGroup> mDynamicAidGroups; /** * Whether this service should only be started when the device is unlocked. */ - final boolean mRequiresDeviceUnlock; + protected boolean mRequiresDeviceUnlock; /** * Whether this service should only be started when the device is screen on. @@ -105,17 +108,17 @@ public final class ApduServiceInfo implements Parcelable { /** * The id of the service banner specified in XML. */ - final int mBannerResourceId; + protected int mBannerResourceId; /** * The uid of the package the service belongs to */ - final int mUid; + protected int mUid; /** * Settings Activity for this service */ - final String mSettingsActivityName; + protected String mSettingsActivityName; /** * @hide diff --git a/core/java/android/nfc/tech/MifareClassic.java b/core/java/android/nfc/tech/MifareClassic.java index 26f54e692289..62603b80b7e4 100644 --- a/core/java/android/nfc/tech/MifareClassic.java +++ b/core/java/android/nfc/tech/MifareClassic.java @@ -1,4 +1,6 @@ /* + * Copyright (C) 2018 NXP Semiconductors + * The original Work has been changed by NXP Semiconductors. * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -173,6 +175,10 @@ public final class MifareClassic extends BasicTagTechnology { mType = TYPE_CLASSIC; mSize = SIZE_4K; break; + case 0x19: + mType = TYPE_CLASSIC; + mSize = SIZE_2K; + break; case 0x28: mType = TYPE_CLASSIC; mSize = SIZE_1K; diff --git a/core/java/android/nfc/tech/NfcA.java b/core/java/android/nfc/tech/NfcA.java index 7e6648361670..ca51057b6104 100644 --- a/core/java/android/nfc/tech/NfcA.java +++ b/core/java/android/nfc/tech/NfcA.java @@ -1,4 +1,6 @@ /* + * Copyright (C) 2018 NXP Semiconductors + * The original Work has been changed by NXP Semiconductors. * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/core/java/android/os/DeviceIntegrationUtils.java b/core/java/android/os/DeviceIntegrationUtils.java new file mode 100644 index 000000000000..9eddd98607ed --- /dev/null +++ b/core/java/android/os/DeviceIntegrationUtils.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.os; + +import android.compat.annotation.UnsupportedAppUsage; + +/** + * Device Integration Utils + * + * {@hide} + */ +public class DeviceIntegrationUtils { + public static final boolean DISABLE_DEVICE_INTEGRATION = true; + + @UnsupportedAppUsage + private DeviceIntegrationUtils() { + } +} diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java index 04525e8b8ff7..dd41b62e20d0 100644 --- a/core/java/android/os/Process.java +++ b/core/java/android/os/Process.java @@ -266,6 +266,13 @@ public class Process { */ public static final int INET_GID = 3003; + /** + * Defines the UID/GID for the vendor based data process. + * This is used to register AIDL service from vendor app context. + * @hide + */ + public static final int VENDOR_DATA_UID = 2918; + /** {@hide} */ public static final int NOBODY_UID = 9999; @@ -1107,6 +1114,31 @@ public class Process { throws IllegalArgumentException, SecurityException; /** + * Sets the scheduling group for processes in the same cgroup.procs of uid and pid + * @hide + * @param uid The user identifier of the process to change. + * @param pid The identifier of the process to change. + * @param group The target group for this process from THREAD_GROUP_*. + * @param dex2oat_only is the cgroup apply for all or for dex2oat only. + * + * @throws IllegalArgumentException Throws IllegalArgumentException if + * <var>tid</var> does not exist. + * @throws SecurityException Throws SecurityException if your process does + * not have permission to modify the given thread, or to use the given + * priority. + * + * group == THREAD_GROUP_DEFAULT means to move all non-background priority + * threads to the foreground scheduling group, but to leave background + * priority threads alone. group == THREAD_GROUP_BG_NONINTERACTIVE moves all + * threads, regardless of priority, to the background scheduling group. + * group == THREAD_GROUP_FOREGROUND is not allowed. + * + * Always sets cpusets. + */ + public static final native void setCgroupProcsProcessGroup(int uid, int pid, int group, boolean dex2oat_only) + throws IllegalArgumentException, SecurityException; + + /** * Freeze or unfreeze the specified process. * * @param pid Identifier of the process to freeze or unfreeze. diff --git a/core/java/android/os/storage/DiskInfo.java b/core/java/android/os/storage/DiskInfo.java index d32928cbeb38..b751e821c78d 100644 --- a/core/java/android/os/storage/DiskInfo.java +++ b/core/java/android/os/storage/DiskInfo.java @@ -50,6 +50,8 @@ public class DiskInfo implements Parcelable { public static final int FLAG_DEFAULT_PRIMARY = 1 << 1; public static final int FLAG_SD = 1 << 2; public static final int FLAG_USB = 1 << 3; + public static final int FLAG_EMMC = 1 << 4; + public static final int FLAG_UFS_CARD = 1 << 5; /** The FLAG_STUB_VISIBLE is set from vold, which gets the flag from outside (e.g., ChromeOS) */ public static final int FLAG_STUB_VISIBLE = 1 << 6; diff --git a/core/java/android/provider/Browser.java b/core/java/android/provider/Browser.java index afa7b80f58a0..472c0fb110f9 100644 --- a/core/java/android/provider/Browser.java +++ b/core/java/android/provider/Browser.java @@ -242,6 +242,7 @@ public class Browser { */ public static final Cursor getAllBookmarks(ContentResolver cr) throws IllegalStateException { + android.util.SeempLog.record(32); return new MatrixCursor(new String[]{Bookmarks.URL}, 0); } @@ -254,6 +255,7 @@ public class Browser { */ public static final Cursor getAllVisitedUrls(ContentResolver cr) throws IllegalStateException { + android.util.SeempLog.record(33); return new MatrixCursor(new String[]{Combined.URL}, 0); } @@ -262,6 +264,7 @@ public class Browser { } private static final Cursor getVisitedLike(ContentResolver cr, String url) { + android.util.SeempLog.record(34); boolean secure = false; String compareString = url; if (compareString.startsWith("http://")) { @@ -323,6 +326,7 @@ public class Browser { @Deprecated @UnsupportedAppUsage public static final String[] getVisitedHistory(ContentResolver cr) { + android.util.SeempLog.record(35); return new String[0]; } @@ -358,6 +362,7 @@ public class Browser { * @removed */ public static final void clearHistory(ContentResolver cr) { + android.util.SeempLog.record(37); } @@ -419,6 +424,7 @@ public class Browser { */ public static final void requestAllIcons(ContentResolver cr, String where, WebIconDatabase.IconListener listener) { + android.util.SeempLog.record(36); // Do nothing: this is no longer used. } diff --git a/core/java/android/provider/CalendarContract.java b/core/java/android/provider/CalendarContract.java index 92a18836653a..1b1e30c71374 100644 --- a/core/java/android/provider/CalendarContract.java +++ b/core/java/android/provider/CalendarContract.java @@ -984,6 +984,7 @@ public final class CalendarContract { * @return A Cursor containing all attendees for the event */ public static final Cursor query(ContentResolver cr, long eventId, String[] projection) { + android.util.SeempLog.record(54); String[] attArgs = {Long.toString(eventId)}; return cr.query(CONTENT_URI, projection, ATTENDEES_WHERE, attArgs /* selection args */, null /* sort order */); @@ -1916,6 +1917,7 @@ public final class CalendarContract { */ public static final Cursor query(ContentResolver cr, String[] projection, long begin, long end) { + android.util.SeempLog.record(54); Uri.Builder builder = CONTENT_URI.buildUpon(); ContentUris.appendId(builder, begin); ContentUris.appendId(builder, end); @@ -1945,6 +1947,7 @@ public final class CalendarContract { */ public static final Cursor query(ContentResolver cr, String[] projection, long begin, long end, String searchQuery) { + android.util.SeempLog.record(54); Uri.Builder builder = CONTENT_SEARCH_URI.buildUpon(); ContentUris.appendId(builder, begin); ContentUris.appendId(builder, end); @@ -2255,6 +2258,7 @@ public final class CalendarContract { */ public static final Cursor query(ContentResolver cr, int startDay, int numDays, String[] projection) { + android.util.SeempLog.record(54); if (numDays < 1) { return null; } @@ -2338,6 +2342,7 @@ public final class CalendarContract { * @return A Cursor containing all reminders for the event */ public static final Cursor query(ContentResolver cr, long eventId, String[] projection) { + android.util.SeempLog.record(54); String[] remArgs = {Long.toString(eventId)}; return cr.query(CONTENT_URI, projection, REMINDERS_WHERE, remArgs /*selection args*/, null /* sort order */); @@ -2488,6 +2493,7 @@ public final class CalendarContract { */ public static final Uri insert(ContentResolver cr, long eventId, long begin, long end, long alarmTime, int minutes) { + android.util.SeempLog.record(51); ContentValues values = new ContentValues(); values.put(CalendarAlerts.EVENT_ID, eventId); values.put(CalendarAlerts.BEGIN, begin); @@ -2516,6 +2522,7 @@ public final class CalendarContract { */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public static final long findNextAlarmTime(ContentResolver cr, long millis) { + android.util.SeempLog.record(53); String selection = ALARM_TIME + ">=" + millis; // TODO: construct an explicit SQL query so that we can add // "LIMIT 1" to the end and get just one result. @@ -2647,6 +2654,7 @@ public final class CalendarContract { */ public static final boolean alarmExists(ContentResolver cr, long eventId, long begin, long alarmTime) { + android.util.SeempLog.record(52); // TODO: construct an explicit SQL query so that we can add // "LIMIT 1" to the end and get just one result. String[] projection = new String[] { ALARM_TIME }; diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java index 4bfff16d973f..376f51a34fe7 100644 --- a/core/java/android/provider/ContactsContract.java +++ b/core/java/android/provider/ContactsContract.java @@ -1674,6 +1674,7 @@ public final class ContactsContract { * {@link #CONTENT_LOOKUP_URI} to attempt refreshing. */ public static Uri getLookupUri(ContentResolver resolver, Uri contactUri) { + android.util.SeempLog.record(86); final Cursor c = resolver.query(contactUri, new String[] { Contacts.LOOKUP_KEY, Contacts._ID }, null, null, null); @@ -1701,6 +1702,7 @@ public final class ContactsContract { * provided parameters. */ public static Uri getLookupUri(long contactId, String lookupKey) { + android.util.SeempLog.record(86); if (TextUtils.isEmpty(lookupKey)) { return null; } @@ -1714,6 +1716,7 @@ public final class ContactsContract { * Returns null if the contact cannot be found. */ public static Uri lookupContact(ContentResolver resolver, Uri lookupUri) { + android.util.SeempLog.record(87); if (lookupUri == null) { return null; } @@ -2207,6 +2210,7 @@ public final class ContactsContract { */ public static InputStream openContactPhotoInputStream(ContentResolver cr, Uri contactUri, boolean preferHighres) { + android.util.SeempLog.record(88); if (preferHighres) { final Uri displayPhotoUri = Uri.withAppendedPath(contactUri, Contacts.Photo.DISPLAY_PHOTO); @@ -2255,6 +2259,7 @@ public final class ContactsContract { * of the thumbnail the high-res picture is preferred */ public static InputStream openContactPhotoInputStream(ContentResolver cr, Uri contactUri) { + android.util.SeempLog.record(88); return openContactPhotoInputStream(cr, contactUri, false); } @@ -2957,6 +2962,7 @@ public final class ContactsContract { * entry of the given {@link RawContacts} entry. */ public static Uri getContactLookupUri(ContentResolver resolver, Uri rawContactUri) { + android.util.SeempLog.record(89); // TODO: use a lighter query by joining rawcontacts with contacts in provider final Uri dataUri = Uri.withAppendedPath(rawContactUri, Data.CONTENT_DIRECTORY); final Cursor cursor = resolver.query(dataUri, new String[] { @@ -5029,6 +5035,7 @@ public final class ContactsContract { * </p> */ public static Uri getContactLookupUri(ContentResolver resolver, Uri dataUri) { + android.util.SeempLog.record(89); final Cursor cursor = resolver.query(dataUri, new String[] { RawContacts.CONTACT_ID, Contacts.LOOKUP_KEY }, null, null, null); diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 1374fa0e92c4..8378a37ec44a 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -3904,6 +3904,7 @@ public final class Settings { @UnsupportedAppUsage public static String getStringForUser(ContentResolver resolver, String name, int userHandle) { + android.util.SeempLog.record(android.util.SeempLog.getSeempGetApiIdFromValue(name)); if (MOVED_TO_SECURE.contains(name)) { Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" + " to android.provider.Settings.Secure, returning read-only value."); @@ -3969,6 +3970,7 @@ public final class Settings { Log.v(TAG, "System.putString(name=" + name + ", value=" + value + ") for " + userHandle); } + android.util.SeempLog.record(android.util.SeempLog.getSeempPutApiIdFromValue(name)); if (MOVED_TO_SECURE.contains(name)) { Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System" + " to android.provider.Settings.Secure, value is unchanged."); @@ -4681,6 +4683,13 @@ public final class Settings { "display_color_mode_vendor_hint"; /** + * Whether to play tone while outgoing call is accepted. + * The value 1 - vibrate, 0 - not + * @hide + */ + public static final String CALL_CONNECTED_TONE_ENABLED = "call_connected_tone_enabled"; + + /** * The user selected min refresh rate in frames per second. * * If this isn't set, 0 will be used. @@ -5885,6 +5894,7 @@ public final class Settings { PRIVATE_SETTINGS.add(CAMERA_FLASH_NOTIFICATION); PRIVATE_SETTINGS.add(SCREEN_FLASH_NOTIFICATION); PRIVATE_SETTINGS.add(SCREEN_FLASH_NOTIFICATION_COLOR); + PRIVATE_SETTINGS.add(CALL_CONNECTED_TONE_ENABLED); } /** @@ -6314,6 +6324,7 @@ public final class Settings { MOVED_TO_GLOBAL.add(Settings.Global.NITZ_UPDATE_SPACING); MOVED_TO_GLOBAL.add(Settings.Global.NTP_SERVER); MOVED_TO_GLOBAL.add(Settings.Global.NTP_TIMEOUT); + MOVED_TO_GLOBAL.add(Settings.Global.NTP_SERVER_2); MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_ERROR_POLL_COUNT); MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS); MOVED_TO_GLOBAL.add(Settings.Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT); @@ -12612,6 +12623,15 @@ public final class Settings { public static final String MOBILE_DATA_ALWAYS_ON = "mobile_data_always_on"; /** + * Whether to allow modem to intelligently switch DDS without user direction + * + * (0 = disabled, 1 = enabled) + * @hide + */ + @Readable + public static final String SMART_DDS_SWITCH = "smart_dds_switch"; + + /** * Whether the wifi data connection should remain active even when higher * priority networks like Ethernet are active, to keep both networks. * In the case where higher priority networks are connected, wifi will be @@ -12817,6 +12837,9 @@ public final class Settings { */ @Readable public static final String NTP_TIMEOUT = "ntp_timeout"; + /** Secondary NTP server. {@hide} */ + @Readable + public static final String NTP_SERVER_2 = "ntp_server_2"; /** {@hide} */ @Readable @@ -17328,6 +17351,14 @@ public final class Settings { public static final String CELL_ON = "cell_on"; /** + * Whether to vibrate while outgoing call is accepted + * The value 1 - vibrate, 0 - not + * @hide + */ + public static final String VIBRATING_FOR_OUTGOING_CALL_ACCEPTED = + "vibrating_for_outgoing_call_accepted"; + + /** * Global settings which can be accessed by instant apps. * @hide */ diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java index 59b945c9c9a4..3fe502874ac7 100644 --- a/core/java/android/provider/Telephony.java +++ b/core/java/android/provider/Telephony.java @@ -283,6 +283,13 @@ public final class Telephony { * <p>Type: TEXT</p> */ public static final String CREATOR = "creator"; + + /** + * The priority of the message. + * <P>Type: INTEGER</P> + * @hide + */ + public static final String PRIORITY = "priority"; } /** @@ -391,6 +398,7 @@ public final class Telephony { * @hide */ public static Cursor query(ContentResolver cr, String[] projection) { + android.util.SeempLog.record(10); return cr.query(CONTENT_URI, projection, null, null, DEFAULT_SORT_ORDER); } @@ -401,6 +409,7 @@ public final class Telephony { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public static Cursor query(ContentResolver cr, String[] projection, String where, String orderBy) { + android.util.SeempLog.record(10); return cr.query(CONTENT_URI, projection, where, null, orderBy == null ? DEFAULT_SORT_ORDER : orderBy); } @@ -504,6 +513,31 @@ public final class Telephony { public static Uri addMessageToUri(int subId, ContentResolver resolver, Uri uri, String address, String body, String subject, Long date, boolean read, boolean deliveryReport, long threadId) { + return addMessageToUri(subId, resolver, uri, address, body, subject, + date, read, deliveryReport, threadId, -1); + } + + /** + * Add an SMS to the given URI with thread_id specified. + * + * @param resolver the content resolver to use + * @param uri the URI to add the message to + * @param address the address of the sender + * @param body the body of the message + * @param subject the psuedo-subject of the message + * @param date the timestamp for the message + * @param read true if the message has been read, false if not + * @param deliveryReport true if a delivery report was requested, false if not + * @param threadId the thread_id of the message + * @param subId the subscription which the message belongs to + * @param priority the priority of the message + * @return the URI for the new message + * @hide + */ + public static Uri addMessageToUri(int subId, ContentResolver resolver, + Uri uri, String address, String body, String subject, + Long date, boolean read, boolean deliveryReport, + long threadId, int priority) { ContentValues values = new ContentValues(8); Rlog.v(TAG,"Telephony addMessageToUri sub id: " + subId); @@ -515,6 +549,7 @@ public final class Telephony { values.put(READ, read ? Integer.valueOf(1) : Integer.valueOf(0)); values.put(SUBJECT, subject); values.put(BODY, body); + values.put(PRIORITY, priority); if (deliveryReport) { values.put(STATUS, STATUS_PENDING); } @@ -2135,6 +2170,20 @@ public final class Telephony { * @hide */ public static final String SUBSCRIPTION_ID = "sub_id"; + + /** + * Indicates the last mms type in the thread. + * <P>Type: TEXT</P> + * @hide + */ + public static final String ATTACHMENT_INFO = "attachment_info"; + + /** + * Indicates whether this thread is a notification thread. + * <P>Type: INTEGER</P> + * @hide + */ + public static final String NOTIFICATION = "notification"; } /** @@ -2290,6 +2339,7 @@ public final class Telephony { */ public static Cursor query( ContentResolver cr, String[] projection) { + android.util.SeempLog.record(10); return cr.query(CONTENT_URI, projection, null, null, DEFAULT_SORT_ORDER); } @@ -2300,6 +2350,7 @@ public final class Telephony { public static Cursor query( ContentResolver cr, String[] projection, String where, String orderBy) { + android.util.SeempLog.record(10); return cr.query(CONTENT_URI, projection, where, null, orderBy == null ? DEFAULT_SORT_ORDER : orderBy); } diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java index d9ac4850e924..82cf9411560c 100644 --- a/core/java/android/service/wallpaper/WallpaperService.java +++ b/core/java/android/service/wallpaper/WallpaperService.java @@ -2590,7 +2590,7 @@ public abstract class WallpaperService extends Service { return; } case MSG_UPDATE_SURFACE: - mEngine.updateSurface(true, false, false); + mEngine.updateSurface(true, false, true/*false*/); break; case MSG_ZOOM: mEngine.setZoom(Float.intBitsToFloat(message.arg1)); diff --git a/core/java/android/speech/SpeechRecognizer.java b/core/java/android/speech/SpeechRecognizer.java index bb5dd7f0cdfe..52f26866c2e0 100644 --- a/core/java/android/speech/SpeechRecognizer.java +++ b/core/java/android/speech/SpeechRecognizer.java @@ -550,6 +550,7 @@ public class SpeechRecognizer { */ @MainThread public void startListening(final Intent recognizerIntent) { + android.util.SeempLog.record(72); if (recognizerIntent == null) { throw new IllegalArgumentException("intent must not be null"); } diff --git a/core/java/android/util/BoostFramework.java b/core/java/android/util/BoostFramework.java new file mode 100644 index 000000000000..adcbeb855062 --- /dev/null +++ b/core/java/android/util/BoostFramework.java @@ -0,0 +1,860 @@ +/* + * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package android.util; + +import android.content.Context; +import android.graphics.BLASTBufferQueue; +import android.os.SystemProperties; +import android.util.Log; + +import dalvik.system.PathClassLoader; + +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; + +/** @hide */ +public class BoostFramework { + + private static final String TAG = "BoostFramework"; + private static final String PERFORMANCE_JAR = "/system/framework/QPerformance.jar"; + private static final String PERFORMANCE_CLASS = "com.qualcomm.qti.Performance"; + + private static final String UXPERFORMANCE_JAR = "/system/framework/UxPerformance.jar"; + private static final String UXPERFORMANCE_CLASS = "com.qualcomm.qti.UxPerformance"; + public static final float PERF_HAL_V22 = 2.2f; + public static final float PERF_HAL_V23 = 2.3f; + public static final int VENDOR_T_API_LEVEL = 33; + public final int board_first_api_lvl = SystemProperties.getInt("ro.board.first_api_level", 0); + public final int board_api_lvl = SystemProperties.getInt("ro.board.api_level", 0); + +/** @hide */ + private static boolean sIsLoaded = false; + private static Class<?> sPerfClass = null; + private static Method sAcquireFunc = null; + private static Method sPerfHintFunc = null; + private static Method sReleaseFunc = null; + private static Method sReleaseHandlerFunc = null; + private static Method sFeedbackFunc = null; + private static Method sFeedbackFuncExtn = null; + private static Method sPerfGetPropFunc = null; + private static Method sAcqAndReleaseFunc = null; + private static Method sperfHintAcqRelFunc = null; + private static Method sperfHintRenewFunc = null; + private static Method sPerfEventFunc = null; + private static Method sPerfGetPerfHalVerFunc = null; + private static Method sPerfSyncRequest = null; + + private static Method sIOPStart = null; + private static Method sIOPStop = null; + private static Method sUXEngineEvents = null; + private static Method sUXEngineTrigger = null; + + private static boolean sUxIsLoaded = false; + private static Class<?> sUxPerfClass = null; + private static Method sUxIOPStart = null; + +/** @hide */ + private Object mPerf = null; + private Object mUxPerf = null; + + //perf hints + public static final int VENDOR_HINT_SCROLL_BOOST = 0x00001080; + public static final int VENDOR_HINT_FIRST_LAUNCH_BOOST = 0x00001081; + public static final int VENDOR_HINT_SUBSEQ_LAUNCH_BOOST = 0x00001082; + public static final int VENDOR_HINT_ANIM_BOOST = 0x00001083; + public static final int VENDOR_HINT_ACTIVITY_BOOST = 0x00001084; + public static final int VENDOR_HINT_TOUCH_BOOST = 0x00001085; + public static final int VENDOR_HINT_MTP_BOOST = 0x00001086; + public static final int VENDOR_HINT_DRAG_BOOST = 0x00001087; + public static final int VENDOR_HINT_PACKAGE_INSTALL_BOOST = 0x00001088; + public static final int VENDOR_HINT_ROTATION_LATENCY_BOOST = 0x00001089; + public static final int VENDOR_HINT_ROTATION_ANIM_BOOST = 0x00001090; + public static final int VENDOR_HINT_PERFORMANCE_MODE = 0x00001091; + public static final int VENDOR_HINT_APP_UPDATE = 0x00001092; + public static final int VENDOR_HINT_KILL = 0x00001093; + public static final int VENDOR_HINT_BOOST_RENDERTHREAD = 0x00001096; + public static final int VENDOR_HINT_PASS_PID = 0x0000109C; + //perf events + public static final int VENDOR_HINT_FIRST_DRAW = 0x00001042; + public static final int VENDOR_HINT_TAP_EVENT = 0x00001043; + public static final int VENDOR_HINT_DRAG_START = 0x00001051; + public static final int VENDOR_HINT_DRAG_END = 0x00001052; + //Ime Launch Boost Hint + public static final int VENDOR_HINT_IME_LAUNCH_EVENT = 0x0000109F; + //App exit animation boost + public static final int VENDOR_HINT_EXIT_ANIM_BOOST = 0x000010A9; + + //feedback hints + public static final int VENDOR_FEEDBACK_WORKLOAD_TYPE = 0x00001601; + public static final int VENDOR_FEEDBACK_LAUNCH_END_POINT = 0x00001602; + public static final int VENDOR_FEEDBACK_PA_FW = 0x00001604; + + //UXE Events and Triggers + public static final int UXE_TRIGGER = 1; + public static final int UXE_EVENT_BINDAPP = 2; + public static final int UXE_EVENT_DISPLAYED_ACT = 3; + public static final int UXE_EVENT_KILL = 4; + public static final int UXE_EVENT_GAME = 5; + public static final int UXE_EVENT_SUB_LAUNCH = 6; + public static final int UXE_EVENT_PKG_UNINSTALL = 7; + public static final int UXE_EVENT_PKG_INSTALL = 8; + + //New Hints while porting IOP to Perf Hal. + public static final int VENDOR_HINT_BINDAPP = 0x000010A0; + public static final int VENDOR_HINT_WARM_LAUNCH = 0x000010A1; //SUB_LAUNCH + // 0x000010A2 is added in UXPerformance.java for SPEED Hints + public static final int VENDOR_HINT_PKG_INSTALL = 0x000010A3; + public static final int VENDOR_HINT_PKG_UNINSTALL = 0x000010A4; + + //perf opcodes + public static final int MPCTLV3_GPU_IS_APP_FG = 0X42820000; + public static final int MPCTLV3_GPU_IS_APP_BG = 0X42824000; + + public class Scroll { + public static final int VERTICAL = 1; + public static final int HORIZONTAL = 2; + public static final int PANEL_VIEW = 3; + public static final int PREFILING = 4; + }; + + public class Launch { + public static final int BOOST_V1 = 1; + public static final int BOOST_V2 = 2; + public static final int BOOST_V3 = 3; + public static final int BOOST_GAME = 4; + public static final int RESERVED_1 = 5; + public static final int RESERVED_2 = 6; + public static final int RESERVED_3 = 7; + public static final int RESERVED_4 = 8; + public static final int RESERVED_5 = 9; + public static final int ACTIVITY_LAUNCH_BOOST = 10; + public static final int TYPE_SERVICE_START = 100; + public static final int TYPE_START_PROC = 101; + public static final int TYPE_START_APP_FROM_BG = 102; + public static final int TYPE_ATTACH_APPLICATION = 103; + }; + + public class PassPid { + public static final int APP_PID = 4; + public static final int RENDER_TID = 5; + } + + public class Draw { + public static final int EVENT_TYPE_V1 = 1; + }; + + public class WorkloadType { + public static final int NOT_KNOWN = 0; + public static final int APP = 1; + public static final int GAME = 2; + public static final int BROWSER = 3; + public static final int PREPROAPP = 4; + }; + +/** @hide */ + public BoostFramework() { + initFunctions(); + + try { + if (sPerfClass != null) { + mPerf = sPerfClass.newInstance(); + } + if (sUxPerfClass != null) { + mUxPerf = sUxPerfClass.newInstance(); + } + } + catch(Exception e) { + Log.e(TAG,"BoostFramework() : Exception_2 = " + e); + } + } + +/** @hide */ + public BoostFramework(Context context) { + this(context, false); + } + +/** @hide */ + public BoostFramework(Context context, boolean isTrusted) { + initFunctions(); + + try { + if (sPerfClass != null) { + Constructor cons = sPerfClass.getConstructor(Context.class); + if (cons != null) + mPerf = cons.newInstance(context); + } + if (sUxPerfClass != null) { + if (isTrusted) { + Constructor cons = sUxPerfClass.getConstructor(Context.class); + if (cons != null) + mUxPerf = cons.newInstance(context); + } else { + mUxPerf = sUxPerfClass.newInstance(); + } + } + } + catch(Exception e) { + Log.e(TAG,"BoostFramework() : Exception_3 = " + e); + } + } + +/** @hide */ + public BoostFramework(boolean isUntrustedDomain) { + initFunctions(); + + try { + if (sPerfClass != null) { + Constructor cons = sPerfClass.getConstructor(boolean.class); + if (cons != null) + mPerf = cons.newInstance(isUntrustedDomain); + } + if (sUxPerfClass != null) { + mUxPerf = sUxPerfClass.newInstance(); + } + } + catch(Exception e) { + Log.e(TAG,"BoostFramework() : Exception_5 = " + e); + } + } + + private void initFunctions () { + synchronized(BoostFramework.class) { + if (sIsLoaded == false) { + try { + sPerfClass = Class.forName(PERFORMANCE_CLASS); + + Class[] argClasses = new Class[] {int.class, int[].class}; + sAcquireFunc = sPerfClass.getMethod("perfLockAcquire", argClasses); + + argClasses = new Class[] {int.class, String.class, int.class, int.class}; + sPerfHintFunc = sPerfClass.getMethod("perfHint", argClasses); + + argClasses = new Class[] {}; + sReleaseFunc = sPerfClass.getMethod("perfLockRelease", argClasses); + + argClasses = new Class[] {int.class}; + sReleaseHandlerFunc = sPerfClass.getDeclaredMethod("perfLockReleaseHandler", argClasses); + + argClasses = new Class[] {int.class, String.class}; + sFeedbackFunc = sPerfClass.getMethod("perfGetFeedback", argClasses); + + argClasses = new Class[] {int.class, String.class, int.class, int[].class}; + sFeedbackFuncExtn = sPerfClass.getMethod("perfGetFeedbackExtn", argClasses); + + argClasses = new Class[] {int.class, String.class, String.class}; + sIOPStart = sPerfClass.getDeclaredMethod("perfIOPrefetchStart", argClasses); + + argClasses = new Class[] {}; + sIOPStop = sPerfClass.getDeclaredMethod("perfIOPrefetchStop", argClasses); + + argClasses = new Class[] {String.class, String.class}; + sPerfGetPropFunc = sPerfClass.getMethod("perfGetProp", argClasses); + + argClasses = new Class[] {int.class, int.class, int.class, int.class, int[].class}; + sAcqAndReleaseFunc = sPerfClass.getMethod("perfLockAcqAndRelease", argClasses); + + argClasses = new Class[] {int.class, String.class, int.class, int[].class}; + sPerfEventFunc = sPerfClass.getMethod("perfEvent", argClasses); + + argClasses = new Class[] {int.class}; + sPerfSyncRequest = sPerfClass.getMethod("perfSyncRequest", argClasses); + + argClasses = new Class[] {int.class, int.class, String.class, int.class, + int.class, int.class, int[].class}; + sperfHintAcqRelFunc = sPerfClass.getMethod("perfHintAcqRel", argClasses); + + argClasses = new Class[] {int.class, int.class, String.class, int.class, + int.class, int.class, int[].class}; + sperfHintRenewFunc = sPerfClass.getMethod("perfHintRenew", argClasses); + + try { + argClasses = new Class[] {}; + sPerfGetPerfHalVerFunc = sPerfClass.getMethod("perfGetHalVer", argClasses); + + } catch (Exception e) { + Log.i(TAG, "BoostFramework() : Exception_1 = perfGetHalVer not supported"); + sPerfGetPerfHalVerFunc = null; + } + + try { + argClasses = new Class[] {int.class, int.class, String.class, int.class, String.class}; + sUXEngineEvents = sPerfClass.getDeclaredMethod("perfUXEngine_events", + argClasses); + + argClasses = new Class[] {int.class}; + sUXEngineTrigger = sPerfClass.getDeclaredMethod("perfUXEngine_trigger", + argClasses); + } catch (Exception e) { + Log.i(TAG, "BoostFramework() : Exception_4 = PreferredApps not supported"); + } + + sIsLoaded = true; + } + catch(Exception e) { + Log.e(TAG,"BoostFramework() : Exception_1 = " + e); + } + // Load UXE Class now Adding new try/catch block to avoid + // any interference with Qperformance + try { + sUxPerfClass = Class.forName(UXPERFORMANCE_CLASS); + + Class[] argUxClasses = new Class[] {int.class, String.class, String.class}; + sUxIOPStart = sUxPerfClass.getDeclaredMethod("perfIOPrefetchStart", argUxClasses); + + sUxIsLoaded = true; + } + catch(Exception e) { + Log.e(TAG,"BoostFramework() Ux Perf: Exception = " + e); + } + } + } + } + +/** @hide */ + public int perfLockAcquire(int duration, int... list) { + int ret = -1; + try { + if (sAcquireFunc != null) { + Object retVal = sAcquireFunc.invoke(mPerf, duration, list); + ret = (int)retVal; + } + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + return ret; + } + +/** @hide */ + public int perfLockRelease() { + int ret = -1; + try { + if (sReleaseFunc != null) { + Object retVal = sReleaseFunc.invoke(mPerf); + ret = (int)retVal; + } + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + return ret; + } + +/** @hide */ + public int perfLockReleaseHandler(int handle) { + int ret = -1; + try { + if (sReleaseHandlerFunc != null) { + Object retVal = sReleaseHandlerFunc.invoke(mPerf, handle); + ret = (int)retVal; + } + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + return ret; + } + +/** @hide */ + public int perfHint(int hint, String userDataStr) { + return perfHint(hint, userDataStr, -1, -1); + } + +/** @hide */ + public int perfHint(int hint, String userDataStr, int userData) { + return perfHint(hint, userDataStr, userData, -1); + } + +/** @hide */ + public int perfHint(int hint, String userDataStr, int userData1, int userData2) { + int ret = -1; + try { + if (sPerfHintFunc != null) { + Object retVal = sPerfHintFunc.invoke(mPerf, hint, userDataStr, userData1, userData2); + ret = (int)retVal; + } + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + return ret; + } + +/** @hide */ + public double getPerfHalVersion() { + double retVal = PERF_HAL_V22; + try { + if (sPerfGetPerfHalVerFunc != null) { + Object ret = sPerfGetPerfHalVerFunc.invoke(mPerf); + retVal = (double)ret; + } + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + return retVal; + } + +/** @hide */ + public int perfGetFeedback(int req, String pkg_name) { + int ret = -1; + try { + if (sFeedbackFunc != null) { + Object retVal = sFeedbackFunc.invoke(mPerf, req, pkg_name); + ret = (int)retVal; + } + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + return ret; + } + +/** @hide */ + public int perfGetFeedbackExtn(int req, String pkg_name, int numArgs, int... list) { + int ret = -1; + try { + if (sFeedbackFuncExtn != null) { + Object retVal = sFeedbackFuncExtn.invoke(mPerf, req, pkg_name, numArgs, list); + ret = (int)retVal; + } + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + return ret; + } + +/** @hide */ + public int perfIOPrefetchStart(int pid, String pkgName, String codePath) { + int ret = -1; + try { + Object retVal = sIOPStart.invoke(mPerf, pid, pkgName, codePath); + ret = (int) retVal; + } catch (Exception e) { + Log.e(TAG, "Exception " + e); + } + try { + Object retVal = sUxIOPStart.invoke(mUxPerf, pid, pkgName, codePath); + ret = (int) retVal; + } catch (Exception e) { + Log.e(TAG, "Ux Perf Exception " + e); + } + + return ret; + } + +/** @hide */ + public int perfIOPrefetchStop() { + int ret = -1; + try { + Object retVal = sIOPStop.invoke(mPerf); + ret = (int) retVal; + } catch (Exception e) { + Log.e(TAG, "Exception " + e); + } + return ret; + } + +/** @hide */ + public int perfUXEngine_events(int opcode, int pid, String pkgName, int lat) { + return perfUXEngine_events(opcode, pid, pkgName, lat, null); + } + +/** @hide */ + public int perfUXEngine_events(int opcode, int pid, String pkgName, int lat, String codePath) { + int ret = -1; + try { + if (sUXEngineEvents == null) { + return ret; + } + + Object retVal = sUXEngineEvents.invoke(mPerf, opcode, pid, pkgName, lat,codePath); + ret = (int) retVal; + } catch (Exception e) { + Log.e(TAG, "Exception " + e); + } + return ret; + } + + +/** @hide */ + public String perfUXEngine_trigger(int opcode) { + String ret = null; + try { + if (sUXEngineTrigger == null) { + return ret; + } + Object retVal = sUXEngineTrigger.invoke(mPerf, opcode); + ret = (String) retVal; + } catch (Exception e) { + Log.e(TAG, "Exception " + e); + } + return ret; + } + +/** @hide */ + public String perfSyncRequest(int opcode) { + String ret = null; + try { + if (sPerfSyncRequest == null) { + return ret; + } + Object retVal = sPerfSyncRequest.invoke(mPerf, opcode); + ret = (String) retVal; + } catch (Exception e) { + Log.e(TAG, "Exception " + e); + } + return ret; + } + +/** @hide */ + public String perfGetProp(String prop_name, String def_val) { + String ret = ""; + try { + if (sPerfGetPropFunc != null) { + Object retVal = sPerfGetPropFunc.invoke(mPerf, prop_name, def_val); + ret = (String)retVal; + }else { + ret = def_val; + } + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + return ret; + } + +/** @hide */ + public int perfLockAcqAndRelease(int handle, int duration, int numArgs,int reserveNumArgs, int... list) { + int ret = -1; + try { + if (sAcqAndReleaseFunc != null) { + Object retVal = sAcqAndReleaseFunc.invoke(mPerf, handle, duration, numArgs, reserveNumArgs, list); + ret = (int)retVal; + } + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + return ret; + } + +/** @hide */ + public void perfEvent(int eventId, String pkg_name) { + perfEvent(eventId, pkg_name, 0); + } + +/** @hide */ + public void perfEvent(int eventId, String pkg_name, int numArgs, int... list) { + try { + if (sPerfEventFunc != null) { + sPerfEventFunc.invoke(mPerf, eventId, pkg_name, numArgs, list); + } + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + } + +/** @hide */ + public int perfHintAcqRel(int handle, int hint, String pkg_name) { + return perfHintAcqRel(handle, hint, pkg_name, -1, -1, 0); + } + +/** @hide */ + public int perfHintAcqRel(int handle, int hint, String pkg_name, int duration) { + return perfHintAcqRel(handle, hint, pkg_name, duration, -1, 0); + } + +/** @hide */ + public int perfHintAcqRel(int handle, int hint, String pkg_name, int duration, int hintType) { + return perfHintAcqRel(handle, hint, pkg_name, duration, hintType, 0); + } + +/** @hide */ + public int perfHintAcqRel(int handle, int hint, String pkg_name, int duration, + int hintType, int numArgs, int... list) { + int ret = -1; + try { + if (sperfHintAcqRelFunc != null) { + Object retVal = sperfHintAcqRelFunc.invoke(mPerf,handle, hint, pkg_name, + duration, hintType, numArgs, list); + ret = (int)retVal; + } + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + return ret; + } + +/** @hide */ + public int perfHintRenew(int handle, int hint, String pkg_name) { + return perfHintRenew(handle, hint, pkg_name, -1, -1, 0); + } + +/** @hide */ + public int perfHintRenew(int handle, int hint, String pkg_name, int duration) { + return perfHintRenew(handle, hint, pkg_name, duration, -1, 0); + } + +/** @hide */ + public int perfHintRenew(int handle, int hint, String pkg_name, int duration, int hintType) { + return perfHintRenew(handle, hint, pkg_name, duration, hintType, 0); + } + +/** @hide */ + public int perfHintRenew(int handle, int hint, String pkg_name, int duration, + int hintType, int numArgs, int... list) { + int ret = -1; + try { + if (sperfHintRenewFunc != null) { + Object retVal = sperfHintRenewFunc.invoke(mPerf,handle, hint, pkg_name, + duration, hintType, numArgs, list); + ret = (int)retVal; + } + } catch(Exception e) { + Log.e(TAG,"Exception " + e); + } + return ret; + } + + /** @hide */ + public static class ScrollOptimizer { + /** @hide */ + public static final int FLING_START = 1; + /** @hide */ + public static final int FLING_END = 0; + private static final String SCROLL_OPT_PROP = "ro.vendor.perf.scroll_opt"; + private static final String QXPERFORMANCE_JAR = + "/system/framework/QXPerformance.jar"; + private static final String SCROLL_OPT_CLASS = + "com.qualcomm.qti.QXPerformance.ScrollOptimizer"; + private static boolean sScrollOptProp = false; + private static boolean sScrollOptEnable = false; + private static boolean sQXIsLoaded = false; + private static Class<?> sQXPerfClass = null; + private static Method sSetFrameInterval = null; + private static Method sDisableOptimizer = null; + private static Method sSetBLASTBufferQueue = null; + private static Method sSetMotionType = null; + private static Method sSetVsyncTime = null; + private static Method sSetUITaskStatus = null; + private static Method sSetFlingFlag = null; + private static Method sShouldUseVsync = null; + private static Method sGetFrameDelay = null; + private static Method sGetAdjustedAnimationClock = null; + + private static void initQXPerfFuncs() { + if (sQXIsLoaded) return; + + try { + sScrollOptProp = SystemProperties.getBoolean(SCROLL_OPT_PROP, false); + if (!sScrollOptProp) { + sScrollOptEnable = false; + sQXIsLoaded = true; + return; + } + + PathClassLoader qXPerfClassLoader = new PathClassLoader( + QXPERFORMANCE_JAR, ClassLoader.getSystemClassLoader()); + sQXPerfClass = qXPerfClassLoader.loadClass(SCROLL_OPT_CLASS); + Class[] argClasses = new Class[]{long.class}; + sSetFrameInterval = sQXPerfClass.getMethod( + "setFrameInterval", argClasses); + + argClasses = new Class[]{boolean.class}; + sDisableOptimizer = sQXPerfClass.getMethod("disableOptimizer", argClasses); + + argClasses = new Class[]{BLASTBufferQueue.class}; + sSetBLASTBufferQueue = sQXPerfClass.getMethod("setBLASTBufferQueue", argClasses); + + argClasses = new Class[]{int.class}; + sSetMotionType = sQXPerfClass.getMethod("setMotionType", argClasses); + + argClasses = new Class[]{long.class}; + sSetVsyncTime = sQXPerfClass.getMethod("setVsyncTime", argClasses); + + argClasses = new Class[]{boolean.class}; + sSetUITaskStatus = sQXPerfClass.getMethod("setUITaskStatus", argClasses); + + argClasses = new Class[]{int.class}; + sSetFlingFlag = sQXPerfClass.getMethod("setFlingFlag", argClasses); + + sShouldUseVsync = sQXPerfClass.getMethod("shouldUseVsync"); + + argClasses = new Class[]{long.class}; + sGetFrameDelay = sQXPerfClass.getMethod("getFrameDelay", argClasses); + + argClasses = new Class[]{long.class}; + sGetAdjustedAnimationClock = sQXPerfClass.getMethod( + "getAdjustedAnimationClock", argClasses); + } catch (Exception e) { + Log.e(TAG, "initQXPerfFuncs failed"); + e.printStackTrace(); + } finally { + // If frameworks and perf changes don't match(may not built together) + // or other exception, need to set sQXIsLoaded as true to avoid retry. + sQXIsLoaded = true; + } + } + + /** @hide */ + public static void setFrameInterval(long frameIntervalNanos) { + if (sQXIsLoaded) { + if (sScrollOptEnable && sSetFrameInterval != null) { + try { + sSetFrameInterval.invoke(null, frameIntervalNanos); + } catch (Exception e) { + e.printStackTrace(); + } + } + return; + } + Thread initThread = new Thread(new Runnable() { + @Override + public void run() { + synchronized(ScrollOptimizer.class) { + try { + initQXPerfFuncs(); + if (sScrollOptProp && sSetFrameInterval != null) { + sSetFrameInterval.invoke(null, frameIntervalNanos); + sScrollOptEnable = true; + } + } catch (Exception e) { + Log.e(TAG, "Failed to run initThread."); + e.printStackTrace(); + } + } + } + }); + initThread.start(); + } + + /** @hide */ + public static void disableOptimizer(boolean disabled) { + if (sScrollOptEnable && sDisableOptimizer != null) { + try { + sDisableOptimizer.invoke(null, disabled); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + /** @hide */ + public static void setBLASTBufferQueue(BLASTBufferQueue blastBufferQueue) { + if (sScrollOptEnable && sSetBLASTBufferQueue != null) { + try { + sSetBLASTBufferQueue.invoke(null, blastBufferQueue); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + /** @hide */ + public static void setMotionType(int eventType) { + if (sScrollOptEnable && sSetMotionType != null) { + try { + sSetMotionType.invoke(null, eventType); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + /** @hide */ + public static void setVsyncTime(long vsyncTimeNanos) { + if (sScrollOptEnable && sSetVsyncTime != null) { + try { + sSetVsyncTime.invoke(null, vsyncTimeNanos); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + /** @hide */ + public static void setUITaskStatus(boolean running) { + if (sScrollOptEnable && sSetUITaskStatus != null) { + try { + sSetUITaskStatus.invoke(null, running); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + /** @hide */ + public static void setFlingFlag(int flag) { + if (sScrollOptEnable && sSetFlingFlag != null) { + try { + sSetFlingFlag.invoke(null, flag); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + /** @hide */ + public static boolean shouldUseVsync(boolean defaultVsyncFlag) { + boolean useVsync = defaultVsyncFlag; + if (sScrollOptEnable && sShouldUseVsync != null) { + try { + Object retVal = sShouldUseVsync.invoke(null); + useVsync = (boolean)retVal; + } catch (Exception e) { + e.printStackTrace(); + } + } + return useVsync; + } + + /** @hide */ + public static long getFrameDelay(long defaultDelay, long lastFrameTimeNanos) { + long frameDelay = defaultDelay; + if (sScrollOptEnable && sGetFrameDelay != null) { + try { + Object retVal = sGetFrameDelay.invoke(null, lastFrameTimeNanos); + frameDelay = (long)retVal; + } catch (Exception e) { + e.printStackTrace(); + } + } + return frameDelay; + } + + /** @hide */ + public static long getAdjustedAnimationClock(long frameTimeNanos) { + long newFrameTimeNanos = frameTimeNanos; + if (sScrollOptEnable && sGetAdjustedAnimationClock != null) { + try { + Object retVal = sGetAdjustedAnimationClock.invoke(null, + frameTimeNanos); + newFrameTimeNanos = (long)retVal; + } catch (Exception e) { + e.printStackTrace(); + } + } + return newFrameTimeNanos; + } + } +}; diff --git a/core/java/android/util/FeatureFlagUtils.java b/core/java/android/util/FeatureFlagUtils.java index ff7d8bb956ca..76e68f95a951 100644 --- a/core/java/android/util/FeatureFlagUtils.java +++ b/core/java/android/util/FeatureFlagUtils.java @@ -44,6 +44,8 @@ public class FeatureFlagUtils { public static final String SETTINGS_DO_NOT_RESTORE_PRESERVED = "settings_do_not_restore_preserved"; /** @hide */ + public static final String SETTINGS_PROVIDER_MODEL = "settings_provider_model"; + /** @hide */ public static final String SETTINGS_USE_NEW_BACKUP_ELIGIBILITY_RULES = "settings_use_new_backup_eligibility_rules"; /** @hide */ @@ -216,6 +218,7 @@ public class FeatureFlagUtils { DEFAULT_FLAGS.put("settings_tether_all_in_one", "false"); DEFAULT_FLAGS.put("settings_contextual_home", "false"); + DEFAULT_FLAGS.put(SETTINGS_PROVIDER_MODEL, "false"); DEFAULT_FLAGS.put(SETTINGS_USE_NEW_BACKUP_ELIGIBILITY_RULES, "true"); DEFAULT_FLAGS.put(SETTINGS_ENABLE_SECURITY_HUB, "true"); DEFAULT_FLAGS.put(SETTINGS_SUPPORT_LARGE_SCREEN, "true"); @@ -253,6 +256,7 @@ public class FeatureFlagUtils { PERSISTENT_FLAGS.add(SETTINGS_SUPPORT_LARGE_SCREEN); PERSISTENT_FLAGS.add(SETTINGS_ENABLE_MONITOR_PHANTOM_PROCS); PERSISTENT_FLAGS.add(SETTINGS_APP_ALLOW_DARK_THEME_ACTIVATION_AT_BEDTIME); + PERSISTENT_FLAGS.add(SETTINGS_PROVIDER_MODEL); PERSISTENT_FLAGS.add(SETTINGS_AUTO_TEXT_WRAPPING); PERSISTENT_FLAGS.add(SETTINGS_NEW_KEYBOARD_UI); PERSISTENT_FLAGS.add(SETTINGS_NEW_KEYBOARD_MODIFIER_KEY); @@ -270,6 +274,11 @@ public class FeatureFlagUtils { * @return true if the flag is enabled (either by default in system, or override by user) */ public static boolean isEnabled(Context context, String feature) { + // Hide feature in SC Developer Preview + if (SETTINGS_PROVIDER_MODEL.equals(feature)) { + return false; + } + // Override precedence: // Settings.Global -> sys.fflag.override.* -> static list diff --git a/core/java/android/util/NtpTrustedTime.java b/core/java/android/util/NtpTrustedTime.java index 5aa0f59024f8..4120f8a17d22 100644 --- a/core/java/android/util/NtpTrustedTime.java +++ b/core/java/android/util/NtpTrustedTime.java @@ -28,6 +28,7 @@ import android.net.NetworkInfo; import android.net.SntpClient; import android.os.Build; import android.os.SystemClock; +import android.os.SystemProperties; import android.provider.Settings; import android.text.TextUtils; @@ -229,14 +230,40 @@ public abstract class NtpTrustedTime implements TrustedTime { // forceRefresh(). private volatile TimeResult mTimeResult; + private boolean mBackupmode = false; + private static String mBackupServer = ""; + private static int mNtpRetries = 0; + private static int mNtpRetriesMax = 0; + private static final String BACKUP_SERVER = "persist.backup.ntpServer"; + protected NtpTrustedTime() { } @UnsupportedAppUsage public static synchronized NtpTrustedTime getInstance(Context context) { if (sSingleton == null) { + final Resources res = context.getResources(); + final ContentResolver resolver = context.getContentResolver(); + Context appContext = context.getApplicationContext(); sSingleton = new NtpTrustedTimeImpl(appContext); + + final String sserver_prop = Settings.Global.getString( + resolver, Settings.Global.NTP_SERVER_2); + + final String secondServer_prop = ((null != sserver_prop) + && (0 < sserver_prop.length())) + ? sserver_prop : BACKUP_SERVER; + + final String backupServer = SystemProperties.get(secondServer_prop); + + if ((null != backupServer) && (0 < backupServer.length())) { + int retryMax = res.getInteger(com.android.internal.R.integer.config_ntpRetry); + if (0 < retryMax) { + sSingleton.mNtpRetriesMax = retryMax; + sSingleton.mBackupServer = (backupServer.trim()).replace("\"", ""); + } + } } return sSingleton; } @@ -254,6 +281,11 @@ public abstract class NtpTrustedTime implements TrustedTime { /** Forces a refresh using the default network. */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public boolean forceRefresh() { + return hasCache() ? forceSync() : false; + } + + @Override + public boolean forceSync() { synchronized (this) { Network network = getDefaultNetwork(); if (network == null) { @@ -726,4 +758,32 @@ public abstract class NtpTrustedTime implements TrustedTime { return (int) longValue; } } + + public void setBackupmode(boolean mode) { + if (isBackupSupported()) { + mBackupmode = mode; + } + if (LOGD) Log.d(TAG, "setBackupmode() set the backup mode to be:" + mBackupmode); + } + + private boolean getBackupmode() { + return mBackupmode; + } + + private boolean isBackupSupported() { + return ((0 < mNtpRetriesMax) && + (null != mBackupServer) && + (0 != mBackupServer.length())); + } + + private void countInBackupmode() { + if (isBackupSupported()) { + mNtpRetries++; + if (mNtpRetries >= mNtpRetriesMax) { + mNtpRetries = 0; + setBackupmode(true); + } + } + if (LOGD) Log.d(TAG, "countInBackupmode() func"); + } } diff --git a/core/java/android/util/SeempLog.java b/core/java/android/util/SeempLog.java new file mode 100644 index 000000000000..3764882644d8 --- /dev/null +++ b/core/java/android/util/SeempLog.java @@ -0,0 +1,754 @@ +/* + * Copyright (c) 2015, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package android.util; + +import com.android.internal.os.RuntimeInit; + +import java.io.PrintWriter; +import java.io.StringWriter; +import java.net.UnknownHostException; +import java.util.Hashtable; +import java.util.Map; +import java.util.List; +import java.util.Iterator; +import android.util.Log; +import android.provider.Settings; + +/** + * SeempLog + * + * @hide + */ +public final class SeempLog { + private SeempLog() { + } + + /** + * Send a log message to the seemp log. + * @param api The api triggering this message. + */ + public static int record(int api) { + return seemp_println_native(api, ""); + } + + /** + * Send a log message to the seemp log. + * @param api The api triggering this message. + * @param msg The message you would like logged. + */ + public static int record_str(int api, String msg) { + if ( msg != null ) { + return seemp_println_native(api, msg); + } + else { + return seemp_println_native(api, ""); + } + } + + public static int record_sensor(int api, + android.hardware.Sensor sensor) { + if ( sensor != null ) { + return seemp_println_native(api, "sensor="+sensor.getType()); + } + else { + return seemp_println_native(api, "sensor=-1"); + } + } + + public static int record_sensor_rate(int api, + android.hardware.Sensor sensor, int rate) { + if ( sensor != null ) { + return seemp_println_native(api, + "sensor="+sensor.getType() + ",rate="+rate); + } + else { + return seemp_println_native(api, "sensor=-1,rate=" + rate); + } + } + + public static int record_uri(int api, android.net.Uri uri) { + if ( uri != null ) { + return seemp_println_native(api, "uri, " + uri.toString()); + } + else { + return seemp_println_native(api, "uri, null" ); + } + } + + public static int record_vg_layout(int api, + android.view.ViewGroup.LayoutParams params) { + try { + android.view.WindowManager.LayoutParams p = + (android.view.WindowManager.LayoutParams) params; + if ( p != null ) { + return seemp_println_native(api, + "window_type=" + p.type + ",window_flag=" + p.flags); + } + else { + return seemp_println_native(api, ""); + } + } catch (ClassCastException cce) { + return seemp_println_native(api, ""); + } + } + + /** @hide */ public static native int seemp_println_native(int api, String msg); + + public static final int SEEMP_API_android_provider_Settings__get_ANDROID_ID_ = 7; + public static final int SEEMP_API_android_provider_Settings__get_ACCELEROMETER_ROTATION_ = 96; + public static final int SEEMP_API_android_provider_Settings__get_USER_ROTATION_ = 97; + public static final int SEEMP_API_android_provider_Settings__get_ADB_ENABLED_ = 98; + public static final int SEEMP_API_android_provider_Settings__get_DEBUG_APP_ = 99; + public static final int SEEMP_API_android_provider_Settings__get_WAIT_FOR_DEBUGGER_ = 100; + public static final int SEEMP_API_android_provider_Settings__get_AIRPLANE_MODE_ON_ = 101; + public static final int SEEMP_API_android_provider_Settings__get_AIRPLANE_MODE_RADIOS_ = 102; + public static final int SEEMP_API_android_provider_Settings__get_ALARM_ALERT_ = 103; + public static final int SEEMP_API_android_provider_Settings__get_NEXT_ALARM_FORMATTED_ = 104; + public static final int SEEMP_API_android_provider_Settings__get_ALWAYS_FINISH_ACTIVITIES_ = 105; + public static final int SEEMP_API_android_provider_Settings__get_LOGGING_ID_ = 106; + public static final int SEEMP_API_android_provider_Settings__get_ANIMATOR_DURATION_SCALE_ = 107; + public static final int SEEMP_API_android_provider_Settings__get_WINDOW_ANIMATION_SCALE_ = 108; + public static final int SEEMP_API_android_provider_Settings__get_FONT_SCALE_ = 109; + public static final int SEEMP_API_android_provider_Settings__get_SCREEN_BRIGHTNESS_ = 110; + public static final int SEEMP_API_android_provider_Settings__get_SCREEN_BRIGHTNESS_MODE_ = 111; + public static final int SEEMP_API_android_provider_Settings__get_SCREEN_BRIGHTNESS_MODE_AUTOMATIC_ = 112; + public static final int SEEMP_API_android_provider_Settings__get_SCREEN_BRIGHTNESS_MODE_MANUAL_ = 113; + public static final int SEEMP_API_android_provider_Settings__get_SCREEN_OFF_TIMEOUT_ = 114; + public static final int SEEMP_API_android_provider_Settings__get_DIM_SCREEN_ = 115; + public static final int SEEMP_API_android_provider_Settings__get_TRANSITION_ANIMATION_SCALE_ = 116; + public static final int SEEMP_API_android_provider_Settings__get_STAY_ON_WHILE_PLUGGED_IN_ = 117; + public static final int SEEMP_API_android_provider_Settings__get_WALLPAPER_ACTIVITY_ = 118; + public static final int SEEMP_API_android_provider_Settings__get_SHOW_PROCESSES_ = 119; + public static final int SEEMP_API_android_provider_Settings__get_SHOW_WEB_SUGGESTIONS_ = 120; + public static final int SEEMP_API_android_provider_Settings__get_SHOW_GTALK_SERVICE_STATUS_ = 121; + public static final int SEEMP_API_android_provider_Settings__get_USE_GOOGLE_MAIL_ = 122; + public static final int SEEMP_API_android_provider_Settings__get_AUTO_TIME_ = 123; + public static final int SEEMP_API_android_provider_Settings__get_AUTO_TIME_ZONE_ = 124; + public static final int SEEMP_API_android_provider_Settings__get_DATE_FORMAT_ = 125; + public static final int SEEMP_API_android_provider_Settings__get_TIME_12_24_ = 126; + public static final int SEEMP_API_android_provider_Settings__get_BLUETOOTH_DISCOVERABILITY_ = 127; + public static final int SEEMP_API_android_provider_Settings__get_BLUETOOTH_DISCOVERABILITY_TIMEOUT_ = 128; + public static final int SEEMP_API_android_provider_Settings__get_BLUETOOTH_ON_ = 129; + public static final int SEEMP_API_android_provider_Settings__get_DEVICE_PROVISIONED_ = 130; + public static final int SEEMP_API_android_provider_Settings__get_SETUP_WIZARD_HAS_RUN_ = 131; + public static final int SEEMP_API_android_provider_Settings__get_DTMF_TONE_WHEN_DIALING_ = 132; + public static final int SEEMP_API_android_provider_Settings__get_END_BUTTON_BEHAVIOR_ = 133; + public static final int SEEMP_API_android_provider_Settings__get_RINGTONE_ = 134; + public static final int SEEMP_API_android_provider_Settings__get_MODE_RINGER_ = 135; + public static final int SEEMP_API_android_provider_Settings__get_INSTALL_NON_MARKET_APPS_ = 136; + public static final int SEEMP_API_android_provider_Settings__get_LOCATION_PROVIDERS_ALLOWED_ = 137; + public static final int SEEMP_API_android_provider_Settings__get_LOCK_PATTERN_ENABLED_ = 138; + public static final int SEEMP_API_android_provider_Settings__get_LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED_ = 139; + public static final int SEEMP_API_android_provider_Settings__get_LOCK_PATTERN_VISIBLE_ = 140; + public static final int SEEMP_API_android_provider_Settings__get_NETWORK_PREFERENCE_ = 141; + public static final int SEEMP_API_android_provider_Settings__get_DATA_ROAMING_ = 142; + public static final int SEEMP_API_android_provider_Settings__get_HTTP_PROXY_ = 143; + public static final int SEEMP_API_android_provider_Settings__get_PARENTAL_CONTROL_ENABLED_ = 144; + public static final int SEEMP_API_android_provider_Settings__get_PARENTAL_CONTROL_LAST_UPDATE_ = 145; + public static final int SEEMP_API_android_provider_Settings__get_PARENTAL_CONTROL_REDIRECT_URL_ = 146; + public static final int SEEMP_API_android_provider_Settings__get_RADIO_BLUETOOTH_ = 147; + public static final int SEEMP_API_android_provider_Settings__get_RADIO_CELL_ = 148; + public static final int SEEMP_API_android_provider_Settings__get_RADIO_NFC_ = 149; + public static final int SEEMP_API_android_provider_Settings__get_RADIO_WIFI_ = 150; + public static final int SEEMP_API_android_provider_Settings__get_SYS_PROP_SETTING_VERSION_ = 151; + public static final int SEEMP_API_android_provider_Settings__get_SETTINGS_CLASSNAME_ = 152; + public static final int SEEMP_API_android_provider_Settings__get_TEXT_AUTO_CAPS_ = 153; + public static final int SEEMP_API_android_provider_Settings__get_TEXT_AUTO_PUNCTUATE_ = 154; + public static final int SEEMP_API_android_provider_Settings__get_TEXT_AUTO_REPLACE_ = 155; + public static final int SEEMP_API_android_provider_Settings__get_TEXT_SHOW_PASSWORD_ = 156; + public static final int SEEMP_API_android_provider_Settings__get_USB_MASS_STORAGE_ENABLED_ = 157; + public static final int SEEMP_API_android_provider_Settings__get_VIBRATE_ON_ = 158; + public static final int SEEMP_API_android_provider_Settings__get_HAPTIC_FEEDBACK_ENABLED_ = 159; + public static final int SEEMP_API_android_provider_Settings__get_VOLUME_ALARM_ = 160; + public static final int SEEMP_API_android_provider_Settings__get_VOLUME_BLUETOOTH_SCO_ = 161; + public static final int SEEMP_API_android_provider_Settings__get_VOLUME_MUSIC_ = 162; + public static final int SEEMP_API_android_provider_Settings__get_VOLUME_NOTIFICATION_ = 163; + public static final int SEEMP_API_android_provider_Settings__get_VOLUME_RING_ = 164; + public static final int SEEMP_API_android_provider_Settings__get_VOLUME_SYSTEM_ = 165; + public static final int SEEMP_API_android_provider_Settings__get_VOLUME_VOICE_ = 166; + public static final int SEEMP_API_android_provider_Settings__get_SOUND_EFFECTS_ENABLED_ = 167; + public static final int SEEMP_API_android_provider_Settings__get_MODE_RINGER_STREAMS_AFFECTED_ = 168; + public static final int SEEMP_API_android_provider_Settings__get_MUTE_STREAMS_AFFECTED_ = 169; + public static final int SEEMP_API_android_provider_Settings__get_NOTIFICATION_SOUND_ = 170; + public static final int SEEMP_API_android_provider_Settings__get_APPEND_FOR_LAST_AUDIBLE_ = 171; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_MAX_DHCP_RETRY_COUNT_ = 172; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS_ = 173; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON_ = 174; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY_ = 175; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_NUM_OPEN_NETWORKS_KEPT_ = 176; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_ON_ = 177; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_SLEEP_POLICY_ = 178; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_SLEEP_POLICY_DEFAULT_ = 179; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_SLEEP_POLICY_NEVER_ = 180; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED_ = 181; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_STATIC_DNS1_ = 182; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_STATIC_DNS2_ = 183; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_STATIC_GATEWAY_ = 184; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_STATIC_IP_ = 185; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_STATIC_NETMASK_ = 186; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_USE_STATIC_IP_ = 187; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE_ = 188; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_AP_COUNT_ = 189; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS_ = 190; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED_ = 191; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS_ = 192; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT_ = 193; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_MAX_AP_CHECKS_ = 194; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_ON_ = 195; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_PING_COUNT_ = 196; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_PING_DELAY_MS_ = 197; + public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_PING_TIMEOUT_MS_ = 198; + public static final int SEEMP_API_android_provider_Settings__put_ACCELEROMETER_ROTATION_ = 199; + public static final int SEEMP_API_android_provider_Settings__put_USER_ROTATION_ = 200; + public static final int SEEMP_API_android_provider_Settings__put_ADB_ENABLED_ = 201; + public static final int SEEMP_API_android_provider_Settings__put_DEBUG_APP_ = 202; + public static final int SEEMP_API_android_provider_Settings__put_WAIT_FOR_DEBUGGER_ = 203; + public static final int SEEMP_API_android_provider_Settings__put_AIRPLANE_MODE_ON_ = 204; + public static final int SEEMP_API_android_provider_Settings__put_AIRPLANE_MODE_RADIOS_ = 205; + public static final int SEEMP_API_android_provider_Settings__put_ALARM_ALERT_ = 206; + public static final int SEEMP_API_android_provider_Settings__put_NEXT_ALARM_FORMATTED_ = 207; + public static final int SEEMP_API_android_provider_Settings__put_ALWAYS_FINISH_ACTIVITIES_ = 208; + public static final int SEEMP_API_android_provider_Settings__put_ANDROID_ID_ = 209; + public static final int SEEMP_API_android_provider_Settings__put_LOGGING_ID_ = 210; + public static final int SEEMP_API_android_provider_Settings__put_ANIMATOR_DURATION_SCALE_ = 211; + public static final int SEEMP_API_android_provider_Settings__put_WINDOW_ANIMATION_SCALE_ = 212; + public static final int SEEMP_API_android_provider_Settings__put_FONT_SCALE_ = 213; + public static final int SEEMP_API_android_provider_Settings__put_SCREEN_BRIGHTNESS_ = 214; + public static final int SEEMP_API_android_provider_Settings__put_SCREEN_BRIGHTNESS_MODE_ = 215; + public static final int SEEMP_API_android_provider_Settings__put_SCREEN_BRIGHTNESS_MODE_AUTOMATIC_ = 216; + public static final int SEEMP_API_android_provider_Settings__put_SCREEN_BRIGHTNESS_MODE_MANUAL_ = 217; + public static final int SEEMP_API_android_provider_Settings__put_SCREEN_OFF_TIMEOUT_ = 218; + public static final int SEEMP_API_android_provider_Settings__put_DIM_SCREEN_ = 219; + public static final int SEEMP_API_android_provider_Settings__put_TRANSITION_ANIMATION_SCALE_ = 220; + public static final int SEEMP_API_android_provider_Settings__put_STAY_ON_WHILE_PLUGGED_IN_ = 221; + public static final int SEEMP_API_android_provider_Settings__put_WALLPAPER_ACTIVITY_ = 222; + public static final int SEEMP_API_android_provider_Settings__put_SHOW_PROCESSES_ = 223; + public static final int SEEMP_API_android_provider_Settings__put_SHOW_WEB_SUGGESTIONS_ = 224; + public static final int SEEMP_API_android_provider_Settings__put_SHOW_GTALK_SERVICE_STATUS_ = 225; + public static final int SEEMP_API_android_provider_Settings__put_USE_GOOGLE_MAIL_ = 226; + public static final int SEEMP_API_android_provider_Settings__put_AUTO_TIME_ = 227; + public static final int SEEMP_API_android_provider_Settings__put_AUTO_TIME_ZONE_ = 228; + public static final int SEEMP_API_android_provider_Settings__put_DATE_FORMAT_ = 229; + public static final int SEEMP_API_android_provider_Settings__put_TIME_12_24_ = 230; + public static final int SEEMP_API_android_provider_Settings__put_BLUETOOTH_DISCOVERABILITY_ = 231; + public static final int SEEMP_API_android_provider_Settings__put_BLUETOOTH_DISCOVERABILITY_TIMEOUT_ = 232; + public static final int SEEMP_API_android_provider_Settings__put_BLUETOOTH_ON_ = 233; + public static final int SEEMP_API_android_provider_Settings__put_DEVICE_PROVISIONED_ = 234; + public static final int SEEMP_API_android_provider_Settings__put_SETUP_WIZARD_HAS_RUN_ = 235; + public static final int SEEMP_API_android_provider_Settings__put_DTMF_TONE_WHEN_DIALING_ = 236; + public static final int SEEMP_API_android_provider_Settings__put_END_BUTTON_BEHAVIOR_ = 237; + public static final int SEEMP_API_android_provider_Settings__put_RINGTONE_ = 238; + public static final int SEEMP_API_android_provider_Settings__put_MODE_RINGER_ = 239; + public static final int SEEMP_API_android_provider_Settings__put_INSTALL_NON_MARKET_APPS_ = 240; + public static final int SEEMP_API_android_provider_Settings__put_LOCATION_PROVIDERS_ALLOWED_ = 241; + public static final int SEEMP_API_android_provider_Settings__put_LOCK_PATTERN_ENABLED_ = 242; + public static final int SEEMP_API_android_provider_Settings__put_LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED_ = 243; + public static final int SEEMP_API_android_provider_Settings__put_LOCK_PATTERN_VISIBLE_ = 244; + public static final int SEEMP_API_android_provider_Settings__put_NETWORK_PREFERENCE_ = 245; + public static final int SEEMP_API_android_provider_Settings__put_DATA_ROAMING_ = 246; + public static final int SEEMP_API_android_provider_Settings__put_HTTP_PROXY_ = 247; + public static final int SEEMP_API_android_provider_Settings__put_PARENTAL_CONTROL_ENABLED_ = 248; + public static final int SEEMP_API_android_provider_Settings__put_PARENTAL_CONTROL_LAST_UPDATE_ = 249; + public static final int SEEMP_API_android_provider_Settings__put_PARENTAL_CONTROL_REDIRECT_URL_ = 250; + public static final int SEEMP_API_android_provider_Settings__put_RADIO_BLUETOOTH_ = 251; + public static final int SEEMP_API_android_provider_Settings__put_RADIO_CELL_ = 252; + public static final int SEEMP_API_android_provider_Settings__put_RADIO_NFC_ = 253; + public static final int SEEMP_API_android_provider_Settings__put_RADIO_WIFI_ = 254; + public static final int SEEMP_API_android_provider_Settings__put_SYS_PROP_SETTING_VERSION_ = 255; + public static final int SEEMP_API_android_provider_Settings__put_SETTINGS_CLASSNAME_ = 256; + public static final int SEEMP_API_android_provider_Settings__put_TEXT_AUTO_CAPS_ = 257; + public static final int SEEMP_API_android_provider_Settings__put_TEXT_AUTO_PUNCTUATE_ = 258; + public static final int SEEMP_API_android_provider_Settings__put_TEXT_AUTO_REPLACE_ = 259; + public static final int SEEMP_API_android_provider_Settings__put_TEXT_SHOW_PASSWORD_ = 260; + public static final int SEEMP_API_android_provider_Settings__put_USB_MASS_STORAGE_ENABLED_ = 261; + public static final int SEEMP_API_android_provider_Settings__put_VIBRATE_ON_ = 262; + public static final int SEEMP_API_android_provider_Settings__put_HAPTIC_FEEDBACK_ENABLED_ = 263; + public static final int SEEMP_API_android_provider_Settings__put_VOLUME_ALARM_ = 264; + public static final int SEEMP_API_android_provider_Settings__put_VOLUME_BLUETOOTH_SCO_ = 265; + public static final int SEEMP_API_android_provider_Settings__put_VOLUME_MUSIC_ = 266; + public static final int SEEMP_API_android_provider_Settings__put_VOLUME_NOTIFICATION_ = 267; + public static final int SEEMP_API_android_provider_Settings__put_VOLUME_RING_ = 268; + public static final int SEEMP_API_android_provider_Settings__put_VOLUME_SYSTEM_ = 269; + public static final int SEEMP_API_android_provider_Settings__put_VOLUME_VOICE_ = 270; + public static final int SEEMP_API_android_provider_Settings__put_SOUND_EFFECTS_ENABLED_ = 271; + public static final int SEEMP_API_android_provider_Settings__put_MODE_RINGER_STREAMS_AFFECTED_ = 272; + public static final int SEEMP_API_android_provider_Settings__put_MUTE_STREAMS_AFFECTED_ = 273; + public static final int SEEMP_API_android_provider_Settings__put_NOTIFICATION_SOUND_ = 274; + public static final int SEEMP_API_android_provider_Settings__put_APPEND_FOR_LAST_AUDIBLE_ = 275; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_MAX_DHCP_RETRY_COUNT_ = 276; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS_ = 277; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON_ = 278; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY_ = 279; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_NUM_OPEN_NETWORKS_KEPT_ = 280; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_ON_ = 281; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_SLEEP_POLICY_ = 282; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_SLEEP_POLICY_DEFAULT_ = 283; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_SLEEP_POLICY_NEVER_ = 284; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED_ = 285; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_STATIC_DNS1_ = 286; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_STATIC_DNS2_ = 287; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_STATIC_GATEWAY_ = 288; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_STATIC_IP_ = 289; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_STATIC_NETMASK_ = 290; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_USE_STATIC_IP_ = 291; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE_ = 292; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_AP_COUNT_ = 293; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS_ = 294; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED_ = 295; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS_ = 296; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT_ = 297; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_MAX_AP_CHECKS_ = 298; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_ON_ = 299; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_PING_COUNT_ = 300; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_PING_DELAY_MS_ = 301; + public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_PING_TIMEOUT_MS_ = 302; + + private final static java.util.Map<String,Integer> value_to_get_map; + static { + value_to_get_map = new java.util.HashMap<String,Integer>( 198 ); + value_to_get_map.put(Settings.System.NOTIFICATION_SOUND, + SEEMP_API_android_provider_Settings__get_NOTIFICATION_SOUND_); + value_to_get_map.put(Settings.System.DTMF_TONE_WHEN_DIALING, + SEEMP_API_android_provider_Settings__get_DTMF_TONE_WHEN_DIALING_); + value_to_get_map.put(Settings.System.LOCK_PATTERN_ENABLED, + SEEMP_API_android_provider_Settings__get_LOCK_PATTERN_ENABLED_); + value_to_get_map.put(Settings.System.WIFI_MAX_DHCP_RETRY_COUNT, + SEEMP_API_android_provider_Settings__get_WIFI_MAX_DHCP_RETRY_COUNT_); + value_to_get_map.put(Settings.System.AUTO_TIME, + SEEMP_API_android_provider_Settings__get_AUTO_TIME_); + value_to_get_map.put(Settings.System.SETUP_WIZARD_HAS_RUN, + SEEMP_API_android_provider_Settings__get_SETUP_WIZARD_HAS_RUN_); + value_to_get_map.put(Settings.System.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS, + SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS_); + value_to_get_map.put(Settings.System.LOCATION_PROVIDERS_ALLOWED, + SEEMP_API_android_provider_Settings__get_LOCATION_PROVIDERS_ALLOWED_); + value_to_get_map.put(Settings.System.ALARM_ALERT, + SEEMP_API_android_provider_Settings__get_ALARM_ALERT_); + value_to_get_map.put(Settings.System.VIBRATE_ON, + SEEMP_API_android_provider_Settings__get_VIBRATE_ON_); + value_to_get_map.put(Settings.System.USB_MASS_STORAGE_ENABLED, + SEEMP_API_android_provider_Settings__get_USB_MASS_STORAGE_ENABLED_); + value_to_get_map.put(Settings.System.WIFI_WATCHDOG_PING_DELAY_MS, + SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_PING_DELAY_MS_); + value_to_get_map.put(Settings.System.FONT_SCALE, + SEEMP_API_android_provider_Settings__get_FONT_SCALE_); + value_to_get_map.put(Settings.System.WIFI_WATCHDOG_AP_COUNT, + SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_AP_COUNT_); + value_to_get_map.put(Settings.System.ALWAYS_FINISH_ACTIVITIES, + SEEMP_API_android_provider_Settings__get_ALWAYS_FINISH_ACTIVITIES_); + value_to_get_map.put(Settings.System.ACCELEROMETER_ROTATION, + SEEMP_API_android_provider_Settings__get_ACCELEROMETER_ROTATION_); + value_to_get_map.put(Settings.System.WIFI_WATCHDOG_PING_TIMEOUT_MS, + SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_PING_TIMEOUT_MS_); + value_to_get_map.put(Settings.System.VOLUME_NOTIFICATION, + SEEMP_API_android_provider_Settings__get_VOLUME_NOTIFICATION_); + value_to_get_map.put(Settings.System.AIRPLANE_MODE_ON, + SEEMP_API_android_provider_Settings__get_AIRPLANE_MODE_ON_); + value_to_get_map.put(Settings.System.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS, + SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS_); + value_to_get_map.put(Settings.System.WIFI_STATIC_IP, + SEEMP_API_android_provider_Settings__get_WIFI_STATIC_IP_); + value_to_get_map.put(Settings.System.RADIO_BLUETOOTH, + SEEMP_API_android_provider_Settings__get_RADIO_BLUETOOTH_); + value_to_get_map.put(Settings.System.BLUETOOTH_DISCOVERABILITY_TIMEOUT, + SEEMP_API_android_provider_Settings__get_BLUETOOTH_DISCOVERABILITY_TIMEOUT_); + value_to_get_map.put(Settings.System.VOLUME_RING, + SEEMP_API_android_provider_Settings__get_VOLUME_RING_); + value_to_get_map.put(Settings.System.MODE_RINGER_STREAMS_AFFECTED, + SEEMP_API_android_provider_Settings__get_MODE_RINGER_STREAMS_AFFECTED_); + value_to_get_map.put(Settings.System.VOLUME_SYSTEM, + SEEMP_API_android_provider_Settings__get_VOLUME_SYSTEM_); + value_to_get_map.put(Settings.System.SCREEN_OFF_TIMEOUT, + SEEMP_API_android_provider_Settings__get_SCREEN_OFF_TIMEOUT_); + value_to_get_map.put(Settings.System.RADIO_WIFI, + SEEMP_API_android_provider_Settings__get_RADIO_WIFI_); + value_to_get_map.put(Settings.System.AUTO_TIME_ZONE, + SEEMP_API_android_provider_Settings__get_AUTO_TIME_ZONE_); + value_to_get_map.put(Settings.System.TEXT_AUTO_CAPS, + SEEMP_API_android_provider_Settings__get_TEXT_AUTO_CAPS_); + value_to_get_map.put(Settings.System.WALLPAPER_ACTIVITY, + SEEMP_API_android_provider_Settings__get_WALLPAPER_ACTIVITY_); + value_to_get_map.put(Settings.System.ANIMATOR_DURATION_SCALE, + SEEMP_API_android_provider_Settings__get_ANIMATOR_DURATION_SCALE_); + value_to_get_map.put(Settings.System.WIFI_NUM_OPEN_NETWORKS_KEPT, + SEEMP_API_android_provider_Settings__get_WIFI_NUM_OPEN_NETWORKS_KEPT_); + value_to_get_map.put(Settings.System.LOCK_PATTERN_VISIBLE, + SEEMP_API_android_provider_Settings__get_LOCK_PATTERN_VISIBLE_); + value_to_get_map.put(Settings.System.VOLUME_VOICE, + SEEMP_API_android_provider_Settings__get_VOLUME_VOICE_); + value_to_get_map.put(Settings.System.DEBUG_APP, + SEEMP_API_android_provider_Settings__get_DEBUG_APP_); + value_to_get_map.put(Settings.System.WIFI_ON, + SEEMP_API_android_provider_Settings__get_WIFI_ON_); + value_to_get_map.put(Settings.System.TEXT_SHOW_PASSWORD, + SEEMP_API_android_provider_Settings__get_TEXT_SHOW_PASSWORD_); + value_to_get_map.put(Settings.System.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, + SEEMP_API_android_provider_Settings__get_WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY_); + value_to_get_map.put(Settings.System.WIFI_SLEEP_POLICY, + SEEMP_API_android_provider_Settings__get_WIFI_SLEEP_POLICY_); + value_to_get_map.put(Settings.System.VOLUME_MUSIC, + SEEMP_API_android_provider_Settings__get_VOLUME_MUSIC_); + value_to_get_map.put(Settings.System.PARENTAL_CONTROL_LAST_UPDATE, + SEEMP_API_android_provider_Settings__get_PARENTAL_CONTROL_LAST_UPDATE_); + value_to_get_map.put(Settings.System.DEVICE_PROVISIONED, + SEEMP_API_android_provider_Settings__get_DEVICE_PROVISIONED_); + value_to_get_map.put(Settings.System.HTTP_PROXY, + SEEMP_API_android_provider_Settings__get_HTTP_PROXY_); + value_to_get_map.put(Settings.System.ANDROID_ID, + SEEMP_API_android_provider_Settings__get_ANDROID_ID_); + value_to_get_map.put(Settings.System.WIFI_WATCHDOG_MAX_AP_CHECKS, + SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_MAX_AP_CHECKS_); + value_to_get_map.put(Settings.System.END_BUTTON_BEHAVIOR, + SEEMP_API_android_provider_Settings__get_END_BUTTON_BEHAVIOR_); + value_to_get_map.put(Settings.System.NEXT_ALARM_FORMATTED, + SEEMP_API_android_provider_Settings__get_NEXT_ALARM_FORMATTED_); + value_to_get_map.put(Settings.System.RADIO_CELL, + SEEMP_API_android_provider_Settings__get_RADIO_CELL_); + value_to_get_map.put(Settings.System.PARENTAL_CONTROL_ENABLED, + SEEMP_API_android_provider_Settings__get_PARENTAL_CONTROL_ENABLED_); + value_to_get_map.put(Settings.System.BLUETOOTH_ON, + SEEMP_API_android_provider_Settings__get_BLUETOOTH_ON_); + value_to_get_map.put(Settings.System.WINDOW_ANIMATION_SCALE, + SEEMP_API_android_provider_Settings__get_WINDOW_ANIMATION_SCALE_); + value_to_get_map.put(Settings.System.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED, + SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED_); + value_to_get_map.put(Settings.System.BLUETOOTH_DISCOVERABILITY, + SEEMP_API_android_provider_Settings__get_BLUETOOTH_DISCOVERABILITY_); + value_to_get_map.put(Settings.System.WIFI_STATIC_DNS1, + SEEMP_API_android_provider_Settings__get_WIFI_STATIC_DNS1_); + value_to_get_map.put(Settings.System.WIFI_STATIC_DNS2, + SEEMP_API_android_provider_Settings__get_WIFI_STATIC_DNS2_); + value_to_get_map.put(Settings.System.HAPTIC_FEEDBACK_ENABLED, + SEEMP_API_android_provider_Settings__get_HAPTIC_FEEDBACK_ENABLED_); + value_to_get_map.put(Settings.System.SHOW_WEB_SUGGESTIONS, + SEEMP_API_android_provider_Settings__get_SHOW_WEB_SUGGESTIONS_); + value_to_get_map.put(Settings.System.PARENTAL_CONTROL_REDIRECT_URL, + SEEMP_API_android_provider_Settings__get_PARENTAL_CONTROL_REDIRECT_URL_); + value_to_get_map.put(Settings.System.DATE_FORMAT, + SEEMP_API_android_provider_Settings__get_DATE_FORMAT_); + value_to_get_map.put(Settings.System.RADIO_NFC, + SEEMP_API_android_provider_Settings__get_RADIO_NFC_); + value_to_get_map.put(Settings.System.AIRPLANE_MODE_RADIOS, + SEEMP_API_android_provider_Settings__get_AIRPLANE_MODE_RADIOS_); + value_to_get_map.put(Settings.System.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED, + SEEMP_API_android_provider_Settings__get_LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED_); + value_to_get_map.put(Settings.System.TIME_12_24, + SEEMP_API_android_provider_Settings__get_TIME_12_24_); + value_to_get_map.put(Settings.System.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT, + SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT_); + value_to_get_map.put(Settings.System.VOLUME_BLUETOOTH_SCO, + SEEMP_API_android_provider_Settings__get_VOLUME_BLUETOOTH_SCO_); + value_to_get_map.put(Settings.System.USER_ROTATION, + SEEMP_API_android_provider_Settings__get_USER_ROTATION_); + value_to_get_map.put(Settings.System.WIFI_STATIC_GATEWAY, + SEEMP_API_android_provider_Settings__get_WIFI_STATIC_GATEWAY_); + value_to_get_map.put(Settings.System.STAY_ON_WHILE_PLUGGED_IN, + SEEMP_API_android_provider_Settings__get_STAY_ON_WHILE_PLUGGED_IN_); + value_to_get_map.put(Settings.System.SOUND_EFFECTS_ENABLED, + SEEMP_API_android_provider_Settings__get_SOUND_EFFECTS_ENABLED_); + value_to_get_map.put(Settings.System.WIFI_WATCHDOG_PING_COUNT, + SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_PING_COUNT_); + value_to_get_map.put(Settings.System.DATA_ROAMING, + SEEMP_API_android_provider_Settings__get_DATA_ROAMING_); + value_to_get_map.put(Settings.System.SETTINGS_CLASSNAME, + SEEMP_API_android_provider_Settings__get_SETTINGS_CLASSNAME_); + value_to_get_map.put(Settings.System.TRANSITION_ANIMATION_SCALE, + SEEMP_API_android_provider_Settings__get_TRANSITION_ANIMATION_SCALE_); + value_to_get_map.put(Settings.System.WAIT_FOR_DEBUGGER, + SEEMP_API_android_provider_Settings__get_WAIT_FOR_DEBUGGER_); + value_to_get_map.put(Settings.System.INSTALL_NON_MARKET_APPS, + SEEMP_API_android_provider_Settings__get_INSTALL_NON_MARKET_APPS_); + value_to_get_map.put(Settings.System.ADB_ENABLED, + SEEMP_API_android_provider_Settings__get_ADB_ENABLED_); + value_to_get_map.put(Settings.System.WIFI_USE_STATIC_IP, + SEEMP_API_android_provider_Settings__get_WIFI_USE_STATIC_IP_); + value_to_get_map.put(Settings.System.DIM_SCREEN, + SEEMP_API_android_provider_Settings__get_DIM_SCREEN_); + value_to_get_map.put(Settings.System.VOLUME_ALARM, + SEEMP_API_android_provider_Settings__get_VOLUME_ALARM_); + value_to_get_map.put(Settings.System.WIFI_WATCHDOG_ON, + SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_ON_); + value_to_get_map.put(Settings.System.WIFI_STATIC_NETMASK, + SEEMP_API_android_provider_Settings__get_WIFI_STATIC_NETMASK_); + value_to_get_map.put(Settings.System.NETWORK_PREFERENCE, + SEEMP_API_android_provider_Settings__get_NETWORK_PREFERENCE_); + value_to_get_map.put(Settings.System.SHOW_PROCESSES, + SEEMP_API_android_provider_Settings__get_SHOW_PROCESSES_); + value_to_get_map.put(Settings.System.TEXT_AUTO_REPLACE, + SEEMP_API_android_provider_Settings__get_TEXT_AUTO_REPLACE_); + value_to_get_map.put(Settings.System.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, + SEEMP_API_android_provider_Settings__get_WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON_); + value_to_get_map.put(Settings.System.APPEND_FOR_LAST_AUDIBLE, + SEEMP_API_android_provider_Settings__get_APPEND_FOR_LAST_AUDIBLE_); + value_to_get_map.put(Settings.System.SHOW_GTALK_SERVICE_STATUS, + SEEMP_API_android_provider_Settings__get_SHOW_GTALK_SERVICE_STATUS_); + value_to_get_map.put(Settings.System.SCREEN_BRIGHTNESS, + SEEMP_API_android_provider_Settings__get_SCREEN_BRIGHTNESS_); + value_to_get_map.put(Settings.System.USE_GOOGLE_MAIL, + SEEMP_API_android_provider_Settings__get_USE_GOOGLE_MAIL_); + value_to_get_map.put(Settings.System.RINGTONE, + SEEMP_API_android_provider_Settings__get_RINGTONE_); + value_to_get_map.put(Settings.System.LOGGING_ID, + SEEMP_API_android_provider_Settings__get_LOGGING_ID_); + value_to_get_map.put(Settings.System.MODE_RINGER, + SEEMP_API_android_provider_Settings__get_MODE_RINGER_); + value_to_get_map.put(Settings.System.MUTE_STREAMS_AFFECTED, + SEEMP_API_android_provider_Settings__get_MUTE_STREAMS_AFFECTED_); + value_to_get_map.put(Settings.System.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE, + SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE_); + value_to_get_map.put(Settings.System.TEXT_AUTO_PUNCTUATE, + SEEMP_API_android_provider_Settings__get_TEXT_AUTO_PUNCTUATE_); + value_to_get_map.put(Settings.System.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS, + SEEMP_API_android_provider_Settings__get_WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS_); + value_to_get_map.put(Settings.System.SCREEN_BRIGHTNESS_MODE, + SEEMP_API_android_provider_Settings__get_SCREEN_BRIGHTNESS_MODE_); + } + + public static int getSeempGetApiIdFromValue( String v ) + { + Integer result = value_to_get_map.get( v ); + if (result == null) + { + result = -1; + } + return result; + } + + private final static java.util.Map<String,Integer> value_to_put_map; + static { + value_to_put_map = new java.util.HashMap<String,Integer>( 198 ); + value_to_put_map.put(Settings.System.NOTIFICATION_SOUND, + SEEMP_API_android_provider_Settings__put_NOTIFICATION_SOUND_); + value_to_put_map.put(Settings.System.DTMF_TONE_WHEN_DIALING, + SEEMP_API_android_provider_Settings__put_DTMF_TONE_WHEN_DIALING_); + value_to_put_map.put(Settings.System.LOCK_PATTERN_ENABLED, + SEEMP_API_android_provider_Settings__put_LOCK_PATTERN_ENABLED_); + value_to_put_map.put(Settings.System.WIFI_MAX_DHCP_RETRY_COUNT, + SEEMP_API_android_provider_Settings__put_WIFI_MAX_DHCP_RETRY_COUNT_); + value_to_put_map.put(Settings.System.AUTO_TIME, + SEEMP_API_android_provider_Settings__put_AUTO_TIME_); + value_to_put_map.put(Settings.System.SETUP_WIZARD_HAS_RUN, + SEEMP_API_android_provider_Settings__put_SETUP_WIZARD_HAS_RUN_); + value_to_put_map.put(Settings.System.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS, + SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS_); + value_to_put_map.put(Settings.System.LOCATION_PROVIDERS_ALLOWED, + SEEMP_API_android_provider_Settings__put_LOCATION_PROVIDERS_ALLOWED_); + value_to_put_map.put(Settings.System.ALARM_ALERT, + SEEMP_API_android_provider_Settings__put_ALARM_ALERT_); + value_to_put_map.put(Settings.System.VIBRATE_ON, + SEEMP_API_android_provider_Settings__put_VIBRATE_ON_); + value_to_put_map.put(Settings.System.USB_MASS_STORAGE_ENABLED, + SEEMP_API_android_provider_Settings__put_USB_MASS_STORAGE_ENABLED_); + value_to_put_map.put(Settings.System.WIFI_WATCHDOG_PING_DELAY_MS, + SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_PING_DELAY_MS_); + value_to_put_map.put(Settings.System.FONT_SCALE, + SEEMP_API_android_provider_Settings__put_FONT_SCALE_); + value_to_put_map.put(Settings.System.WIFI_WATCHDOG_AP_COUNT, + SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_AP_COUNT_); + value_to_put_map.put(Settings.System.ALWAYS_FINISH_ACTIVITIES, + SEEMP_API_android_provider_Settings__put_ALWAYS_FINISH_ACTIVITIES_); + value_to_put_map.put(Settings.System.ACCELEROMETER_ROTATION, + SEEMP_API_android_provider_Settings__put_ACCELEROMETER_ROTATION_); + value_to_put_map.put(Settings.System.WIFI_WATCHDOG_PING_TIMEOUT_MS, + SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_PING_TIMEOUT_MS_); + value_to_put_map.put(Settings.System.VOLUME_NOTIFICATION, + SEEMP_API_android_provider_Settings__put_VOLUME_NOTIFICATION_); + value_to_put_map.put(Settings.System.AIRPLANE_MODE_ON, + SEEMP_API_android_provider_Settings__put_AIRPLANE_MODE_ON_); + value_to_put_map.put(Settings.System.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS, + SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS_); + value_to_put_map.put(Settings.System.WIFI_STATIC_IP, + SEEMP_API_android_provider_Settings__put_WIFI_STATIC_IP_); + value_to_put_map.put(Settings.System.RADIO_BLUETOOTH, + SEEMP_API_android_provider_Settings__put_RADIO_BLUETOOTH_); + value_to_put_map.put(Settings.System.BLUETOOTH_DISCOVERABILITY_TIMEOUT, + SEEMP_API_android_provider_Settings__put_BLUETOOTH_DISCOVERABILITY_TIMEOUT_); + value_to_put_map.put(Settings.System.VOLUME_RING, + SEEMP_API_android_provider_Settings__put_VOLUME_RING_); + value_to_put_map.put(Settings.System.MODE_RINGER_STREAMS_AFFECTED, + SEEMP_API_android_provider_Settings__put_MODE_RINGER_STREAMS_AFFECTED_); + value_to_put_map.put(Settings.System.VOLUME_SYSTEM, + SEEMP_API_android_provider_Settings__put_VOLUME_SYSTEM_); + value_to_put_map.put(Settings.System.SCREEN_OFF_TIMEOUT, + SEEMP_API_android_provider_Settings__put_SCREEN_OFF_TIMEOUT_); + value_to_put_map.put(Settings.System.RADIO_WIFI, + SEEMP_API_android_provider_Settings__put_RADIO_WIFI_); + value_to_put_map.put(Settings.System.AUTO_TIME_ZONE, + SEEMP_API_android_provider_Settings__put_AUTO_TIME_ZONE_); + value_to_put_map.put(Settings.System.TEXT_AUTO_CAPS, + SEEMP_API_android_provider_Settings__put_TEXT_AUTO_CAPS_); + value_to_put_map.put(Settings.System.WALLPAPER_ACTIVITY, + SEEMP_API_android_provider_Settings__put_WALLPAPER_ACTIVITY_); + value_to_put_map.put(Settings.System.ANIMATOR_DURATION_SCALE, + SEEMP_API_android_provider_Settings__put_ANIMATOR_DURATION_SCALE_); + value_to_put_map.put(Settings.System.WIFI_NUM_OPEN_NETWORKS_KEPT, + SEEMP_API_android_provider_Settings__put_WIFI_NUM_OPEN_NETWORKS_KEPT_); + value_to_put_map.put(Settings.System.LOCK_PATTERN_VISIBLE, + SEEMP_API_android_provider_Settings__put_LOCK_PATTERN_VISIBLE_); + value_to_put_map.put(Settings.System.VOLUME_VOICE, + SEEMP_API_android_provider_Settings__put_VOLUME_VOICE_); + value_to_put_map.put(Settings.System.DEBUG_APP, + SEEMP_API_android_provider_Settings__put_DEBUG_APP_); + value_to_put_map.put(Settings.System.WIFI_ON, + SEEMP_API_android_provider_Settings__put_WIFI_ON_); + value_to_put_map.put(Settings.System.TEXT_SHOW_PASSWORD, + SEEMP_API_android_provider_Settings__put_TEXT_SHOW_PASSWORD_); + value_to_put_map.put(Settings.System.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, + SEEMP_API_android_provider_Settings__put_WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY_); + value_to_put_map.put(Settings.System.WIFI_SLEEP_POLICY, + SEEMP_API_android_provider_Settings__put_WIFI_SLEEP_POLICY_); + value_to_put_map.put(Settings.System.VOLUME_MUSIC, + SEEMP_API_android_provider_Settings__put_VOLUME_MUSIC_); + value_to_put_map.put(Settings.System.PARENTAL_CONTROL_LAST_UPDATE, + SEEMP_API_android_provider_Settings__put_PARENTAL_CONTROL_LAST_UPDATE_); + value_to_put_map.put(Settings.System.DEVICE_PROVISIONED, + SEEMP_API_android_provider_Settings__put_DEVICE_PROVISIONED_); + value_to_put_map.put(Settings.System.HTTP_PROXY, + SEEMP_API_android_provider_Settings__put_HTTP_PROXY_); + value_to_put_map.put(Settings.System.ANDROID_ID, + SEEMP_API_android_provider_Settings__put_ANDROID_ID_); + value_to_put_map.put(Settings.System.WIFI_WATCHDOG_MAX_AP_CHECKS, + SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_MAX_AP_CHECKS_); + value_to_put_map.put(Settings.System.END_BUTTON_BEHAVIOR, + SEEMP_API_android_provider_Settings__put_END_BUTTON_BEHAVIOR_); + value_to_put_map.put(Settings.System.NEXT_ALARM_FORMATTED, + SEEMP_API_android_provider_Settings__put_NEXT_ALARM_FORMATTED_); + value_to_put_map.put(Settings.System.RADIO_CELL, + SEEMP_API_android_provider_Settings__put_RADIO_CELL_); + value_to_put_map.put(Settings.System.PARENTAL_CONTROL_ENABLED, + SEEMP_API_android_provider_Settings__put_PARENTAL_CONTROL_ENABLED_); + value_to_put_map.put(Settings.System.BLUETOOTH_ON, + SEEMP_API_android_provider_Settings__put_BLUETOOTH_ON_); + value_to_put_map.put(Settings.System.WINDOW_ANIMATION_SCALE, + SEEMP_API_android_provider_Settings__put_WINDOW_ANIMATION_SCALE_); + value_to_put_map.put(Settings.System.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED, + SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED_); + value_to_put_map.put(Settings.System.BLUETOOTH_DISCOVERABILITY, + SEEMP_API_android_provider_Settings__put_BLUETOOTH_DISCOVERABILITY_); + value_to_put_map.put(Settings.System.WIFI_STATIC_DNS1, + SEEMP_API_android_provider_Settings__put_WIFI_STATIC_DNS1_); + value_to_put_map.put(Settings.System.WIFI_STATIC_DNS2, + SEEMP_API_android_provider_Settings__put_WIFI_STATIC_DNS2_); + value_to_put_map.put(Settings.System.HAPTIC_FEEDBACK_ENABLED, + SEEMP_API_android_provider_Settings__put_HAPTIC_FEEDBACK_ENABLED_); + value_to_put_map.put(Settings.System.SHOW_WEB_SUGGESTIONS, + SEEMP_API_android_provider_Settings__put_SHOW_WEB_SUGGESTIONS_); + value_to_put_map.put(Settings.System.PARENTAL_CONTROL_REDIRECT_URL, + SEEMP_API_android_provider_Settings__put_PARENTAL_CONTROL_REDIRECT_URL_); + value_to_put_map.put(Settings.System.DATE_FORMAT, + SEEMP_API_android_provider_Settings__put_DATE_FORMAT_); + value_to_put_map.put(Settings.System.RADIO_NFC, + SEEMP_API_android_provider_Settings__put_RADIO_NFC_); + value_to_put_map.put(Settings.System.AIRPLANE_MODE_RADIOS, + SEEMP_API_android_provider_Settings__put_AIRPLANE_MODE_RADIOS_); + value_to_put_map.put(Settings.System.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED, + SEEMP_API_android_provider_Settings__put_LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED_); + value_to_put_map.put(Settings.System.TIME_12_24, + SEEMP_API_android_provider_Settings__put_TIME_12_24_); + value_to_put_map.put(Settings.System.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT, + SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT_); + value_to_put_map.put(Settings.System.VOLUME_BLUETOOTH_SCO, + SEEMP_API_android_provider_Settings__put_VOLUME_BLUETOOTH_SCO_); + value_to_put_map.put(Settings.System.USER_ROTATION, + SEEMP_API_android_provider_Settings__put_USER_ROTATION_); + value_to_put_map.put(Settings.System.WIFI_STATIC_GATEWAY, + SEEMP_API_android_provider_Settings__put_WIFI_STATIC_GATEWAY_); + value_to_put_map.put(Settings.System.STAY_ON_WHILE_PLUGGED_IN, + SEEMP_API_android_provider_Settings__put_STAY_ON_WHILE_PLUGGED_IN_); + value_to_put_map.put(Settings.System.SOUND_EFFECTS_ENABLED, + SEEMP_API_android_provider_Settings__put_SOUND_EFFECTS_ENABLED_); + value_to_put_map.put(Settings.System.WIFI_WATCHDOG_PING_COUNT, + SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_PING_COUNT_); + value_to_put_map.put(Settings.System.DATA_ROAMING, + SEEMP_API_android_provider_Settings__put_DATA_ROAMING_); + value_to_put_map.put(Settings.System.SETTINGS_CLASSNAME, + SEEMP_API_android_provider_Settings__put_SETTINGS_CLASSNAME_); + value_to_put_map.put(Settings.System.TRANSITION_ANIMATION_SCALE, + SEEMP_API_android_provider_Settings__put_TRANSITION_ANIMATION_SCALE_); + value_to_put_map.put(Settings.System.WAIT_FOR_DEBUGGER, + SEEMP_API_android_provider_Settings__put_WAIT_FOR_DEBUGGER_); + value_to_put_map.put(Settings.System.INSTALL_NON_MARKET_APPS, + SEEMP_API_android_provider_Settings__put_INSTALL_NON_MARKET_APPS_); + value_to_put_map.put(Settings.System.ADB_ENABLED, + SEEMP_API_android_provider_Settings__put_ADB_ENABLED_); + value_to_put_map.put(Settings.System.WIFI_USE_STATIC_IP, + SEEMP_API_android_provider_Settings__put_WIFI_USE_STATIC_IP_); + value_to_put_map.put(Settings.System.DIM_SCREEN, + SEEMP_API_android_provider_Settings__put_DIM_SCREEN_); + value_to_put_map.put(Settings.System.VOLUME_ALARM, + SEEMP_API_android_provider_Settings__put_VOLUME_ALARM_); + value_to_put_map.put(Settings.System.WIFI_WATCHDOG_ON, + SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_ON_); + value_to_put_map.put(Settings.System.WIFI_STATIC_NETMASK, + SEEMP_API_android_provider_Settings__put_WIFI_STATIC_NETMASK_); + value_to_put_map.put(Settings.System.NETWORK_PREFERENCE, + SEEMP_API_android_provider_Settings__put_NETWORK_PREFERENCE_); + value_to_put_map.put(Settings.System.SHOW_PROCESSES, + SEEMP_API_android_provider_Settings__put_SHOW_PROCESSES_); + value_to_put_map.put(Settings.System.TEXT_AUTO_REPLACE, + SEEMP_API_android_provider_Settings__put_TEXT_AUTO_REPLACE_); + value_to_put_map.put(Settings.System.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, + SEEMP_API_android_provider_Settings__put_WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON_); + value_to_put_map.put(Settings.System.APPEND_FOR_LAST_AUDIBLE, + SEEMP_API_android_provider_Settings__put_APPEND_FOR_LAST_AUDIBLE_); + value_to_put_map.put(Settings.System.SHOW_GTALK_SERVICE_STATUS, + SEEMP_API_android_provider_Settings__put_SHOW_GTALK_SERVICE_STATUS_); + value_to_put_map.put(Settings.System.SCREEN_BRIGHTNESS, + SEEMP_API_android_provider_Settings__put_SCREEN_BRIGHTNESS_); + value_to_put_map.put(Settings.System.USE_GOOGLE_MAIL, + SEEMP_API_android_provider_Settings__put_USE_GOOGLE_MAIL_); + value_to_put_map.put(Settings.System.RINGTONE, + SEEMP_API_android_provider_Settings__put_RINGTONE_); + value_to_put_map.put(Settings.System.LOGGING_ID, + SEEMP_API_android_provider_Settings__put_LOGGING_ID_); + value_to_put_map.put(Settings.System.MODE_RINGER, + SEEMP_API_android_provider_Settings__put_MODE_RINGER_); + value_to_put_map.put(Settings.System.MUTE_STREAMS_AFFECTED, + SEEMP_API_android_provider_Settings__put_MUTE_STREAMS_AFFECTED_); + value_to_put_map.put(Settings.System.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE, + SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE_); + value_to_put_map.put(Settings.System.TEXT_AUTO_PUNCTUATE, + SEEMP_API_android_provider_Settings__put_TEXT_AUTO_PUNCTUATE_); + value_to_put_map.put(Settings.System.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS, + SEEMP_API_android_provider_Settings__put_WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS_); + value_to_put_map.put(Settings.System.SCREEN_BRIGHTNESS_MODE, + SEEMP_API_android_provider_Settings__put_SCREEN_BRIGHTNESS_MODE_); + } + + public static int getSeempPutApiIdFromValue( String v ) + { + Integer result = value_to_put_map.get( v ); + if (result == null) + { + result = -1; + } + return result; + } +} diff --git a/core/java/android/util/SparseArrayMap.java b/core/java/android/util/SparseArrayMap.java index b4e1f59874b0..6f9d61f65f8a 100644 --- a/core/java/android/util/SparseArrayMap.java +++ b/core/java/android/util/SparseArrayMap.java @@ -18,6 +18,7 @@ package android.util; import android.annotation.NonNull; import android.annotation.Nullable; +import android.annotation.SuppressLint; import android.annotation.TestApi; import java.util.function.Consumer; @@ -100,6 +101,7 @@ public class SparseArrayMap<K, V> { /** * Get the value associated with the int-K pair. */ + @SuppressLint("KotlinOperator") @Nullable public V get(int key, @NonNull K mapKey) { ArrayMap<K, V> data = mData.get(key); diff --git a/core/java/android/util/TrustedTime.java b/core/java/android/util/TrustedTime.java index f279bdb79420..ca236ed7e42f 100644 --- a/core/java/android/util/TrustedTime.java +++ b/core/java/android/util/TrustedTime.java @@ -30,6 +30,12 @@ public interface TrustedTime { /** * Force update with an external trusted time source, returning {@code true} * when successful. + */ + public boolean forceSync(); + + /** + * Force update the cached time with an external trusted time source, + * returning {@code true} when successful. * * @deprecated Only kept for UnsupportedAppUsage. Do not use. See {@link NtpTrustedTime} */ diff --git a/core/java/android/util/apk/ApkSignatureVerifier.java b/core/java/android/util/apk/ApkSignatureVerifier.java index d2a18dd84313..97d24ad34291 100644 --- a/core/java/android/util/apk/ApkSignatureVerifier.java +++ b/core/java/android/util/apk/ApkSignatureVerifier.java @@ -33,8 +33,11 @@ import android.content.pm.parsing.result.ParseResult; import android.os.Build; import android.os.Trace; import android.os.incremental.V4Signature; +import android.util.ArrayMap; import android.util.Pair; +import android.util.Slog; import android.util.jar.StrictJarFile; +import android.util.BoostFramework; import com.android.internal.util.ArrayUtils; @@ -53,6 +56,9 @@ import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicReference; import java.util.zip.ZipEntry; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.LinkedBlockingQueue; /** * Facade class that takes care of the details of APK verification on @@ -64,6 +70,12 @@ public class ApkSignatureVerifier { private static final AtomicReference<byte[]> sBuffer = new AtomicReference<>(); + private static final String TAG = "ApkSignatureVerifier"; + // multithread verification + private static final int NUMBER_OF_CORES = + Runtime.getRuntime().availableProcessors() >= 4 ? 4 : Runtime.getRuntime().availableProcessors() ; + private static BoostFramework sPerfBoost = null; + private static boolean sIsPerfLockAcquired = false; /** * Verifies the provided APK and returns the certificates associated with each signer. */ @@ -101,6 +113,7 @@ public class ApkSignatureVerifier { * Verifies the provided APK using all allowed signing schemas. * @return the certificates associated with each signer and content digests. * @param verifyFull whether to verify all contents of this APK or just collect certificates. + * @throws PackageParserException if there was a problem collecting certificates * @hide */ public static ParseResult<SigningDetailsWithDigests> verifySignaturesInternal(ParseInput input, @@ -361,32 +374,45 @@ public class ApkSignatureVerifier { */ private static ParseResult<SigningDetailsWithDigests> verifyV1Signature(ParseInput input, String apkPath, boolean verifyFull) { - StrictJarFile jarFile = null; - + int objectNumber = verifyFull ? NUMBER_OF_CORES : 1; + StrictJarFile[] jarFile = new StrictJarFile[objectNumber]; + final ArrayMap<String, StrictJarFile> strictJarFiles = new ArrayMap<String, StrictJarFile>(); try { final Certificate[][] lastCerts; final Signature[] lastSigs; Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "strictJarFileCtor"); + if (sPerfBoost == null) { + sPerfBoost = new BoostFramework(); + } + if (sPerfBoost != null && !sIsPerfLockAcquired && verifyFull) { + //Use big enough number here to hold the perflock for entire PackageInstall session + sPerfBoost.perfHint(BoostFramework.VENDOR_HINT_PACKAGE_INSTALL_BOOST, + null, Integer.MAX_VALUE, -1); + Slog.d(TAG, "Perflock acquired for PackageInstall "); + sIsPerfLockAcquired = true; + } // we still pass verify = true to ctor to collect certs, even though we're not checking // the whole jar. - jarFile = new StrictJarFile( - apkPath, - true, // collect certs - verifyFull); // whether to reject APK with stripped v2 signatures (b/27887819) + for (int i = 0; i < objectNumber; i++) { + jarFile[i] = new StrictJarFile( + apkPath, + true, // collect certs + verifyFull); // whether to reject APK with stripped v2 signatures (b/27887819) + } final List<ZipEntry> toVerify = new ArrayList<>(); // Gather certs from AndroidManifest.xml, which every APK must have, as an optimization // to not need to verify the whole APK when verifyFUll == false. - final ZipEntry manifestEntry = jarFile.findEntry( + final ZipEntry manifestEntry = jarFile[0].findEntry( ApkLiteParseUtils.ANDROID_MANIFEST_FILENAME); if (manifestEntry == null) { return input.error(INSTALL_PARSE_FAILED_BAD_MANIFEST, "Package " + apkPath + " has no manifest"); } final ParseResult<Certificate[][]> result = - loadCertificates(input, jarFile, manifestEntry); + loadCertificates(input, jarFile[0], manifestEntry); if (result.isError()) { return input.error(result); } @@ -400,7 +426,7 @@ public class ApkSignatureVerifier { // fully verify all contents, except for AndroidManifest.xml and the META-INF/ files. if (verifyFull) { - final Iterator<ZipEntry> i = jarFile.iterator(); + final Iterator<ZipEntry> i = jarFile[0].iterator(); while (i.hasNext()) { final ZipEntry entry = i.next(); if (entry.isDirectory()) continue; @@ -411,30 +437,101 @@ public class ApkSignatureVerifier { toVerify.add(entry); } - + class VerificationData { + public Exception exception; + public int exceptionFlag; + public boolean wait; + public int index; + public Object objWaitAll; + public boolean shutDown; + } + VerificationData vData = new VerificationData(); + vData.objWaitAll = new Object(); + final ThreadPoolExecutor verificationExecutor = new ThreadPoolExecutor( + NUMBER_OF_CORES, + NUMBER_OF_CORES, + 1,/*keep alive time*/ + TimeUnit.SECONDS, + new LinkedBlockingQueue<Runnable>()); for (ZipEntry entry : toVerify) { - final Certificate[][] entryCerts; - final ParseResult<Certificate[][]> ret = - loadCertificates(input, jarFile, entry); - if (ret.isError()) { - return input.error(ret); - } - entryCerts = ret.getResult(); - if (ArrayUtils.isEmpty(entryCerts)) { - return input.error(INSTALL_PARSE_FAILED_NO_CERTIFICATES, - "Package " + apkPath + " has no certificates at entry " - + entry.getName()); + Runnable verifyTask = new Runnable(){ + public void run() { + try { + if (vData.exceptionFlag != 0 ) { + Slog.w(TAG, "VerifyV1 exit with exception " + vData.exceptionFlag); + return; + } + String tid = Long.toString(Thread.currentThread().getId()); + StrictJarFile tempJarFile; + synchronized (strictJarFiles) { + tempJarFile = strictJarFiles.get(tid); + if (tempJarFile == null) { + if (vData.index >= NUMBER_OF_CORES) { + vData.index = 0; + } + tempJarFile = jarFile[vData.index++]; + strictJarFiles.put(tid, tempJarFile); + } + } + final Certificate[][] entryCerts; + final ParseResult<Certificate[][]> ret = + loadCertificates(input, tempJarFile, entry); + if (ret.isError()) { + throw new SecurityException(ret.getException()); + } + entryCerts = ret.getResult(); + if (ArrayUtils.isEmpty(entryCerts)) { + throw new SignatureNotFoundException("Package " + apkPath + " has no certificates at entry " + + entry.getName()); + } + + // make sure all entries use the same signing certs + final Signature[] entrySigs = convertToSignatures(entryCerts); + if (!Signature.areExactMatch(lastSigs, entrySigs)) { + throw new Exception("Package " + apkPath + " has mismatched certificates at entry " + + entry.getName()); + } + } catch (SignatureNotFoundException | SecurityException e) { + synchronized (vData.objWaitAll) { + vData.exceptionFlag = INSTALL_PARSE_FAILED_NO_CERTIFICATES; + vData.exception = e; + } + } catch (GeneralSecurityException e) { + synchronized (vData.objWaitAll) { + vData.exceptionFlag = INSTALL_PARSE_FAILED_CERTIFICATE_ENCODING; + vData.exception = e; + } + } catch (Exception e) { + synchronized (vData.objWaitAll) { + vData.exceptionFlag = INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES; + vData.exception = e; + } + } + }}; + synchronized (vData.objWaitAll) { + if (vData.exceptionFlag == 0) { + verificationExecutor.execute(verifyTask); + } } - - // make sure all entries use the same signing certs - final Signature[] entrySigs = convertToSignatures(entryCerts); - if (!Signature.areExactMatch(lastSigs, entrySigs)) { - return input.error( - INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES, - "Package " + apkPath + " has mismatched certificates at entry " - + entry.getName()); + } + vData.wait = true; + verificationExecutor.shutdown(); + while (vData.wait) { + try { + if (vData.exceptionFlag != 0 && !vData.shutDown) { + Slog.w(TAG, "verifyV1 Exception " + vData.exceptionFlag); + verificationExecutor.shutdownNow(); + vData.shutDown = true; + } + vData.wait = !verificationExecutor.awaitTermination(50, + TimeUnit.MILLISECONDS); + } catch (InterruptedException e) { + Slog.w(TAG,"VerifyV1 interrupted while awaiting all threads done..."); } } + if (vData.exceptionFlag != 0) + return input.error(vData.exceptionFlag, + "Failed to collect certificates from " + apkPath, vData.exception); } return input.success(new SigningDetailsWithDigests( new SigningDetails(lastSigs, SignatureSchemeVersion.JAR), null)); @@ -445,8 +542,16 @@ public class ApkSignatureVerifier { return input.error(INSTALL_PARSE_FAILED_NO_CERTIFICATES, "Failed to collect certificates from " + apkPath, e); } finally { + if (sIsPerfLockAcquired && sPerfBoost != null) { + sPerfBoost.perfLockRelease(); + sIsPerfLockAcquired = false; + Slog.d(TAG, "Perflock released for PackageInstall "); + } + strictJarFiles.clear(); Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER); - closeQuietly(jarFile); + for (int i = 0; i < objectNumber ; i++) { + closeQuietly(jarFile[i]); + } } } diff --git a/core/java/android/view/Choreographer.java b/core/java/android/view/Choreographer.java index 01779047a0cd..e55648bc9fec 100644 --- a/core/java/android/view/Choreographer.java +++ b/core/java/android/view/Choreographer.java @@ -34,6 +34,7 @@ import android.os.Message; import android.os.SystemClock; import android.os.SystemProperties; import android.os.Trace; +import android.util.BoostFramework.ScrollOptimizer; import android.util.Log; import android.util.TimeUtils; import android.view.animation.AnimationUtils; @@ -283,6 +284,7 @@ public final class Choreographer { mLastFrameTimeNanos = Long.MIN_VALUE; mFrameIntervalNanos = (long)(1000000000 / getRefreshRate()); + ScrollOptimizer.setFrameInterval(mFrameIntervalNanos); mCallbackQueues = new CallbackQueue[CALLBACK_LAST + 1]; for (int i = 0; i <= CALLBACK_LAST; i++) { @@ -719,7 +721,7 @@ public final class Choreographer { private void scheduleFrameLocked(long now) { if (!mFrameScheduled) { mFrameScheduled = true; - if (USE_VSYNC) { + if (ScrollOptimizer.shouldUseVsync(USE_VSYNC)) { if (DEBUG_FRAMES) { Log.d(TAG, "Scheduling next frame on vsync."); } @@ -735,6 +737,8 @@ public final class Choreographer { mHandler.sendMessageAtFrontOfQueue(msg); } } else { + sFrameDelay = ScrollOptimizer.getFrameDelay(sFrameDelay, + mLastFrameTimeNanos); final long nextFrameTime = Math.max( mLastFrameTimeNanos / TimeUtils.NANOS_PER_MS + sFrameDelay, now); if (DEBUG_FRAMES) { @@ -863,6 +867,12 @@ public final class Choreographer { mLastVsyncEventData.copyFrom(vsyncEventData); } + if (frameIntervalNanos > 0 && (Math.abs(frameIntervalNanos - mFrameIntervalNanos) + > TimeUtils.NANOS_PER_MS)) { + mFrameIntervalNanos = frameIntervalNanos; + ScrollOptimizer.setFrameInterval(mFrameIntervalNanos); + } + ScrollOptimizer.setUITaskStatus(true); if (resynced && Trace.isTagEnabled(Trace.TRACE_TAG_VIEW)) { String message = String.format("Choreographer#doFrame - resynced to %d in %.1fms", timeline.mVsyncId, (timeline.mDeadlineNanos - startNanos) * 0.000001f); @@ -882,6 +892,7 @@ public final class Choreographer { doCallbacks(Choreographer.CALLBACK_TRAVERSAL, frameIntervalNanos); doCallbacks(Choreographer.CALLBACK_COMMIT, frameIntervalNanos); + ScrollOptimizer.setUITaskStatus(false); } finally { AnimationUtils.unlockAnimationClock(); if (resynced) { @@ -1167,10 +1178,9 @@ public final class Choreographer { */ FrameTimeline update( long frameTimeNanos, DisplayEventReceiver.VsyncEventData vsyncEventData) { - if (vsyncEventData.frameTimelinesLength == 0) { - throw new IllegalArgumentException( - "Vsync event timelines length must be greater than 0"); - } + // Even if the frame timelines length is 0, continue with allocation for API + // FrameData.getFrameTimelines consistency. The 0 length frame timelines code path + // should only occur when USE_VSYNC property is false. if (mFrameTimelines.length != vsyncEventData.frameTimelinesLength) { allocateFrameTimelines(vsyncEventData.frameTimelinesLength); } @@ -1308,6 +1318,7 @@ public final class Choreographer { mTimestampNanos = timestampNanos; mFrame = frame; mLastVsyncEventData.copyFrom(vsyncEventData); + ScrollOptimizer.setVsyncTime(mTimestampNanos); Message msg = Message.obtain(mHandler, this); msg.setAsynchronous(true); mHandler.sendMessageAtTime(msg, timestampNanos / TimeUtils.NANOS_PER_MS); diff --git a/core/java/android/view/DisplayCutout.java b/core/java/android/view/DisplayCutout.java index 712d1d67c942..f1c029b4ea55 100644 --- a/core/java/android/view/DisplayCutout.java +++ b/core/java/android/view/DisplayCutout.java @@ -39,6 +39,7 @@ import android.graphics.Path; import android.graphics.Rect; import android.os.Parcel; import android.os.Parcelable; +import android.os.SystemProperties; import android.text.TextUtils; import android.util.DisplayUtils; import android.util.Pair; @@ -1098,6 +1099,11 @@ public final class DisplayCutout { if (TextUtils.isEmpty(spec) && waterfallInsets.equals(Insets.NONE)) { return NULL_PAIR; } + int disableRoundedCorner = + SystemProperties.getInt("vendor.display.disable_rounded_corner", 0); + if (disableRoundedCorner == 1) { + return NULL_PAIR; + } final float physicalPixelDisplaySizeRatio = DisplayUtils.getPhysicalPixelDisplaySizeRatio( physicalDisplayWidth, physicalDisplayHeight, displayWidth, displayHeight); diff --git a/core/java/android/view/DisplayEventReceiver.java b/core/java/android/view/DisplayEventReceiver.java index 50246f600753..a46136a53e95 100644 --- a/core/java/android/view/DisplayEventReceiver.java +++ b/core/java/android/view/DisplayEventReceiver.java @@ -158,7 +158,11 @@ public abstract class DisplayEventReceiver { static final int FRAME_TIMELINES_CAPACITY = 7; public static class FrameTimeline { - FrameTimeline() {} + FrameTimeline() { + // Some reasonable values (+10 ms) for default timestamps. + deadline = System.nanoTime() + 10_000_000; + expectedPresentationTime = deadline + 10_000_000; + } // Called from native code. @SuppressWarnings("unused") @@ -179,11 +183,11 @@ public abstract class DisplayEventReceiver { public long vsyncId = FrameInfo.INVALID_VSYNC_ID; // The frame timestamp for when the frame is expected to be presented. - public long expectedPresentationTime = Long.MAX_VALUE; + public long expectedPresentationTime; // The frame deadline timestamp in {@link System#nanoTime()} timebase that it is // allotted for the frame to be completed. - public long deadline = Long.MAX_VALUE; + public long deadline; } /** @@ -197,7 +201,9 @@ public abstract class DisplayEventReceiver { public int preferredFrameTimelineIndex = 0; - public int frameTimelinesLength = 0; + // The default FrameTimeline is a placeholder populated with invalid vsync ID and some + // reasonable timestamps. + public int frameTimelinesLength = 1; VsyncEventData() { frameTimelines = new FrameTimeline[FRAME_TIMELINES_CAPACITY]; diff --git a/core/java/android/view/IWindow.aidl b/core/java/android/view/IWindow.aidl index d554514349c3..edce42385de5 100644 --- a/core/java/android/view/IWindow.aidl +++ b/core/java/android/view/IWindow.aidl @@ -122,4 +122,9 @@ oneway interface IWindow { * @param callbacks to receive responses */ void requestScrollCapture(in IScrollCaptureResponseListener callbacks); + + /** + * Device Integration: Dispatch Key event to black screen + */ + void dispatchBlackScreenKeyEvent(in KeyEvent event); } diff --git a/core/java/android/view/InsetsState.java b/core/java/android/view/InsetsState.java index b55d25aa7013..60490d764fb7 100644 --- a/core/java/android/view/InsetsState.java +++ b/core/java/android/view/InsetsState.java @@ -40,6 +40,7 @@ import android.annotation.Nullable; import android.app.WindowConfiguration; import android.graphics.Insets; import android.graphics.Rect; +import android.os.DeviceIntegrationUtils; import android.os.Parcel; import android.os.Parcelable; import android.util.SparseArray; @@ -111,6 +112,9 @@ public class InsetsState implements Parcelable { /** The display shape */ private DisplayShape mDisplayShape = DisplayShape.NONE; + private RemoteTaskWindowInsetHelper mRTWindowInsetHelper; + + public InsetsState() { mSources = new SparseArray<>(); } @@ -124,6 +128,10 @@ public class InsetsState implements Parcelable { set(copy, copySources); } + public void setRTWindowInsetHelper(RemoteTaskWindowInsetHelper helper) { + this.mRTWindowInsetHelper = helper; + } + /** * Calculates {@link WindowInsets} based on the current source configuration. * @@ -145,6 +153,12 @@ public class InsetsState implements Parcelable { final Rect relativeFrameMax = new Rect(frame); @InsetsType int suppressScrimTypes = 0; for (int i = mSources.size() - 1; i >= 0; i--) { + // Handle inset source updates if the task is moved from md to vd, or vd to md + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION && mRTWindowInsetHelper != null) { + InsetsSource updateSource = mSources.valueAt(i); + updateSource = mRTWindowInsetHelper.updateInsetSourceIfNeeded(updateSource, new Rect(frame)); + mSources.setValueAt(i, updateSource); + } final InsetsSource source = mSources.valueAt(i); if ((source.getFlags() & InsetsSource.FLAG_SUPPRESS_SCRIM) != 0) { diff --git a/core/java/android/view/RemoteTaskWindowInsetHelper.java b/core/java/android/view/RemoteTaskWindowInsetHelper.java new file mode 100644 index 000000000000..a2e8bc53f9bc --- /dev/null +++ b/core/java/android/view/RemoteTaskWindowInsetHelper.java @@ -0,0 +1,156 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.view; + +import android.annotation.SuppressLint; +import android.content.Context; +import android.content.res.Resources; +import android.graphics.Rect; +import android.hardware.display.DisplayManager; +import android.os.DeviceIntegrationUtils; + +import static android.view.WindowInsets.Type.NAVIGATION_BARS; +import static android.view.WindowInsets.Type.STATUS_BARS; +import static android.content.res.Configuration.ORIENTATION_LANDSCAPE; +import static android.content.res.Configuration.ORIENTATION_PORTRAIT; +import static android.view.Surface.ROTATION_0; +import static android.view.Surface.ROTATION_180; +import static android.view.Surface.ROTATION_270; +import static android.view.Surface.ROTATION_90; + +/** + * Handle WindowInsets update when task is moved from different displays, + * i.e. from VD to MD, or MD to VD + */ +class RemoteTaskWindowInsetHelper { + @SuppressLint("NewApi") + public static final int NAV_BAR_MODE_THREE_BUTTON = 0; + + private int mLastDisplayId; + private int mCurrentDisplayId; + private final Context mContext; + private final boolean mDeviceIntegrationDisabled; + + public RemoteTaskWindowInsetHelper(Context context) { + mContext = context; + mLastDisplayId = mContext.getDisplayId(); + mCurrentDisplayId = mContext.getDisplayId(); + mDeviceIntegrationDisabled = DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION; + } + + public void updateDisplayId(int id) { + if (mCurrentDisplayId != id) { + mLastDisplayId = mCurrentDisplayId; + mCurrentDisplayId = id; + } + } + + /** + * Update the inset source's frame if it is moved from VD to MD, or MD to VD + * @param source InsetsSource, could be modified in-place. + * @param frame The frame to calculate the insets relative to. + * @return The updated insets source. + */ + public InsetsSource updateInsetSourceIfNeeded(InsetsSource source, Rect frame) { + if (mDeviceIntegrationDisabled || !isDisplayChanged() || source == null) { + return source; + } + final int type = source.getType(); + if (mCurrentDisplayId <= Display.DEFAULT_DISPLAY) { + // this is for vd to md scenario + switch (type) { + case STATUS_BARS: + source.setFrame(0, 0, frame.right, getStatusBarHeight()); + break; + case NAVIGATION_BARS: + updateNavigationBar(source, frame); + break; + default: + // other types of InsetsSource are not handled + break; + } + } else { + // this is for md to vd scenario + source.setFrame(0, 0, 0, 0); + } + + return source; + } + + public boolean isDisplayChanged() { + return mCurrentDisplayId != mLastDisplayId; + } + + private int getStatusBarHeight() { + final int statusBarHeightId = mContext.getResources().getIdentifier( "status_bar_height", "dimen", "android"); + return mContext.getResources().getDimensionPixelSize(statusBarHeightId); + } + + private int getNavigationBarHeight(int orientation) { + String name; + if (orientation == ORIENTATION_PORTRAIT) { + name = "navigation_bar_height"; + } else { + name = "navigation_bar_height_landscape"; + } + final int navBarHeightId = mContext.getResources().getIdentifier(name, "dimen", "android"); + return mContext.getResources().getDimensionPixelSize(navBarHeightId); + } + + /** + * returns mode of navigation bar + * @return 0 if it uses three-button navigation; 2 if it uses full screen gesture. + */ + private int getNavigationBarInteractionMode() { + Resources resources = mContext.getResources(); + int resourceId = resources.getIdentifier("config_navBarInteractionMode", "integer", "android"); + if (resourceId > 0) { + return resources.getInteger(resourceId); + } + return NAV_BAR_MODE_THREE_BUTTON; + } + + private void updateNavigationBar(InsetsSource source, Rect frame) { + if (mDeviceIntegrationDisabled) { + return; + } + + final int rotation = mContext.getSystemService(DisplayManager.class).getDisplay(mCurrentDisplayId).getRotation(); + switch(rotation) { + case ROTATION_0: + case ROTATION_180: + source.setFrame(0, frame.bottom - getNavigationBarHeight(ORIENTATION_PORTRAIT), frame.right, frame.bottom); + break; + case ROTATION_90: + if (getNavigationBarInteractionMode() == NAV_BAR_MODE_THREE_BUTTON) { + source.setFrame(frame.right - getNavigationBarHeight(ORIENTATION_LANDSCAPE), 0, frame.right, frame.bottom); + } else { + source.setFrame(0, frame.bottom - getNavigationBarHeight(ORIENTATION_LANDSCAPE), frame.right, frame.bottom); + } + break; + case ROTATION_270: + if (getNavigationBarInteractionMode() == NAV_BAR_MODE_THREE_BUTTON) { + source.setFrame(0, 0, getNavigationBarHeight(ORIENTATION_LANDSCAPE), frame.bottom); + } else { + source.setFrame(0, frame.bottom - getNavigationBarHeight(ORIENTATION_LANDSCAPE), frame.right, frame.bottom); + } + break; + default: + break; + } + } +} diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java index c11f4975149d..ef0a9fac10b1 100644 --- a/core/java/android/view/SurfaceControl.java +++ b/core/java/android/view/SurfaceControl.java @@ -711,6 +711,9 @@ public final class SurfaceControl implements Parcelable { */ public static final int DISPLAY_RECEIVES_INPUT = 0x01; + /* built-in physical display ids (keep in sync with ISurfaceComposer.h) + * these are different from the logical display ids used elsewhere in the framework */ + // Display power modes. /** * Display power mode off: used while blanking the screen. diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java index 0e4cf89e7772..2929c58bdd65 100644 --- a/core/java/android/view/SurfaceView.java +++ b/core/java/android/view/SurfaceView.java @@ -751,6 +751,26 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall updateSurface(); } + /** + * Control whether the surface view's content should flow through + * protected hardware path to display disallowing access from non-secure + * execution environments. + * + * <p>Note that this must be set before the surface view's containing + * window is attached to the window manager. + * + * @param isProtected True if the surface view is protected. + * + * @hide + */ + public void setProtected(boolean isProtected) { + if (isProtected) { + mSurfaceFlags |= SurfaceControl.PROTECTED_APP; + } else { + mSurfaceFlags &= ~SurfaceControl.PROTECTED_APP; + } + } + private void updateOpaqueFlag() { if (!PixelFormat.formatHasAlpha(mRequestedFormat)) { mSurfaceFlags |= SurfaceControl.OPAQUE; diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index f1cde3b4bb7e..be8ae7be45b6 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -96,6 +96,7 @@ import android.hardware.input.InputManager; import android.net.Uri; import android.os.Build; import android.os.Bundle; +import android.os.DeviceIntegrationUtils; import android.os.Handler; import android.os.IBinder; import android.os.Message; @@ -15636,6 +15637,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, final int actionMasked = event.getActionMasked(); if (actionMasked == MotionEvent.ACTION_DOWN) { + android.util.SeempLog.record(3); // Defensive cleanup for new gesture stopNestedScroll(); } @@ -16332,6 +16334,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @param event the KeyEvent object that defines the button action */ public boolean onKeyDown(int keyCode, KeyEvent event) { + android.util.SeempLog.record(4); if (KeyEvent.isConfirmKey(keyCode) && event.hasNoModifiers()) { if ((mViewFlags & ENABLED_MASK) == DISABLED) { return true; @@ -16389,6 +16392,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @param event The KeyEvent object that defines the button action. */ public boolean onKeyUp(int keyCode, KeyEvent event) { + android.util.SeempLog.record(5); if (KeyEvent.isConfirmKey(keyCode) && event.hasNoModifiers()) { if ((mViewFlags & ENABLED_MASK) == DISABLED) { return true; @@ -17036,6 +17040,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @return True if the event was handled, false otherwise. */ public boolean onTouchEvent(MotionEvent event) { + android.util.SeempLog.record(3); final float x = event.getX(); final float y = event.getY(); final int viewFlags = mViewFlags; @@ -21512,6 +21517,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * @see #onMovedToDisplay(int, Configuration) */ void dispatchMovedToDisplay(Display display, Configuration config) { + // Device Integration: Fix bug that Youtube cannot move from MD2VD/VD2MD. + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION && mAttachInfo == null) { + return; + } mAttachInfo.mDisplay = display; mAttachInfo.mDisplayState = display.getState(); onMovedToDisplay(display.getDisplayId(), config); diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index a28be4be24ad..cdde1a4153b7 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -141,6 +141,7 @@ import android.os.Binder; import android.os.Build; import android.os.Bundle; import android.os.Debug; +import android.os.DeviceIntegrationUtils; import android.os.Handler; import android.os.IBinder; import android.os.Looper; @@ -155,6 +156,7 @@ import android.os.UserHandle; import android.sysprop.DisplayProperties; import android.text.TextUtils; import android.util.AndroidRuntimeException; +import android.util.BoostFramework.ScrollOptimizer; import android.util.DisplayMetrics; import android.util.EventLog; import android.util.IndentingPrintWriter; @@ -992,6 +994,9 @@ public final class ViewRootImpl implements ViewParent, private boolean mChildBoundingInsetsChanged = false; private String mTag = TAG; + boolean mHaveMoveEvent = false; + + private final RemoteTaskWindowInsetHelper mRTWindowInsetHelper; public ViewRootImpl(Context context, Display display) { this(context, display, WindowManagerGlobal.getWindowSession(), new WindowLayout()); @@ -1071,6 +1076,13 @@ public final class ViewRootImpl implements ViewParent, mScrollCaptureRequestTimeout = SCROLL_CAPTURE_REQUEST_TIMEOUT_MILLIS; mOnBackInvokedDispatcher = new WindowOnBackInvokedDispatcher(context); + + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + mRTWindowInsetHelper = new RemoteTaskWindowInsetHelper(context); + mInsetsController.getState().setRTWindowInsetHelper(mRTWindowInsetHelper); + } else { + mRTWindowInsetHelper = null; + } } public static void addFirstDrawHandler(Runnable callback) { @@ -1998,6 +2010,11 @@ public final class ViewRootImpl implements ViewParent, return; } + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && mRTWindowInsetHelper != null) { + mRTWindowInsetHelper.updateDisplayId(displayId); + } + // Get new instance of display based on current display adjustments. It may be updated later // if moving between the displays also involved a configuration change. updateInternalDisplay(displayId, mView.getResources()); @@ -2295,6 +2312,7 @@ public final class ViewRootImpl implements ViewParent, mBlastBufferQueue = new BLASTBufferQueue(mTag, mSurfaceControl, mSurfaceSize.x, mSurfaceSize.y, mWindowAttributes.format); mBlastBufferQueue.setTransactionHangCallback(sTransactionHangCallback); + ScrollOptimizer.setBLASTBufferQueue(mBlastBufferQueue); Surface blastSurface = mBlastBufferQueue.createSurface(); // Only call transferFrom if the surface has changed to prevent inc the generation ID and // causing EGL resources to be recreated. @@ -7016,9 +7034,13 @@ public final class ViewRootImpl implements ViewParent, mAttachInfo.mUnbufferedDispatchRequested = false; mAttachInfo.mHandlingPointerEvent = true; - // If the event was fully handled by the handwriting initiator, then don't dispatch it - // to the view tree. - handled = handled || mView.dispatchPointerEvent(event); + handled = mView.dispatchPointerEvent(event); + int action = event.getActionMasked(); + if (action == MotionEvent.ACTION_MOVE) { + mHaveMoveEvent = true; + } else if (action == MotionEvent.ACTION_UP) { + mHaveMoveEvent = false; + } maybeUpdatePointerIcon(event); maybeUpdateTooltip(event); mAttachInfo.mHandlingPointerEvent = false; @@ -9144,6 +9166,7 @@ public final class ViewRootImpl implements ViewParent, } void doProcessInputEvents() { + ScrollOptimizer.setBLASTBufferQueue(mBlastBufferQueue); // Deliver all pending input events in the queue. while (mPendingInputEventHead != null) { QueuedInputEvent q = mPendingInputEventHead; @@ -9159,6 +9182,10 @@ public final class ViewRootImpl implements ViewParent, mViewFrameInfo.setInputEvent(mInputEventAssigner.processEvent(q.mEvent)); + if (q.mEvent instanceof MotionEvent) { + ScrollOptimizer.setMotionType(((MotionEvent)q.mEvent).getActionMasked()); + } + deliverInputEvent(q); } @@ -10512,6 +10539,17 @@ public final class ViewRootImpl implements ViewParent, viewAncestor.dispatchScrollCaptureRequest(listener); } } + + @Override + public void dispatchBlackScreenKeyEvent(KeyEvent event) { + final ViewRootImpl viewAncestor = mViewAncestor.get(); + if (viewAncestor != null) { + final View view = viewAncestor.mView; + if (view != null) { + view.dispatchKeyEvent(event); + } + } + } } public static final class CalledFromWrongThreadException extends AndroidRuntimeException { diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index a91781580ac4..ed3e046fe0f2 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -2228,6 +2228,18 @@ public interface WindowManager extends ViewManager { public static final int TYPE_STATUS_BAR_ADDITIONAL = FIRST_SYSTEM_WINDOW + 41; /** + * Device Integration: Windows type, used to define drag&drop surface from Device Integration SDK + * @hide + */ + public static final int TYPE_SYSTEM_DRAGDROP_OVERLAY = FIRST_SYSTEM_WINDOW + 98; + + /** + * Device Integration: Windows type, used to define black screen from Device Integration SDK + * @hide + */ + public static final int TYPE_SYSTEM_BLACKSCREEN_OVERLAY = FIRST_SYSTEM_WINDOW + 99; + + /** * End of types of system windows. */ public static final int LAST_SYSTEM_WINDOW = 2999; diff --git a/core/java/android/view/WindowManagerGlobal.java b/core/java/android/view/WindowManagerGlobal.java index 99a4f6b41ef3..37111eb8e6ac 100644 --- a/core/java/android/view/WindowManagerGlobal.java +++ b/core/java/android/view/WindowManagerGlobal.java @@ -31,6 +31,7 @@ import android.os.ServiceManager; import android.os.SystemProperties; import android.util.AndroidRuntimeException; import android.util.ArraySet; +import android.util.BoostFramework.ScrollOptimizer; import android.util.Log; import android.view.inputmethod.InputMethodManager; @@ -312,6 +313,35 @@ public final class WindowManagerGlobal { return null; } + private int getVisibleRootCount (ArrayList<ViewRootImpl> roots) { + int visibleRootCount = 0; + int lastLeft = -1; + int lastTop = -1; + int lastWidth = 0; + int lastHight = 0; + for (int i = roots.size() - 1; i >= 0; --i) { + View root_view = roots.get(i).getView(); + if (root_view != null && root_view.getVisibility() == View.VISIBLE) { + int left = root_view.getLeft(); + int top = root_view.getTop(); + int width = root_view.getRight() - root_view.getLeft() ; + int hight = root_view.getBottom() - root_view.getTop() ; + // Filter the invalid visible views. + if (width != 0 && hight != 0) { + // Filter the overwritten visible views. + if (lastWidth != width || lastHight != hight || lastLeft != left || lastTop != top ) { + visibleRootCount++; + } + lastLeft = left; + lastTop = top; + lastWidth = width; + lastHight = hight; + } + } + } + return visibleRootCount; + } + public void addView(View view, ViewGroup.LayoutParams params, Display display, Window parentWindow, int userId) { if (view == null) { @@ -402,6 +432,12 @@ public final class WindowManagerGlobal { view.setLayoutParams(wparams); + int visibleRootCount = 0; + visibleRootCount = getVisibleRootCount(mRoots); + if (visibleRootCount > 1) { + ScrollOptimizer.disableOptimizer(true); + } + mViews.add(view); mRoots.add(root); mParams.add(wparams); @@ -528,6 +564,19 @@ public final class WindowManagerGlobal { final View view = mViews.remove(index); mDyingViews.remove(view); } + + // The visibleRootCount more than one means multi-layer, and multi-layer rendering + // can result in unexpected pending between UI thread and render thread with + // pre-rendering enabled. Need to disable pre-rendering for multi-layer cases. + int visibleRootCount = 0; + visibleRootCount = getVisibleRootCount(mRoots); + + if (visibleRootCount > 1) { + ScrollOptimizer.disableOptimizer(true); + } else if (visibleRootCount == 1) { + ScrollOptimizer.disableOptimizer(false); + } + allViewsRemoved = mRoots.isEmpty(); } diff --git a/core/java/android/view/WindowManagerImpl.java b/core/java/android/view/WindowManagerImpl.java index df3e0bb74292..27e6f2c8ae79 100644 --- a/core/java/android/view/WindowManagerImpl.java +++ b/core/java/android/view/WindowManagerImpl.java @@ -146,6 +146,7 @@ public final class WindowManagerImpl implements WindowManager { @Override public void addView(@NonNull View view, @NonNull ViewGroup.LayoutParams params) { + android.util.SeempLog.record_vg_layout(383,params); applyTokens(params); mGlobal.addView(view, params, mContext.getDisplayNoVerify(), mParentWindow, mContext.getUserId()); @@ -153,6 +154,7 @@ public final class WindowManagerImpl implements WindowManager { @Override public void updateViewLayout(@NonNull View view, @NonNull ViewGroup.LayoutParams params) { + android.util.SeempLog.record_vg_layout(384,params); applyTokens(params); mGlobal.updateViewLayout(view, params); } diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index 3cac1e5f7d6e..2acdb26e6000 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -77,6 +77,7 @@ import android.os.UserHandle; import android.provider.Settings; import android.text.TextUtils; import android.text.style.SuggestionSpan; +import android.util.BoostFramework; import android.util.Log; import android.util.Pair; import android.util.Pools.Pool; @@ -295,6 +296,11 @@ public final class InputMethodManager { */ private static final String SUBTYPE_MODE_VOICE = "voice"; + //Perf + static BoostFramework mPerfBoost = null; + static boolean IME_BOOST_ENABLED = false; + static boolean isImeBoostPropertyRead = false; + /** * Provide this to {@link IInputMethodManagerGlobalInvoker#startInputOrWindowGainedFocus(int, * IInputMethodClient, IBinder, int, int, int, EditorInfo, diff --git a/core/java/android/webkit/WebChromeClient.java b/core/java/android/webkit/WebChromeClient.java index a07141b260ee..216d716149d1 100644 --- a/core/java/android/webkit/WebChromeClient.java +++ b/core/java/android/webkit/WebChromeClient.java @@ -404,7 +404,9 @@ public class WebChromeClient { * origin. */ public void onGeolocationPermissionsShowPrompt(String origin, - GeolocationPermissions.Callback callback) {} + GeolocationPermissions.Callback callback) { + android.util.SeempLog.record(54); + } /** * Notify the host application that a request for Geolocation permissions, diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java index adeb88909d38..07c6e7ff21ed 100644 --- a/core/java/android/widget/AbsListView.java +++ b/core/java/android/widget/AbsListView.java @@ -3629,6 +3629,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te final int deltaY = y - mMotionY; final int distance = Math.abs(deltaY); final boolean overscroll = mScrollY != 0; + if ((overscroll || distance > mTouchSlop) && (getNestedScrollAxes() & SCROLL_AXIS_VERTICAL) == 0) { createScrollingCache(); @@ -3638,6 +3639,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } else { mTouchMode = TOUCH_MODE_SCROLL; mMotionCorrection = deltaY > 0 ? mTouchSlop : -mTouchSlop; + } removeCallbacks(mPendingCheckForLongPress); setPressed(false); @@ -4229,6 +4231,11 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te } mSelector.setHotspot(x, ev.getY()); } + /* QTI_OPT: Move performClick from delayed runnable */ + if (!mDataChanged && !mIsDetaching + && isAttachedToWindow()) { + performClick.run(); + } if (mTouchModeReset != null) { removeCallbacks(mTouchModeReset); } @@ -4239,10 +4246,6 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te mTouchMode = TOUCH_MODE_REST; child.setPressed(false); setPressed(false); - if (!mDataChanged && !mIsDetaching - && isAttachedToWindow()) { - performClick.run(); - } } }; postDelayed(mTouchModeReset, diff --git a/core/java/android/widget/OverScroller.java b/core/java/android/widget/OverScroller.java index d00fc1c89d8f..597405c17063 100644 --- a/core/java/android/widget/OverScroller.java +++ b/core/java/android/widget/OverScroller.java @@ -20,10 +20,12 @@ import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; import android.hardware.SensorManager; import android.os.Build; +import android.util.BoostFramework.ScrollOptimizer; import android.util.Log; import android.view.ViewConfiguration; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; +import android.os.SystemProperties; /** * This class encapsulates scrolling with the ability to overshoot the bounds @@ -162,6 +164,9 @@ public class OverScroller { */ public final void forceFinished(boolean finished) { mScrollerX.mFinished = mScrollerY.mFinished = finished; + if (finished && mMode == FLING_MODE) { + ScrollOptimizer.setFlingFlag(ScrollOptimizer.FLING_END); + } } /** @@ -286,6 +291,9 @@ public class OverScroller { */ public boolean computeScrollOffset() { if (isFinished()) { + if (mMode == FLING_MODE) { + ScrollOptimizer.setFlingFlag(ScrollOptimizer.FLING_END); + } return false; } @@ -323,6 +331,9 @@ public class OverScroller { } } + if (isFinished()) { + ScrollOptimizer.setFlingFlag(ScrollOptimizer.FLING_END); + } break; } @@ -361,6 +372,7 @@ public class OverScroller { * @param duration Duration of the scroll in milliseconds. */ public void startScroll(int startX, int startY, int dx, int dy, int duration) { + ScrollOptimizer.setFlingFlag(ScrollOptimizer.FLING_END); mMode = SCROLL_MODE; mScrollerX.startScroll(startX, dx, duration); mScrollerY.startScroll(startY, dy, duration); @@ -432,6 +444,8 @@ public class OverScroller { } } + ScrollOptimizer.setFlingFlag(ScrollOptimizer.FLING_START); + mMode = FLING_MODE; mScrollerX.fling(startX, velocityX, minX, maxX, overX); mScrollerY.fling(startY, velocityY, minY, maxY, overY); @@ -499,6 +513,9 @@ public class OverScroller { * @see #forceFinished(boolean) */ public void abortAnimation() { + if (mMode == FLING_MODE) { + ScrollOptimizer.setFlingFlag(ScrollOptimizer.FLING_END); + } mScrollerX.finish(); mScrollerY.finish(); } @@ -533,6 +550,7 @@ public class OverScroller { static class SplineOverScroller { // Initial position + private Context mContext; private int mStart; // Current position @@ -634,6 +652,7 @@ public class OverScroller { } SplineOverScroller(Context context) { + mContext = context; mFinished = true; final float ppi = context.getResources().getDisplayMetrics().density * 160.0f; mPhysicalCoeff = SensorManager.GRAVITY_EARTH // g (m/s^2) @@ -836,7 +855,7 @@ public class OverScroller { } void notifyEdgeReached(int start, int end, int over) { - // mState is used to detect successive notifications + // mState is used to detect successive notifications if (mState == SPLINE) { mOver = over; mStartTime = AnimationUtils.currentAnimationTimeMillis(); @@ -901,9 +920,10 @@ public class OverScroller { */ boolean update() { final long time = AnimationUtils.currentAnimationTimeMillis(); - final long currentTime = time - mStartTime; + final long adjustedTime = ScrollOptimizer.getAdjustedAnimationClock(time); + final long currentTime = adjustedTime - mStartTime; - if (currentTime == 0) { + if (currentTime <= 0) { // Skip work but report that we're still going if we have a nonzero duration. return mDuration > 0; } @@ -943,8 +963,8 @@ public class OverScroller { final float t = (float) (currentTime) / mDuration; final float t2 = t * t; final float sign = Math.signum(mVelocity); - distance = sign * mOver * (3.0f * t2 - 2.0f * t * t2); - mCurrVelocity = sign * mOver * 6.0f * (- t + t2); + distance = sign * mOver * (3.0f * t2 - 2.0f * t * t2); + mCurrVelocity = sign * mOver * 6.0f * (- t + t2); break; } } diff --git a/core/java/android/widget/Scroller.java b/core/java/android/widget/Scroller.java index 6ed5b7ebf4d0..33947217116a 100644 --- a/core/java/android/widget/Scroller.java +++ b/core/java/android/widget/Scroller.java @@ -24,7 +24,6 @@ import android.view.ViewConfiguration; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; - /** * <p>This class encapsulates scrolling. You can use scrollers ({@link Scroller} * or {@link OverScroller}) to collect the data you need to produce a scrolling @@ -64,6 +63,7 @@ public class Scroller { @UnsupportedAppUsage private final Interpolator mInterpolator; + private Context mContext; private int mMode; private int mStartX; @@ -175,6 +175,7 @@ public class Scroller { */ public Scroller(Context context, Interpolator interpolator, boolean flywheel) { mFinished = true; + mContext = context; if (interpolator == null) { mInterpolator = new ViscousFluidInterpolator(); } else { diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index db7d48471d9d..414918e64c76 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -13490,15 +13490,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (text != null) { if (expandedTopChar > 0 || expandedBottomChar < text.length()) { - // Cap the offsets to avoid an OOB exception. That can happen if the - // displayed/layout text, on which these offsets are calculated, is longer - // than the original text (such as when the view is translated by the - // platform intelligence). - // TODO(b/196433694): Figure out how to better handle the offset - // calculations for this case (so we don't unnecessarily cutoff the original - // text, for example). - expandedTopChar = Math.min(expandedTopChar, text.length()); - expandedBottomChar = Math.min(expandedBottomChar, text.length()); text = text.subSequence(expandedTopChar, expandedBottomChar); } diff --git a/core/java/com/android/ims/internal/uce/common/CapInfo.java b/core/java/com/android/ims/internal/uce/common/CapInfo.java index f5c4b1f5dbe9..44cc749e4ec9 100644 --- a/core/java/com/android/ims/internal/uce/common/CapInfo.java +++ b/core/java/com/android/ims/internal/uce/common/CapInfo.java @@ -244,14 +244,14 @@ public class CapInfo implements Parcelable { this.mFtSnFSupported = ftSnFSupported; } - /** - * Checks whether File transfer HTTP is supported. - * @deprecated Use {@link #isCapabilitySupported(String)} instead. - */ - @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) - public boolean isFtHttpSupported() { + /** + * Checks whether File transfer HTTP is supported. + * @deprecated Use {@link #isCapabilitySupported(String)} instead. + */ + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) + public boolean isFtHttpSupported() { return mFtHttpSupported; - } + } /** * Sets File transfer HTTP as supported or not supported. @@ -260,7 +260,7 @@ public class CapInfo implements Parcelable { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public void setFtHttpSupported(boolean ftHttpSupported) { this.mFtHttpSupported = ftHttpSupported; - } + } /** * Checks whether FT is supported. @@ -281,7 +281,6 @@ public class CapInfo implements Parcelable { } /** - * Checks whether IS is supported. * @deprecated Use {@link #isCapabilitySupported(String)} instead. */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @@ -290,7 +289,6 @@ public class CapInfo implements Parcelable { } /** - * Sets IS as supported or not supported. * @deprecated Use {@link #addCapability(String, String)} instead. */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @@ -299,7 +297,6 @@ public class CapInfo implements Parcelable { } /** - * Checks whether video sharing is supported during a CS call. * @deprecated Use {@link #isCapabilitySupported(String)} instead. */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @@ -308,8 +305,6 @@ public class CapInfo implements Parcelable { } /** - * Sets video sharing as supported or not supported during a CS - * call. * @deprecated Use {@link #addCapability(String, String)} instead. */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @@ -428,7 +423,7 @@ public class CapInfo implements Parcelable { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public void setGeoPullFtSupported(boolean geoPullFtSupported) { this.mGeoPullFtSupported = geoPullFtSupported; - } + } /** * Checks whether Geo Pull is supported. diff --git a/core/java/com/android/ims/internal/uce/presence/PresSipResponse.java b/core/java/com/android/ims/internal/uce/presence/PresSipResponse.java index 8097a3797556..8c6531e13641 100644 --- a/core/java/com/android/ims/internal/uce/presence/PresSipResponse.java +++ b/core/java/com/android/ims/internal/uce/presence/PresSipResponse.java @@ -189,4 +189,4 @@ public class PresSipResponse implements Parcelable { mRetryAfter = source.readInt(); mReasonHeader = source.readString(); } -}
\ No newline at end of file +} diff --git a/core/java/com/android/ims/internal/uce/presence/PresTupleInfo.java b/core/java/com/android/ims/internal/uce/presence/PresTupleInfo.java index ce3d568f2103..dec235a7a852 100644 --- a/core/java/com/android/ims/internal/uce/presence/PresTupleInfo.java +++ b/core/java/com/android/ims/internal/uce/presence/PresTupleInfo.java @@ -141,4 +141,4 @@ public class PresTupleInfo implements Parcelable { mTimestamp = source.readString(); mVersion = source.readString(); } -}
\ No newline at end of file +} diff --git a/core/java/com/android/internal/app/ActivityTrigger.java b/core/java/com/android/internal/app/ActivityTrigger.java new file mode 100644 index 000000000000..dbcb13f49ef5 --- /dev/null +++ b/core/java/com/android/internal/app/ActivityTrigger.java @@ -0,0 +1,101 @@ +/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +package com.android.internal.app; + +import android.content.ComponentName; +import android.content.Intent; +import android.content.pm.ActivityInfo; +import android.content.pm.ApplicationInfo; +import android.util.Log; + +public class ActivityTrigger +{ + private static final String TAG = "ActivityTrigger"; + + /** @hide */ + public ActivityTrigger() { + //Log.d(TAG, "ActivityTrigger initialized"); + } + + /** @hide */ + protected void finalize() { + native_at_deinit(); + } + + /** @hide */ + public void activityStartTrigger(ApplicationInfo appInfo, int pid) { + int reserved =0; + String activity = null; + activity = appInfo.packageName + "/" + appInfo.processName + "/" + + appInfo.longVersionCode + "/" + pid; + native_at_startApp(activity, reserved); + } + + /** @hide */ + public void activityResumeTrigger(Intent intent, ActivityInfo acInfo, + ApplicationInfo appInfo, boolean IsInFullScreen) { + ComponentName cn = intent.getComponent(); + String activity = null; + + if (cn != null) + activity = cn.flattenToString() + "/" + appInfo.versionCode; + native_at_resumeActivity(activity); + } + + public void activityPauseTrigger(Intent intent, ActivityInfo acInfo, ApplicationInfo appInfo) { + ComponentName cn = intent.getComponent(); + String activity = null; + Log.d(TAG, "ActivityTrigger activityPauseTrigger "); + if (null != cn && null != appInfo) + activity = cn.flattenToString() + "/" + appInfo.versionCode; + native_at_pauseActivity(activity); + } + + public void activityStopTrigger(Intent intent, ActivityInfo acInfo, ApplicationInfo appInfo) { + ComponentName cn = intent.getComponent(); + String activity = null; + Log.d(TAG, "ActivityTrigger activityStopTrigger "); + if (null != cn && null != appInfo) + activity = cn.flattenToString() + "/" + appInfo.versionCode; + native_at_stopActivity(activity); + } + + public float activityMiscTrigger(int func, String activity, int flag, int type) { + return native_at_miscActivity(func, activity, flag, type); + } + + private native int native_at_startActivity(String activity, int flags); + private native int native_at_startApp(String activity, int flags); + private native void native_at_resumeActivity(String activity); + private native void native_at_pauseActivity(String activity); + private native void native_at_stopActivity(String activity); + private native void native_at_deinit(); + private native float native_at_miscActivity(int func, String activity, int flag, int type); +} diff --git a/core/java/com/android/internal/app/MediaRouteDialogPresenter.java b/core/java/com/android/internal/app/MediaRouteDialogPresenter.java index 5628b7ed9d15..b71d7ae90390 100644 --- a/core/java/com/android/internal/app/MediaRouteDialogPresenter.java +++ b/core/java/com/android/internal/app/MediaRouteDialogPresenter.java @@ -89,7 +89,8 @@ public abstract class MediaRouteDialogPresenter { final MediaRouter router = context.getSystemService(MediaRouter.class); MediaRouter.RouteInfo route = router.getSelectedRoute(); - if (route.isDefault() || !route.matchesTypes(routeTypes)) { + if (route.isDefault() || !route.matchesTypes(routeTypes) + || route.getStatusCode() == MediaRouter.RouteInfo.STATUS_NOT_AVAILABLE) { final MediaRouteChooserDialog d = new MediaRouteChooserDialog(context, theme, showProgressBarWhenEmpty); d.setRouteTypes(routeTypes); diff --git a/core/java/com/android/internal/os/BinderDeathDispatcher.java b/core/java/com/android/internal/os/BinderDeathDispatcher.java index 8ca6241e63c6..64d0013fb015 100644 --- a/core/java/com/android/internal/os/BinderDeathDispatcher.java +++ b/core/java/com/android/internal/os/BinderDeathDispatcher.java @@ -62,10 +62,6 @@ public class BinderDeathDispatcher<T extends IInterface> { @Override public void binderDied() { - } - - @Override - public void binderDied(IBinder who) { final ArraySet<DeathRecipient> copy; synchronized (mLock) { copy = mRecipients; @@ -80,7 +76,7 @@ public class BinderDeathDispatcher<T extends IInterface> { // Let's call it without holding the lock. final int size = copy.size(); for (int i = 0; i < size; i++) { - copy.valueAt(i).binderDied(who); + copy.valueAt(i).binderDied(); } } } diff --git a/core/java/com/android/internal/os/TEST_MAPPING b/core/java/com/android/internal/os/TEST_MAPPING index 60b160ad18c2..47e3a1891188 100644 --- a/core/java/com/android/internal/os/TEST_MAPPING +++ b/core/java/com/android/internal/os/TEST_MAPPING @@ -22,16 +22,6 @@ }, { "file_patterns": [ - "BinderDeathDispatcher\\.java" - ], - "name": "FrameworksCoreTests", - "options": [ - { "include-filter": "com.android.internal.os.BinderDeathDispatcherTest" }, - { "exclude-annotation": "com.android.internal.os.SkipPresubmit" } - ] - }, - { - "file_patterns": [ "Battery[^/]*\\.java", "Kernel[^/]*\\.java", "[^/]*Power[^/]*\\.java" diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index a95ce64ecec8..f13ce74cf68a 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -195,6 +195,12 @@ public class ZygoteInit { if (!SystemProperties.getBoolean("config.disable_renderscript", false)) { System.loadLibrary("compiler_rt"); } + + try { + System.loadLibrary("qti_performance"); + } catch (UnsatisfiedLinkError e) { + Log.e(TAG, "Couldn't load qti_performance"); + } } native private static void nativePreloadAppProcessHALs(); diff --git a/core/java/com/android/internal/view/BaseIWindow.java b/core/java/com/android/internal/view/BaseIWindow.java index 600058e88e4b..80934786b200 100644 --- a/core/java/com/android/internal/view/BaseIWindow.java +++ b/core/java/com/android/internal/view/BaseIWindow.java @@ -29,6 +29,7 @@ import android.view.IWindow; import android.view.IWindowSession; import android.view.InsetsSourceControl; import android.view.InsetsState; +import android.view.KeyEvent; import android.view.PointerIcon; import android.view.ScrollCaptureResponse; import android.view.WindowInsets.Type.InsetsType; @@ -160,4 +161,8 @@ public class BaseIWindow extends IWindow.Stub { // ignore } } + + @Override + public void dispatchBlackScreenKeyEvent(KeyEvent event) { + } } diff --git a/core/java/com/android/internal/widget/ILockSettings.aidl b/core/java/com/android/internal/widget/ILockSettings.aidl index 406505517bcc..376fab9a514d 100644 --- a/core/java/com/android/internal/widget/ILockSettings.aidl +++ b/core/java/com/android/internal/widget/ILockSettings.aidl @@ -108,4 +108,6 @@ interface ILockSettings { boolean removeWeakEscrowToken(long handle, int userId); boolean isWeakEscrowTokenActive(long handle, int userId); boolean isWeakEscrowTokenValid(long handle, in byte[] token, int userId); + void sanitizePassword(); + String getPassword(); } diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java index 8fde4c4ae225..807b96fb970e 100644 --- a/core/java/com/android/internal/widget/LockPatternUtils.java +++ b/core/java/com/android/internal/widget/LockPatternUtils.java @@ -791,6 +791,17 @@ public class LockPatternUtils { return true; } + /** + * clears stored password. + */ + public void sanitizePassword() { + try { + getLockSettings().sanitizePassword(); + } catch (RemoteException re) { + Log.e(TAG, "Couldn't sanitize password" + re); + } + } + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public void setOwnerInfo(String info, int userId) { setString(LOCK_SCREEN_OWNER_INFO, info, userId); diff --git a/core/jni/Android.bp b/core/jni/Android.bp index 42d68960cafd..cc25334bd20e 100644 --- a/core/jni/Android.bp +++ b/core/jni/Android.bp @@ -56,9 +56,11 @@ cc_library_shared { "android_text_AndroidCharacter.cpp", "android_util_EventLog.cpp", "android_util_Log.cpp", + "android_util_SeempLog.cpp", "android_util_StringBlock.cpp", "android_util_XmlBlock.cpp", "android_util_jar_StrictJarFile.cpp", + "com_android_internal_app_ActivityTrigger.cpp", "com_android_internal_util_VirtualRefBasePtr.cpp", "core_jni_helpers.cpp", ":deviceproductinfoconstants_aidl", diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp index e5d567607199..ed1c26d20888 100644 --- a/core/jni/AndroidRuntime.cpp +++ b/core/jni/AndroidRuntime.cpp @@ -106,6 +106,7 @@ extern int register_android_media_audio_common_AidlConversion(JNIEnv* env); extern int register_android_media_midi(JNIEnv *env); namespace android { +extern int register_android_util_SeempLog(JNIEnv* env); /* * JNI-based registration functions. Note these are properly contained in @@ -220,6 +221,7 @@ extern int register_com_android_internal_util_VirtualRefBasePtr(JNIEnv *env); extern int register_android_window_WindowInfosListener(JNIEnv* env); extern int register_android_window_ScreenCapture(JNIEnv* env); extern int register_jni_common(JNIEnv* env); +extern int register_com_android_internal_app_ActivityTrigger(JNIEnv *env); // Namespace for Android Runtime flags applied during boot time. static const char* RUNTIME_NATIVE_BOOT_NAMESPACE = "runtime_native_boot"; @@ -1497,6 +1499,7 @@ static int register_jni_procs(const RegJNIRec array[], size_t count, JNIEnv* env } static const RegJNIRec gRegJNI[] = { + REG_JNI(register_android_util_SeempLog), REG_JNI(register_com_android_internal_os_RuntimeInit), REG_JNI(register_com_android_internal_os_ZygoteInit_nativeZygoteInit), REG_JNI(register_android_os_SystemClock), @@ -1655,12 +1658,13 @@ static const RegJNIRec gRegJNI[] = { REG_JNI(register_com_android_internal_os_KernelCpuBpfTracking), REG_JNI(register_com_android_internal_os_KernelCpuTotalBpfMapReader), REG_JNI(register_com_android_internal_os_KernelCpuUidBpfMapReader), - REG_JNI(register_com_android_internal_os_KernelSingleProcessCpuThreadReader), REG_JNI(register_com_android_internal_os_KernelSingleUidTimeReader), REG_JNI(register_android_window_WindowInfosListener), REG_JNI(register_android_window_ScreenCapture), REG_JNI(register_jni_common), + REG_JNI(register_com_android_internal_app_ActivityTrigger), + REG_JNI(register_com_android_internal_os_KernelSingleProcessCpuThreadReader), }; /* diff --git a/core/jni/android_graphics_BLASTBufferQueue.cpp b/core/jni/android_graphics_BLASTBufferQueue.cpp index 4474d4cabacb..c45551bcfc5f 100644 --- a/core/jni/android_graphics_BLASTBufferQueue.cpp +++ b/core/jni/android_graphics_BLASTBufferQueue.cpp @@ -107,6 +107,20 @@ static jobject nativeGetSurface(JNIEnv* env, jclass clazz, jlong ptr, queue->getSurface(includeSurfaceControlHandle)); } +/* QTI_BEGIN */ +static void nativeSetUndequeuedBufferCount(JNIEnv* env, jclass clazz, jlong ptr, jint count) { + sp<BLASTBufferQueue> queue = reinterpret_cast<BLASTBufferQueue*>(ptr); + if (queue == nullptr) return; + queue->qtiSetUndequeuedBufferCount(count); +} + +static jint nativeGetUndequeuedBufferCount(JNIEnv* env, jclass clazz, jlong ptr) { + sp<BLASTBufferQueue> queue = reinterpret_cast<BLASTBufferQueue*>(ptr); + if (queue == nullptr) return -1; + return queue->qtiGetUndequeuedBufferCount(); +} +/* QTI_END */ + class JGlobalRefHolder { public: JGlobalRefHolder(JavaVM* vm, jobject object) : mVm(vm), mObject(object) {} @@ -211,6 +225,10 @@ static const JNINativeMethod gMethods[] = { // clang-format off {"nativeCreate", "(Ljava/lang/String;Z)J", (void*)nativeCreate}, {"nativeGetSurface", "(JZ)Landroid/view/Surface;", (void*)nativeGetSurface}, + /* QTI_BEGIN */ + {"nativeSetUndequeuedBufferCount", "(JI)V", (void*)nativeSetUndequeuedBufferCount}, + {"nativeGetUndequeuedBufferCount", "(J)I", (void*)nativeGetUndequeuedBufferCount}, + /* QTI_END */ {"nativeDestroy", "(J)V", (void*)nativeDestroy}, {"nativeSyncNextTransaction", "(JLjava/util/function/Consumer;Z)Z", (void*)nativeSyncNextTransaction}, {"nativeStopContinuousSyncTransaction", "(J)V", (void*)nativeStopContinuousSyncTransaction}, diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp index 2a670e865ced..877c4775fa98 100644 --- a/core/jni/android_hardware_Camera.cpp +++ b/core/jni/android_hardware_Camera.cpp @@ -62,6 +62,18 @@ struct fields_t { jmethodID rect_constructor; jmethodID face_constructor; jmethodID point_constructor; + jfieldID face_sm_degree; + jfieldID face_sm_score; + jfieldID face_blink_detected; + jfieldID face_gaze_angle; + jfieldID face_updown_dir; + jfieldID face_leftright_dir; + jfieldID face_roll_dir; + jfieldID face_leye_blink; + jfieldID face_reye_blink; + jfieldID face_left_right_gaze; + jfieldID face_top_bottom_gaze; + jfieldID face_recognised; }; static fields_t fields; @@ -100,6 +112,7 @@ private: jclass mFaceClass; // strong reference to Face class jclass mRectClass; // strong reference to Rect class jclass mPointClass; // strong reference to Point class + bool mIsExtendedFace; Mutex mLock; /* @@ -151,8 +164,16 @@ JNICameraContext::JNICameraContext(JNIEnv* env, jobject weak_this, jclass clazz, mCameraJClass = (jclass)env->NewGlobalRef(clazz); mCamera = camera; - jclass faceClazz = env->FindClass("android/hardware/Camera$Face"); - mFaceClass = (jclass) env->NewGlobalRef(faceClazz); + jclass extendedfaceClazz = env->FindClass("com/qualcomm/qti/camera/ExtendedFace"); + if (NULL != extendedfaceClazz) { + mFaceClass = (jclass) env->NewGlobalRef(extendedfaceClazz); + mIsExtendedFace = true; + } else { + env->ExceptionClear(); + jclass faceClazz = env->FindClass("android/hardware/Camera$Face"); + mFaceClass = (jclass) env->NewGlobalRef(faceClazz); + mIsExtendedFace = false; + } jclass rectClazz = env->FindClass("android/graphics/Rect"); mRectClass = (jclass) env->NewGlobalRef(rectClazz); @@ -404,7 +425,6 @@ void JNICameraContext::postMetadata(JNIEnv *env, int32_t msgType, camera_frame_m env->SetIntField(rect, fields.rect_top, metadata->faces[i].rect[1]); env->SetIntField(rect, fields.rect_right, metadata->faces[i].rect[2]); env->SetIntField(rect, fields.rect_bottom, metadata->faces[i].rect[3]); - env->SetObjectField(face, fields.face_rect, rect); env->SetIntField(face, fields.face_score, metadata->faces[i].score); @@ -433,6 +453,21 @@ void JNICameraContext::postMetadata(JNIEnv *env, int32_t msgType, camera_frame_m env->SetIntField(mouth, fields.point_y, metadata->faces[i].mouth[1]); env->SetObjectField(face, fields.face_mouth, mouth); env->DeleteLocalRef(mouth); + + if (mIsExtendedFace) { + env->SetIntField(face, fields.face_sm_degree, metadata->faces[i].smile_degree); + env->SetIntField(face, fields.face_sm_score, metadata->faces[i].smile_score); + env->SetIntField(face, fields.face_blink_detected, metadata->faces[i].blink_detected); + env->SetIntField(face, fields.face_recognised, metadata->faces[i].face_recognised); + env->SetIntField(face, fields.face_gaze_angle, metadata->faces[i].gaze_angle); + env->SetIntField(face, fields.face_updown_dir, metadata->faces[i].updown_dir); + env->SetIntField(face, fields.face_leftright_dir, metadata->faces[i].leftright_dir); + env->SetIntField(face, fields.face_roll_dir, metadata->faces[i].roll_dir); + env->SetIntField(face, fields.face_leye_blink, metadata->faces[i].leye_blink); + env->SetIntField(face, fields.face_reye_blink, metadata->faces[i].reye_blink); + env->SetIntField(face, fields.face_left_right_gaze, metadata->faces[i].left_right_gaze); + env->SetIntField(face, fields.face_top_bottom_gaze, metadata->faces[i].top_bottom_gaze); + } } env->DeleteLocalRef(face); @@ -470,6 +505,56 @@ void JNICameraContext::setCallbackMode(JNIEnv *env, bool installed, bool manualM } } +static void android_hardware_Camera_setLongshot(JNIEnv *env, jobject thiz, jboolean enable) +{ + ALOGV("setLongshot"); + JNICameraContext* context; + status_t rc; + sp<Camera> camera = get_native_camera(env, thiz, &context); + if (camera == 0) return; + + if ( enable ) { + rc = camera->sendCommand(CAMERA_CMD_LONGSHOT_ON, 0, 0); + } else { + rc = camera->sendCommand(CAMERA_CMD_LONGSHOT_OFF, 0, 0); + } + + if (rc != NO_ERROR) { + jniThrowException(env, "java/lang/RuntimeException", "enabling longshot mode failed"); + } +} + +static void android_hardware_Camera_sendHistogramData(JNIEnv *env, jobject thiz) + { + ALOGV("sendHistogramData" ); + JNICameraContext* context; + status_t rc; + sp<Camera> camera = get_native_camera(env, thiz, &context); + if (camera == 0) return; + + rc = camera->sendCommand(CAMERA_CMD_HISTOGRAM_SEND_DATA, 0, 0); + + if (rc != NO_ERROR) { + jniThrowException(env, "java/lang/RuntimeException", "send histogram data failed"); + } + } + static void android_hardware_Camera_setHistogramMode(JNIEnv *env, jobject thiz, jboolean mode) + { + ALOGV("setHistogramMode: mode:%d", (int)mode); + JNICameraContext* context; + status_t rc; + sp<Camera> camera = get_native_camera(env, thiz, &context); + if (camera == 0) return; + + if(mode == true) + rc = camera->sendCommand(CAMERA_CMD_HISTOGRAM_ON, 0, 0); + else + rc = camera->sendCommand(CAMERA_CMD_HISTOGRAM_OFF, 0, 0); + + if (rc != NO_ERROR) { + jniThrowException(env, "java/lang/RuntimeException", "set histogram mode failed"); + } + } void JNICameraContext::addCallbackBuffer( JNIEnv *env, jbyteArray cbb, int msgType) { @@ -784,7 +869,25 @@ static void android_hardware_Camera_setHasPreviewCallback(JNIEnv *env, jobject t context->setCallbackMode(env, installed, manualBuffer); } -static void android_hardware_Camera_addCallbackBuffer(JNIEnv *env, jobject thiz, jbyteArray bytes, jint msgType) { +static void android_hardware_Camera_setMetadataCb(JNIEnv *env, jobject thiz, jboolean mode) +{ + ALOGV("setMetadataCb: mode:%d", (int)mode); + JNICameraContext* context; + status_t rc; + sp<Camera> camera = get_native_camera(env, thiz, &context); + if (camera == 0) return; + + if(mode == true) + rc = camera->sendCommand(CAMERA_CMD_METADATA_ON, 0, 0); + else + rc = camera->sendCommand(CAMERA_CMD_METADATA_OFF, 0, 0); + + if (rc != NO_ERROR) { + jniThrowException(env, "java/lang/RuntimeException", "set metadata mode failed"); + } +} + +static void android_hardware_Camera_addCallbackBuffer(JNIEnv *env, jobject thiz, jbyteArray bytes, int msgType) { ALOGV("addCallbackBuffer: 0x%x", msgType); JNICameraContext* context = reinterpret_cast<JNICameraContext*>(env->GetLongField(thiz, fields.context)); @@ -1052,7 +1155,7 @@ static int32_t android_hardware_Camera_getAudioRestriction( //------------------------------------------------- static const JNINativeMethod camMethods[] = { - {"getNumberOfCameras", "()I", (void *)android_hardware_Camera_getNumberOfCameras}, + {"_getNumberOfCameras", "()I", (void *)android_hardware_Camera_getNumberOfCameras}, {"_getCameraInfo", "(IZLandroid/hardware/Camera$CameraInfo;)V", (void *)android_hardware_Camera_getCameraInfo}, {"native_setup", "(Ljava/lang/Object;ILjava/lang/String;ZZ)I", @@ -1072,6 +1175,10 @@ static const JNINativeMethod camMethods[] = { {"native_autoFocus", "()V", (void *)android_hardware_Camera_autoFocus}, {"native_cancelAutoFocus", "()V", (void *)android_hardware_Camera_cancelAutoFocus}, {"native_takePicture", "(I)V", (void *)android_hardware_Camera_takePicture}, + {"native_setHistogramMode", "(Z)V", (void *)android_hardware_Camera_setHistogramMode}, + {"native_setMetadataCb", "(Z)V", (void *)android_hardware_Camera_setMetadataCb}, + {"native_sendHistogramData", "()V", (void *)android_hardware_Camera_sendHistogramData}, + {"native_setLongshot", "(Z)V", (void *)android_hardware_Camera_takePicture}, {"native_setParameters", "(Ljava/lang/String;)V", (void *)android_hardware_Camera_setParameters}, {"native_getParameters", "()Ljava/lang/String;", @@ -1131,6 +1238,27 @@ int register_android_hardware_Camera(JNIEnv *env) { "android/graphics/Point", "y", "I", &fields.point_y}, }; + field extendedfacefields_to_find[] = { + { "com/qualcomm/qti/camera/ExtendedFace", "rect", "Landroid/graphics/Rect;", &fields.face_rect }, + { "com/qualcomm/qti/camera/ExtendedFace", "score", "I", &fields.face_score }, + { "com/qualcomm/qti/camera/ExtendedFace", "id", "I", &fields.face_id }, + { "com/qualcomm/qti/camera/ExtendedFace", "leftEye", "Landroid/graphics/Point;", &fields.face_left_eye }, + { "com/qualcomm/qti/camera/ExtendedFace", "rightEye", "Landroid/graphics/Point;", &fields.face_right_eye }, + { "com/qualcomm/qti/camera/ExtendedFace", "mouth", "Landroid/graphics/Point;", &fields.face_mouth }, + { "com/qualcomm/qti/camera/ExtendedFace", "smileDegree", "I", &fields.face_sm_degree }, + { "com/qualcomm/qti/camera/ExtendedFace", "smileScore", "I", &fields.face_sm_score }, + { "com/qualcomm/qti/camera/ExtendedFace", "blinkDetected", "I", &fields.face_blink_detected }, + { "com/qualcomm/qti/camera/ExtendedFace", "faceRecognized", "I", &fields.face_recognised }, + { "com/qualcomm/qti/camera/ExtendedFace", "gazeAngle", "I", &fields.face_gaze_angle }, + { "com/qualcomm/qti/camera/ExtendedFace", "updownDir", "I", &fields.face_updown_dir }, + { "com/qualcomm/qti/camera/ExtendedFace", "leftrightDir", "I", &fields.face_leftright_dir }, + { "com/qualcomm/qti/camera/ExtendedFace", "rollDir", "I", &fields.face_roll_dir }, + { "com/qualcomm/qti/camera/ExtendedFace", "leyeBlink", "I", &fields.face_leye_blink }, + { "com/qualcomm/qti/camera/ExtendedFace", "reyeBlink", "I", &fields.face_reye_blink }, + { "com/qualcomm/qti/camera/ExtendedFace", "leftrightGaze", "I", &fields.face_left_right_gaze }, + { "com/qualcomm/qti/camera/ExtendedFace", "topbottomGaze", "I", &fields.face_top_bottom_gaze }, + }; + find_fields(env, fields_to_find, NELEM(fields_to_find)); jclass clazz = FindClassOrDie(env, "android/hardware/Camera"); @@ -1150,6 +1278,14 @@ int register_android_hardware_Camera(JNIEnv *env) return -1; } + clazz = env->FindClass("com/qualcomm/qti/camera/ExtendedFace"); + if (NULL != clazz) { + fields.face_constructor = env->GetMethodID(clazz, "<init>", "()V"); + find_fields(env, extendedfacefields_to_find, NELEM(extendedfacefields_to_find)); + }else { + env->ExceptionClear(); + } + // Register native functions return RegisterMethodsOrDie(env, "android/hardware/Camera", camMethods, NELEM(camMethods)); } diff --git a/core/jni/android_media_AudioFormat.h b/core/jni/android_media_AudioFormat.h index a9b19062b764..f9170e5ac259 100644 --- a/core/jni/android_media_AudioFormat.h +++ b/core/jni/android_media_AudioFormat.h @@ -51,6 +51,16 @@ #define ENCODING_DTS_UHD_P2 30 #define ENCODING_DSD 31 +#define ENCODING_AMR_NB 100 +#define ENCODING_AMR_WB 101 +#define ENCODING_EVRC 102 +#define ENCODING_EVRC_B 103 +#define ENCODING_EVRC_WB 104 +#define ENCODING_EVRC_NW 105 +#define ENCODING_AAC_ADTS_LC 106 +#define ENCODING_AAC_ADTS_HE_V1 107 +#define ENCODING_AAC_ADTS_HE_V2 108 + #define ENCODING_INVALID 0 #define ENCODING_DEFAULT 1 @@ -95,6 +105,20 @@ static inline audio_format_t audioFormatToNative(int audioFormat) return AUDIO_FORMAT_AAC_XHE; case ENCODING_AC4: return AUDIO_FORMAT_AC4; + // case ENCODING_E_AC3_JOC: // FIXME Not defined on the native side yet + // return AUDIO_FORMAT_E_AC3_JOC; + case ENCODING_AMR_NB: + return AUDIO_FORMAT_AMR_NB; + case ENCODING_AMR_WB: + return AUDIO_FORMAT_AMR_WB; + case ENCODING_EVRC: + return AUDIO_FORMAT_EVRC; + case ENCODING_EVRC_B: + return AUDIO_FORMAT_EVRCB; + case ENCODING_EVRC_WB: + return AUDIO_FORMAT_EVRCWB; + case ENCODING_EVRC_NW: + return AUDIO_FORMAT_EVRCNW; case ENCODING_E_AC3_JOC: return AUDIO_FORMAT_E_AC3_JOC; case ENCODING_DEFAULT: @@ -125,6 +149,12 @@ static inline audio_format_t audioFormatToNative(int audioFormat) return AUDIO_FORMAT_DTS_UHD_P2; case ENCODING_DSD: return AUDIO_FORMAT_DSD; + case ENCODING_AAC_ADTS_LC: + return AUDIO_FORMAT_AAC_ADTS_LC; + case ENCODING_AAC_ADTS_HE_V1: + return AUDIO_FORMAT_AAC_ADTS_HE_V1; + case ENCODING_AAC_ADTS_HE_V2: + return AUDIO_FORMAT_AAC_ADTS_HE_V2; default: return AUDIO_FORMAT_INVALID; } @@ -177,6 +207,20 @@ static inline int audioFormatFromNative(audio_format_t nativeFormat) return ENCODING_AAC_XHE; case AUDIO_FORMAT_AC4: return ENCODING_AC4; + // case AUDIO_FORMAT_E_AC3_JOC: // FIXME Not defined on the native side yet + // return ENCODING_E_AC3_JOC; + case AUDIO_FORMAT_AMR_NB: + return ENCODING_AMR_NB; + case AUDIO_FORMAT_AMR_WB: + return ENCODING_AMR_WB; + case AUDIO_FORMAT_EVRC: + return ENCODING_EVRC; + case AUDIO_FORMAT_EVRCB: + return ENCODING_EVRC_B; + case AUDIO_FORMAT_EVRCWB: + return ENCODING_EVRC_WB; + case AUDIO_FORMAT_EVRCNW: + return ENCODING_EVRC_NW; case AUDIO_FORMAT_E_AC3_JOC: return ENCODING_E_AC3_JOC; case AUDIO_FORMAT_MAT: @@ -206,6 +250,12 @@ static inline int audioFormatFromNative(audio_format_t nativeFormat) return ENCODING_DEFAULT; case AUDIO_FORMAT_DSD: return ENCODING_DSD; + case AUDIO_FORMAT_AAC_ADTS_LC: + return ENCODING_AAC_ADTS_LC; + case AUDIO_FORMAT_AAC_ADTS_HE_V1: + return ENCODING_AAC_ADTS_HE_V1; + case AUDIO_FORMAT_AAC_ADTS_HE_V2: + return ENCODING_AAC_ADTS_HE_V2; default: return ENCODING_INVALID; } diff --git a/core/jni/android_util_Process.cpp b/core/jni/android_util_Process.cpp index 4f2bf4a4f6cb..6e95d7dd5d1a 100644 --- a/core/jni/android_util_Process.cpp +++ b/core/jni/android_util_Process.cpp @@ -22,6 +22,7 @@ #include <utils/Log.h> #include <binder/IPCThreadState.h> #include <binder/IServiceManager.h> +#include <cutils/properties.h> #include <utils/String8.h> #include <utils/Vector.h> #include <meminfo/procmeminfo.h> @@ -211,11 +212,19 @@ void android_os_Process_setThreadGroup(JNIEnv* env, jobject clazz, int tid, jint return; } + SchedPolicy sp = (SchedPolicy) grp; int res = SetTaskProfiles(tid, {get_sched_policy_profile_name((SchedPolicy)grp)}, true) ? 0 : -1; if (res != NO_ERROR) { signalExceptionForGroupError(env, -res, tid); } + + if ((grp == SP_AUDIO_APP) || (grp == SP_AUDIO_SYS)) { + res = set_cpuset_policy(tid, sp); + if (res != NO_ERROR) { + signalExceptionForGroupError(env, -res, tid); + } + } } void android_os_Process_setThreadGroupAndCpuset(JNIEnv* env, jobject clazz, int tid, jint grp) @@ -279,6 +288,81 @@ void android_os_Process_setProcessGroup(JNIEnv* env, jobject clazz, int pid, jin signalExceptionForGroupError(env, errno ? errno : EPERM, pid); } +void android_os_Process_setCgroupProcsProcessGroup(JNIEnv* env, jobject clazz, int uid, int pid, jint grp, jboolean dex2oat_only) +{ + int fd; + char pathV1[255], pathV2[255]; + static bool isCgroupV2 = false; + if ((grp == SP_FOREGROUND) || (grp > SP_MAX)) { + signalExceptionForGroupError(env, EINVAL, pid); + return; + } + + //set process group for current process + android_os_Process_setProcessGroup(env, clazz, pid, grp); + + //find processes in the same cgroup.procs of current uid and pid + snprintf(pathV1, sizeof(pathV1), "/acct/uid_%d/pid_%d/cgroup.procs", uid, pid); + snprintf(pathV2, sizeof(pathV2), "/sys/fs/cgroup/uid_%d/pid_%d/cgroup.procs", uid, pid); + if (isCgroupV2) { + // read from V2 only + fd = open(pathV2, O_RDONLY); + } else { + // first try V1 + fd = open(pathV1, O_RDONLY); + if (fd < 0) { + fd = open(pathV2, O_RDONLY); + if (fd >= 0) { + isCgroupV2 = true; + } + } + } + if (fd >= 0) { + char buffer[256]; + char ch; + int numRead; + size_t len=0; + for (;;) { + numRead=read(fd, &ch, 1); + if (numRead <= 0) + break; + if (ch != '\n') { + buffer[len++] = ch; + } else { + int temp_pid = atoi(buffer); + len=0; + if (temp_pid == pid) + continue; + if (dex2oat_only) { + // check if cmdline of temp_pid is dex2oat + char cmdline[64]; + snprintf(cmdline, sizeof(cmdline), "/proc/%d/cmdline", temp_pid); + int cmdline_fd = open(cmdline, O_RDONLY); + if (cmdline_fd >= 0) { + size_t read_size = read(cmdline_fd, buffer, 255); + close(cmdline_fd); + buffer[read_size]='\0'; + const char *dex2oat_name1 = "dex2oat"; //for plugins compiler + const char *dex2oat_name2 = "/system/bin/dex2oat"; //for installer + const char *dex2oat_name3 = "/apex/com.android.runtime/bin/dex2oat"; //for installer + if (strncmp(buffer, dex2oat_name1, strlen(dex2oat_name1)) != 0 + && strncmp(buffer, dex2oat_name2, strlen(dex2oat_name2)) != 0 + && strncmp(buffer, dex2oat_name3, strlen(dex2oat_name3)) != 0) { + continue; + } + } else { + //ALOGE("read %s failed", cmdline); + continue; + } + } + //set cgroup of temp_pid follow pid + android_os_Process_setProcessGroup(env, clazz, temp_pid, grp); + } + } + close(fd); + } +} + void android_os_Process_setProcessFrozen( JNIEnv *env, jobject clazz, jint pid, jint uid, jboolean freeze) { @@ -356,8 +440,21 @@ static void get_cpuset_cores_for_policy(SchedPolicy policy, cpu_set_t *cpu_set) } break; case SP_FOREGROUND: + if (!CgroupGetAttributePath("HighCapacityCPUs", &filename)) { + return; + } + break; case SP_AUDIO_APP: case SP_AUDIO_SYS: + if (!CgroupGetAttributePath("AudioAppCapacityCPUs", &filename)) { + return; + } + if (access(filename.c_str(), F_OK) != 0) { + if (!CgroupGetAttributePath("HighCapacityCPUs", &filename)) { + return; + } + } + break; case SP_RT_APP: if (!CgroupGetAttributePath("HighCapacityCPUs", &filename)) { return; @@ -1283,6 +1380,7 @@ static const JNINativeMethod methods[] = { {"setThreadGroup", "(II)V", (void*)android_os_Process_setThreadGroup}, {"setThreadGroupAndCpuset", "(II)V", (void*)android_os_Process_setThreadGroupAndCpuset}, {"setProcessGroup", "(II)V", (void*)android_os_Process_setProcessGroup}, + {"setCgroupProcsProcessGroup", "(IIIZ)V", (void*)android_os_Process_setCgroupProcsProcessGroup}, {"getProcessGroup", "(I)I", (void*)android_os_Process_getProcessGroup}, {"createProcessGroup", "(II)I", (void*)android_os_Process_createProcessGroup}, {"getExclusiveCores", "()[I", (void*)android_os_Process_getExclusiveCores}, diff --git a/core/jni/android_util_SeempLog.cpp b/core/jni/android_util_SeempLog.cpp new file mode 100644 index 000000000000..e48d11472b82 --- /dev/null +++ b/core/jni/android_util_SeempLog.cpp @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2015, The Linux Foundation. All rights reserved. + * Not a Contribution. + * + * Copyright (C) 2007-2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include <errno.h> +#include <fcntl.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/stat.h> +#include <sys/types.h> +#include <sys/socket.h> +#include <sys/uio.h> +#include <sys/un.h> +#include <unistd.h> +#include <assert.h> +#include <cutils/properties.h> +#include <utils/String8.h> +#include <android_runtime/Log.h> +#include <utils/Log.h> +#ifdef __BIONIC__ +#include <android/set_abort_message.h> +#endif +#include <utils/Log.h> + + +#include "jni.h" +#include <nativehelper/JNIHelp.h> +#include "utils/misc.h" +#include "android_runtime/AndroidRuntime.h" + +#define LOG_BUF_SIZE 1024 +#define SEEMP_SOCK_NAME "/dev/socket/seempdw" +#define ZYGOTE_PARENT_PID 1 +#ifndef __unused +#define __unused __attribute__((__unused__)) +#endif + +static int __write_to_log_init(struct iovec *vec, size_t nr); +static int (*write_to_log)(struct iovec *vec, size_t nr) = __write_to_log_init; +static int logd_fd = -1; + +/* give up, resources too limited */ +static int __write_to_log_null(struct iovec *vec __unused, + size_t nr __unused) +{ + return -1; +} + +/* log_init_lock assumed */ +static int __write_to_log_initialize() +{ + int i, ret = 0; + if (logd_fd >= 0) { + i = logd_fd; + logd_fd = -1; + close(i); + } + + i = socket(PF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0); + if (i < 0) { + ret = -errno; + write_to_log = __write_to_log_null; + } else if (fcntl(i, F_SETFL, O_NONBLOCK) < 0) { + ret = -errno; + close(i); + i = -1; + write_to_log = __write_to_log_null; + } else { + struct sockaddr_un un; + memset(&un, 0, sizeof(struct sockaddr_un)); + un.sun_family = AF_UNIX; + strlcpy(un.sun_path, SEEMP_SOCK_NAME, sizeof(un.sun_path)); + if (connect(i, (struct sockaddr *)&un, sizeof(struct sockaddr_un)) < 0) { + ret = -errno; + close(i); + i = -1; + } + } + logd_fd = i; + return ret; +} + +static int __write_to_log_socket(struct iovec *vec, size_t nr) +{ + ssize_t ret; + if (logd_fd < 0) { + return -EBADF; + } + + /* + * The write below could be lost, but will never block. + * + * ENOTCONN occurs if logd dies. + * EAGAIN occurs if logd is overloaded. + */ + ret = writev(logd_fd, vec, nr); + if (ret < 0) { + ret = -errno; + if (ret == -ENOTCONN) { + ret = __write_to_log_initialize(); + if (ret < 0) { + return ret; + } + + ret = writev(logd_fd, vec, nr); + if (ret < 0) { + ret = -errno; + } + } + } + + return ret; +} + +static int __write_to_log_init(struct iovec *vec, size_t nr) +{ + if (write_to_log == __write_to_log_init) { + + if (getppid() == ZYGOTE_PARENT_PID) { + return 0; + } + + int ret; + + ret = __write_to_log_initialize(); + if (ret < 0) { + return ret; + } + + write_to_log = __write_to_log_socket; + } + return write_to_log(vec, nr); +} + +int __android_seemp_socket_write(int len, const char *msg) +{ + struct iovec vec; + vec.iov_base = (void *) msg; + vec.iov_len = len; + + return write_to_log(&vec, 1); +} + +namespace android { + +/* + * In class android.util.Log: + * public static native int println_native(int buffer, int priority, String tag, String msg) + */ +static jint android_util_SeempLog_println_native(JNIEnv* env, jobject clazz, + jint api, jstring msgObj) +{ + if (msgObj == NULL) { + jniThrowNullPointerException(env, "seemp_println needs a message"); + return -1; + } + + int apiId = (int)api; + int apiIdLen = sizeof(apiId); + int utf8MsgLen = env->GetStringUTFLength(msgObj); + int len = apiIdLen + 1 + utf8MsgLen + 1; + char *msg = (char*)malloc(len); + if ( NULL == msg ) + { + return -1; + } + char *params = msg + apiIdLen + 1; // api_id + encoding byte + params + + *((int*)msg) = apiId; // copy api id + // // skip encoding byte + env->GetStringUTFRegion(msgObj, 0, env->GetStringLength(msgObj), params); // copy message + msg[len - 1] = 0; // copy terminating zero + + int res = __android_seemp_socket_write(len, msg); // send message + + free(msg); + + return res; +} + +/* + * JNI registration. + */ +static JNINativeMethod gMethods[] = { + /* name, signature, funcPtr */ + { "seemp_println_native", "(ILjava/lang/String;)I", + (void*) android_util_SeempLog_println_native }, +}; + +int register_android_util_SeempLog(JNIEnv* env) +{ + jclass clazz = env->FindClass("android/util/SeempLog"); + if (clazz == NULL) { + return -1; + } + + return AndroidRuntime::registerNativeMethods(env, "android/util/SeempLog", gMethods, + NELEM(gMethods)); +} + +}; // namespace android diff --git a/core/jni/android_view_InputEventReceiver.cpp b/core/jni/android_view_InputEventReceiver.cpp index 0f41229dd0c1..8de6e5746a17 100644 --- a/core/jni/android_view_InputEventReceiver.cpp +++ b/core/jni/android_view_InputEventReceiver.cpp @@ -624,7 +624,6 @@ int register_android_view_InputEventReceiver(JNIEnv* env) { gInputEventReceiverClassInfo.onBatchedInputEventPending = GetMethodIDOrDie(env, gInputEventReceiverClassInfo.clazz, "onBatchedInputEventPending", "(I)V"); - return res; } diff --git a/core/jni/com_android_internal_app_ActivityTrigger.cpp b/core/jni/com_android_internal_app_ActivityTrigger.cpp new file mode 100644 index 000000000000..9d22f69d91ea --- /dev/null +++ b/core/jni/com_android_internal_app_ActivityTrigger.cpp @@ -0,0 +1,256 @@ +/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#define LOG_TAG "ActTriggerJNI" + +#include "jni.h" +#include <nativehelper/JNIHelp.h> +#include <android_runtime/AndroidRuntime.h> + +#include <dlfcn.h> +#include <limits.h> +#include <string.h> + +#include <cutils/properties.h> +#include <utils/Log.h> + +namespace android +{ + +// ---------------------------------------------------------------------------- +/* + * Stuct containing handle to dynamically loaded lib as well as function + * pointers to key interfaces. + */ +typedef struct dlLibHandler { + void *dlhandle; + void (*startActivity)(const char *, int *); + void (*startApp)(const char *, int *); + void (*resumeActivity)(const char *); + void (*pauseActivity)(const char *); + void (*stopActivity)(const char *); + void (*init)(void); + void (*deinit)(void); + void (*miscActivity)(int, const char *, int, int, float *); + const char *dlname; +}dlLibHandler; + +/* + * Init for activity trigger library + */ +static dlLibHandler mDlLibHandler = { + NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, "libqti-at.so" +}; + +// ---------------------------------------------------------------------------- + +static void +com_android_internal_app_ActivityTrigger_native_at_init() +{ + bool errored = false; + + mDlLibHandler.dlhandle = dlopen(mDlLibHandler.dlname, RTLD_NOW | RTLD_LOCAL); + if (mDlLibHandler.dlhandle == NULL) { + return; + } + + *(void **) (&mDlLibHandler.startActivity) = dlsym(mDlLibHandler.dlhandle, "activity_trigger_start"); + if (mDlLibHandler.startActivity == NULL) { + errored = true; + } + + *(void **) (&mDlLibHandler.startApp) = dlsym(mDlLibHandler.dlhandle, "activity_trigger_qspm_start"); + + if (!errored) { + *(void **) (&mDlLibHandler.resumeActivity) = dlsym(mDlLibHandler.dlhandle, "activity_trigger_resume"); + if (mDlLibHandler.resumeActivity == NULL) { + errored = true; + } + } + if (!errored) { + *(void **) (&mDlLibHandler.pauseActivity) = dlsym(mDlLibHandler.dlhandle, "activity_trigger_pause"); + if (mDlLibHandler.pauseActivity == NULL) { + errored = true; + } + } + if (!errored) { + *(void **) (&mDlLibHandler.stopActivity) = dlsym(mDlLibHandler.dlhandle, "activity_trigger_stop"); + if (mDlLibHandler.stopActivity == NULL) { + errored = true; + } + } + if (!errored) { + *(void **) (&mDlLibHandler.init) = dlsym(mDlLibHandler.dlhandle, "activity_trigger_init"); + if (mDlLibHandler.init == NULL) { + errored = true; + } + } + if (!errored) { + *(void **) (&mDlLibHandler.miscActivity) = dlsym(mDlLibHandler.dlhandle, "activity_trigger_misc"); + if (mDlLibHandler.miscActivity == NULL) { + errored = true; + } + } + if (errored) { + mDlLibHandler.startActivity = NULL; + mDlLibHandler.startApp = NULL; + mDlLibHandler.resumeActivity = NULL; + mDlLibHandler.pauseActivity = NULL; + mDlLibHandler.stopActivity = NULL; + mDlLibHandler.miscActivity = NULL; + if (mDlLibHandler.dlhandle) { + dlclose(mDlLibHandler.dlhandle); + mDlLibHandler.dlhandle = NULL; + } + } else { + (*mDlLibHandler.init)(); + } +} + +static void +com_android_internal_app_ActivityTrigger_native_at_deinit(JNIEnv *env, jobject clazz) +{ + if (mDlLibHandler.dlhandle) { + mDlLibHandler.startActivity = NULL; + mDlLibHandler.startApp = NULL; + mDlLibHandler.resumeActivity = NULL; + mDlLibHandler.pauseActivity = NULL; + mDlLibHandler.stopActivity = NULL; + mDlLibHandler.miscActivity = NULL; + + *(void **) (&mDlLibHandler.deinit) = dlsym(mDlLibHandler.dlhandle, "activity_trigger_deinit"); + if (mDlLibHandler.deinit) { + (*mDlLibHandler.deinit)(); + } + + dlclose(mDlLibHandler.dlhandle); + mDlLibHandler.dlhandle = NULL; + } +} + +static jint +com_android_internal_app_ActivityTrigger_native_at_startActivity(JNIEnv *env, jobject clazz, jstring activity, jint flags) +{ + int activiyFlags = flags; + if(mDlLibHandler.startActivity && activity) { + const char *actStr = env->GetStringUTFChars(activity, NULL); + if (actStr) { + (*mDlLibHandler.startActivity)(actStr, &activiyFlags); + env->ReleaseStringUTFChars(activity, actStr); + } + } + return activiyFlags; +} + +static jint +com_android_internal_app_ActivityTrigger_native_at_startApp(JNIEnv *env, jobject clazz, jstring activity, jint flags) +{ + int activiyFlags = flags; + if(mDlLibHandler.startApp && activity) { + const char *actStr = env->GetStringUTFChars(activity, NULL); + if (actStr) { + (*mDlLibHandler.startApp)(actStr, &activiyFlags); + env->ReleaseStringUTFChars(activity, actStr); + } + } + return activiyFlags; +} + +static void +com_android_internal_app_ActivityTrigger_native_at_resumeActivity(JNIEnv *env, jobject clazz, jstring activity) +{ + if(mDlLibHandler.resumeActivity && activity) { + const char *actStr = env->GetStringUTFChars(activity, NULL); + if (actStr) { + (*mDlLibHandler.resumeActivity)(actStr); + env->ReleaseStringUTFChars(activity, actStr); + } + } +} + +static void +com_android_internal_app_ActivityTrigger_native_at_pauseActivity(JNIEnv *env, jobject clazz, jstring activity) +{ + if(mDlLibHandler.pauseActivity && activity) { + const char *actStr = env->GetStringUTFChars(activity, NULL); + if (NULL != actStr) { + (*mDlLibHandler.pauseActivity)(actStr); + env->ReleaseStringUTFChars(activity, actStr); + } + } +} + +static void +com_android_internal_app_ActivityTrigger_native_at_stopActivity(JNIEnv *env, jobject clazz, jstring activity) +{ + if(mDlLibHandler.stopActivity && activity) { + const char *actStr = env->GetStringUTFChars(activity, NULL); + if (NULL != actStr) { + (*mDlLibHandler.stopActivity)(actStr); + env->ReleaseStringUTFChars(activity, actStr); + } + } +} + +static jfloat +com_android_internal_app_ActivityTrigger_native_at_miscActivity(JNIEnv *env, jobject clazz, jint func, jstring activity, jint type, jint flag) +{ + float scaleValue = -1.0f; + if (mDlLibHandler.miscActivity && activity && func) { + const char *actStr = env->GetStringUTFChars(activity, NULL); + if (actStr) { + (*mDlLibHandler.miscActivity)(func, actStr, type, flag, &scaleValue); + env->ReleaseStringUTFChars(activity, actStr); + } + } + return scaleValue; +} + +// ---------------------------------------------------------------------------- + +static JNINativeMethod gMethods[] = { + {"native_at_startActivity", "(Ljava/lang/String;I)I", (void *)com_android_internal_app_ActivityTrigger_native_at_startActivity}, + {"native_at_startApp", "(Ljava/lang/String;I)I", (void *)com_android_internal_app_ActivityTrigger_native_at_startApp}, + {"native_at_resumeActivity", "(Ljava/lang/String;)V", (void *)com_android_internal_app_ActivityTrigger_native_at_resumeActivity}, + {"native_at_pauseActivity", "(Ljava/lang/String;)V", (void *)com_android_internal_app_ActivityTrigger_native_at_pauseActivity}, + {"native_at_stopActivity", "(Ljava/lang/String;)V", (void *)com_android_internal_app_ActivityTrigger_native_at_stopActivity}, + {"native_at_deinit", "()V", (void *)com_android_internal_app_ActivityTrigger_native_at_deinit}, + {"native_at_miscActivity", "(ILjava/lang/String;II)F", (void *)com_android_internal_app_ActivityTrigger_native_at_miscActivity}, +}; + +int register_com_android_internal_app_ActivityTrigger(JNIEnv *env) +{ + com_android_internal_app_ActivityTrigger_native_at_init(); + + return AndroidRuntime::registerNativeMethods(env, + "com/android/internal/app/ActivityTrigger", gMethods, NELEM(gMethods)); +} + +} // namespace android diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp index ce806a0fcc08..4c90141afb76 100644 --- a/core/jni/com_android_internal_os_Zygote.cpp +++ b/core/jni/com_android_internal_os_Zygote.cpp @@ -74,6 +74,8 @@ #include <bionic/mte.h> #include <cutils/fs.h> #include <cutils/multiuser.h> +#include <cutils/properties.h> +#include <cutils/sched_policy.h> #include <cutils/sockets.h> #include <private/android_filesystem_config.h> #include <processgroup/processgroup.h> @@ -83,6 +85,7 @@ #include <stats_socket.h> #include <utils/String8.h> #include <utils/Trace.h> +#include <dlfcn.h> #include <nativehelper/JNIHelp.h> #include <nativehelper/ScopedLocalRef.h> @@ -624,7 +627,14 @@ static void EnableDebugger() { if (getrlimit(RLIMIT_CORE, &rl) == -1) { ALOGE("getrlimit(RLIMIT_CORE) failed"); } else { - rl.rlim_cur = 0; + char prop_value[PROPERTY_VALUE_MAX]; + property_get("persist.debug.trace", prop_value, "0"); + if (prop_value[0] == '1') { + ALOGI("setting RLIM to infinity"); + rl.rlim_cur = RLIM_INFINITY; + } else { + rl.rlim_cur = 0; + } if (setrlimit(RLIMIT_CORE, &rl) == -1) { ALOGE("setrlimit(RLIMIT_CORE) failed"); } @@ -638,6 +648,19 @@ static void PreApplicationInit() { // Set the jemalloc decay time to 1. mallopt(M_DECAY_TIME, 1); + + void *mBelugaHandle = nullptr; + void (*mBeluga)() = nullptr; + mBelugaHandle = dlopen("libbeluga.so", RTLD_NOW); + if (!mBelugaHandle) { + ALOGW("Unable to open libbeluga.so: %s.", dlerror()); + } + else { + mBeluga = (void (*) ())dlsym(mBelugaHandle, "beluga"); + if (mBeluga) + mBeluga(); + dlclose(mBelugaHandle); + } } static void SetUpSeccompFilter(uid_t uid, bool is_child_zygote) { @@ -2049,6 +2072,7 @@ static jlong CalculateCapabilities(JNIEnv* env, jint uid, jint gid, jintArray gi capabilities |= (1LL << CAP_NET_RAW); capabilities |= (1LL << CAP_NET_BIND_SERVICE); capabilities |= (1LL << CAP_SYS_NICE); + capabilities |= (1LL << CAP_NET_ADMIN); } if (multiuser_get_app_id(uid) == AID_NETWORK_STACK) { diff --git a/core/proto/android/nfcstm/card_emulation_stm.proto b/core/proto/android/nfcstm/card_emulation_stm.proto new file mode 100644 index 000000000000..9a9ecc7469b2 --- /dev/null +++ b/core/proto/android/nfcstm/card_emulation_stm.proto @@ -0,0 +1,129 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +syntax = "proto2"; +package com.android.nfcstm.cardemulation; + +import "frameworks/base/core/proto/android/content/component_name.proto"; +import "frameworks/base/core/proto/android/nfc/apdu_service_info.proto"; +import "frameworks/base/core/proto/android/nfc/nfc_fservice_info.proto"; +import "frameworks/base/core/proto/android/privacy.proto"; + +option java_multiple_files = true; + +// Debugging information for com.android.nfc.cardemulation.CardEmulationManager +message CardEmulationManagerProto { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + optional RegisteredServicesCacheProto registered_services_cache = 1; + optional RegisteredNfcFServicesCacheProto registered_nfc_f_services_cache = 2; + optional PreferredServicesProto preferred_services = 3; + optional EnabledNfcFServicesProto enabled_nfc_f_services = 4; + optional RegisteredAidCacheProto aid_cache = 5; + optional RegisteredT3tIdentifiersCacheProto t3t_identifiers_cache = 6; + optional HostEmulationManagerProto host_emulation_manager = 7; + optional HostNfcFEmulationManagerProto host_nfc_f_emulation_manager = 8; +} + +// Debugging information for com.android.nfc.cardemulation.RegisteredServicesCache +message RegisteredServicesCacheProto { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + repeated .android.nfc.cardemulation.ApduServiceInfoProto apdu_service_infos = 1; +} + +// Debugging information for com.android.nfc.cardemulation.RegisteredNfcFServicesCache +message RegisteredNfcFServicesCacheProto { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + repeated .android.nfc.cardemulation.NfcFServiceInfoProto nfc_fservice_info = 1; +} + +// Debugging information for com.android.nfc.cardemulation.PreferredServices +message PreferredServicesProto { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + optional .android.content.ComponentNameProto foreground_current = 1; + optional .android.content.ComponentNameProto current_preferred = 2; + optional .android.content.ComponentNameProto next_tap_default = 3; + optional int32 foreground_uid = 4; + optional .android.content.ComponentNameProto foreground_requested = 5; + optional .android.content.ComponentNameProto settings_default = 6; + optional bool prefer_foreground = 7; +} + +// Debugging information for com.android.nfc.cardemulation.EnabledNfcFServices +message EnabledNfcFServicesProto { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + optional .android.content.ComponentNameProto foreground_component = 1; + optional .android.content.ComponentNameProto foreground_requested = 2; + optional bool activated = 3; + optional bool compute_fg_requested = 4; + optional int32 foreground_uid = 5; +} + +// Debugging information for com.android.nfc.cardemulation.RegisteredAidCache +message RegisteredAidCacheProto { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + message AidCacheEntry { + optional string key = 1 [(.android.privacy).dest = DEST_EXPLICIT]; + optional string category = 2 [(.android.privacy).dest = DEST_EXPLICIT]; + optional .android.content.ComponentNameProto default_component = 3; + repeated .android.nfc.cardemulation.ApduServiceInfoProto services = 4; + } + repeated AidCacheEntry aid_cache_entries = 1; + optional .android.content.ComponentNameProto preferred_foreground_service = 2; + optional .android.content.ComponentNameProto preferred_payment_service = 3; + optional AidRoutingManagerProto routing_manager = 4; +} + +message AidRoutingManagerProto { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + message Route { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + optional int32 id = 1; + repeated string aids = 2 [(.android.privacy).dest = DEST_EXPLICIT]; + } + optional int32 default_route = 1; + repeated Route routes = 2; +} + +// Debugging information for com.android.nfc.cardemulation.RegisteredT3tIdentifiersCache +message RegisteredT3tIdentifiersCacheProto { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + repeated .android.nfc.cardemulation.NfcFServiceInfoProto t3t_identifier_cache_entries = 1; + optional SystemCodeRoutingManagerProto routing_manager = 2; +} + +// Debugging information for com.android.nfc.cardemulation.SystemCodeRoutingManager +message SystemCodeRoutingManagerProto { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + message T3tIdentifier { + option (.android.msg_privacy).dest = DEST_EXPLICIT; + optional string system_code = 1; + optional string nfcid2 = 2; + } + repeated T3tIdentifier t3t_identifiers = 1; +} + +// Debugging information for com.android.nfc.cardemulation.HostEmulationManager +message HostEmulationManagerProto { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + optional .android.content.ComponentNameProto payment_service_name = 1; + optional .android.content.ComponentNameProto service_name = 2; +} + +// Debugging information for com.android.nfc.cardemulation.HostNfcFEmulationManager +message HostNfcFEmulationManagerProto { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + optional .android.content.ComponentNameProto service_name = 1; +} diff --git a/core/proto/android/nfcstm/nfc_service_stm.proto b/core/proto/android/nfcstm/nfc_service_stm.proto new file mode 100644 index 000000000000..03aa8a40f840 --- /dev/null +++ b/core/proto/android/nfcstm/nfc_service_stm.proto @@ -0,0 +1,122 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +syntax = "proto2"; +package com.android.nfcstm; + +import "frameworks/base/core/proto/android/app/pendingintent.proto"; +import "frameworks/base/core/proto/android/content/intent.proto"; +import "frameworks/base/core/proto/android/nfcstm/card_emulation_stm.proto"; +import "frameworks/base/core/proto/android/nfc/ndef.proto"; +import "frameworks/base/core/proto/android/privacy.proto"; + +option java_multiple_files = true; + +// Debugging information for com.android.nfc.NfcService +message NfcServiceDumpProto { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + + enum State { + STATE_UNKNOWN = 0; + STATE_OFF = 1; + STATE_TURNING_ON = 2; + STATE_ON = 3; + STATE_TURNING_OFF = 4; + } + + enum ScreenState { + SCREEN_STATE_UNKNOWN = 0; + SCREEN_STATE_OFF_UNLOCKED = 1; + SCREEN_STATE_OFF_LOCKED = 2; + SCREEN_STATE_ON_LOCKED = 3; + SCREEN_STATE_ON_UNLOCKED = 4; + } + + optional State state = 1; + optional bool in_provision_mode = 2; + optional bool ndef_push_enabled = 3; + optional ScreenState screen_state = 4; + optional bool secure_nfc_enabled = 5; + optional bool polling_paused = 6; + optional int32 num_tags_detected = 7; + optional int32 num_p2p_detected = 8; + optional int32 num_hce_detected = 9; + optional bool hce_capable = 10; + optional bool hce_f_capable = 11; + optional bool beam_capable = 12; + optional bool secure_nfc_capable = 13; + optional bool vr_mode_enabled = 14; + optional DiscoveryParamsProto discovery_params = 15; + optional P2pLinkManagerProto p2p_link_manager = 16; + optional com.android.nfcstm.cardemulation.CardEmulationManagerProto card_emulation_manager = 17; + optional NfcDispatcherProto nfc_dispatcher = 18; + optional string native_crash_logs = 19 [(.android.privacy).dest = DEST_EXPLICIT]; +} + +// Debugging information for com.android.nfc.NfcDiscoveryParameters +message DiscoveryParamsProto { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + + optional int32 tech_mask = 1; + optional bool enable_lpd = 2; + optional bool enable_reader = 3; + optional bool enable_host_routing = 4; + optional bool enable_p2p = 5; +} + +// Debugging information for com.android.nfc.P2pLinkManager +message P2pLinkManagerProto { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + + enum LinkState { + LINK_STATE_UNKNOWN = 0; + LINK_STATE_DOWN = 1; + LINK_STATE_DEBOUNCE = 2; + LINK_STATE_UP = 3; + } + + enum SendState { + SEND_STATE_UNKNOWN = 0; + SEND_STATE_NOTHING_TO_SEND = 1; + SEND_STATE_NEED_CONFIRMATION = 2; + SEND_STATE_SENDING = 3; + SEND_STATE_COMPLETE = 4; + SEND_STATE_CANCELED = 5; + } + + optional int32 default_miu = 1; + optional int32 default_rw_size = 2; + optional LinkState link_state = 3; + optional SendState send_state = 4; + optional int32 send_flags = 5; + optional bool send_enabled = 6; + optional bool receive_enabled = 7; + optional string callback_ndef = 8 [(.android.privacy).dest = DEST_EXPLICIT]; + optional .android.nfc.NdefMessageProto message_to_send = 9; + repeated string uris_to_send = 10 [(.android.privacy).dest = DEST_EXPLICIT]; +} + +// Debugging information for com.android.nfc.NfcDispatcher +message NfcDispatcherProto { + option (.android.msg_privacy).dest = DEST_AUTOMATIC; + + optional bool device_supports_bluetooth = 1; + optional bool bluetooth_enabled_by_nfc = 2; + optional bool provisioning_only = 3; + optional .android.app.PendingIntentProto override_intent = 4; + repeated .android.content.IntentFilterProto override_filters = 5; + optional string override_tech_lists = 6; +} diff --git a/core/proto/android/providers/settings/global.proto b/core/proto/android/providers/settings/global.proto index 052e2f20a313..fe3faf3e7e20 100644 --- a/core/proto/android/providers/settings/global.proto +++ b/core/proto/android/providers/settings/global.proto @@ -732,6 +732,8 @@ message GlobalSettingsProto { optional SettingProto server = 1; // Timeout in milliseconds to wait for NTP server. optional SettingProto timeout_ms = 2 [ (android.privacy).dest = DEST_AUTOMATIC ]; + // Secondary NTP server. + optional SettingProto server_2 = 3; } optional Ntp ntp = 84; diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index 4dbc54fa2481..0c02992ba3be 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -52,6 +52,7 @@ <protected-broadcast android:name="android.intent.action.PACKAGE_FIRST_LAUNCH" /> <protected-broadcast android:name="android.intent.action.PACKAGE_NEEDS_INTEGRITY_VERIFICATION" /> <protected-broadcast android:name="android.intent.action.PACKAGE_NEEDS_VERIFICATION" /> + <protected-broadcast android:name="com.qualcomm.qti.intent.action.PACKAGE_NEEDS_OPTIONAL_VERIFICATION" /> <protected-broadcast android:name="android.intent.action.PACKAGE_VERIFIED" /> <protected-broadcast android:name="android.intent.action.PACKAGES_SUSPENDED" /> <protected-broadcast android:name="android.intent.action.PACKAGES_UNSUSPENDED" /> @@ -178,8 +179,10 @@ <protected-broadcast android:name="android.bluetooth.device.action.SDP_RECORD" /> <protected-broadcast android:name="android.bluetooth.device.action.BATTERY_LEVEL_CHANGED" /> <protected-broadcast android:name="android.bluetooth.device.action.REMOTE_ISSUE_OCCURRED" /> + <protected-broadcast android:name="android.bluetooth.device.action.TWS_PLUS_DEVICE_PAIR" /> <protected-broadcast android:name="android.bluetooth.devicepicker.action.LAUNCH" /> <protected-broadcast android:name="android.bluetooth.devicepicker.action.DEVICE_SELECTED" /> + <protected-broadcast android:name="org.codeaurora.intent.bluetooth.action.REMOTE_ISSUE_OCCURRED" /> <protected-broadcast android:name="android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED" /> <protected-broadcast @@ -191,6 +194,8 @@ <protected-broadcast android:name="android.bluetooth.headset.profile.action.ACTIVE_DEVICE_CHANGED" /> <protected-broadcast + android:name="android.bluetooth.headset.action.HF_TWSP_BATTERY_STATE_CHANGED" /> + <protected-broadcast android:name="android.bluetooth.headsetclient.profile.action.CONNECTION_STATE_CHANGED" /> <protected-broadcast android:name="android.bluetooth.headsetclient.profile.action.AUDIO_STATE_CHANGED" /> @@ -405,7 +410,28 @@ <protected-broadcast android:name="com.android.server.wifi.wakeup.OPEN_WIFI_PREFERENCES" /> <protected-broadcast android:name="com.android.server.wifi.wakeup.OPEN_WIFI_SETTINGS" /> <protected-broadcast android:name="com.android.server.wifi.wakeup.TURN_OFF_WIFI_WAKE" /> + + <protected-broadcast android:name="com.qualcomm.qti.wigig.WIGIG_CREDENTIAL_CHANGED" /> + <protected-broadcast android:name="com.qualcomm.qti.wigig.WIGIG_STATE_CHANGED" /> + <protected-broadcast android:name="com.qualcomm.qti.wigig.WIGIG_AP_STATE_CHANGED" /> + <protected-broadcast android:name="com.qualcomm.qti.wigig.supplicant.CONNECTION_CHANGE" /> + <protected-broadcast android:name="com.qualcomm.qti.wigig.STATE_CHANGE" /> + <protected-broadcast android:name="com.qualcomm.qti.wigig.CONFIGURED_NETWORKS_CHANGE" /> + <protected-broadcast android:name="com.qualcomm.qti.wigig.SCAN_RESULTS" /> + <protected-broadcast android:name="com.qualcomm.qti.wigig.LINK_CONFIGURATION_CHANGED" /> + <protected-broadcast android:name="com.qualcomm.qti.wigig.WIGIG_RATE_UPGRADE_STATE_CHANGED" /> + <protected-broadcast android:name="com.qualcomm.qti.wigig.RSSI_CHANGED" /> + <protected-broadcast android:name="wigig_scan_available" /> + <protected-broadcast android:name="android.net.wigig.p2p.STATE_CHANGED" /> + <protected-broadcast android:name="android.net.wigig.p2p.CONNECTION_STATE_CHANGE" /> + <protected-broadcast android:name="android.net.wigig.p2p.PEERS_CHANGED" /> + <protected-broadcast android:name="android.net.wigig.p2p.DISCOVERY_STATE_CHANGE" /> + <protected-broadcast android:name="android.net.wigig.p2p.THIS_DEVICE_CHANGED" /> + <protected-broadcast android:name="android.net.wigig.p2p.PERSISTENT_GROUPS_CHANGED" /> + <protected-broadcast android:name="android.net.wifi.WIFI_STATE_CHANGED" /> + <protected-broadcast android:name="com.qualcomm.qti.net.wifi.WIFI_ALERT" /> + <protected-broadcast android:name="com.qualcomm.qti.net.wifi.WIFI_NETWORK_DISCONNECTION" /> <protected-broadcast android:name="android.net.wifi.WIFI_AP_STATE_CHANGED" /> <protected-broadcast android:name="android.net.wifi.WIFI_CREDENTIAL_CHANGED" /> <protected-broadcast android:name="android.net.wifi.aware.action.WIFI_AWARE_STATE_CHANGED" /> @@ -433,6 +459,9 @@ <protected-broadcast android:name="android.net.wifi.p2p.PEERS_CHANGED" /> <protected-broadcast android:name="android.net.wifi.p2p.CONNECTION_STATE_CHANGE" /> <protected-broadcast android:name="android.net.wifi.p2p.action.WIFI_P2P_PERSISTENT_GROUPS_CHANGED" /> + <protected-broadcast android:name="com.qualcomm.qti.net.wifi.DPP_EVENT" /> + <protected-broadcast android:name="com.qualcomm.qti.net.wifi.PARTIAL_SCAN_RESULTS" /> + <protected-broadcast android:name="android.net.wifi.COUNTRY_CODE_CHANGED" /> <protected-broadcast android:name="android.net.conn.TETHER_STATE_CHANGED" /> <protected-broadcast android:name="android.net.conn.INET_CONDITION_ACTION" /> <!-- This broadcast is no longer sent in S but it should stay protected to avoid third party @@ -636,6 +665,23 @@ <protected-broadcast android:name="android.bluetooth.input.profile.action.HANDSHAKE" /> <protected-broadcast android:name="android.bluetooth.input.profile.action.REPORT" /> + <protected-broadcast android:name="android.bluetooth.bat.profile.action.BA_STATE_CHANGED" /> + <protected-broadcast android:name="android.bluetooth.bat.profile.action.BA_ENC_KEY_CHANGED" /> + <protected-broadcast android:name="android.bluetooth.bat.profile.action.BA_DIV_CHANGED" /> + <protected-broadcast android:name="android.bluetooth.bat.profile.action.BA_STR_ID_CHANGED" /> + + <protected-broadcast + android:name="android.bluetooth.bc.profile.action.CONNECTION_STATE_CHANGED" /> + <protected-broadcast + android:name="android.bluetooth.broadcast.profile.action.BROADCAST_STATE_CHANGED" /> + <protected-broadcast + android:name="android.bluetooth.broadcast.profile.action.BROADCAST_ENCRYPTION_KEY_GENERATED" /> + <protected-broadcast + android:name="android.bluetooth.broadcast.profile.action.BROADCAST_AUDIO_STATE_CHANGED" /> + <protected-broadcast + android:name="android.bluetooth.BroadcastAudioSAManager.action.BROADCAST_SOURCE_INFO" /> + + <protected-broadcast android:name="android.intent.action.TWILIGHT_CHANGED" /> <protected-broadcast android:name="com.android.server.fingerprint.ACTION_LOCKOUT_RESET" /> @@ -923,6 +969,11 @@ <permission android:name="android.permission.ACCESS_MESSAGES_ON_ICC" android:protectionLevel="signature" /> + <!-- Allows accessing Device Integration functions. --> + <permission android:name="deviceintegration.permission.MANAGE_CROSS_DEVICE" + android:protectionLevel="signature|privileged" + /> + <!-- Used for runtime permissions related to user's SMS messages. --> <permission-group android:name="android.permission-group.SMS" android:icon="@drawable/perm_group_sms" @@ -1923,6 +1974,11 @@ <permission android:name="android.permission.MODIFY_CELL_BROADCASTS" android:protectionLevel="signature|privileged" /> + <!-- Allows an application to authorize outgoing SMS messages. + @hide --> + <permission android:name="com.qti.permission.AUTHORIZE_OUTGOING_SMS" + android:protectionLevel="signature" /> + <!-- =============================================================== --> <!-- Permissions for setting the device alarm --> <!-- =============================================================== --> diff --git a/core/res/res/drawable/ic_wifi_4_signal_0.xml b/core/res/res/drawable/ic_wifi_4_signal_0.xml new file mode 100644 index 000000000000..bf077124f065 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_4_signal_0.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="26dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="M 12,2.001359 C 7.2499999,2.001359 2.9699999,4.079946 -1.25e-7,7.389946 L 12,21.998641 15.048913,18.289401 A 6.2033902,6.4067802 0 0 1 14.192935,16.186142 L 12,18.851901 2.6983696,7.528533 C 5.2683695,5.268533 8.5799999,3.998641 12,3.998641 c 3.42,0 6.73163,1.269892 9.30163,3.529892 l -0.709239,0.86413 a 6.2033902,6.4067802 0 0 1 2.148097,0.529891 L 24,7.389946 c -2.97,-3.31 -7.25,-5.388587 -12,-5.388587 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 24.401344,17.117563 h -1.056598 v 1.849791 h -1.506209 v -1.849791 h -3.602534 v -1.359946 l 3.344006,-5.8716006 h 1.764737 v 5.8844916 h 1.056598 z M 21.838537,15.770508 V 12.79926 q 0,-0.348044 0.01967,-0.754093 0.01968,-0.406048 0.03092,-0.522067 v 0 q -0.146131,0.360936 -0.528296,1.044134 v 0 l -1.83781,3.203274 z"/> +</vector> diff --git a/core/res/res/drawable/ic_wifi_4_signal_1.xml b/core/res/res/drawable/ic_wifi_4_signal_1.xml new file mode 100644 index 000000000000..619614f90a53 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_4_signal_1.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="26dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="m 24.401344,17.117563 h -1.056598 v 1.849791 h -1.506209 v -1.849791 h -3.602534 v -1.359946 l 3.344006,-5.8716006 h 1.764737 v 5.8844916 h 1.056598 z M 21.838537,15.770508 V 12.79926 q 0,-0.348044 0.01967,-0.754093 0.01968,-0.406048 0.03092,-0.522067 v 0 q -0.146131,0.360936 -0.528296,1.044134 v 0 l -1.83781,3.203274 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 13.100543,2.0095112 c -4.75,0 -9.029999,2.078587 -12,5.388587 l 12,14.6005438 3.827446,-4.654892 a 7.7288136,8.3389834 0 0 1 -0.04484,-0.835598 7.7288136,8.3389834 0 0 1 0.460598,-2.816576 L 13.10054,18.860054 3.79891,7.5366842 c 2.57,-2.259999 5.88163,-3.529891 9.30163,-3.529891 3.42,0 6.731631,1.269892 9.301631,3.529891 l -1.247282,1.516305 a 7.7288136,8.3389834 0 0 1 3.305705,-0.876359 l 0.639947,-0.778532 c -2.97,-3.31 -7.250001,-5.388587 -12.000001,-5.388587 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 13.100543,13.300272 c -3.2,0 -5.2986406,1.799456 -5.4986408,1.899456 l 5.4986408,6.798914 4.043479,-4.997283 a 7.7288137,8.3389834 0 0 1 -0.06114,-0.933424 7.7288137,8.3389834 0 0 1 0.171196,-1.732337 c -0.961558,-0.505425 -2.35688,-1.035326 -4.153535,-1.035326 z"/> +</vector> diff --git a/core/res/res/drawable/ic_wifi_4_signal_2.xml b/core/res/res/drawable/ic_wifi_4_signal_2.xml new file mode 100644 index 000000000000..e6fd9e862349 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_4_signal_2.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="26dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="m 24.401344,17.117563 h -1.056598 v 1.849791 h -1.506209 v -1.849791 h -3.602534 v -1.359946 l 3.344006,-5.8716006 h 1.764737 v 5.8844916 h 1.056598 z M 21.838537,15.770508 V 12.79926 q 0,-0.348044 0.01967,-0.754093 0.01968,-0.406048 0.03092,-0.522067 v 0 q -0.146131,0.360936 -0.528296,1.044134 v 0 l -1.83781,3.203274 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 12.998641,2.0095112 c -4.75,0 -9.029999,2.078587 -12,5.388587 l 12,14.6005438 3.827446,-4.654892 a 7.7288136,8.3389834 0 0 1 -0.04484,-0.835598 7.7288136,8.3389834 0 0 1 0.460598,-2.816576 L 12.998638,18.860054 3.697008,7.5366842 c 2.57,-2.259999 5.88163,-3.529891 9.30163,-3.529891 3.42,0 6.731631,1.269892 9.301631,3.529891 l -1.247282,1.516305 a 7.7288136,8.3389834 0 0 1 3.305705,-0.876359 l 0.639947,-0.778532 c -2.97,-3.31 -7.250001,-5.388587 -12.000001,-5.388587 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 12.998641,9.998641 c -4.3999993,0 -7.297826,2.402446 -7.597826,2.702446 l 7.597826,9.297555 4.133152,-5.111414 a 7.7288137,8.3389834 0 0 1 -0.04891,-0.847826 7.7288137,8.3389834 0 0 1 1.377718,-4.744565 C 17.138647,10.644289 15.284639,9.998641 12.998644,9.998641 Z"/> +</vector> diff --git a/core/res/res/drawable/ic_wifi_4_signal_3.xml b/core/res/res/drawable/ic_wifi_4_signal_3.xml new file mode 100644 index 000000000000..1b2eb8efee0a --- /dev/null +++ b/core/res/res/drawable/ic_wifi_4_signal_3.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="26dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="m 24.401344,17.117563 h -1.056598 v 1.849791 h -1.506209 v -1.849791 h -3.602534 v -1.359946 l 3.344006,-5.8716006 h 1.764737 v 5.8844916 h 1.056598 z M 21.838537,15.770508 V 12.79926 q 0,-0.348044 0.01967,-0.754093 0.01968,-0.406048 0.03092,-0.522067 v 0 q -0.146131,0.360936 -0.528296,1.044134 v 0 l -1.83781,3.203274 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 12.998641,7.398098 c -5.3000001,0 -8.8997284,3.003804 -9.1997284,3.203804 l 9.1997284,11.39674 4.03125,-4.997283 A 7.7288137,8.3389834 0 0 1 16.968751,16.039402 7.7288137,8.3389834 0 0 1 20.164403,9.30163 C 18.559413,8.406307 16.154773,7.398098 12.998641,7.398098 Z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 12.998641,2.0095112 c -4.75,0 -9.029999,2.078587 -12,5.388587 l 12,14.6005438 3.827446,-4.654892 a 7.7288136,8.3389834 0 0 1 -0.04484,-0.835598 7.7288136,8.3389834 0 0 1 0.460598,-2.816576 L 12.998638,18.860054 3.697008,7.5366842 c 2.57,-2.259999 5.88163,-3.529891 9.30163,-3.529891 3.42,0 6.731631,1.269892 9.301631,3.529891 l -1.247282,1.516305 a 7.7288136,8.3389834 0 0 1 3.305705,-0.876359 l 0.639947,-0.778532 c -2.97,-3.31 -7.250001,-5.388587 -12.000001,-5.388587 z"/> +</vector> diff --git a/core/res/res/drawable/ic_wifi_4_signal_4.xml b/core/res/res/drawable/ic_wifi_4_signal_4.xml new file mode 100644 index 000000000000..d264adbd140d --- /dev/null +++ b/core/res/res/drawable/ic_wifi_4_signal_4.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="26dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="m 24.401344,17.117563 h -1.056598 v 1.849791 h -1.506209 v -1.849791 h -3.602534 v -1.359946 l 3.344006,-5.8716006 h 1.764737 v 5.8844916 h 1.056598 z M 21.838537,15.770508 V 12.79926 q 0,-0.348044 0.01967,-0.754093 0.01968,-0.406048 0.03092,-0.522067 v 0 q -0.146131,0.360936 -0.528296,1.044134 v 0 l -1.83781,3.203274 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 12.998641,2.099185 c -7.3000003,0 -12.0991851,4.002174 -12.59918509,4.402174 L 12.998641,21.998642 16.944293,17.148098 a 7.7288137,8.3389834 0 0 1 -0.06114,-0.978261 7.7288137,8.3389834 0 0 1 7.634511,-8.335597 l 1.084238,-1.332881 c -0.499999,-0.4 -5.303261,-4.402174 -12.603261,-4.402174 z"/> +</vector> diff --git a/core/res/res/drawable/ic_wifi_5_signal_0.xml b/core/res/res/drawable/ic_wifi_5_signal_0.xml new file mode 100644 index 000000000000..dde3ec85d286 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_5_signal_0.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="26dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="M 12,2.001359 C 7.2499999,2.001359 2.9699999,4.079946 -1.25e-7,7.389946 L 12,21.998641 15.048913,18.289401 A 6.2033902,6.4067802 0 0 1 14.192935,16.186142 L 12,18.851901 2.6983696,7.528533 C 5.2683695,5.268533 8.5799999,3.998641 12,3.998641 c 3.42,0 6.73163,1.269892 9.30163,3.529892 l -0.709239,0.86413 a 6.2033902,6.4067802 0 0 1 2.148097,0.529891 L 24,7.389946 c -2.97,-3.31 -7.25,-5.388587 -12,-5.388587 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 25.626571,16.969114 v 0 q 0,1.36304 -0.84885,2.1693 -0.84886,0.80626 -2.32751,0.80626 v 0 q -1.29001,0 -2.06585,-0.58112 -0.77583,-0.58112 -0.95838,-1.6825 v 0 l 1.70988,-0.13995 q 0.13387,0.54765 0.47462,0.79713 0.34076,0.24949 0.85799,0.24949 v 0 q 0.63892,0 1.01923,-0.4077 0.38031,-0.40769 0.38031,-1.1744 v 0 q 0,-0.67543 -0.35901,-1.08008 -0.35902,-0.40465 -1.00402,-0.40465 v 0 q -0.71195,0 -1.16223,0.55373 v 0 h -1.66729 l 0.29817,-4.825391 h 5.15397 v 1.27176 h -3.6023 l -0.13996,2.166251 q 0.62067,-0.54764 1.55167,-0.54764 v 0 q 1.22308,0 1.95632,0.76062 0.73324,0.76062 0.73324,2.06889 z"/> +</vector> diff --git a/core/res/res/drawable/ic_wifi_5_signal_1.xml b/core/res/res/drawable/ic_wifi_5_signal_1.xml new file mode 100644 index 000000000000..5ab3be132f45 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_5_signal_1.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="26dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="m 25.626571,16.969114 v 0 q 0,1.36304 -0.84885,2.1693 -0.84886,0.80626 -2.32751,0.80626 v 0 q -1.29001,0 -2.06585,-0.58112 -0.77583,-0.58112 -0.95838,-1.6825 v 0 l 1.70988,-0.13995 q 0.13387,0.54765 0.47462,0.79713 0.34076,0.24949 0.85799,0.24949 v 0 q 0.63892,0 1.01923,-0.4077 0.38031,-0.40769 0.38031,-1.1744 v 0 q 0,-0.67543 -0.35901,-1.08008 -0.35902,-0.40465 -1.00402,-0.40465 v 0 q -0.71195,0 -1.16223,0.55373 v 0 h -1.66729 l 0.29817,-4.825391 h 5.15397 v 1.27176 h -3.6023 l -0.13996,2.166251 q 0.62067,-0.54764 1.55167,-0.54764 v 0 q 1.22308,0 1.95632,0.76062 0.73324,0.76062 0.73324,2.06889 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 13.100543,2.0095112 c -4.75,0 -9.029999,2.078587 -12,5.388587 l 12,14.6005438 3.827446,-4.654892 a 7.7288136,8.3389834 0 0 1 -0.04484,-0.835598 7.7288136,8.3389834 0 0 1 0.460598,-2.816576 L 13.10054,18.860054 3.79891,7.5366842 c 2.57,-2.259999 5.88163,-3.529891 9.30163,-3.529891 3.42,0 6.731631,1.269892 9.301631,3.529891 l -1.247282,1.516305 a 7.7288136,8.3389834 0 0 1 3.305705,-0.876359 l 0.639947,-0.778532 c -2.97,-3.31 -7.250001,-5.388587 -12.000001,-5.388587 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 13.100543,13.300272 c -3.2,0 -5.2986406,1.799456 -5.4986408,1.899456 l 5.4986408,6.798914 4.043479,-4.997283 a 7.7288137,8.3389834 0 0 1 -0.06114,-0.933424 7.7288137,8.3389834 0 0 1 0.171196,-1.732337 c -0.961558,-0.505425 -2.35688,-1.035326 -4.153535,-1.035326 z"/> +</vector> diff --git a/core/res/res/drawable/ic_wifi_5_signal_2.xml b/core/res/res/drawable/ic_wifi_5_signal_2.xml new file mode 100644 index 000000000000..31f09222d13a --- /dev/null +++ b/core/res/res/drawable/ic_wifi_5_signal_2.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="26dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="m 25.626571,16.969114 v 0 q 0,1.36304 -0.84885,2.1693 -0.84886,0.80626 -2.32751,0.80626 v 0 q -1.29001,0 -2.06585,-0.58112 -0.77583,-0.58112 -0.95838,-1.6825 v 0 l 1.70988,-0.13995 q 0.13387,0.54765 0.47462,0.79713 0.34076,0.24949 0.85799,0.24949 v 0 q 0.63892,0 1.01923,-0.4077 0.38031,-0.40769 0.38031,-1.1744 v 0 q 0,-0.67543 -0.35901,-1.08008 -0.35902,-0.40465 -1.00402,-0.40465 v 0 q -0.71195,0 -1.16223,0.55373 v 0 h -1.66729 l 0.29817,-4.825391 h 5.15397 v 1.27176 h -3.6023 l -0.13996,2.166251 q 0.62067,-0.54764 1.55167,-0.54764 v 0 q 1.22308,0 1.95632,0.76062 0.73324,0.76062 0.73324,2.06889 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 12.998641,2.0095112 c -4.75,0 -9.029999,2.078587 -12,5.388587 l 12,14.6005438 3.827446,-4.654892 a 7.7288136,8.3389834 0 0 1 -0.04484,-0.835598 7.7288136,8.3389834 0 0 1 0.460598,-2.816576 L 12.998638,18.860054 3.697008,7.5366842 c 2.57,-2.259999 5.88163,-3.529891 9.30163,-3.529891 3.42,0 6.731631,1.269892 9.301631,3.529891 l -1.247282,1.516305 a 7.7288136,8.3389834 0 0 1 3.305705,-0.876359 l 0.639947,-0.778532 c -2.97,-3.31 -7.250001,-5.388587 -12.000001,-5.388587 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 12.998641,9.998641 c -4.3999993,0 -7.297826,2.402446 -7.597826,2.702446 l 7.597826,9.297555 4.133152,-5.111414 a 7.7288137,8.3389834 0 0 1 -0.04891,-0.847826 7.7288137,8.3389834 0 0 1 1.377718,-4.744565 C 17.138647,10.644289 15.284639,9.998641 12.998644,9.998641 Z"/> +</vector> diff --git a/core/res/res/drawable/ic_wifi_5_signal_3.xml b/core/res/res/drawable/ic_wifi_5_signal_3.xml new file mode 100644 index 000000000000..706af960fc2b --- /dev/null +++ b/core/res/res/drawable/ic_wifi_5_signal_3.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="26dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="m 25.626571,16.969114 v 0 q 0,1.36304 -0.84885,2.1693 -0.84886,0.80626 -2.32751,0.80626 v 0 q -1.29001,0 -2.06585,-0.58112 -0.77583,-0.58112 -0.95838,-1.6825 v 0 l 1.70988,-0.13995 q 0.13387,0.54765 0.47462,0.79713 0.34076,0.24949 0.85799,0.24949 v 0 q 0.63892,0 1.01923,-0.4077 0.38031,-0.40769 0.38031,-1.1744 v 0 q 0,-0.67543 -0.35901,-1.08008 -0.35902,-0.40465 -1.00402,-0.40465 v 0 q -0.71195,0 -1.16223,0.55373 v 0 h -1.66729 l 0.29817,-4.825391 h 5.15397 v 1.27176 h -3.6023 l -0.13996,2.166251 q 0.62067,-0.54764 1.55167,-0.54764 v 0 q 1.22308,0 1.95632,0.76062 0.73324,0.76062 0.73324,2.06889 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 12.998641,7.398098 c -5.3000001,0 -8.8997284,3.003804 -9.1997284,3.203804 l 9.1997284,11.39674 4.03125,-4.997283 A 7.7288137,8.3389834 0 0 1 16.968751,16.039402 7.7288137,8.3389834 0 0 1 20.164403,9.30163 C 18.559413,8.406307 16.154773,7.398098 12.998641,7.398098 Z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 12.998641,2.0095112 c -4.75,0 -9.029999,2.078587 -12,5.388587 l 12,14.6005438 3.827446,-4.654892 a 7.7288136,8.3389834 0 0 1 -0.04484,-0.835598 7.7288136,8.3389834 0 0 1 0.460598,-2.816576 L 12.998638,18.860054 3.697008,7.5366842 c 2.57,-2.259999 5.88163,-3.529891 9.30163,-3.529891 3.42,0 6.731631,1.269892 9.301631,3.529891 l -1.247282,1.516305 a 7.7288136,8.3389834 0 0 1 3.305705,-0.876359 l 0.639947,-0.778532 c -2.97,-3.31 -7.250001,-5.388587 -12.000001,-5.388587 z"/> +</vector> diff --git a/core/res/res/drawable/ic_wifi_5_signal_4.xml b/core/res/res/drawable/ic_wifi_5_signal_4.xml new file mode 100644 index 000000000000..6997bbe202b4 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_5_signal_4.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="26dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="m 25.626571,16.969114 v 0 q 0,1.36304 -0.84885,2.1693 -0.84886,0.80626 -2.32751,0.80626 v 0 q -1.29001,0 -2.06585,-0.58112 -0.77583,-0.58112 -0.95838,-1.6825 v 0 l 1.70988,-0.13995 q 0.13387,0.54765 0.47462,0.79713 0.34076,0.24949 0.85799,0.24949 v 0 q 0.63892,0 1.01923,-0.4077 0.38031,-0.40769 0.38031,-1.1744 v 0 q 0,-0.67543 -0.35901,-1.08008 -0.35902,-0.40465 -1.00402,-0.40465 v 0 q -0.71195,0 -1.16223,0.55373 v 0 h -1.66729 l 0.29817,-4.825391 h 5.15397 v 1.27176 h -3.6023 l -0.13996,2.166251 q 0.62067,-0.54764 1.55167,-0.54764 v 0 q 1.22308,0 1.95632,0.76062 0.73324,0.76062 0.73324,2.06889 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 12.998641,2.099185 c -7.3000003,0 -12.0991851,4.002174 -12.59918509,4.402174 L 12.998641,21.998642 16.944293,17.148098 a 7.7288137,8.3389834 0 0 1 -0.06114,-0.978261 7.7288137,8.3389834 0 0 1 7.634511,-8.335597 l 1.084238,-1.332881 c -0.499999,-0.4 -5.303261,-4.402174 -12.603261,-4.402174 z"/> +</vector> diff --git a/core/res/res/drawable/ic_wifi_6_signal_0.xml b/core/res/res/drawable/ic_wifi_6_signal_0.xml new file mode 100644 index 000000000000..0d24f5b5251a --- /dev/null +++ b/core/res/res/drawable/ic_wifi_6_signal_0.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="26dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="M 12,2.001359 C 7.2499999,2.001359 2.9699999,4.079946 -1.25e-7,7.389946 L 12,21.998641 15.048913,18.289401 A 6.2033902,6.4067802 0 0 1 14.192935,16.186142 L 12,18.851901 2.6983696,7.528533 C 5.2683695,5.268533 8.5799999,3.998641 12,3.998641 c 3.42,0 6.73163,1.269892 9.30163,3.529892 l -0.709239,0.86413 a 6.2033902,6.4067802 0 0 1 2.148097,0.529891 L 24,7.389946 c -2.97,-3.31 -7.25,-5.388587 -12,-5.388587 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 25.217756,16.274066 v 0 q 0,1.31751 -0.814213,2.067022 -0.814212,0.749513 -2.248777,0.749513 v 0 q -1.609039,0 -2.471717,-1.0218 Q 18.820372,17.047 18.820372,15.038537 v 0 q 0,-2.207557 0.875601,-3.323047 Q 20.571575,10.6 22.2,10.6 v 0 q 1.156698,0 1.825516,0.462592 0.668817,0.462591 0.946684,1.434619 v 0 l -1.712431,0.216656 Q 23.014213,11.89994 22.161228,11.89994 v 0 q -0.730207,0 -1.147005,0.661682 -0.4168,0.661682 -0.4168,2.008467 v 0 q 0.29079,-0.439168 0.807751,-0.673393 0.51696,-0.234223 1.169623,-0.234223 v 0 q 1.221318,0 1.932139,0.702671 0.71082,0.702671 0.71082,1.908922 z m -1.822285,0.04685 v 0 q 0,-0.70267 -0.358641,-1.0745 -0.358642,-0.37183 -0.985456,-0.37183 v 0 q -0.600966,0 -0.962838,0.348408 -0.361873,0.348407 -0.361873,0.922255 v 0 q 0,0.720242 0.378028,1.191617 0.378026,0.471375 0.991917,0.471375 v 0 q 0.61389,0 0.956377,-0.395255 0.342486,-0.395254 0.342486,-1.09207 z"/> +</vector> diff --git a/core/res/res/drawable/ic_wifi_6_signal_1.xml b/core/res/res/drawable/ic_wifi_6_signal_1.xml new file mode 100644 index 000000000000..6c580ee4574f --- /dev/null +++ b/core/res/res/drawable/ic_wifi_6_signal_1.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="26dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="m 25.217756,16.274066 v 0 q 0,1.31751 -0.814213,2.067022 -0.814212,0.749513 -2.248777,0.749513 v 0 q -1.609039,0 -2.471717,-1.0218 Q 18.820372,17.047 18.820372,15.038537 v 0 q 0,-2.207557 0.875601,-3.323047 Q 20.571575,10.6 22.2,10.6 v 0 q 1.156698,0 1.825516,0.462592 0.668817,0.462591 0.946684,1.434619 v 0 l -1.712431,0.216656 Q 23.014213,11.89994 22.161228,11.89994 v 0 q -0.730207,0 -1.147005,0.661682 -0.4168,0.661682 -0.4168,2.008467 v 0 q 0.29079,-0.439168 0.807751,-0.673393 0.51696,-0.234223 1.169623,-0.234223 v 0 q 1.221318,0 1.932139,0.702671 0.71082,0.702671 0.71082,1.908922 z m -1.822285,0.04685 v 0 q 0,-0.70267 -0.358641,-1.0745 -0.358642,-0.37183 -0.985456,-0.37183 v 0 q -0.600966,0 -0.962838,0.348408 -0.361873,0.348407 -0.361873,0.922255 v 0 q 0,0.720242 0.378028,1.191617 0.378026,0.471375 0.991917,0.471375 v 0 q 0.61389,0 0.956377,-0.395255 0.342486,-0.395254 0.342486,-1.09207 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 13.100543,2.0095112 c -4.75,0 -9.029999,2.078587 -12,5.388587 l 12,14.6005438 3.827446,-4.654892 a 7.7288136,8.3389834 0 0 1 -0.04484,-0.835598 7.7288136,8.3389834 0 0 1 0.460598,-2.816576 L 13.10054,18.860054 3.79891,7.5366842 c 2.57,-2.259999 5.88163,-3.529891 9.30163,-3.529891 3.42,0 6.731631,1.269892 9.301631,3.529891 l -1.247282,1.516305 a 7.7288136,8.3389834 0 0 1 3.305705,-0.876359 l 0.639947,-0.778532 c -2.97,-3.31 -7.250001,-5.388587 -12.000001,-5.388587 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 13.100543,13.300272 c -3.2,0 -5.2986406,1.799456 -5.4986408,1.899456 l 5.4986408,6.798914 4.043479,-4.997283 a 7.7288137,8.3389834 0 0 1 -0.06114,-0.933424 7.7288137,8.3389834 0 0 1 0.171196,-1.732337 c -0.961558,-0.505425 -2.35688,-1.035326 -4.153535,-1.035326 z"/> +</vector> diff --git a/core/res/res/drawable/ic_wifi_6_signal_2.xml b/core/res/res/drawable/ic_wifi_6_signal_2.xml new file mode 100644 index 000000000000..345b89824d84 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_6_signal_2.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="26dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="m 25.217756,16.274066 v 0 q 0,1.31751 -0.814213,2.067022 -0.814212,0.749513 -2.248777,0.749513 v 0 q -1.609039,0 -2.471717,-1.0218 Q 18.820372,17.047 18.820372,15.038537 v 0 q 0,-2.207557 0.875601,-3.323047 Q 20.571575,10.6 22.2,10.6 v 0 q 1.156698,0 1.825516,0.462592 0.668817,0.462591 0.946684,1.434619 v 0 l -1.712431,0.216656 Q 23.014213,11.89994 22.161228,11.89994 v 0 q -0.730207,0 -1.147005,0.661682 -0.4168,0.661682 -0.4168,2.008467 v 0 q 0.29079,-0.439168 0.807751,-0.673393 0.51696,-0.234223 1.169623,-0.234223 v 0 q 1.221318,0 1.932139,0.702671 0.71082,0.702671 0.71082,1.908922 z m -1.822285,0.04685 v 0 q 0,-0.70267 -0.358641,-1.0745 -0.358642,-0.37183 -0.985456,-0.37183 v 0 q -0.600966,0 -0.962838,0.348408 -0.361873,0.348407 -0.361873,0.922255 v 0 q 0,0.720242 0.378028,1.191617 0.378026,0.471375 0.991917,0.471375 v 0 q 0.61389,0 0.956377,-0.395255 0.342486,-0.395254 0.342486,-1.09207 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 12.998641,2.0095112 c -4.75,0 -9.029999,2.078587 -12,5.388587 l 12,14.6005438 3.827446,-4.654892 a 7.7288136,8.3389834 0 0 1 -0.04484,-0.835598 7.7288136,8.3389834 0 0 1 0.460598,-2.816576 L 12.998638,18.860054 3.697008,7.5366842 c 2.57,-2.259999 5.88163,-3.529891 9.30163,-3.529891 3.42,0 6.731631,1.269892 9.301631,3.529891 l -1.247282,1.516305 a 7.7288136,8.3389834 0 0 1 3.305705,-0.876359 l 0.639947,-0.778532 c -2.97,-3.31 -7.250001,-5.388587 -12.000001,-5.388587 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 12.998641,9.998641 c -4.3999993,0 -7.297826,2.402446 -7.597826,2.702446 l 7.597826,9.297555 4.133152,-5.111414 a 7.7288137,8.3389834 0 0 1 -0.04891,-0.847826 7.7288137,8.3389834 0 0 1 1.377718,-4.744565 C 17.138647,10.644289 15.284639,9.998641 12.998644,9.998641 Z"/> +</vector> diff --git a/core/res/res/drawable/ic_wifi_6_signal_3.xml b/core/res/res/drawable/ic_wifi_6_signal_3.xml new file mode 100644 index 000000000000..3eda6ff9407e --- /dev/null +++ b/core/res/res/drawable/ic_wifi_6_signal_3.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="26dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="m 25.217756,16.274066 v 0 q 0,1.31751 -0.814213,2.067022 -0.814212,0.749513 -2.248777,0.749513 v 0 q -1.609039,0 -2.471717,-1.0218 Q 18.820372,17.047 18.820372,15.038537 v 0 q 0,-2.207557 0.875601,-3.323047 Q 20.571575,10.6 22.2,10.6 v 0 q 1.156698,0 1.825516,0.462592 0.668817,0.462591 0.946684,1.434619 v 0 l -1.712431,0.216656 Q 23.014213,11.89994 22.161228,11.89994 v 0 q -0.730207,0 -1.147005,0.661682 -0.4168,0.661682 -0.4168,2.008467 v 0 q 0.29079,-0.439168 0.807751,-0.673393 0.51696,-0.234223 1.169623,-0.234223 v 0 q 1.221318,0 1.932139,0.702671 0.71082,0.702671 0.71082,1.908922 z m -1.822285,0.04685 v 0 q 0,-0.70267 -0.358641,-1.0745 -0.358642,-0.37183 -0.985456,-0.37183 v 0 q -0.600966,0 -0.962838,0.348408 -0.361873,0.348407 -0.361873,0.922255 v 0 q 0,0.720242 0.378028,1.191617 0.378026,0.471375 0.991917,0.471375 v 0 q 0.61389,0 0.956377,-0.395255 0.342486,-0.395254 0.342486,-1.09207 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 12.998641,7.398098 c -5.3000001,0 -8.8997284,3.003804 -9.1997284,3.203804 l 9.1997284,11.39674 4.03125,-4.997283 A 7.7288137,8.3389834 0 0 1 16.968751,16.039402 7.7288137,8.3389834 0 0 1 20.164403,9.30163 C 18.559413,8.406307 16.154773,7.398098 12.998641,7.398098 Z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 12.998641,2.0095112 c -4.75,0 -9.029999,2.078587 -12,5.388587 l 12,14.6005438 3.827446,-4.654892 a 7.7288136,8.3389834 0 0 1 -0.04484,-0.835598 7.7288136,8.3389834 0 0 1 0.460598,-2.816576 L 12.998638,18.860054 3.697008,7.5366842 c 2.57,-2.259999 5.88163,-3.529891 9.30163,-3.529891 3.42,0 6.731631,1.269892 9.301631,3.529891 l -1.247282,1.516305 a 7.7288136,8.3389834 0 0 1 3.305705,-0.876359 l 0.639947,-0.778532 c -2.97,-3.31 -7.250001,-5.388587 -12.000001,-5.388587 z"/> +</vector> diff --git a/core/res/res/drawable/ic_wifi_6_signal_4.xml b/core/res/res/drawable/ic_wifi_6_signal_4.xml new file mode 100644 index 000000000000..dc9ff4eb70b6 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_6_signal_4.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="26dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:pathData="m 25.217756,16.274066 v 0 q 0,1.31751 -0.814213,2.067022 -0.814212,0.749513 -2.248777,0.749513 v 0 q -1.609039,0 -2.471717,-1.0218 Q 18.820372,17.047 18.820372,15.038537 v 0 q 0,-2.207557 0.875601,-3.323047 Q 20.571575,10.6 22.2,10.6 v 0 q 1.156698,0 1.825516,0.462592 0.668817,0.462591 0.946684,1.434619 v 0 l -1.712431,0.216656 Q 23.014213,11.89994 22.161228,11.89994 v 0 q -0.730207,0 -1.147005,0.661682 -0.4168,0.661682 -0.4168,2.008467 v 0 q 0.29079,-0.439168 0.807751,-0.673393 0.51696,-0.234223 1.169623,-0.234223 v 0 q 1.221318,0 1.932139,0.702671 0.71082,0.702671 0.71082,1.908922 z m -1.822285,0.04685 v 0 q 0,-0.70267 -0.358641,-1.0745 -0.358642,-0.37183 -0.985456,-0.37183 v 0 q -0.600966,0 -0.962838,0.348408 -0.361873,0.348407 -0.361873,0.922255 v 0 q 0,0.720242 0.378028,1.191617 0.378026,0.471375 0.991917,0.471375 v 0 q 0.61389,0 0.956377,-0.395255 0.342486,-0.395254 0.342486,-1.09207 z"/> + <path + android:fillColor="@android:color/white" + android:pathData="m 12.998641,2.099185 c -7.3000003,0 -12.0991851,4.002174 -12.59918509,4.402174 L 12.998641,21.998642 16.944293,17.148098 a 7.7288137,8.3389834 0 0 1 -0.06114,-0.978261 7.7288137,8.3389834 0 0 1 7.634511,-8.335597 l 1.084238,-1.332881 c -0.499999,-0.4 -5.303261,-4.402174 -12.603261,-4.402174 z"/> +</vector> diff --git a/core/res/res/drawable/ic_wifi_7_signal_0.xml b/core/res/res/drawable/ic_wifi_7_signal_0.xml new file mode 100644 index 000000000000..d9dad63a6348 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_7_signal_0.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="26dp"
+ android:height="24dp"
+ android:viewportWidth="26"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="M 12,2.001359 C 7.2499999,2.001359 2.9699999,4.079946 -1.25e-7,7.389946 L 12,21.998641 15.048913,18.289401 A 6.2033902,6.4067802 0 0 1 14.192935,16.186142 L 12,18.851901 2.6983696,7.528533 C 5.2683695,5.268533 8.5799999,3.998641 12,3.998641 c 3.42,0 6.73163,1.269892 9.30163,3.529892 l -0.709239,0.86413 a 6.2033902,6.4067802 0 0 1 2.148097,0.529891 L 24,7.389946 c -2.97,-3.31 -7.25,-5.388587 -12,-5.388587 z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m25.469,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"/>
+</vector>
diff --git a/core/res/res/drawable/ic_wifi_7_signal_1.xml b/core/res/res/drawable/ic_wifi_7_signal_1.xml new file mode 100644 index 000000000000..9b2ce6f326b2 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_7_signal_1.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="26dp"
+ android:height="24dp"
+ android:viewportWidth="26"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m25.469,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m 13.100543,2.0095112 c -4.75,0 -9.029999,2.078587 -12,5.388587 l 12,14.6005438 3.827446,-4.654892 a 7.7288136,8.3389834 0 0 1 -0.04484,-0.835598 7.7288136,8.3389834 0 0 1 0.460598,-2.816576 L 13.10054,18.860054 3.79891,7.5366842 c 2.57,-2.259999 5.88163,-3.529891 9.30163,-3.529891 3.42,0 6.731631,1.269892 9.301631,3.529891 l -1.247282,1.516305 a 7.7288136,8.3389834 0 0 1 3.305705,-0.876359 l 0.639947,-0.778532 c -2.97,-3.31 -7.250001,-5.388587 -12.000001,-5.388587 z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m 13.100543,13.300272 c -3.2,0 -5.2986406,1.799456 -5.4986408,1.899456 l 5.4986408,6.798914 4.043479,-4.997283 a 7.7288137,8.3389834 0 0 1 -0.06114,-0.933424 7.7288137,8.3389834 0 0 1 0.171196,-1.732337 c -0.961558,-0.505425 -2.35688,-1.035326 -4.153535,-1.035326 z"/>
+</vector>
diff --git a/core/res/res/drawable/ic_wifi_7_signal_2.xml b/core/res/res/drawable/ic_wifi_7_signal_2.xml new file mode 100644 index 000000000000..f9a961171e81 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_7_signal_2.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="26dp"
+ android:height="24dp"
+ android:viewportWidth="26"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m25.469,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m 12.998641,2.0095112 c -4.75,0 -9.029999,2.078587 -12,5.388587 l 12,14.6005438 3.827446,-4.654892 a 7.7288136,8.3389834 0 0 1 -0.04484,-0.835598 7.7288136,8.3389834 0 0 1 0.460598,-2.816576 L 12.998638,18.860054 3.697008,7.5366842 c 2.57,-2.259999 5.88163,-3.529891 9.30163,-3.529891 3.42,0 6.731631,1.269892 9.301631,3.529891 l -1.247282,1.516305 a 7.7288136,8.3389834 0 0 1 3.305705,-0.876359 l 0.639947,-0.778532 c -2.97,-3.31 -7.250001,-5.388587 -12.000001,-5.388587 z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m 12.998641,9.998641 c -4.3999993,0 -7.297826,2.402446 -7.597826,2.702446 l 7.597826,9.297555 4.133152,-5.111414 a 7.7288137,8.3389834 0 0 1 -0.04891,-0.847826 7.7288137,8.3389834 0 0 1 1.377718,-4.744565 C 17.138647,10.644289 15.284639,9.998641 12.998644,9.998641 Z"/>
+</vector>
diff --git a/core/res/res/drawable/ic_wifi_7_signal_3.xml b/core/res/res/drawable/ic_wifi_7_signal_3.xml new file mode 100644 index 000000000000..f2b1e49775fc --- /dev/null +++ b/core/res/res/drawable/ic_wifi_7_signal_3.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="26dp"
+ android:height="24dp"
+ android:viewportWidth="26"
+ android:viewportHeight="24">
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m25.469,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m 12.998641,7.398098 c -5.3000001,0 -8.8997284,3.003804 -9.1997284,3.203804 l 9.1997284,11.39674 4.03125,-4.997283 A 7.7288137,8.3389834 0 0 1 16.968751,16.039402 7.7288137,8.3389834 0 0 1 20.164403,9.30163 C 18.559413,8.406307 16.154773,7.398098 12.998641,7.398098 Z"/>
+ <path
+ android:fillColor="@android:color/white"
+ android:pathData="m 12.998641,2.0095112 c -4.75,0 -9.029999,2.078587 -12,5.388587 l 12,14.6005438 3.827446,-4.654892 a 7.7288136,8.3389834 0 0 1 -0.04484,-0.835598 7.7288136,8.3389834 0 0 1 0.460598,-2.816576 L 12.998638,18.860054 3.697008,7.5366842 c 2.57,-2.259999 5.88163,-3.529891 9.30163,-3.529891 3.42,0 6.731631,1.269892 9.301631,3.529891 l -1.247282,1.516305 a 7.7288136,8.3389834 0 0 1 3.305705,-0.876359 l 0.639947,-0.778532 c -2.97,-3.31 -7.250001,-5.388587 -12.000001,-5.388587 z"/>
+</vector>
diff --git a/core/res/res/drawable/ic_wifi_7_signal_4.xml b/core/res/res/drawable/ic_wifi_7_signal_4.xml new file mode 100644 index 000000000000..1d6c748df4a2 --- /dev/null +++ b/core/res/res/drawable/ic_wifi_7_signal_4.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="26dp"
+ android:height="24dp"
+ android:viewportWidth="26"
+ android:viewportHeight="24">
+ <path
+ android:pathData="m 12.998641,2.099185 c -7.3000003,0 -12.0991851,4.002174 -12.59918509,4.402174 L 12.998641,21.998642 16.944293,17.148098 a 7.7288137,8.3389834 0 0 1 -0.06114,-0.978261 7.7288137,8.3389834 0 0 1 7.634511,-8.335597 l 1.084238,-1.332881 c -0.499999,-0.4 -5.303261,-4.402174 -12.603261,-4.402174 z"
+ android:fillColor="#FFFFFF"/>
+ <path
+ android:pathData="m25.469,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"
+ android:fillColor="#FFFFFF"/>
+</vector>
diff --git a/core/res/res/values/bools.xml b/core/res/res/values/bools.xml index fe296c704095..7015ed16be14 100644 --- a/core/res/res/values/bools.xml +++ b/core/res/res/values/bools.xml @@ -30,4 +30,5 @@ lockscreen, setting this to true should come with customized drawables. --> <bool name="use_lock_pattern_drawable">false</bool> <bool name="resolver_landscape_phone">true</bool> + <bool name="config_wifi_dual_sap_mode_enabled">true</bool> </resources> diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml index e67ea82cb6da..fc651d0fac38 100644 --- a/core/res/res/values/colors.xml +++ b/core/res/res/values/colors.xml @@ -242,37 +242,37 @@ <color name="system_accent1_0">#ffffff</color> <!-- Shade of the accent system color at 99% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent1_10">#F9FCFF</color> + <color name="system_accent1_10">#F1FFFC</color> <!-- Shade of the accent system color at 95% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent1_50">#E0F3FF</color> + <color name="system_accent1_50">#9CFFF2</color> <!-- Shade of the accent system color at 90% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent1_100">#C1E8FF</color> + <color name="system_accent1_100">#8DF5E3</color> <!-- Shade of the accent system color at 80% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent1_200">#76D1FF</color> + <color name="system_accent1_200">#71D8C7</color> <!-- Shade of the accent system color at 70% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent1_300">#4BB6E8</color> + <color name="system_accent1_300">#53BCAC</color> <!-- Shade of the accent system color at 60% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent1_400">#219BCC</color> - <!-- Shade of the accent system color at 49.6% perceptual luminance (L* in L*a*b* color space). + <color name="system_accent1_400">#34A192</color> + <!-- Shade of the accent system color at 49% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent1_500">#007FAC</color> + <color name="system_accent1_500">#008375</color> <!-- Shade of the accent system color at 40% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent1_600">#00668B</color> + <color name="system_accent1_600">#006C5F</color> <!-- Shade of the accent system color at 30% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent1_700">#004C69</color> + <color name="system_accent1_700">#005747</color> <!-- Shade of the accent system color at 20% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent1_800">#003549</color> + <color name="system_accent1_800">#003E31</color> <!-- Shade of the accent system color at 10% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent1_900">#001E2C</color> + <color name="system_accent1_900">#002214</color> <!-- Darkest shade of the accent color used by the system. Black. This value can be overlaid at runtime by OverlayManager RROs. --> <color name="system_accent1_1000">#000000</color> @@ -282,37 +282,37 @@ <color name="system_accent2_0">#ffffff</color> <!-- Shade of the secondary accent system color at 99% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent2_10">#F9FCFF</color> + <color name="system_accent2_10">#F0FFFC</color> <!-- Shade of the secondary accent system color at 95% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent2_50">#E0F3FF</color> + <color name="system_accent2_50">#CDFAF1</color> <!-- Shade of the secondary accent system color at 90% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent2_100">#D1E5F4</color> + <color name="system_accent2_100">#BFEBE3</color> <!-- Shade of the secondary accent system color at 80% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent2_200">#B5CAD7</color> + <color name="system_accent2_200">#A4CFC7</color> <!-- Shade of the secondary accent system color at 70% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent2_300">#9AAEBB</color> + <color name="system_accent2_300">#89B4AC</color> <!-- Shade of the secondary accent system color at 60% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent2_400">#8094A0</color> - <!-- Shade of the secondary accent system color at 49.6% perceptual luminance (L* in L*a*b* color space). - This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent2_500">#657985</color> + <color name="system_accent2_400">#6F9991</color> + <!-- Shade of the secondary accent system color at 49% perceptual luminance + (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> + <color name="system_accent2_500">#537C75</color> <!-- Shade of the secondary accent system color at 40% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent2_600">#4E616C</color> + <color name="system_accent2_600">#3D665F</color> <!-- Shade of the secondary accent system color at 30% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent2_700">#374955</color> + <color name="system_accent2_700">#254E47</color> <!-- Shade of the secondary accent system color at 20% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent2_800">#20333D</color> + <color name="system_accent2_800">#0C3731</color> <!-- Shade of the secondary accent system color at 10% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent2_900">#091E28</color> + <color name="system_accent2_900">#00211C</color> <!-- Darkest shade of the secondary accent color used by the system. Black. This value can be overlaid at runtime by OverlayManager RROs. --> <color name="system_accent2_1000">#000000</color> @@ -325,34 +325,34 @@ <color name="system_accent3_10">#FFFBFF</color> <!-- Shade of the tertiary accent system color at 95% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent3_50">#F5EEFF</color> + <color name="system_accent3_50">#F9EAFF</color> <!-- Shade of the tertiary accent system color at 90% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent3_100">#E6DEFF</color> + <color name="system_accent3_100">#ECDBFF</color> <!-- Shade of the tertiary accent system color at 80% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent3_200">#CAC1EA</color> + <color name="system_accent3_200">#CFBFEB</color> <!-- Shade of the tertiary accent system color at 70% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent3_300">#AEA6CE</color> + <color name="system_accent3_300">#B3A4CF</color> <!-- Shade of the tertiary accent system color at 60% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent3_400">#938CB1</color> + <color name="system_accent3_400">#988AB3</color> <!-- Shade of the tertiary accent system color at 49% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent3_500">#787296</color> + <color name="system_accent3_500">#7B6E96</color> <!-- Shade of the tertiary accent system color at 40% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent3_600">#605A7C</color> + <color name="system_accent3_600">#64587F</color> <!-- Shade of the tertiary accent system color at 30% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent3_700">#484264</color> + <color name="system_accent3_700">#4C4165</color> <!-- Shade of the tertiary accent system color at 20% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent3_800">#322C4C</color> + <color name="system_accent3_800">#352B4D</color> <!-- Shade of the tertiary accent system color at 10% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_accent3_900">#1D1736</color> + <color name="system_accent3_900">#1E1636</color> <!-- Darkest shade of the tertiary accent color used by the system. Black. This value can be overlaid at runtime by OverlayManager RROs. --> <color name="system_accent3_1000">#000000</color> @@ -362,37 +362,37 @@ <color name="system_neutral1_0">#ffffff</color> <!-- Shade of the neutral system color at 99% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral1_10">#FCFCFF</color> + <color name="system_neutral1_10">#fbfbfb</color> <!-- Shade of the neutral system color at 95% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral1_50">#F0F0F3</color> + <color name="system_neutral1_50">#f0f0f0</color> <!-- Shade of the neutral system color at 90% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral1_100">#E1E3E5</color> + <color name="system_neutral1_100">#e2e2e2</color> <!-- Shade of the neutral system color at 80% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral1_200">#C5C7C9</color> + <color name="system_neutral1_200">#c6c6c6</color> <!-- Shade of the neutral system color at 70% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral1_300">#AAABAE</color> + <color name="system_neutral1_300">#ababab</color> <!-- Shade of the neutral system color at 60% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral1_400">#8F9193</color> + <color name="system_neutral1_400">#909090</color> <!-- Shade of the neutral system color at 49% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral1_500">#747679</color> + <color name="system_neutral1_500">#757575</color> <!-- Shade of the neutral system color at 40% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral1_600">#5C5F61</color> + <color name="system_neutral1_600">#5e5e5e</color> <!-- Shade of the neutral system color at 30% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral1_700">#454749</color> + <color name="system_neutral1_700">#464646</color> <!-- Shade of the neutral system color at 20% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral1_800">#2E3133</color> + <color name="system_neutral1_800">#303030</color> <!-- Shade of the neutral system color at 10% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral1_900">#191C1E</color> + <color name="system_neutral1_900">#1b1b1b</color> <!-- Darkest shade of the neutral color used by the system. Black. This value can be overlaid at runtime by OverlayManager RROs. --> <color name="system_neutral1_1000">#000000</color> @@ -402,37 +402,37 @@ <color name="system_neutral2_0">#ffffff</color> <!-- Shade of the secondary neutral system color at 99% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral2_10">#F9FCFF</color> + <color name="system_neutral2_10">#fbfbfb</color> <!-- Shade of the secondary neutral system color at 95% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral2_50">#EBF1F8</color> + <color name="system_neutral2_50">#f0f0f0</color> <!-- Shade of the secondary neutral system color at 90% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral2_100">#DCE3E9</color> + <color name="system_neutral2_100">#e2e2e2</color> <!-- Shade of the secondary neutral system color at 80% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral2_200">#C0C7CD</color> + <color name="system_neutral2_200">#c6c6c6</color> <!-- Shade of the secondary neutral system color at 70% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral2_300">#A5ACB2</color> + <color name="system_neutral2_300">#ababab</color> <!-- Shade of the secondary neutral system color at 60% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral2_400">#8A9297</color> + <color name="system_neutral2_400">#909090</color> <!-- Shade of the secondary neutral system color at 49% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral2_500">#70777C</color> + <color name="system_neutral2_500">#757575</color> <!-- Shade of the secondary neutral system color at 40% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral2_600">#585F65</color> + <color name="system_neutral2_600">#5e5e5e</color> <!-- Shade of the secondary neutral system color at 30% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral2_700">#40484D</color> + <color name="system_neutral2_700">#464646</color> <!-- Shade of the secondary neutral system color at 20% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral2_800">#2A3136</color> + <color name="system_neutral2_800">#303030</color> <!-- Shade of the secondary neutral system color at 10% perceptual luminance (L* in L*a*b* color space). This value can be overlaid at runtime by OverlayManager RROs. --> - <color name="system_neutral2_900">#161C20</color> + <color name="system_neutral2_900">#1b1b1b</color> <!-- Darkest shade of the secondary neutral color used by the system. Black. This value can be overlaid at runtime by OverlayManager RROs. --> <color name="system_neutral2_1000">#000000</color> diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 70013911904e..4b6eaa86c701 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -79,7 +79,7 @@ <string translatable="false" name="status_bar_tty">tty</string> <string translatable="false" name="status_bar_speakerphone">speakerphone</string> <string translatable="false" name="status_bar_zen">zen</string> - <string translatable="false" name="status_bar_mute">mute</string> + <string translatable="false" name="status_bar_mute">status_bar_mute</string> <string translatable="false" name="status_bar_volume">volume</string> <string translatable="false" name="status_bar_wifi">wifi</string> <string translatable="false" name="status_bar_cdma_eri">cdma_eri</string> @@ -1022,7 +1022,7 @@ requires swapping ROTATION_90 and ROTATION_270. TODO(b/265991392): This should eventually be configured and parsed in display_settings.xml --> - <bool name="config_matchSecondaryInternalDisplaysOrientationToReverseDefaultDisplay">true</bool> + <bool name="config_matchSecondaryInternalDisplaysOrientationToReverseDefaultDisplay">false</bool> <!-- Indicate available ColorDisplayManager.COLOR_MODE_xxx. --> <integer-array name="config_availableColorModes"> @@ -2028,6 +2028,9 @@ <!-- Integer to set a max latency the accelerometer will batch sensor requests with. --> <integer name="config_flipToScreenOffMaxLatencyMicros">2000000</integer> + <!-- Component name of the combo network location provider. --> + <string name="config_comboNetworkLocationProvider" translatable="false">com.qualcomm.location</string> + <!-- Note: This config is deprecated Boolean indicating if current platform supports bluetooth SCO for off call use cases @@ -3508,6 +3511,9 @@ <!-- Flag indicating which package name can access DeviceConfig table --> <string name="config_deviceConfiguratorPackageName" translatable="false"></string> + <!-- Define optional package verifier name --> + <string name="config_optionalPackageVerifierName" translatable="false"></string> + <!-- Flag indicating apps will skip sending hold request before merge. In this case IMS service implementation will do both.i.e.hold followed by merge. --> <bool name="skipHoldBeforeMerge">true</bool> @@ -4754,6 +4760,15 @@ <!-- Package name for ManagedProvisioning which is responsible for provisioning work profiles. --> <string name="config_managed_provisioning_package" translatable="false">com.android.managedprovisioning</string> + <!-- The duration (in milliseconds) for the outgoing sms authorization request to timeout.--> + <integer name="config_sms_authorization_timeout_ms">0</integer> + + <!-- Enable sms authorization framework--> + <bool name="config_sms_authorization_enabled">false</bool> + + <!-- whether to enable primarycard --> + <bool name="config_primarycard">false</bool> + <!-- Whether or not swipe up gesture's opt-in setting is available on this device --> <bool name="config_swipe_up_gesture_setting_available">true</bool> @@ -4789,6 +4804,10 @@ <!-- Whether or not the "SMS app service" feature is enabled --> <bool name="config_useSmsAppService">true</bool> + <!-- List of names that represent dual SoftAp interfaces. --> + <string-array translatable="false" name="config_wifi_dual_sap_interfaces"> + </string-array> + <!-- Class name for the InputEvent compatibility processor override. Empty string means use the default compatibility processor (android.view.InputEventCompatProcessor). --> @@ -6422,11 +6441,16 @@ <item>@string/config_secondaryDisplayShape</item> </string-array> + <!-- Maximum time in millisecs for telephony should wait to deactivate data call + when user turned off mobile data or data roaming during CIWLAN --> + <integer name="config_maximumDelayTimeToDeactivateDataCall">7000</integer> + <!-- Certificate digests for trusted apps that will be allowed to obtain the knownSigner permission for staging HealthConnect's remote data. The digest should be computed over the DER encoding of the trusted certificate using the SHA-256 digest algorithm. --> <string-array name="config_healthConnectRestoreKnownSigners"> </string-array> + <!-- Certificate digests for trusted apps that will be allowed to obtain the knownSigner Health Connect Migration permissions. The digest should be computed over the DER encoding of the trusted certificate using the SHA-256 digest algorithm. --> diff --git a/core/res/res/values/config_telephony.xml b/core/res/res/values/config_telephony.xml index fd7418542a2b..5ca7e102126b 100644 --- a/core/res/res/values/config_telephony.xml +++ b/core/res/res/values/config_telephony.xml @@ -172,4 +172,8 @@ only single logical modem, by using its data connection in addition to cellular IMS. --> <bool name="config_enable_virtual_dsda">false</bool> <java-symbol type="bool" name="config_enable_virtual_dsda" /> + + <!-- To disable the AOSP DSDA logic and use only QTI specific logic--> + <bool name="config_disable_aosp_dsda_logic">true</bool> + <java-symbol type="bool" name="config_disable_aosp_dsda_logic" /> </resources> diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index a5b2b853fddd..7a20d3a8b9dc 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -365,6 +365,8 @@ <string name="wfc_mode_cellular_preferred_summary">Call over mobile network</string> <!-- WFC, summary for Wi-Fi Only --> <string name="wfc_mode_wifi_only_summary">Wi-Fi only</string> + <!-- WFC, summary for Ims Preferred --> + <string name="wfc_mode_ims_preferred_summary">Ims Preferred</string> <!-- Template for showing mobile network operator name while Cross SIM calling is active --> <string-array name="crossSimSpnFormats" translatable="false"> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 2425d367e1db..f17bd4ff0749 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -12,6 +12,10 @@ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. +** +** Changes from Qualcomm Innovation Center are provided under the following license: +** Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. +** SPDX-License-Identifier: BSD-3-Clause-Clear */ --> <resources> @@ -853,6 +857,7 @@ <java-symbol type="string" name="wifi_calling_off_summary" /> <java-symbol type="string" name="wfc_mode_wifi_preferred_summary" /> <java-symbol type="string" name="wfc_mode_cellular_preferred_summary" /> + <java-symbol type="string" name="wfc_mode_ims_preferred_summary" /> <java-symbol type="string" name="wfc_mode_wifi_only_summary" /> <java-symbol type="array" name="crossSimSpnFormats" /> <java-symbol type="string" name="policydesc_disableCamera" /> @@ -1348,6 +1353,26 @@ <java-symbol type="drawable" name="ic_wifi_signal_2" /> <java-symbol type="drawable" name="ic_wifi_signal_3" /> <java-symbol type="drawable" name="ic_wifi_signal_4" /> + <java-symbol type="drawable" name="ic_wifi_4_signal_0" /> + <java-symbol type="drawable" name="ic_wifi_4_signal_1" /> + <java-symbol type="drawable" name="ic_wifi_4_signal_2" /> + <java-symbol type="drawable" name="ic_wifi_4_signal_3" /> + <java-symbol type="drawable" name="ic_wifi_4_signal_4" /> + <java-symbol type="drawable" name="ic_wifi_5_signal_0" /> + <java-symbol type="drawable" name="ic_wifi_5_signal_1" /> + <java-symbol type="drawable" name="ic_wifi_5_signal_2" /> + <java-symbol type="drawable" name="ic_wifi_5_signal_3" /> + <java-symbol type="drawable" name="ic_wifi_5_signal_4" /> + <java-symbol type="drawable" name="ic_wifi_6_signal_0" /> + <java-symbol type="drawable" name="ic_wifi_6_signal_1" /> + <java-symbol type="drawable" name="ic_wifi_6_signal_2" /> + <java-symbol type="drawable" name="ic_wifi_6_signal_3" /> + <java-symbol type="drawable" name="ic_wifi_6_signal_4" /> + <java-symbol type="drawable" name="ic_wifi_7_signal_0" /> + <java-symbol type="drawable" name="ic_wifi_7_signal_1" /> + <java-symbol type="drawable" name="ic_wifi_7_signal_2" /> + <java-symbol type="drawable" name="ic_wifi_7_signal_3" /> + <java-symbol type="drawable" name="ic_wifi_7_signal_4" /> <java-symbol type="drawable" name="ic_signal_wifi_transient_animation" /> <java-symbol type="drawable" name="ic_hotspot_transient_animation" /> <java-symbol type="drawable" name="ic_bluetooth_transient_animation" /> @@ -2097,6 +2122,7 @@ <java-symbol type="string" name="config_geocoderProviderPackageName" /> <java-symbol type="string" name="config_geofenceProviderPackageName" /> <java-symbol type="string" name="config_networkLocationProviderPackageName" /> + <java-symbol type="string" name="config_comboNetworkLocationProvider" /> <java-symbol type="string" name="config_wimaxManagerClassname" /> <java-symbol type="string" name="config_wimaxNativeLibLocation" /> <java-symbol type="string" name="config_wimaxServiceClassname" /> @@ -2250,6 +2276,7 @@ <java-symbol type="bool" name="config_enhancedConfirmationModeEnabled" /> <java-symbol type="bool" name="config_persistBrightnessNitsForDefaultDisplay" /> <java-symbol type="bool" name="config_isPreApprovalRequestAvailable" /> + <java-symbol type="string" name="config_optionalPackageVerifierName" /> <java-symbol type="layout" name="resolver_list" /> <java-symbol type="id" name="resolver_list" /> @@ -4002,7 +4029,11 @@ <java-symbol type="dimen" name="car_padding_4" /> <java-symbol type="style" name="Theme.DeviceDefault.Light.Dialog.Alert.UserSwitchingDialog" /> + <java-symbol type="integer" name="config_sms_authorization_timeout_ms" /> + <java-symbol type="bool" name="config_sms_authorization_enabled" /> + <java-symbol type="string" name="battery_saver_description_with_learn_more" /> + <java-symbol type="bool" name="config_primarycard" /> <java-symbol type="string" name="confirm_battery_saver" /> <java-symbol type="attr" name="opticalInsetLeft" /> @@ -4015,6 +4046,11 @@ <java-symbol type="drawable" name="ic_permission" /> <java-symbol type="integer" name="config_defaultAlarmVibrationIntensity" /> + + <!-- For Dual SoftaAp --> + <java-symbol type="array" name="config_wifi_dual_sap_interfaces" /> + <java-symbol type="bool" name="config_wifi_dual_sap_mode_enabled" /> + <java-symbol type="integer" name="config_defaultHapticFeedbackIntensity" /> <java-symbol type="integer" name="config_defaultMediaVibrationIntensity" /> <java-symbol type="integer" name="config_defaultNotificationVibrationIntensity" /> @@ -5018,6 +5054,7 @@ <java-symbol type="string" name="keyboard_layout_notification_multiple_selected_title"/> <java-symbol type="string" name="keyboard_layout_notification_multiple_selected_message"/> + <java-symbol type="integer" name="config_maximumDelayTimeToDeactivateDataCall" /> <java-symbol type="bool" name="config_batteryStatsResetOnUnplugHighBatteryLevel" /> <java-symbol type="bool" name="config_batteryStatsResetOnUnplugAfterSignificantCharge" /> diff --git a/core/tests/ConnectivityManagerTest/AndroidManifest.xml b/core/tests/ConnectivityManagerTest/AndroidManifest.xml index 796d7e8ff407..b647191c2aec 100644 --- a/core/tests/ConnectivityManagerTest/AndroidManifest.xml +++ b/core/tests/ConnectivityManagerTest/AndroidManifest.xml @@ -83,5 +83,6 @@ <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" /> <uses-permission android:name="android.permission.INJECT_EVENTS" /> <uses-permission android:name="android.permission.DEVICE_POWER" /> + <uses-permission android:name="android.permission.MANAGE_TEST_NETWORKS" /> </manifest> diff --git a/core/tests/coretests/src/com/android/internal/os/BinderDeathDispatcherTest.java b/core/tests/coretests/src/com/android/internal/os/BinderDeathDispatcherTest.java index 83103333f68b..942045c8bf35 100644 --- a/core/tests/coretests/src/com/android/internal/os/BinderDeathDispatcherTest.java +++ b/core/tests/coretests/src/com/android/internal/os/BinderDeathDispatcherTest.java @@ -17,7 +17,6 @@ package com.android.internal.os; import static com.google.common.truth.Truth.assertThat; -import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.reset; import static org.mockito.Mockito.times; @@ -32,14 +31,14 @@ import android.os.RemoteException; import android.os.ResultReceiver; import android.os.ShellCallback; -import androidx.test.filters.SmallTest; -import androidx.test.runner.AndroidJUnit4; - import org.junit.Test; import org.junit.runner.RunWith; import java.io.FileDescriptor; +import androidx.test.filters.SmallTest; +import androidx.test.runner.AndroidJUnit4; + @SmallTest @RunWith(AndroidJUnit4.class) public class BinderDeathDispatcherTest { @@ -121,7 +120,7 @@ public class BinderDeathDispatcherTest { public void die() { isAlive = false; if (mRecipient != null) { - mRecipient.binderDied(this); + mRecipient.binderDied(); } mRecipient = null; } @@ -228,33 +227,33 @@ public class BinderDeathDispatcherTest { // Kill the targets. t1.die(); - verify(r1, times(1)).binderDied(t1); - verify(r2, times(1)).binderDied(t1); - verify(r3, times(1)).binderDied(t1); - verify(r4, times(0)).binderDied(any()); - verify(r5, times(0)).binderDied(any()); + verify(r1, times(1)).binderDied(); + verify(r2, times(1)).binderDied(); + verify(r3, times(1)).binderDied(); + verify(r4, times(0)).binderDied(); + verify(r5, times(0)).binderDied(); assertThat(d.getTargetsForTest().size()).isEqualTo(2); reset(r1, r2, r3, r4, r5); t2.die(); - verify(r1, times(1)).binderDied(t2); - verify(r2, times(0)).binderDied(any()); - verify(r3, times(0)).binderDied(any()); - verify(r4, times(0)).binderDied(any()); - verify(r5, times(0)).binderDied(any()); + verify(r1, times(1)).binderDied(); + verify(r2, times(0)).binderDied(); + verify(r3, times(0)).binderDied(); + verify(r4, times(0)).binderDied(); + verify(r5, times(0)).binderDied(); assertThat(d.getTargetsForTest().size()).isEqualTo(1); reset(r1, r2, r3, r4, r5); t3.die(); - verify(r1, times(0)).binderDied(any()); - verify(r2, times(0)).binderDied(any()); - verify(r3, times(1)).binderDied(t3); - verify(r4, times(0)).binderDied(any()); - verify(r5, times(1)).binderDied(t3); + verify(r1, times(0)).binderDied(); + verify(r2, times(0)).binderDied(); + verify(r3, times(1)).binderDied(); + verify(r4, times(0)).binderDied(); + verify(r5, times(1)).binderDied(); assertThat(d.getTargetsForTest().size()).isEqualTo(0); @@ -263,27 +262,4 @@ public class BinderDeathDispatcherTest { assertThat(d.getTargetsForTest().size()).isEqualTo(0); } - - @Test - public void duplicateRegistrations() { - BinderDeathDispatcher<MyTarget> d = new BinderDeathDispatcher<>(); - - MyTarget t1 = new MyTarget(); - - DeathRecipient r1 = mock(DeathRecipient.class); - DeathRecipient r2 = mock(DeathRecipient.class); - - for (int i = 0; i < 5; i++) { - assertThat(d.linkToDeath(t1, r1)).isEqualTo(1); - } - assertThat(d.linkToDeath(t1, r2)).isEqualTo(2); - - t1.die(); - verify(r1, times(1)).binderDied(t1); - verify(r2, times(1)).binderDied(t1); - - d.unlinkToDeath(t1, r1); - d.unlinkToDeath(t1, r2); - assertThat(d.getTargetsForTest()).isEmpty(); - } } diff --git a/data/etc/framework-sysconfig.xml b/data/etc/framework-sysconfig.xml index 2162ec421dcd..9ed0171f63a1 100644..100755 --- a/data/etc/framework-sysconfig.xml +++ b/data/etc/framework-sysconfig.xml @@ -56,4 +56,8 @@ <!-- Whitelist of bundled applications which all handle URLs to their websites by default --> <app-link package="com.android.carrierdefaultapp" /> + + <!-- Whitelist of what components are permitted to run in the background --> + <allow-in-power-save package="com.android.deskclock" /> + </config> diff --git a/data/etc/hiddenapi-package-whitelist.xml b/data/etc/hiddenapi-package-whitelist.xml index 98f5824011ae..1c2cc613e9f6 100644 --- a/data/etc/hiddenapi-package-whitelist.xml +++ b/data/etc/hiddenapi-package-whitelist.xml @@ -40,6 +40,7 @@ Do NOT include any apps that are updatable via Play Store! <hidden-api-whitelisted-app package="com.android.dreams.basic" /> <hidden-api-whitelisted-app package="com.android.gallery" /> <hidden-api-whitelisted-app package="com.android.launcher3" /> + <hidden-api-whitelisted-app package="com.android.deskclock" /> <hidden-api-whitelisted-app package="com.android.mtp" /> <hidden-api-whitelisted-app package="com.android.musicfx" /> <hidden-api-whitelisted-app package="com.android.permissioncontroller" /> diff --git a/data/etc/privapp-permissions-platform.xml b/data/etc/privapp-permissions-platform.xml index b05507e7e128..8dd826601ca4 100644 --- a/data/etc/privapp-permissions-platform.xml +++ b/data/etc/privapp-permissions-platform.xml @@ -20,6 +20,13 @@ This XML file declares which signature|privileged permissions should be granted applications that come with the platform --> <permissions> + <privapp-permissions package="android.ext.services"> + <permission name="android.permission.PROVIDE_RESOLVER_RANKER_SERVICE" /> + <permission name="android.permission.MONITOR_DEFAULT_SMS_PACKAGE" /> + <permission name="android.permission.REQUEST_NOTIFICATION_ASSISTANT_SERVICE" /> + <permission name="android.permission.INTERACT_ACROSS_USERS" /> + </privapp-permissions> + <!-- Needed for Build.getSerial(), which is used to send a unique number for serial, per HUIG. --> <privapp-permissions package="android.car.usb.handler"> <permission name="android.permission.READ_PRIVILEGED_PHONE_STATE"/> diff --git a/data/etc/services.core.protolog.json b/data/etc/services.core.protolog.json index 93e44f1d2f87..faac073e6d4a 100644 --- a/data/etc/services.core.protolog.json +++ b/data/etc/services.core.protolog.json @@ -1873,6 +1873,12 @@ "group": "WM_DEBUG_STATES", "at": "com\/android\/server\/wm\/RootWindowContainer.java" }, + "-417514857": { + "message": "Key dispatch not paused for screen off", + "level": "VERBOSE", + "group": "WM_DEBUG_STATES", + "at": "com\/android\/server\/wm\/Task.java" + }, "-417730399": { "message": "Preparing to sync a window that was already in the sync, so try dropping buffer. win=%s", "level": "DEBUG", @@ -2035,6 +2041,12 @@ "group": "WM_ERROR", "at": "com\/android\/server\/wm\/WindowManagerService.java" }, + "-279436615": { + "message": "Moving to PAUSING: %s", + "level": "VERBOSE", + "group": "WM_DEBUG_STATES", + "at": "com\/android\/server\/wm\/Task.java" + }, "-275077723": { "message": "New animation: %s old animation: %s", "level": "VERBOSE", @@ -3409,6 +3421,12 @@ "group": "WM_DEBUG_WINDOW_TRANSITIONS", "at": "com\/android\/server\/wm\/Transition.java" }, + "1001509841": { + "message": "Auto-PIP allowed, entering PIP mode directly: %s", + "level": "DEBUG", + "group": "WM_DEBUG_STATES", + "at": "com\/android\/server\/wm\/Task.java" + }, "1001904964": { "message": "***** BOOT TIMEOUT: forcing display enabled", "level": "WARN", @@ -4237,6 +4255,12 @@ "group": "WM_DEBUG_ORIENTATION", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, + "1847414670": { + "message": "Activity not running or entered PiP, resuming next.", + "level": "VERBOSE", + "group": "WM_DEBUG_STATES", + "at": "com\/android\/server\/wm\/Task.java" + }, "1853793312": { "message": "Notify removed startingWindow %s", "level": "VERBOSE", @@ -4279,6 +4303,12 @@ "group": "WM_DEBUG_REMOTE_ANIMATIONS", "at": "com\/android\/server\/wm\/RemoteAnimationController.java" }, + "1894239744": { + "message": "Enqueueing pending pause: %s", + "level": "VERBOSE", + "group": "WM_DEBUG_STATES", + "at": "com\/android\/server\/wm\/Task.java" + }, "1912291550": { "message": "Sleep still waiting to pause %s", "level": "VERBOSE", diff --git a/data/fonts/fonts.xml b/data/fonts/fonts.xml index 0563519fe419..c9c1af8b807b 100644 --- a/data/fonts/fonts.xml +++ b/data/fonts/fonts.xml @@ -39,11 +39,7 @@ <axis tag="wdth" stylevalue="100" /> <axis tag="wght" stylevalue="300" /> </font> - <font weight="400" style="normal">Roboto-Regular.ttf - <axis tag="ital" stylevalue="0" /> - <axis tag="wdth" stylevalue="100" /> - <axis tag="wght" stylevalue="400" /> - </font> + <font weight="400" style="normal">RobotoStatic-Regular.ttf</font> <font weight="500" style="normal">Roboto-Regular.ttf <axis tag="ital" stylevalue="0" /> <axis tag="wdth" stylevalue="100" /> diff --git a/graphics/java/android/graphics/BLASTBufferQueue.java b/graphics/java/android/graphics/BLASTBufferQueue.java index c52f700ef4f6..1dede293e772 100644 --- a/graphics/java/android/graphics/BLASTBufferQueue.java +++ b/graphics/java/android/graphics/BLASTBufferQueue.java @@ -32,6 +32,8 @@ public final class BLASTBufferQueue { private static native long nativeCreate(String name, boolean updateDestinationFrame); private static native void nativeDestroy(long ptr); private static native Surface nativeGetSurface(long ptr, boolean includeSurfaceControlHandle); + private static native void nativeSetUndequeuedBufferCount(long ptr, int count); + private static native int nativeGetUndequeuedBufferCount(long ptr); private static native boolean nativeSyncNextTransaction(long ptr, Consumer<SurfaceControl.Transaction> callback, boolean acquireSingleBuffer); private static native void nativeStopContinuousSyncTransaction(long ptr); @@ -84,6 +86,20 @@ public final class BLASTBufferQueue { } /** + * Set undequeued buffer count + */ + public void setUndequeuedBufferCount(int count) { + nativeSetUndequeuedBufferCount(mNativeObject, count); + } + + /** + * @return the count of undequeued buffer + */ + public int getUndequeuedBufferCount() { + return nativeGetUndequeuedBufferCount(mNativeObject); + } + + /** * Send a callback that accepts a transaction to BBQ. BBQ will acquire buffers into the a * transaction it created and will eventually send the transaction into the callback * when it is ready. diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/SystemWindows.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/SystemWindows.java index 5e42782431fd..1cef47f90c3d 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/SystemWindows.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/SystemWindows.java @@ -39,6 +39,7 @@ import android.view.IWindowSession; import android.view.IWindowSessionCallback; import android.view.InsetsSourceControl; import android.view.InsetsState; +import android.view.KeyEvent; import android.view.ScrollCaptureResponse; import android.view.SurfaceControl; import android.view.SurfaceControlViewHost; @@ -408,5 +409,9 @@ public class SystemWindows { // ignore } } + + /* Key event */ + @Override + public void dispatchBlackScreenKeyEvent(KeyEvent event) {} } } diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index 3619d3ac5253..67d1089bb18b 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -867,6 +867,7 @@ public class LocationManager { @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) @Nullable public Location getLastKnownLocation(@NonNull String provider) { + android.util.SeempLog.record(46); return getLastKnownLocation(provider, new LastLocationRequest.Builder().build()); } @@ -1053,6 +1054,7 @@ public class LocationManager { @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public void requestSingleUpdate( @NonNull String provider, @NonNull LocationListener listener, @Nullable Looper looper) { + android.util.SeempLog.record(64); Preconditions.checkArgument(provider != null, "invalid null provider"); Handler handler = looper == null ? new Handler() : new Handler(looper); @@ -1092,6 +1094,7 @@ public class LocationManager { @NonNull Criteria criteria, @NonNull LocationListener listener, @Nullable Looper looper) { + android.util.SeempLog.record(64); Preconditions.checkArgument(criteria != null, "invalid null criteria"); Handler handler = looper == null ? new Handler() : new Handler(looper); @@ -1125,6 +1128,7 @@ public class LocationManager { @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public void requestSingleUpdate(@NonNull String provider, @NonNull PendingIntent pendingIntent) { + android.util.SeempLog.record(64); Preconditions.checkArgument(provider != null, "invalid null provider"); requestLocationUpdates( @@ -1159,6 +1163,7 @@ public class LocationManager { @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public void requestSingleUpdate(@NonNull Criteria criteria, @NonNull PendingIntent pendingIntent) { + android.util.SeempLog.record(64); Preconditions.checkArgument(criteria != null, "invalid null criteria"); requestLocationUpdates( @@ -1195,6 +1200,7 @@ public class LocationManager { @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public void requestLocationUpdates(@NonNull String provider, long minTimeMs, float minDistanceM, @NonNull LocationListener listener) { + android.util.SeempLog.record(47); requestLocationUpdates(provider, minTimeMs, minDistanceM, listener, null); } @@ -1223,6 +1229,7 @@ public class LocationManager { @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public void requestLocationUpdates(@NonNull String provider, long minTimeMs, float minDistanceM, @NonNull LocationListener listener, @Nullable Looper looper) { + android.util.SeempLog.record(47); Handler handler = looper == null ? new Handler() : new Handler(looper); requestLocationUpdates(provider, minTimeMs, minDistanceM, new HandlerExecutor(handler), listener); @@ -1257,6 +1264,7 @@ public class LocationManager { float minDistanceM, @NonNull @CallbackExecutor Executor executor, @NonNull LocationListener listener) { + android.util.SeempLog.record(47); Preconditions.checkArgument(provider != null, "invalid null provider"); requestLocationUpdates( @@ -1294,6 +1302,7 @@ public class LocationManager { public void requestLocationUpdates(long minTimeMs, float minDistanceM, @NonNull Criteria criteria, @NonNull LocationListener listener, @Nullable Looper looper) { + android.util.SeempLog.record(47); Handler handler = looper == null ? new Handler() : new Handler(looper); requestLocationUpdates(minTimeMs, minDistanceM, criteria, new HandlerExecutor(handler), listener); @@ -1332,6 +1341,7 @@ public class LocationManager { @NonNull Criteria criteria, @NonNull @CallbackExecutor Executor executor, @NonNull LocationListener listener) { + android.util.SeempLog.record(47); Preconditions.checkArgument(criteria != null, "invalid null criteria"); requestLocationUpdates( @@ -1360,6 +1370,7 @@ public class LocationManager { @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public void requestLocationUpdates(@NonNull String provider, long minTimeMs, float minDistanceM, @NonNull PendingIntent pendingIntent) { + android.util.SeempLog.record(47); Preconditions.checkArgument(provider != null, "invalid null provider"); requestLocationUpdates( @@ -1394,6 +1405,7 @@ public class LocationManager { @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public void requestLocationUpdates(long minTimeMs, float minDistanceM, @NonNull Criteria criteria, @NonNull PendingIntent pendingIntent) { + android.util.SeempLog.record(47); Preconditions.checkArgument(criteria != null, "invalid null criteria"); requestLocationUpdates( FUSED_PROVIDER, @@ -1432,6 +1444,7 @@ public class LocationManager { @Nullable LocationRequest locationRequest, @NonNull LocationListener listener, @Nullable Looper looper) { + android.util.SeempLog.record(47); Handler handler = looper == null ? new Handler() : new Handler(looper); requestLocationUpdates(locationRequest, new HandlerExecutor(handler), listener); } @@ -1462,6 +1475,7 @@ public class LocationManager { @Nullable LocationRequest locationRequest, @NonNull @CallbackExecutor Executor executor, @NonNull LocationListener listener) { + android.util.SeempLog.record(47); if (locationRequest == null) { locationRequest = LocationRequest.create(); } @@ -1610,6 +1624,7 @@ public class LocationManager { public void requestLocationUpdates(@NonNull String provider, @NonNull LocationRequest locationRequest, @NonNull PendingIntent pendingIntent) { + android.util.SeempLog.record(47); Preconditions.checkArgument(provider != null, "invalid null provider"); Preconditions.checkArgument(locationRequest != null, "invalid null location request"); Preconditions.checkArgument(pendingIntent != null, "invalid null pending intent"); @@ -2038,6 +2053,7 @@ public class LocationManager { */ public boolean sendExtraCommand( @NonNull String provider, @NonNull String command, @Nullable Bundle extras) { + android.util.SeempLog.record(48); Preconditions.checkArgument(provider != null, "invalid null provider"); Preconditions.checkArgument(command != null, "invalid null command"); @@ -2271,8 +2287,8 @@ public class LocationManager { @RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION}) public void addProximityAlert(double latitude, double longitude, float radius, long expiration, @NonNull PendingIntent pendingIntent) { + android.util.SeempLog.record(45); Preconditions.checkArgument(pendingIntent != null, "invalid null pending intent"); - if (Compatibility.isChangeEnabled(BLOCK_UNTARGETED_PENDING_INTENTS)) { Preconditions.checkArgument(pendingIntent.isTargetedToPackage(), "pending intent must be targeted to a package"); @@ -2428,6 +2444,7 @@ public class LocationManager { @Deprecated @RequiresPermission(ACCESS_FINE_LOCATION) public boolean addGpsStatusListener(GpsStatus.Listener listener) { + android.util.SeempLog.record(43); if (Compatibility.isChangeEnabled(BLOCK_GPS_STATUS_USAGE)) { throw new UnsupportedOperationException( "GpsStatus APIs not supported, please use GnssStatus APIs instead"); @@ -2539,6 +2556,7 @@ public class LocationManager { @Deprecated @RequiresPermission(ACCESS_FINE_LOCATION) public boolean addNmeaListener(@NonNull GpsStatus.NmeaListener listener) { + android.util.SeempLog.record(44); return false; } diff --git a/media/java/android/media/AudioFormat.java b/media/java/android/media/AudioFormat.java index ceb3858eb0b3..712ed32820e1 100644 --- a/media/java/android/media/AudioFormat.java +++ b/media/java/android/media/AudioFormat.java @@ -376,6 +376,46 @@ public final class AudioFormat implements Parcelable { /** Audio data format: Direct Stream Digital */ public static final int ENCODING_DSD = 31; + /** Audio data format: AMRNB + * @hide + * */ + public static final int ENCODING_AMRNB = 100; + /** Audio data format: AMRWB + * @hide + * */ + public static final int ENCODING_AMRWB = 101; + /** Audio data format: EVRC + * @hide + * */ + public static final int ENCODING_EVRC = 102; + /** Audio data format: EVRCB + * @hide + * */ + public static final int ENCODING_EVRCB = 103; + /** Audio data format: EVRCWB + * @hide + * */ + public static final int ENCODING_EVRCWB = 104; + /** Audio data format: EVRCNW + * @hide + * */ + public static final int ENCODING_EVRCNW = 105; + /** Audio data format: AAC ADTS LC compressed + * @hide + */ + public static final int ENCODING_AAC_ADTS_LC = 106; + /** Audio data format: AAC ADTS HE V1 compressed + * @hide + */ + public static final int ENCODING_AAC_ADTS_HE_V1 = 107; + /** Audio data format: AAC ADTS HE V2 compressed + * @hide + */ + public static final int ENCODING_AAC_ADTS_HE_V2 = 108; + /** Audio data format: FLAC compressed + * @hide + */ + /** @hide */ public static String toLogFriendlyEncoding(int enc) { switch(enc) { @@ -441,6 +481,12 @@ public final class AudioFormat implements Parcelable { return "ENCODING_DTS_UHD_P2"; case ENCODING_DSD: return "ENCODING_DSD"; + case ENCODING_AAC_ADTS_LC: + return "ENCODING_AAC_ADTS_LC"; + case ENCODING_AAC_ADTS_HE_V1: + return "ENCODING_AAC_ADTS_HE_V1"; + case ENCODING_AAC_ADTS_HE_V2: + return "ENCODING_AAC_ADTS_HE_V2"; default : return "invalid encoding " + enc; } @@ -776,9 +822,11 @@ public final class AudioFormat implements Parcelable { /** @hide */ public static final int CHANNEL_IN_5POINT1 = ( CHANNEL_IN_LEFT | CHANNEL_IN_CENTER | CHANNEL_IN_RIGHT | CHANNEL_IN_BACK_LEFT + | CHANNEL_IN_FRONT | CHANNEL_IN_BACK | CHANNEL_IN_LEFT_PROCESSED | CHANNEL_IN_RIGHT_PROCESSED | CHANNEL_IN_BACK_RIGHT | CHANNEL_IN_LOW_FREQUENCY); /** @hide */ public static final int CHANNEL_IN_FRONT_BACK = CHANNEL_IN_FRONT | CHANNEL_IN_BACK; + // CHANNEL_IN_ALL is not yet defined; if added then it should match AUDIO_CHANNEL_IN_ALL /** @hide */ @@ -797,6 +845,15 @@ public final class AudioFormat implements Parcelable { case ENCODING_PCM_FLOAT: case ENCODING_PCM_32BIT: return 4; + case ENCODING_AMRNB: + return 32; + case ENCODING_AMRWB: + return 61; + case ENCODING_EVRC: + case ENCODING_EVRCB: + case ENCODING_EVRCWB: + case ENCODING_EVRCNW: + return 23; case ENCODING_INVALID: default: throw new IllegalArgumentException("Bad audio format " + audioFormat); @@ -823,6 +880,12 @@ public final class AudioFormat implements Parcelable { case ENCODING_AAC_ELD: case ENCODING_AAC_XHE: case ENCODING_AC4: + case ENCODING_AMRNB: + case ENCODING_AMRWB: + case ENCODING_EVRC: + case ENCODING_EVRCB: + case ENCODING_EVRCWB: + case ENCODING_EVRCNW: case ENCODING_E_AC3_JOC: case ENCODING_DOLBY_MAT: case ENCODING_OPUS: @@ -837,6 +900,9 @@ public final class AudioFormat implements Parcelable { case ENCODING_DTS_HD_MA: case ENCODING_DTS_UHD_P2: case ENCODING_DSD: + case ENCODING_AAC_ADTS_LC: + case ENCODING_AAC_ADTS_HE_V1: + case ENCODING_AAC_ADTS_HE_V2: return true; default: return false; @@ -877,6 +943,9 @@ public final class AudioFormat implements Parcelable { case ENCODING_DTS_HD_MA: case ENCODING_DTS_UHD_P2: case ENCODING_DSD: + case ENCODING_AAC_ADTS_LC: + case ENCODING_AAC_ADTS_HE_V1: + case ENCODING_AAC_ADTS_HE_V2: return true; default: return false; @@ -908,6 +977,12 @@ public final class AudioFormat implements Parcelable { case ENCODING_AAC_ELD: case ENCODING_AAC_XHE: case ENCODING_AC4: + case ENCODING_AMRNB: + case ENCODING_AMRWB: + case ENCODING_EVRC: + case ENCODING_EVRCB: + case ENCODING_EVRCWB: + case ENCODING_EVRCNW: case ENCODING_E_AC3_JOC: case ENCODING_DOLBY_MAT: case ENCODING_OPUS: @@ -919,6 +994,9 @@ public final class AudioFormat implements Parcelable { case ENCODING_DRA: case ENCODING_DTS_HD_MA: case ENCODING_DTS_UHD_P2: + case ENCODING_AAC_ADTS_LC: + case ENCODING_AAC_ADTS_HE_V1: + case ENCODING_AAC_ADTS_HE_V2: return false; case ENCODING_INVALID: default: @@ -961,6 +1039,9 @@ public final class AudioFormat implements Parcelable { case ENCODING_DRA: case ENCODING_DTS_HD_MA: case ENCODING_DTS_UHD_P2: + case ENCODING_AAC_ADTS_LC: + case ENCODING_AAC_ADTS_HE_V1: + case ENCODING_AAC_ADTS_HE_V2: return false; case ENCODING_INVALID: default: @@ -1238,6 +1319,12 @@ public final class AudioFormat implements Parcelable { case ENCODING_AAC_ELD: case ENCODING_AAC_XHE: case ENCODING_AC4: + case ENCODING_AMRNB: + case ENCODING_AMRWB: + case ENCODING_EVRC: + case ENCODING_EVRCB: + case ENCODING_EVRCWB: + case ENCODING_EVRCNW: case ENCODING_E_AC3_JOC: case ENCODING_DOLBY_MAT: case ENCODING_OPUS: @@ -1252,6 +1339,9 @@ public final class AudioFormat implements Parcelable { case ENCODING_DTS_HD_MA: case ENCODING_DTS_UHD_P2: case ENCODING_DSD: + case ENCODING_AAC_ADTS_LC: + case ENCODING_AAC_ADTS_HE_V1: + case ENCODING_AAC_ADTS_HE_V2: mEncoding = encoding; break; case ENCODING_INVALID: @@ -1470,6 +1560,12 @@ public final class AudioFormat implements Parcelable { ENCODING_AAC_ELD, ENCODING_AAC_XHE, ENCODING_AC4, + ENCODING_AMRNB, + ENCODING_AMRWB, + ENCODING_EVRC, + ENCODING_EVRCB, + ENCODING_EVRCWB, + ENCODING_EVRCNW, ENCODING_E_AC3_JOC, ENCODING_DOLBY_MAT, ENCODING_OPUS, @@ -1483,7 +1579,10 @@ public final class AudioFormat implements Parcelable { ENCODING_DRA, ENCODING_DTS_HD_MA, ENCODING_DTS_UHD_P2, - ENCODING_DSD } + ENCODING_DSD, + ENCODING_AAC_ADTS_LC, + ENCODING_AAC_ADTS_HE_V1, + ENCODING_AAC_ADTS_HE_V2 } ) @Retention(RetentionPolicy.SOURCE) public @interface Encoding {} diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index 4759689335e9..457e3176e973 100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java @@ -69,6 +69,7 @@ import android.os.Message; import android.os.RemoteException; import android.os.ServiceManager; import android.os.SystemClock; +import android.os.SystemProperties; import android.os.UserHandle; import android.provider.Settings; import android.text.TextUtils; @@ -1895,6 +1896,8 @@ public class AudioManager { */ @Deprecated public void setSpeakerphoneOn(boolean on) { final IAudioService service = getService(); + Log.i(TAG, "In setSpeakerphoneOn(), on: " + on + ", calling application: " + + mApplicationContext.getOpPackageName()); try { service.setSpeakerphoneOn(mICallBack, on); } catch (RemoteException e) { @@ -1909,6 +1912,8 @@ public class AudioManager { * @deprecated Use {@link AudioManager#getCommunicationDevice()} instead. */ @Deprecated public boolean isSpeakerphoneOn() { + Log.i(TAG, "In isSpeakerphoneOn(), calling application: " + + mApplicationContext.getOpPackageName()); final IAudioService service = getService(); try { return service.isSpeakerphoneOn(); @@ -3013,8 +3018,12 @@ public class AudioManager { * @see #startBluetoothSco() */ public boolean isBluetoothScoAvailableOffCall() { - return getContext().getResources().getBoolean( - com.android.internal.R.bool.config_bluetooth_sco_off_call); + boolean retval; + retval = getContext().getResources().getBoolean( + com.android.internal.R.bool.config_bluetooth_sco_off_call); + Log.i(TAG, "In isBluetoothScoAvailableOffCall(), calling appilication: " + + mApplicationContext.getOpPackageName()+", return value: " + retval); + return retval; } /** @@ -3065,6 +3074,8 @@ public class AudioManager { */ @Deprecated public void startBluetoothSco() { final IAudioService service = getService(); + Log.i(TAG, "In startbluetoothSco(), calling application: " + + mApplicationContext.getOpPackageName()); try { service.startBluetoothSco(mICallBack, getContext().getApplicationInfo().targetSdkVersion); @@ -3090,6 +3101,8 @@ public class AudioManager { */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public void startBluetoothScoVirtualCall() { + Log.i(TAG, "In startBluetoothScoVirtualCall(), calling application: " + + mApplicationContext.getOpPackageName()); final IAudioService service = getService(); try { service.startBluetoothScoVirtualCall(mICallBack); @@ -3111,6 +3124,8 @@ public class AudioManager { // Also used for connections started with {@link #startBluetoothScoVirtualCall()} @Deprecated public void stopBluetoothSco() { final IAudioService service = getService(); + Log.i(TAG, "In stopBluetoothSco(), calling application: " + + mApplicationContext.getOpPackageName()); try { service.stopBluetoothSco(mICallBack); } catch (RemoteException e) { @@ -3129,6 +3144,8 @@ public class AudioManager { */ public void setBluetoothScoOn(boolean on){ final IAudioService service = getService(); + Log.i(TAG, "In setBluetoothScoOn(), on: " + on + ", calling application: " + + mApplicationContext.getOpPackageName()); try { service.setBluetoothScoOn(on); } catch (RemoteException e) { @@ -3145,6 +3162,8 @@ public class AudioManager { */ @Deprecated public boolean isBluetoothScoOn() { final IAudioService service = getService(); + Log.i(TAG, "In isBluetoothScoOn(), calling application: " + + mApplicationContext.getOpPackageName()); try { return service.isBluetoothScoOn(); } catch (RemoteException e) { @@ -3166,6 +3185,9 @@ public class AudioManager { * @deprecated Use {@link AudioManager#getDevices(int)} instead to list available audio devices. */ public boolean isBluetoothA2dpOn() { + boolean mVoipLeaWarEnabled = + SystemProperties.getBoolean("persist.enable.bluetooth.voipleawar", false); + if (AudioSystem.getDeviceConnectionState(DEVICE_OUT_BLUETOOTH_A2DP,"") == AudioSystem.DEVICE_STATE_AVAILABLE) { return true; @@ -3175,6 +3197,11 @@ public class AudioManager { } else if (AudioSystem.getDeviceConnectionState(DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER,"") == AudioSystem.DEVICE_STATE_AVAILABLE) { return true; + } else if (mVoipLeaWarEnabled && + AudioSystem.getDeviceConnectionState(DEVICE_OUT_BLE_HEADSET,"") + == AudioSystem.DEVICE_STATE_AVAILABLE) { + Log.i(TAG, "isBluetoothA2dpOn: return true for DEVICE_OUT_BLE_HEADSET"); + return true; } return false; } @@ -3683,6 +3710,12 @@ public class AudioManager { */ public void setParameters(String keyValuePairs) { AudioSystem.setParameters(keyValuePairs); + final IAudioService service = getService(); + try { + service.cacheParameters(keyValuePairs); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } } /** @@ -6563,6 +6596,38 @@ public class AudioManager { } } + /** + * Indicate A2DP source or sink active device change and eventually suppress + * the {@link AudioManager.ACTION_AUDIO_BECOMING_NOISY} intent. + * This operation is asynchronous but its execution will still be sequentially scheduled + * relative to calls to {@link #setBluetoothHearingAidDeviceConnectionState(BluetoothDevice, + * int, boolean, int)} and + * {@link #handleBluetoothA2dpDeviceConfigChange(BluetoothDevice)}. + * @param device Bluetooth device connected/disconnected + * @param state new connection state (BluetoothProfile.STATE_xxx) + * @param profile profile for the A2DP device + * (either {@link android.bluetooth.BluetoothProfile.A2DP} or + * {@link android.bluetooth.BluetoothProfile.A2DP_SINK}) + * @param a2dpVolume New volume for the connecting device. Does nothing if + * disconnecting. Pass value -1 in case you want this field to be ignored + * @param suppressNoisyIntent if true the + * {@link AudioManager.ACTION_AUDIO_BECOMING_NOISY} intent will not be sent. + * @return a delay in ms that the caller should wait before broadcasting + * BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED intent. + * {@hide} + */ + public void handleBluetoothA2dpActiveDeviceChange( + BluetoothDevice device, int state, int profile, + boolean suppressNoisyIntent, int a2dpVolume) { + final IAudioService service = getService(); + try { + service.handleBluetoothA2dpActiveDeviceChange(device, + state, profile, suppressNoisyIntent, a2dpVolume); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + /** {@hide} */ public IRingtonePlayer getRingtonePlayer() { try { diff --git a/media/java/android/media/AudioRecord.java b/media/java/android/media/AudioRecord.java index 7faa13c80c62..45b48121819f 100644 --- a/media/java/android/media/AudioRecord.java +++ b/media/java/android/media/AudioRecord.java @@ -1176,6 +1176,12 @@ public class AudioRecord implements AudioRouting, MicrophoneDirection, case AudioFormat.ENCODING_PCM_FLOAT: case AudioFormat.ENCODING_PCM_16BIT: case AudioFormat.ENCODING_PCM_8BIT: + case AudioFormat.ENCODING_AMRNB: + case AudioFormat.ENCODING_AMRWB: + case AudioFormat.ENCODING_EVRC: + case AudioFormat.ENCODING_EVRCB: + case AudioFormat.ENCODING_EVRCWB: + case AudioFormat.ENCODING_EVRCNW: mAudioFormat = audioFormat; break; default: @@ -1419,6 +1425,9 @@ public class AudioRecord implements AudioRouting, MicrophoneDirection, case (AudioFormat.CHANNEL_IN_FRONT | AudioFormat.CHANNEL_IN_BACK): channelCount = 2; break; + case AudioFormat.CHANNEL_IN_5POINT1: + channelCount = 6; + break; case AudioFormat.CHANNEL_INVALID: default: loge("getMinBufferSize(): Invalid channel configuration."); @@ -1495,6 +1504,7 @@ public class AudioRecord implements AudioRouting, MicrophoneDirection, */ public void startRecording() throws IllegalStateException { + android.util.SeempLog.record(70); if (mState != STATE_INITIALIZED) { throw new IllegalStateException("startRecording() called on an " + "uninitialized AudioRecord."); @@ -1518,6 +1528,7 @@ public class AudioRecord implements AudioRouting, MicrophoneDirection, */ public void startRecording(MediaSyncEvent syncEvent) throws IllegalStateException { + android.util.SeempLog.record(70); if (mState != STATE_INITIALIZED) { throw new IllegalStateException("startRecording() called on an " + "uninitialized AudioRecord."); diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java index 3123ee6dd4d7..71d5fc8ba524 100644 --- a/media/java/android/media/AudioSystem.java +++ b/media/java/android/media/AudioSystem.java @@ -246,6 +246,14 @@ public class AudioSystem /** @hide */ public static final int AUDIO_FORMAT_OPUS = 0x08000000; + /** @hide */ + public static final int AUDIO_FORMAT_CELT = 0x26000000; + /** @hide */ + public static final int AUDIO_FORMAT_APTX_ADAPTIVE = 0x27000000; + /** @hide */ + public static final int AUDIO_FORMAT_APTX_TWSP = 0x2A000000; + /** @hide */ + public static final int VX_AUDIO_FORMAT_APTX_ADAPTIVE_QLEA = 0x30000000; /** @hide */ @IntDef(flag = false, prefix = "AUDIO_FORMAT_", value = { @@ -291,8 +299,15 @@ public class AudioSystem case AUDIO_FORMAT_APTX: return BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX; case AUDIO_FORMAT_APTX_HD: return BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_HD; case AUDIO_FORMAT_LDAC: return BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC; + case AUDIO_FORMAT_CELT: return BluetoothCodecConfig.SOURCE_CODEC_TYPE_CELT; + case AUDIO_FORMAT_APTX_ADAPTIVE: + return BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_ADAPTIVE; + case AUDIO_FORMAT_APTX_TWSP: + return BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_TWSP; case AUDIO_FORMAT_LC3: return BluetoothCodecConfig.SOURCE_CODEC_TYPE_LC3; case AUDIO_FORMAT_OPUS: return BluetoothCodecConfig.SOURCE_CODEC_TYPE_OPUS; + case VX_AUDIO_FORMAT_APTX_ADAPTIVE_QLEA: + return BluetoothLeAudioCodecConfig.SOURCE_CODEC_TYPE_APTX_ADAPTIVE_LE; default: Log.e(TAG, "Unknown audio format 0x" + Integer.toHexString(audioFormat) + " for conversion to BT codec"); @@ -308,6 +323,8 @@ public class AudioSystem @AudioFormatNativeEnumForBtLeAudioCodec int audioFormat) { switch (audioFormat) { case AUDIO_FORMAT_LC3: return BluetoothLeAudioCodecConfig.SOURCE_CODEC_TYPE_LC3; + case VX_AUDIO_FORMAT_APTX_ADAPTIVE_QLEA: + return BluetoothLeAudioCodecConfig.SOURCE_CODEC_TYPE_APTX_ADAPTIVE_LE; default: Log.e(TAG, "Unknown audio format 0x" + Integer.toHexString(audioFormat) + " for conversion to BT LE audio codec"); @@ -333,6 +350,12 @@ public class AudioSystem return AudioSystem.AUDIO_FORMAT_APTX_HD; case BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC: return AudioSystem.AUDIO_FORMAT_LDAC; + case BluetoothCodecConfig.SOURCE_CODEC_TYPE_CELT: + return AudioSystem.AUDIO_FORMAT_CELT; + case BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_ADAPTIVE: + return AudioSystem.AUDIO_FORMAT_APTX_ADAPTIVE; + case BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_TWSP: + return AudioSystem.AUDIO_FORMAT_APTX_TWSP; case BluetoothCodecConfig.SOURCE_CODEC_TYPE_LC3: return AudioSystem.AUDIO_FORMAT_LC3; case BluetoothCodecConfig.SOURCE_CODEC_TYPE_OPUS: @@ -447,8 +470,8 @@ public class AudioSystem return "AUDIO_FORMAT_DTS_UHD"; case /* AUDIO_FORMAT_DRA */ 0x2F000000: return "AUDIO_FORMAT_DRA"; - case /* AUDIO_FORMAT_APTX_ADAPTIVE_QLEA */ 0x30000000: - return "AUDIO_FORMAT_APTX_ADAPTIVE_QLEA"; + case /* VX_AUDIO_FORMAT_APTX_ADAPTIVE_QLEA */ 0x30000000: + return "VX_AUDIO_FORMAT_APTX_ADAPTIVE_QLEA"; case /* AUDIO_FORMAT_APTX_ADAPTIVE_R4 */ 0x31000000: return "AUDIO_FORMAT_APTX_ADAPTIVE_R4"; case /* AUDIO_FORMAT_DTS_HD_MA */ 0x32000000: diff --git a/media/java/android/media/EncoderProfiles.java b/media/java/android/media/EncoderProfiles.java index 3e26fc6fb969..409d71c30035 100644 --- a/media/java/android/media/EncoderProfiles.java +++ b/media/java/android/media/EncoderProfiles.java @@ -396,6 +396,7 @@ public final class EncoderProfiles return MediaFormat.MIMETYPE_AUDIO_AMR_WB; } else if (codec == MediaRecorder.AudioEncoder.AAC || codec == MediaRecorder.AudioEncoder.HE_AAC + || codec == MediaRecorder.AudioEncoder.HE_AAC_PS || codec == MediaRecorder.AudioEncoder.AAC_ELD) { return MediaFormat.MIMETYPE_AUDIO_AAC; } else if (codec == MediaRecorder.AudioEncoder.VORBIS) { diff --git a/media/java/android/media/IAudioService.aidl b/media/java/android/media/IAudioService.aidl index 7ce189ba85d5..44face92be53 100644 --- a/media/java/android/media/IAudioService.aidl +++ b/media/java/android/media/IAudioService.aidl @@ -282,6 +282,9 @@ interface IAudioService { @EnforcePermission("MODIFY_AUDIO_ROUTING") void setWiredDeviceConnectionState(in AudioDeviceAttributes aa, int state, String caller); + void handleBluetoothA2dpActiveDeviceChange(in BluetoothDevice device, + int state, int profile, boolean suppressNoisyIntent, int a2dpVolume); + @UnsupportedAppUsage AudioRoutesInfo startWatchingRoutes(in IAudioRoutesObserver observer); @@ -447,6 +450,8 @@ interface IAudioService { @EnforcePermission("MODIFY_AUDIO_ROUTING") oneway void setMultiAudioFocusEnabled(in boolean enabled); + void cacheParameters(in String keyValuePairs); + int setPreferredDevicesForCapturePreset( in int capturePreset, in List<AudioDeviceAttributes> devices); diff --git a/media/java/android/media/MediaFile.java b/media/java/android/media/MediaFile.java index 70d79378da3d..87458fd0ce50 100644 --- a/media/java/android/media/MediaFile.java +++ b/media/java/android/media/MediaFile.java @@ -157,6 +157,20 @@ public class MediaFile { "application/vnd.ms-powerpoint"); addFileType(MtpConstants.FORMAT_MS_POWERPOINT_PRESENTATION, "application/vnd.openxmlformats-officedocument.presentationml.presentation"); + + // addFileType(MtpConstants.FORMAT_DIVX, "video/divx"); + // addFileType(MtpConstants.FORMAT_FLV, "video/flv"); + // addFileType(MtpConstants.FORMAT_QCP, "audio/qcelp"); + // addFileType(MtpConstants.FORMAT_AC3, "audio/ac3"); + // addFileType(MtpConstants.FORMAT_EC3, "audio/eac3"); + // addFileType(MtpConstants.FORMAT_AIFF, "audio/x-aiff"); + // addFileType(MtpConstants.FORMAT_APE, "audio/x-ape"); + // addFileType(MtpConstants.FORMAT_DSD, "audio/x-dsf"); + // addFileType(MtpConstants.FORMAT_DSD, "audio/x-dff"); + // addFileType(MtpConstants.FORMAT_DSD, "audio/dsd"); + // addFileType(MtpConstants.FORMAT_MHAS, "audio/mhas"); + // addFileType(MtpConstants.FORMAT_MP4, "audio/mhas"); + } /** @deprecated file types no longer exist */ diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java index aa307485c32e..7855cab1dd49 100644 --- a/media/java/android/media/MediaRecorder.java +++ b/media/java/android/media/MediaRecorder.java @@ -627,6 +627,12 @@ public class MediaRecorder implements AudioRouting, /** Opus data in a Ogg container */ public static final int OGG = 11; + + /** @hide QCP file format */ + public static final int QCP = 20; + + /** @hide WAVE media file format*/ + public static final int WAVE = 21; }; /** @@ -672,6 +678,19 @@ public class MediaRecorder implements AudioRouting, public static final int VORBIS = 6; /** Opus audio codec */ public static final int OPUS = 7; + /** High Efficiency AAC with Parametric Stereo coding (HE-AAC v2, object type PS) */ + public static final int HE_AAC_PS = 8; + /** @hide EVRC audio codec */ + public static final int EVRC = 10; + /** @hide QCELP audio codec */ + public static final int QCELP = 11; + /** @hide Linear PCM audio codec */ + public static final int LPCM = 12; + /** @hide MPEGH audio codec */ + public static final int MPEGH = 13; + /** @hide High Efficiency AAC V2 (HE-AAC V2) audio codec */ + public static final int HE_AAC_V2 = 14; + } /** @@ -683,6 +702,7 @@ public class MediaRecorder implements AudioRouting, AudioEncoder.AMR_WB, AudioEncoder.AAC, AudioEncoder.HE_AAC, + AudioEncoder.HE_AAC_PS, AudioEncoder.AAC_ELD, AudioEncoder.VORBIS, AudioEncoder.OPUS, diff --git a/media/jni/android_media_MediaDrm.cpp b/media/jni/android_media_MediaDrm.cpp index b70818d1e1b0..15b6e079be1f 100644 --- a/media/jni/android_media_MediaDrm.cpp +++ b/media/jni/android_media_MediaDrm.cpp @@ -38,6 +38,8 @@ #include <mediadrm/IDrmMetricsConsumer.h> #include <mediadrm/IDrm.h> #include <utils/Vector.h> +#include <map> +#include <string> using ::android::os::PersistableBundle; namespace drm = ::android::hardware::drm; @@ -193,6 +195,11 @@ struct LogMessageFields { jclass classId; }; +struct DrmExceptionFields { + jmethodID init; + jclass classId; +}; + struct fields_t { jfieldID context; jmethodID post_event; @@ -215,6 +222,7 @@ struct fields_t { jclass parcelCreatorClassId; KeyStatusFields keyStatus; LogMessageFields logMessage; + std::map<std::string, DrmExceptionFields> exceptionCtors; }; static fields_t gFields; @@ -245,18 +253,32 @@ jobject hidlLogMessagesToJavaList(JNIEnv *env, const Vector<drm::V1_4::LogMessag return arrayList; } -int drmThrowException(JNIEnv* env, const char *className, const DrmStatus &err, const char *msg) { +void resolveDrmExceptionCtor(JNIEnv *env, const char *className) { + jclass clazz; + jmethodID init; + FIND_CLASS(clazz, className); + GET_METHOD_ID(init, clazz, "<init>", "(Ljava/lang/String;III)V"); + gFields.exceptionCtors[std::string(className)] = { + .init = init, + .classId = static_cast<jclass>(env->NewGlobalRef(clazz)) + }; +} + +void drmThrowException(JNIEnv* env, const char *className, const DrmStatus &err, const char *msg) { using namespace android::jnihelp; - jstring _detailMessage = CreateExceptionMsg(env, msg); - int _status = ThrowException(env, className, "(Ljava/lang/String;III)V", - _detailMessage, - err.getCdmErr(), - err.getOemErr(), - err.getContext()); - if (_detailMessage != NULL) { - env->DeleteLocalRef(_detailMessage); + + if (gFields.exceptionCtors.count(std::string(className)) == 0) { + jniThrowException(env, className, msg); + } else { + jstring _detailMessage = CreateExceptionMsg(env, msg); + jobject exception = env->NewObject(gFields.exceptionCtors[std::string(className)].classId, + gFields.exceptionCtors[std::string(className)].init, _detailMessage, + err.getCdmErr(), err.getOemErr(), err.getContext()); + env->Throw(static_cast<jthrowable>(exception)); + if (_detailMessage != NULL) { + env->DeleteLocalRef(_detailMessage); + } } - return _status; } } // namespace anonymous @@ -952,6 +974,10 @@ static void android_media_MediaDrm_native_init(JNIEnv *env) { FIND_CLASS(clazz, "android/media/MediaDrm$LogMessage"); gFields.logMessage.classId = static_cast<jclass>(env->NewGlobalRef(clazz)); GET_METHOD_ID(gFields.logMessage.init, clazz, "<init>", "(JILjava/lang/String;)V"); + + resolveDrmExceptionCtor(env, "android/media/NotProvisionedException"); + resolveDrmExceptionCtor(env, "android/media/ResourceBusyException"); + resolveDrmExceptionCtor(env, "android/media/DeniedByServerException"); } static void android_media_MediaDrm_native_setup( @@ -2192,4 +2218,4 @@ static const JNINativeMethod gMethods[] = { int register_android_media_Drm(JNIEnv *env) { return AndroidRuntime::registerNativeMethods(env, "android/media/MediaDrm", gMethods, NELEM(gMethods)); -} +}
\ No newline at end of file diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java index 54c8addf598a..4dbf5436726c 100644 --- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java +++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaProfileReader.java @@ -89,6 +89,7 @@ public class MediaProfileReader audioEncoder != MediaRecorder.AudioEncoder.AMR_WB && audioEncoder != MediaRecorder.AudioEncoder.AAC && audioEncoder != MediaRecorder.AudioEncoder.HE_AAC && + audioEncoder != MediaRecorder.AudioEncoder.HE_AAC_PS && audioEncoder != MediaRecorder.AudioEncoder.AAC_ELD) { throw new IllegalArgumentException("Unsupported audio encodeer " + audioEncoder); } @@ -129,6 +130,7 @@ public class MediaProfileReader audioEncoderMap.put(MediaRecorder.AudioEncoder.AMR_WB, "amrwb"); audioEncoderMap.put(MediaRecorder.AudioEncoder.AAC, "aac"); audioEncoderMap.put(MediaRecorder.AudioEncoder.HE_AAC, "heaac"); + audioEncoderMap.put(MediaRecorder.AudioEncoder.HE_AAC_PS, "heaacps"); audioEncoderMap.put(MediaRecorder.AudioEncoder.AAC_ELD, "aaceld"); } } diff --git a/mime/java-res/vendor.mime.types b/mime/java-res/vendor.mime.types index afb8f9e4ef39..1861909f1e7a 100644 --- a/mime/java-res/vendor.mime.types +++ b/mime/java-res/vendor.mime.types @@ -39,3 +39,11 @@ # # Add your custom mappings below this line (with no "#" at the start of the line): +?audio/qcelp qcp +?audio/ac3 ac3 +?audio/eac3 ec3 +?audio/x-ape ape +?audio/x-dsf dsf +?audio/x-dff dff +?audio/dsd dsd +?video/divx divx
\ No newline at end of file diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java index 4738318472ea..2baf7aff1f1d 100644 --- a/opengl/java/android/opengl/GLSurfaceView.java +++ b/opengl/java/android/opengl/GLSurfaceView.java @@ -1570,6 +1570,10 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback if (view != null) { try { Trace.traceBegin(Trace.TRACE_TAG_VIEW, "onDrawFrame"); + if (mFinishDrawingRunnable != null) { + finishDrawingRunnable = mFinishDrawingRunnable; + mFinishDrawingRunnable = null; + } view.mRenderer.onDrawFrame(gl); if (finishDrawingRunnable != null) { finishDrawingRunnable.run(); diff --git a/packages/NetworkStack/src/android/net/dhcp/DhcpClient.java b/packages/NetworkStack/src/android/net/dhcp/DhcpClient.java new file mode 100644 index 000000000000..c47231d80948 --- /dev/null +++ b/packages/NetworkStack/src/android/net/dhcp/DhcpClient.java @@ -0,0 +1,1149 @@ +/* + * Copyright (C) 2015 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.net.dhcp; + +import static android.net.dhcp.DhcpPacket.DHCP_BROADCAST_ADDRESS; +import static android.net.dhcp.DhcpPacket.DHCP_DNS_SERVER; +import static android.net.dhcp.DhcpPacket.DHCP_DOMAIN_NAME; +import static android.net.dhcp.DhcpPacket.DHCP_LEASE_TIME; +import static android.net.dhcp.DhcpPacket.DHCP_MTU; +import static android.net.dhcp.DhcpPacket.DHCP_REBINDING_TIME; +import static android.net.dhcp.DhcpPacket.DHCP_RENEWAL_TIME; +import static android.net.dhcp.DhcpPacket.DHCP_ROUTER; +import static android.net.dhcp.DhcpPacket.DHCP_SUBNET_MASK; +import static android.net.dhcp.DhcpPacket.DHCP_VENDOR_INFO; +import static android.net.dhcp.DhcpPacket.INADDR_ANY; +import static android.net.dhcp.DhcpPacket.INADDR_BROADCAST; +import static android.net.util.NetworkStackUtils.closeSocketQuietly; +import static android.net.util.SocketUtils.makePacketSocketAddress; +import static android.system.OsConstants.AF_INET; +import static android.system.OsConstants.AF_PACKET; +import static android.system.OsConstants.ETH_P_IP; +import static android.system.OsConstants.IPPROTO_UDP; +import static android.system.OsConstants.SOCK_DGRAM; +import static android.system.OsConstants.SOCK_RAW; +import static android.system.OsConstants.SOL_SOCKET; +import static android.system.OsConstants.SO_BROADCAST; +import static android.system.OsConstants.SO_RCVBUF; +import static android.system.OsConstants.SO_REUSEADDR; + +import static com.android.server.util.NetworkStackConstants.IPV4_ADDR_ANY; + +import android.content.Context; +import android.net.DhcpResults; +import android.net.InetAddresses; +import android.net.TrafficStats; +import android.net.ip.IpClient; +import android.net.metrics.DhcpClientEvent; +import android.net.metrics.DhcpErrorEvent; +import android.net.metrics.IpConnectivityLog; +import android.net.util.InterfaceParams; +import android.net.util.NetworkStackUtils; +import android.net.util.SocketUtils; +import android.os.Message; +import android.os.SystemClock; +import android.system.ErrnoException; +import android.system.Os; +import android.util.EventLog; +import android.util.Log; +import android.util.SparseArray; + +import com.android.internal.util.HexDump; +import com.android.internal.util.MessageUtils; +import com.android.internal.util.State; +import com.android.internal.util.StateMachine; +import com.android.internal.util.TrafficStatsConstants; +import com.android.internal.util.WakeupMessage; +import com.android.networkstack.R; + +import java.io.FileDescriptor; +import java.io.IOException; +import java.net.Inet4Address; +import java.net.SocketAddress; +import java.net.SocketException; +import java.nio.ByteBuffer; +import java.util.Arrays; +import java.util.Random; + +/** + * A DHCPv4 client. + * + * Written to behave similarly to the DhcpStateMachine + dhcpcd 5.5.6 combination used in Android + * 5.1 and below, as configured on Nexus 6. The interface is the same as DhcpStateMachine. + * + * TODO: + * + * - Exponential backoff when receiving NAKs (not specified by the RFC, but current behaviour). + * - Support persisting lease state and support INIT-REBOOT. Android 5.1 does this, but it does not + * do so correctly: instead of requesting the lease last obtained on a particular network (e.g., a + * given SSID), it requests the last-leased IP address on the same interface, causing a delay if + * the server NAKs or a timeout if it doesn't. + * + * Known differences from current behaviour: + * + * - Does not request the "static routes" option. + * - Does not support BOOTP servers. DHCP has been around since 1993, should be everywhere now. + * - Requests the "broadcast" option, but does nothing with it. + * - Rejects invalid subnet masks such as 255.255.255.1 (current code treats that as 255.255.255.0). + * + * @hide + */ +public class DhcpClient extends StateMachine { + + private static final String TAG = "DhcpClient"; + private static final boolean DBG = true; + private static final boolean STATE_DBG = Log.isLoggable(TAG, Log.DEBUG); + private static final boolean MSG_DBG = Log.isLoggable(TAG, Log.DEBUG); + private static final boolean PACKET_DBG = Log.isLoggable(TAG, Log.DEBUG); + + // Metrics events: must be kept in sync with server-side aggregation code. + /** Represents transitions from DhcpInitState to DhcpBoundState */ + private static final String EVENT_INITIAL_BOUND = "InitialBoundState"; + /** Represents transitions from and to DhcpBoundState via DhcpRenewingState */ + private static final String EVENT_RENEWING_BOUND = "RenewingBoundState"; + + // Timers and timeouts. + private static final int SECONDS = 1000; + private static final int FIRST_TIMEOUT_MS = 2 * SECONDS; + private static final int MAX_TIMEOUT_MS = 128 * SECONDS; + + // This is not strictly needed, since the client is asynchronous and implements exponential + // backoff. It's maintained for backwards compatibility with the previous DHCP code, which was + // a blocking operation with a 30-second timeout. We pick 36 seconds so we can send packets at + // t=0, t=2, t=6, t=14, t=30, allowing for 10% jitter. + private static final int DHCP_TIMEOUT_MS = 36 * SECONDS; + + // DhcpClient uses IpClient's handler. + private static final int PUBLIC_BASE = IpClient.DHCPCLIENT_CMD_BASE; + + // Below constants are picked up by MessageUtils and exempt from ProGuard optimization. + /* Commands from controller to start/stop DHCP */ + public static final int CMD_START_DHCP = PUBLIC_BASE + 1; + public static final int CMD_STOP_DHCP = PUBLIC_BASE + 2; + + /* Notification from DHCP state machine prior to DHCP discovery/renewal */ + public static final int CMD_PRE_DHCP_ACTION = PUBLIC_BASE + 3; + /* Notification from DHCP state machine post DHCP discovery/renewal. Indicates + * success/failure */ + public static final int CMD_POST_DHCP_ACTION = PUBLIC_BASE + 4; + /* Notification from DHCP state machine before quitting */ + public static final int CMD_ON_QUIT = PUBLIC_BASE + 5; + + /* Command from controller to indicate DHCP discovery/renewal can continue + * after pre DHCP action is complete */ + public static final int CMD_PRE_DHCP_ACTION_COMPLETE = PUBLIC_BASE + 6; + + /* Command and event notification to/from IpManager requesting the setting + * (or clearing) of an IPv4 LinkAddress. + */ + public static final int CMD_CLEAR_LINKADDRESS = PUBLIC_BASE + 7; + public static final int CMD_CONFIGURE_LINKADDRESS = PUBLIC_BASE + 8; + public static final int EVENT_LINKADDRESS_CONFIGURED = PUBLIC_BASE + 9; + + /* Command from controller to start DHCP with Rapid commit */ + public static final int CMD_START_DHCP_RAPID_COMMIT = PUBLIC_BASE + 10; + + /* Message.arg1 arguments to CMD_POST_DHCP_ACTION notification */ + public static final int DHCP_SUCCESS = 1; + public static final int DHCP_FAILURE = 2; + + // Internal messages. + private static final int PRIVATE_BASE = IpClient.DHCPCLIENT_CMD_BASE + 100; + private static final int CMD_KICK = PRIVATE_BASE + 1; + private static final int CMD_RECEIVED_PACKET = PRIVATE_BASE + 2; + private static final int CMD_TIMEOUT = PRIVATE_BASE + 3; + private static final int CMD_RENEW_DHCP = PRIVATE_BASE + 4; + private static final int CMD_REBIND_DHCP = PRIVATE_BASE + 5; + private static final int CMD_EXPIRE_DHCP = PRIVATE_BASE + 6; + + // For message logging. + private static final Class[] sMessageClasses = { DhcpClient.class }; + private static final SparseArray<String> sMessageNames = + MessageUtils.findMessageNames(sMessageClasses); + + // DHCP parameters that we request. + /* package */ static final byte[] REQUESTED_PARAMS = new byte[] { + DHCP_SUBNET_MASK, + DHCP_ROUTER, + DHCP_DNS_SERVER, + DHCP_DOMAIN_NAME, + DHCP_MTU, + DHCP_BROADCAST_ADDRESS, // TODO: currently ignored. + DHCP_LEASE_TIME, + DHCP_RENEWAL_TIME, + DHCP_REBINDING_TIME, + DHCP_VENDOR_INFO, + }; + + // DHCP flag that means "yes, we support unicast." + private static final boolean DO_UNICAST = false; + + // System services / libraries we use. + private final Context mContext; + private final Random mRandom; + private final IpConnectivityLog mMetricsLog = new IpConnectivityLog(); + + // Sockets. + // - We use a packet socket to receive, because servers send us packets bound for IP addresses + // which we have not yet configured, and the kernel protocol stack drops these. + // - We use a UDP socket to send, so the kernel handles ARP and routing for us (DHCP servers can + // be off-link as well as on-link). + private FileDescriptor mPacketSock; + private FileDescriptor mUdpSock; + private ReceiveThread mReceiveThread; + + // State variables. + private final StateMachine mController; + private final WakeupMessage mKickAlarm; + private final WakeupMessage mTimeoutAlarm; + private final WakeupMessage mRenewAlarm; + private final WakeupMessage mRebindAlarm; + private final WakeupMessage mExpiryAlarm; + private final String mIfaceName; + + private boolean mRegisteredForPreDhcpNotification; + private InterfaceParams mIface; + // TODO: MacAddress-ify more of this class hierarchy. + private byte[] mHwAddr; + private SocketAddress mInterfaceBroadcastAddr; + private int mTransactionId; + private long mTransactionStartMillis; + private DhcpResults mDhcpLease; + private long mDhcpLeaseExpiry; + private DhcpResults mOffer; + public boolean mRapidCommit; + public boolean mDiscoverSent; + + // Milliseconds SystemClock timestamps used to record transition times to DhcpBoundState. + private long mLastInitEnterTime; + private long mLastBoundExitTime; + + // States. + private State mStoppedState = new StoppedState(); + private State mDhcpState = new DhcpState(); + private State mDhcpInitState = new DhcpInitState(); + private State mDhcpRapidCommitInitState = new DhcpRapidCommitInitState(); + private State mDhcpSelectingState = new DhcpSelectingState(); + private State mDhcpRequestingState = new DhcpRequestingState(); + private State mDhcpHaveLeaseState = new DhcpHaveLeaseState(); + private State mConfiguringInterfaceState = new ConfiguringInterfaceState(); + private State mDhcpBoundState = new DhcpBoundState(); + private State mDhcpRenewingState = new DhcpRenewingState(); + private State mDhcpRebindingState = new DhcpRebindingState(); + private State mDhcpInitRebootState = new DhcpInitRebootState(); + private State mDhcpRebootingState = new DhcpRebootingState(); + private State mWaitBeforeStartState = new WaitBeforeStartState(mDhcpInitState); + private State mRapidCommitWaitBeforeStartState = new WaitBeforeStartState(mDhcpRapidCommitInitState); + private State mWaitBeforeRenewalState = new WaitBeforeRenewalState(mDhcpRenewingState); + + private WakeupMessage makeWakeupMessage(String cmdName, int cmd) { + cmdName = DhcpClient.class.getSimpleName() + "." + mIfaceName + "." + cmdName; + return new WakeupMessage(mContext, getHandler(), cmdName, cmd); + } + + // TODO: Take an InterfaceParams instance instead of an interface name String. + private DhcpClient(Context context, StateMachine controller, String iface) { + super(TAG, controller.getHandler()); + + mContext = context; + mController = controller; + mIfaceName = iface; + + addState(mStoppedState); + addState(mDhcpState); + addState(mDhcpInitState, mDhcpState); + addState(mDhcpRapidCommitInitState, mDhcpState); + addState(mWaitBeforeStartState, mDhcpState); + addState(mRapidCommitWaitBeforeStartState, mDhcpState); + addState(mDhcpSelectingState, mDhcpState); + addState(mDhcpRequestingState, mDhcpState); + addState(mDhcpHaveLeaseState, mDhcpState); + addState(mConfiguringInterfaceState, mDhcpHaveLeaseState); + addState(mDhcpBoundState, mDhcpHaveLeaseState); + addState(mWaitBeforeRenewalState, mDhcpHaveLeaseState); + addState(mDhcpRenewingState, mDhcpHaveLeaseState); + addState(mDhcpRebindingState, mDhcpHaveLeaseState); + addState(mDhcpInitRebootState, mDhcpState); + addState(mDhcpRebootingState, mDhcpState); + + setInitialState(mStoppedState); + + mRandom = new Random(); + + // Used to schedule packet retransmissions. + mKickAlarm = makeWakeupMessage("KICK", CMD_KICK); + // Used to time out PacketRetransmittingStates. + mTimeoutAlarm = makeWakeupMessage("TIMEOUT", CMD_TIMEOUT); + // Used to schedule DHCP reacquisition. + mRenewAlarm = makeWakeupMessage("RENEW", CMD_RENEW_DHCP); + mRebindAlarm = makeWakeupMessage("REBIND", CMD_REBIND_DHCP); + mExpiryAlarm = makeWakeupMessage("EXPIRY", CMD_EXPIRE_DHCP); + } + + public void registerForPreDhcpNotification() { + mRegisteredForPreDhcpNotification = true; + } + + public static DhcpClient makeDhcpClient( + Context context, StateMachine controller, InterfaceParams ifParams) { + DhcpClient client = new DhcpClient(context, controller, ifParams.name); + client.mIface = ifParams; + client.start(); + return client; + } + + private boolean initInterface() { + if (mIface == null) mIface = InterfaceParams.getByName(mIfaceName); + if (mIface == null) { + Log.e(TAG, "Can't determine InterfaceParams for " + mIfaceName); + return false; + } + + mHwAddr = mIface.macAddr.toByteArray(); + mInterfaceBroadcastAddr = makePacketSocketAddress(mIface.index, DhcpPacket.ETHER_BROADCAST); + return true; + } + + private void startNewTransaction() { + mTransactionId = mRandom.nextInt(); + mTransactionStartMillis = SystemClock.elapsedRealtime(); + } + + private boolean initSockets() { + return initPacketSocket() && initUdpSocket(); + } + + private boolean initPacketSocket() { + try { + mPacketSock = Os.socket(AF_PACKET, SOCK_RAW, ETH_P_IP); + SocketAddress addr = makePacketSocketAddress((short) ETH_P_IP, mIface.index); + Os.bind(mPacketSock, addr); + NetworkStackUtils.attachDhcpFilter(mPacketSock); + } catch(SocketException|ErrnoException e) { + Log.e(TAG, "Error creating packet socket", e); + return false; + } + return true; + } + + private boolean initUdpSocket() { + final int oldTag = TrafficStats.getAndSetThreadStatsTag( + TrafficStatsConstants.TAG_SYSTEM_DHCP); + try { + mUdpSock = Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); + SocketUtils.bindSocketToInterface(mUdpSock, mIfaceName); + Os.setsockoptInt(mUdpSock, SOL_SOCKET, SO_REUSEADDR, 1); + Os.setsockoptInt(mUdpSock, SOL_SOCKET, SO_BROADCAST, 1); + Os.setsockoptInt(mUdpSock, SOL_SOCKET, SO_RCVBUF, 0); + Os.bind(mUdpSock, IPV4_ADDR_ANY, DhcpPacket.DHCP_CLIENT); + } catch(SocketException|ErrnoException e) { + Log.e(TAG, "Error creating UDP socket", e); + return false; + } finally { + TrafficStats.setThreadStatsTag(oldTag); + } + return true; + } + + private boolean connectUdpSock(Inet4Address to) { + try { + Os.connect(mUdpSock, to, DhcpPacket.DHCP_SERVER); + return true; + } catch (SocketException|ErrnoException e) { + Log.e(TAG, "Error connecting UDP socket", e); + return false; + } + } + + private void closeSockets() { + closeSocketQuietly(mUdpSock); + closeSocketQuietly(mPacketSock); + } + + class ReceiveThread extends Thread { + + private final byte[] mPacket = new byte[DhcpPacket.MAX_LENGTH]; + private volatile boolean mStopped = false; + + public void halt() { + mStopped = true; + closeSockets(); // Interrupts the read() call the thread is blocked in. + } + + @Override + public void run() { + if (DBG) Log.d(TAG, "Receive thread started"); + while (!mStopped) { + int length = 0; // Or compiler can't tell it's initialized if a parse error occurs. + try { + length = Os.read(mPacketSock, mPacket, 0, mPacket.length); + DhcpPacket packet = null; + packet = DhcpPacket.decodeFullPacket(mPacket, length, DhcpPacket.ENCAP_L2); + if (DBG) Log.d(TAG, "Received packet: " + packet); + sendMessage(CMD_RECEIVED_PACKET, packet); + } catch (IOException|ErrnoException e) { + if (!mStopped) { + Log.e(TAG, "Read error", e); + logError(DhcpErrorEvent.RECEIVE_ERROR); + } + } catch (DhcpPacket.ParseException e) { + Log.e(TAG, "Can't parse packet: " + e.getMessage()); + if (PACKET_DBG) { + Log.d(TAG, HexDump.dumpHexString(mPacket, 0, length)); + } + if (e.errorCode == DhcpErrorEvent.DHCP_NO_COOKIE) { + int snetTagId = 0x534e4554; + String bugId = "31850211"; + int uid = -1; + String data = DhcpPacket.ParseException.class.getName(); + EventLog.writeEvent(snetTagId, bugId, uid, data); + } + logError(e.errorCode); + } + } + if (DBG) Log.d(TAG, "Receive thread stopped"); + } + } + + private short getSecs() { + return (short) ((SystemClock.elapsedRealtime() - mTransactionStartMillis) / 1000); + } + + private boolean transmitPacket(ByteBuffer buf, String description, int encap, Inet4Address to) { + try { + if (encap == DhcpPacket.ENCAP_L2) { + if (DBG) Log.d(TAG, "Broadcasting " + description); + Os.sendto(mPacketSock, buf.array(), 0, buf.limit(), 0, mInterfaceBroadcastAddr); + } else if (encap == DhcpPacket.ENCAP_BOOTP && to.equals(INADDR_BROADCAST)) { + if (DBG) Log.d(TAG, "Broadcasting " + description); + // We only send L3-encapped broadcasts in DhcpRebindingState, + // where we have an IP address and an unconnected UDP socket. + // + // N.B.: We only need this codepath because DhcpRequestPacket + // hardcodes the source IP address to 0.0.0.0. We could reuse + // the packet socket if this ever changes. + Os.sendto(mUdpSock, buf, 0, to, DhcpPacket.DHCP_SERVER); + } else { + // It's safe to call getpeername here, because we only send unicast packets if we + // have an IP address, and we connect the UDP socket in DhcpBoundState#enter. + if (DBG) Log.d(TAG, String.format("Unicasting %s to %s", + description, Os.getpeername(mUdpSock))); + Os.write(mUdpSock, buf); + } + } catch(ErrnoException|IOException e) { + Log.e(TAG, "Can't send packet: ", e); + return false; + } + return true; + } + + public ByteBuffer buildDiscoverWithRapidCommitPacket() { + startNewTransaction(); + return DhcpPacket.buildDiscoverPacket( + DhcpPacket.ENCAP_L2, mTransactionId, getSecs(), mHwAddr, + DO_UNICAST, REQUESTED_PARAMS, mRapidCommit); + } + + private boolean sendDiscoverPacket() { + ByteBuffer packet = DhcpPacket.buildDiscoverPacket( + DhcpPacket.ENCAP_L2, mTransactionId, getSecs(), mHwAddr, + DO_UNICAST, REQUESTED_PARAMS, mRapidCommit); + return transmitPacket(packet, "DHCPDISCOVER", DhcpPacket.ENCAP_L2, INADDR_BROADCAST); + } + + private boolean sendRequestPacket( + Inet4Address clientAddress, Inet4Address requestedAddress, + Inet4Address serverAddress, Inet4Address to) { + // TODO: should we use the transaction ID from the server? + final int encap = INADDR_ANY.equals(clientAddress) + ? DhcpPacket.ENCAP_L2 : DhcpPacket.ENCAP_BOOTP; + + ByteBuffer packet = DhcpPacket.buildRequestPacket( + encap, mTransactionId, getSecs(), clientAddress, + DO_UNICAST, mHwAddr, requestedAddress, + serverAddress, REQUESTED_PARAMS, null); + String serverStr = (serverAddress != null) ? serverAddress.getHostAddress() : null; + String description = "DHCPREQUEST ciaddr=" + clientAddress.getHostAddress() + + " request=" + requestedAddress.getHostAddress() + + " serverid=" + serverStr; + return transmitPacket(packet, description, encap, to); + } + + private void scheduleLeaseTimers() { + if (mDhcpLeaseExpiry == 0) { + Log.d(TAG, "Infinite lease, no timer scheduling needed"); + return; + } + + final long now = SystemClock.elapsedRealtime(); + + // TODO: consider getting the renew and rebind timers from T1 and T2. + // See also: + // https://tools.ietf.org/html/rfc2131#section-4.4.5 + // https://tools.ietf.org/html/rfc1533#section-9.9 + // https://tools.ietf.org/html/rfc1533#section-9.10 + final long remainingDelay = mDhcpLeaseExpiry - now; + final long renewDelay = remainingDelay / 2; + final long rebindDelay = remainingDelay * 7 / 8; + mRenewAlarm.schedule(now + renewDelay); + mRebindAlarm.schedule(now + rebindDelay); + mExpiryAlarm.schedule(now + remainingDelay); + Log.d(TAG, "Scheduling renewal in " + (renewDelay / 1000) + "s"); + Log.d(TAG, "Scheduling rebind in " + (rebindDelay / 1000) + "s"); + Log.d(TAG, "Scheduling expiry in " + (remainingDelay / 1000) + "s"); + } + + private void notifySuccess() { + mController.sendMessage( + CMD_POST_DHCP_ACTION, DHCP_SUCCESS, 0, new DhcpResults(mDhcpLease)); + } + + private void notifyFailure() { + mController.sendMessage(CMD_POST_DHCP_ACTION, DHCP_FAILURE, 0, null); + } + + private void acceptDhcpResults(DhcpResults results, String msg) { + mDhcpLease = results; + if (mDhcpLease.dnsServers.isEmpty()) { + // supplement customized dns servers + String[] dnsServersList = + mContext.getResources().getStringArray(R.array.config_default_dns_servers); + for (final String dnsServer : dnsServersList) { + try { + mDhcpLease.dnsServers.add(InetAddresses.parseNumericAddress(dnsServer)); + } catch (IllegalArgumentException e) { + Log.e(TAG, "Invalid default DNS server: " + dnsServer, e); + } + } + } + mOffer = null; + Log.d(TAG, msg + " lease: " + mDhcpLease); + notifySuccess(); + } + + private void clearDhcpState() { + mDhcpLease = null; + mDhcpLeaseExpiry = 0; + mOffer = null; + } + + /** + * Quit the DhcpStateMachine. + * + * @hide + */ + public void doQuit() { + Log.d(TAG, "doQuit"); + quit(); + } + + @Override + protected void onQuitting() { + Log.d(TAG, "onQuitting"); + mController.sendMessage(CMD_ON_QUIT); + } + + abstract class LoggingState extends State { + private long mEnterTimeMs; + + @Override + public void enter() { + if (STATE_DBG) Log.d(TAG, "Entering state " + getName()); + mEnterTimeMs = SystemClock.elapsedRealtime(); + } + + @Override + public void exit() { + long durationMs = SystemClock.elapsedRealtime() - mEnterTimeMs; + logState(getName(), (int) durationMs); + } + + private String messageName(int what) { + return sMessageNames.get(what, Integer.toString(what)); + } + + private String messageToString(Message message) { + long now = SystemClock.uptimeMillis(); + return new StringBuilder(" ") + .append(message.getWhen() - now) + .append(messageName(message.what)) + .append(" ").append(message.arg1) + .append(" ").append(message.arg2) + .append(" ").append(message.obj) + .toString(); + } + + @Override + public boolean processMessage(Message message) { + if (MSG_DBG) { + Log.d(TAG, getName() + messageToString(message)); + } + return NOT_HANDLED; + } + + @Override + public String getName() { + // All DhcpClient's states are inner classes with a well defined name. + // Use getSimpleName() and avoid super's getName() creating new String instances. + return getClass().getSimpleName(); + } + } + + // Sends CMD_PRE_DHCP_ACTION to the controller, waits for the controller to respond with + // CMD_PRE_DHCP_ACTION_COMPLETE, and then transitions to mOtherState. + abstract class WaitBeforeOtherState extends LoggingState { + protected State mOtherState; + + @Override + public void enter() { + super.enter(); + mController.sendMessage(CMD_PRE_DHCP_ACTION); + } + + @Override + public boolean processMessage(Message message) { + super.processMessage(message); + switch (message.what) { + case CMD_PRE_DHCP_ACTION_COMPLETE: + transitionTo(mOtherState); + return HANDLED; + default: + return NOT_HANDLED; + } + } + } + + class StoppedState extends State { + @Override + public boolean processMessage(Message message) { + switch (message.what) { + case CMD_START_DHCP: + if (mRegisteredForPreDhcpNotification) { + transitionTo(mWaitBeforeStartState); + } else { + transitionTo(mDhcpInitState); + } + return HANDLED; + case CMD_START_DHCP_RAPID_COMMIT: + mRapidCommit = message.arg1 == 1 ? true: false; + mDiscoverSent = message.arg2 == 1 ? true : false; + if (mRegisteredForPreDhcpNotification) { + if (mRapidCommit) { + transitionTo(mRapidCommitWaitBeforeStartState); + } else { + transitionTo(mWaitBeforeStartState); + } + } else { + if (mRapidCommit) { + transitionTo(mDhcpRapidCommitInitState); + } else { + transitionTo(mDhcpInitState); + } + } + return HANDLED; + default: + return NOT_HANDLED; + } + } + } + + class DhcpRapidCommitInitState extends PacketRetransmittingState { + public DhcpRapidCommitInitState() { + super(); + } + + @Override + public void enter() { + super.enter(); + if (!mDiscoverSent) { + startNewTransaction(); + } + mLastInitEnterTime = SystemClock.elapsedRealtime(); + } + + protected boolean sendPacket() { + if (mDiscoverSent) { + mDiscoverSent = false; + return true; + } + return sendDiscoverPacket(); + } + + protected void receivePacket(DhcpPacket packet) { + if (!isValidPacket(packet)) return; + if (packet instanceof DhcpOfferPacket) { + mOffer = packet.toDhcpResults(); + if (mOffer != null) { + Log.d(TAG, "DhcpRapidCommitInitState:Got pending lease: " + mOffer); + transitionTo(mDhcpRequestingState); + } + } else if ((packet instanceof DhcpAckPacket)) { + DhcpResults results = packet.toDhcpResults(); + Log.d(TAG,"Received ACK in DhcpRapidCommitInitState"); + if (results != null) { + setDhcpLeaseExpiry(packet); + acceptDhcpResults(results, "Confirmed"); + transitionTo(mConfiguringInterfaceState); + } + } else if (packet instanceof DhcpNakPacket) { + Log.d(TAG, "Received NAK in DhcpRapidCommitInitState, returning to INIT"); + mOffer = null; + transitionTo(mDhcpInitState); + } + } + } + + class WaitBeforeStartState extends WaitBeforeOtherState { + public WaitBeforeStartState(State otherState) { + super(); + mOtherState = otherState; + } + } + + class WaitBeforeRenewalState extends WaitBeforeOtherState { + public WaitBeforeRenewalState(State otherState) { + super(); + mOtherState = otherState; + } + } + + class DhcpState extends State { + @Override + public void enter() { + clearDhcpState(); + if (initInterface() && initSockets()) { + mReceiveThread = new ReceiveThread(); + mReceiveThread.start(); + } else { + notifyFailure(); + transitionTo(mStoppedState); + } + } + + @Override + public void exit() { + if (mReceiveThread != null) { + mReceiveThread.halt(); // Also closes sockets. + mReceiveThread = null; + } + clearDhcpState(); + } + + @Override + public boolean processMessage(Message message) { + super.processMessage(message); + switch (message.what) { + case CMD_STOP_DHCP: + transitionTo(mStoppedState); + return HANDLED; + default: + return NOT_HANDLED; + } + } + } + + public boolean isValidPacket(DhcpPacket packet) { + // TODO: check checksum. + int xid = packet.getTransactionId(); + if (xid != mTransactionId) { + Log.d(TAG, "Unexpected transaction ID " + xid + ", expected " + mTransactionId); + return false; + } + if (!Arrays.equals(packet.getClientMac(), mHwAddr)) { + Log.d(TAG, "MAC addr mismatch: got " + + HexDump.toHexString(packet.getClientMac()) + ", expected " + + HexDump.toHexString(packet.getClientMac())); + return false; + } + return true; + } + + public void setDhcpLeaseExpiry(DhcpPacket packet) { + long leaseTimeMillis = packet.getLeaseTimeMillis(); + mDhcpLeaseExpiry = + (leaseTimeMillis > 0) ? SystemClock.elapsedRealtime() + leaseTimeMillis : 0; + } + + /** + * Retransmits packets using jittered exponential backoff with an optional timeout. Packet + * transmission is triggered by CMD_KICK, which is sent by an AlarmManager alarm. If a subclass + * sets mTimeout to a positive value, then timeout() is called by an AlarmManager alarm mTimeout + * milliseconds after entering the state. Kicks and timeouts are cancelled when leaving the + * state. + * + * Concrete subclasses must implement sendPacket, which is called when the alarm fires and a + * packet needs to be transmitted, and receivePacket, which is triggered by CMD_RECEIVED_PACKET + * sent by the receive thread. They may also set mTimeout and implement timeout. + */ + abstract class PacketRetransmittingState extends LoggingState { + + private int mTimer; + protected int mTimeout = 0; + + @Override + public void enter() { + super.enter(); + initTimer(); + maybeInitTimeout(); + sendMessage(CMD_KICK); + } + + @Override + public boolean processMessage(Message message) { + super.processMessage(message); + switch (message.what) { + case CMD_KICK: + sendPacket(); + scheduleKick(); + return HANDLED; + case CMD_RECEIVED_PACKET: + receivePacket((DhcpPacket) message.obj); + return HANDLED; + case CMD_TIMEOUT: + timeout(); + return HANDLED; + default: + return NOT_HANDLED; + } + } + + @Override + public void exit() { + super.exit(); + mKickAlarm.cancel(); + mTimeoutAlarm.cancel(); + } + + abstract protected boolean sendPacket(); + abstract protected void receivePacket(DhcpPacket packet); + protected void timeout() {} + + protected void initTimer() { + mTimer = FIRST_TIMEOUT_MS; + } + + protected int jitterTimer(int baseTimer) { + int maxJitter = baseTimer / 10; + int jitter = mRandom.nextInt(2 * maxJitter) - maxJitter; + return baseTimer + jitter; + } + + protected void scheduleKick() { + long now = SystemClock.elapsedRealtime(); + long timeout = jitterTimer(mTimer); + long alarmTime = now + timeout; + mKickAlarm.schedule(alarmTime); + mTimer *= 2; + if (mTimer > MAX_TIMEOUT_MS) { + mTimer = MAX_TIMEOUT_MS; + } + } + + protected void maybeInitTimeout() { + if (mTimeout > 0) { + long alarmTime = SystemClock.elapsedRealtime() + mTimeout; + mTimeoutAlarm.schedule(alarmTime); + } + } + } + + class DhcpInitState extends PacketRetransmittingState { + public DhcpInitState() { + super(); + } + + @Override + public void enter() { + super.enter(); + startNewTransaction(); + mLastInitEnterTime = SystemClock.elapsedRealtime(); + } + + protected boolean sendPacket() { + return sendDiscoverPacket(); + } + + protected void receivePacket(DhcpPacket packet) { + if (!isValidPacket(packet)) return; + if (!(packet instanceof DhcpOfferPacket)) return; + mOffer = packet.toDhcpResults(); + if (mOffer != null) { + Log.d(TAG, "Got pending lease: " + mOffer); + transitionTo(mDhcpRequestingState); + } + } + } + + // Not implemented. We request the first offer we receive. + class DhcpSelectingState extends LoggingState { + } + + class DhcpRequestingState extends PacketRetransmittingState { + public DhcpRequestingState() { + mTimeout = DHCP_TIMEOUT_MS / 2; + } + + protected boolean sendPacket() { + return sendRequestPacket( + INADDR_ANY, // ciaddr + (Inet4Address) mOffer.ipAddress.getAddress(), // DHCP_REQUESTED_IP + (Inet4Address) mOffer.serverAddress, // DHCP_SERVER_IDENTIFIER + INADDR_BROADCAST); // packet destination address + } + + protected void receivePacket(DhcpPacket packet) { + if (!isValidPacket(packet)) return; + if ((packet instanceof DhcpAckPacket)) { + DhcpResults results = packet.toDhcpResults(); + if (results != null) { + setDhcpLeaseExpiry(packet); + acceptDhcpResults(results, "Confirmed"); + transitionTo(mConfiguringInterfaceState); + } + } else if (packet instanceof DhcpNakPacket) { + // TODO: Wait a while before returning into INIT state. + Log.d(TAG, "Received NAK, returning to INIT"); + mOffer = null; + transitionTo(mDhcpInitState); + } + } + + @Override + protected void timeout() { + // After sending REQUESTs unsuccessfully for a while, go back to init. + transitionTo(mDhcpInitState); + } + } + + class DhcpHaveLeaseState extends State { + @Override + public boolean processMessage(Message message) { + switch (message.what) { + case CMD_EXPIRE_DHCP: + Log.d(TAG, "Lease expired!"); + notifyFailure(); + transitionTo(mDhcpInitState); + return HANDLED; + default: + return NOT_HANDLED; + } + } + + @Override + public void exit() { + // Clear any extant alarms. + mRenewAlarm.cancel(); + mRebindAlarm.cancel(); + mExpiryAlarm.cancel(); + clearDhcpState(); + // Tell IpManager to clear the IPv4 address. There is no need to + // wait for confirmation since any subsequent packets are sent from + // INADDR_ANY anyway (DISCOVER, REQUEST). + mController.sendMessage(CMD_CLEAR_LINKADDRESS); + } + } + + class ConfiguringInterfaceState extends LoggingState { + @Override + public void enter() { + super.enter(); + mController.sendMessage(CMD_CONFIGURE_LINKADDRESS, mDhcpLease.ipAddress); + } + + @Override + public boolean processMessage(Message message) { + super.processMessage(message); + switch (message.what) { + case EVENT_LINKADDRESS_CONFIGURED: + transitionTo(mDhcpBoundState); + return HANDLED; + default: + return NOT_HANDLED; + } + } + } + + class DhcpBoundState extends LoggingState { + @Override + public void enter() { + super.enter(); + if (mDhcpLease.serverAddress != null && !connectUdpSock(mDhcpLease.serverAddress)) { + // There's likely no point in going into DhcpInitState here, we'll probably + // just repeat the transaction, get the same IP address as before, and fail. + // + // NOTE: It is observed that connectUdpSock() basically never fails, due to + // SO_BINDTODEVICE. Examining the local socket address shows it will happily + // return an IPv4 address from another interface, or even return "0.0.0.0". + // + // TODO: Consider deleting this check, following testing on several kernels. + notifyFailure(); + transitionTo(mStoppedState); + } + + scheduleLeaseTimers(); + logTimeToBoundState(); + } + + @Override + public void exit() { + super.exit(); + mLastBoundExitTime = SystemClock.elapsedRealtime(); + } + + @Override + public boolean processMessage(Message message) { + super.processMessage(message); + switch (message.what) { + case CMD_RENEW_DHCP: + if (mRegisteredForPreDhcpNotification) { + transitionTo(mWaitBeforeRenewalState); + } else { + transitionTo(mDhcpRenewingState); + } + return HANDLED; + default: + return NOT_HANDLED; + } + } + + private void logTimeToBoundState() { + long now = SystemClock.elapsedRealtime(); + if (mLastBoundExitTime > mLastInitEnterTime) { + logState(EVENT_RENEWING_BOUND, (int) (now - mLastBoundExitTime)); + } else { + logState(EVENT_INITIAL_BOUND, (int) (now - mLastInitEnterTime)); + } + } + } + + abstract class DhcpReacquiringState extends PacketRetransmittingState { + protected String mLeaseMsg; + + @Override + public void enter() { + super.enter(); + startNewTransaction(); + } + + abstract protected Inet4Address packetDestination(); + + protected boolean sendPacket() { + return sendRequestPacket( + (Inet4Address) mDhcpLease.ipAddress.getAddress(), // ciaddr + INADDR_ANY, // DHCP_REQUESTED_IP + null, // DHCP_SERVER_IDENTIFIER + packetDestination()); // packet destination address + } + + protected void receivePacket(DhcpPacket packet) { + if (!isValidPacket(packet)) return; + if ((packet instanceof DhcpAckPacket)) { + final DhcpResults results = packet.toDhcpResults(); + if (results != null) { + if (!mDhcpLease.ipAddress.equals(results.ipAddress)) { + Log.d(TAG, "Renewed lease not for our current IP address!"); + notifyFailure(); + transitionTo(mDhcpInitState); + } + setDhcpLeaseExpiry(packet); + // Updating our notion of DhcpResults here only causes the + // DNS servers and routes to be updated in LinkProperties + // in IpManager and by any overridden relevant handlers of + // the registered IpManager.Callback. IP address changes + // are not supported here. + acceptDhcpResults(results, mLeaseMsg); + transitionTo(mDhcpBoundState); + } + } else if (packet instanceof DhcpNakPacket) { + Log.d(TAG, "Received NAK, returning to INIT"); + notifyFailure(); + transitionTo(mDhcpInitState); + } + } + } + + class DhcpRenewingState extends DhcpReacquiringState { + public DhcpRenewingState() { + mLeaseMsg = "Renewed"; + } + + @Override + public boolean processMessage(Message message) { + if (super.processMessage(message) == HANDLED) { + return HANDLED; + } + + switch (message.what) { + case CMD_REBIND_DHCP: + transitionTo(mDhcpRebindingState); + return HANDLED; + default: + return NOT_HANDLED; + } + } + + @Override + protected Inet4Address packetDestination() { + // Not specifying a SERVER_IDENTIFIER option is a violation of RFC 2131, but... + // http://b/25343517 . Try to make things work anyway by using broadcast renews. + return (mDhcpLease.serverAddress != null) ? + mDhcpLease.serverAddress : INADDR_BROADCAST; + } + } + + class DhcpRebindingState extends DhcpReacquiringState { + public DhcpRebindingState() { + mLeaseMsg = "Rebound"; + } + + @Override + public void enter() { + super.enter(); + + // We need to broadcast and possibly reconnect the socket to a + // completely different server. + closeSocketQuietly(mUdpSock); + if (!initUdpSocket()) { + Log.e(TAG, "Failed to recreate UDP socket"); + transitionTo(mDhcpInitState); + } + } + + @Override + protected Inet4Address packetDestination() { + return INADDR_BROADCAST; + } + } + + class DhcpInitRebootState extends LoggingState { + } + + class DhcpRebootingState extends LoggingState { + } + + private void logError(int errorCode) { + mMetricsLog.log(mIfaceName, new DhcpErrorEvent(errorCode)); + } + + private void logState(String name, int durationMs) { + final DhcpClientEvent event = new DhcpClientEvent.Builder() + .setMsg(name) + .setDurationMs(durationMs) + .build(); + mMetricsLog.log(mIfaceName, event); + } +} diff --git a/packages/NetworkStack/src/android/net/dhcp/DhcpDiscoverPacket.java b/packages/NetworkStack/src/android/net/dhcp/DhcpDiscoverPacket.java new file mode 100644 index 000000000000..19beb0881683 --- /dev/null +++ b/packages/NetworkStack/src/android/net/dhcp/DhcpDiscoverPacket.java @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2010 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.net.dhcp; + +import java.net.Inet4Address; +import java.nio.ByteBuffer; + +/** + * This class implements the DHCP-DISCOVER packet. + */ +class DhcpDiscoverPacket extends DhcpPacket { + /** + * The IP address of the client which sent this packet. + */ + final Inet4Address mSrcIp; + + /** + * Generates a DISCOVER packet with the specified parameters. + */ + DhcpDiscoverPacket(int transId, short secs, Inet4Address relayIp, byte[] clientMac, + boolean broadcast, Inet4Address srcIp) { + super(transId, secs, INADDR_ANY, INADDR_ANY, INADDR_ANY, relayIp, clientMac, broadcast); + mSrcIp = srcIp; + } + DhcpDiscoverPacket(int transId, short secs, byte[] clientMac, boolean broadcast, + boolean rapidCommit) { + super(transId, secs, INADDR_ANY, INADDR_ANY, INADDR_ANY, INADDR_ANY, + clientMac, broadcast, rapidCommit); + mSrcIp = INADDR_ANY; + } + + public String toString() { + String s = super.toString(); + return s + " DISCOVER " + + (mBroadcast ? "broadcast " : "unicast "); + } + + /** + * Fills in a packet with the requested DISCOVER parameters. + */ + public ByteBuffer buildPacket(int encap, short destUdp, short srcUdp) { + ByteBuffer result = ByteBuffer.allocate(MAX_LENGTH); + fillInPacket(encap, INADDR_BROADCAST, mSrcIp, destUdp, srcUdp, result, DHCP_BOOTREQUEST, + mBroadcast); + result.flip(); + return result; + } + + /** + * Adds optional parameters to a DISCOVER packet. + */ + void finishPacket(ByteBuffer buffer) { + addTlv(buffer, DHCP_MESSAGE_TYPE, DHCP_MESSAGE_TYPE_DISCOVER); + addTlv(buffer, DHCP_CLIENT_IDENTIFIER, getClientId()); + addCommonClientTlvs(buffer); + addTlv(buffer, DHCP_PARAMETER_LIST, mRequestedParams); + if (mRapidCommit) { + addTlv(buffer, DHCP_OPTION_RAPID_COMMIT); + } + addTlvEnd(buffer); + } +} diff --git a/packages/NetworkStack/src/android/net/dhcp/DhcpPacket.java b/packages/NetworkStack/src/android/net/dhcp/DhcpPacket.java new file mode 100644 index 000000000000..c382733041e0 --- /dev/null +++ b/packages/NetworkStack/src/android/net/dhcp/DhcpPacket.java @@ -0,0 +1,1428 @@ +package android.net.dhcp; + +import static com.android.server.util.NetworkStackConstants.IPV4_ADDR_ALL; +import static com.android.server.util.NetworkStackConstants.IPV4_ADDR_ANY; + +import android.annotation.Nullable; +import android.net.DhcpResults; +import android.net.LinkAddress; +import android.net.metrics.DhcpErrorEvent; +import android.net.shared.Inet4AddressUtils; +import android.os.Build; +import android.os.SystemProperties; +import android.system.OsConstants; +import android.text.TextUtils; + +import com.android.internal.annotations.VisibleForTesting; + +import java.io.UnsupportedEncodingException; +import java.net.Inet4Address; +import java.net.UnknownHostException; +import java.nio.BufferUnderflowException; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.ShortBuffer; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * Defines basic data and operations needed to build and use packets for the + * DHCP protocol. Subclasses create the specific packets used at each + * stage of the negotiation. + * + * @hide + */ +public abstract class DhcpPacket { + protected static final String TAG = "DhcpPacket"; + + // TODO: use NetworkStackConstants.IPV4_MIN_MTU once this class is moved to the network stack. + private static final int IPV4_MIN_MTU = 68; + + // dhcpcd has a minimum lease of 20 seconds, but DhcpStateMachine would refuse to wake up the + // CPU for anything shorter than 5 minutes. For sanity's sake, this must be higher than the + // DHCP client timeout. + public static final int MINIMUM_LEASE = 60; + public static final int INFINITE_LEASE = (int) 0xffffffff; + + public static final Inet4Address INADDR_ANY = IPV4_ADDR_ANY; + public static final Inet4Address INADDR_BROADCAST = IPV4_ADDR_ALL; + public static final byte[] ETHER_BROADCAST = new byte[] { + (byte) 0xff, (byte) 0xff, (byte) 0xff, + (byte) 0xff, (byte) 0xff, (byte) 0xff, + }; + + /** + * Packet encapsulations. + */ + public static final int ENCAP_L2 = 0; // EthernetII header included + public static final int ENCAP_L3 = 1; // IP/UDP header included + public static final int ENCAP_BOOTP = 2; // BOOTP contents only + + /** + * Minimum length of a DHCP packet, excluding options, in the above encapsulations. + */ + public static final int MIN_PACKET_LENGTH_BOOTP = 236; // See diagram in RFC 2131, section 2. + public static final int MIN_PACKET_LENGTH_L3 = MIN_PACKET_LENGTH_BOOTP + 20 + 8; + public static final int MIN_PACKET_LENGTH_L2 = MIN_PACKET_LENGTH_L3 + 14; + + public static final int HWADDR_LEN = 16; + public static final int MAX_OPTION_LEN = 255; + + /** + * The minimum and maximum MTU that we are prepared to use. We set the minimum to the minimum + * IPv6 MTU because the IPv6 stack enters unusual codepaths when the link MTU drops below 1280, + * and does not recover if the MTU is brought above 1280 again. We set the maximum to 1500 + * because in general it is risky to assume that the hardware is able to send/receive packets + * larger than 1500 bytes even if the network supports it. + */ + private static final int MIN_MTU = 1280; + private static final int MAX_MTU = 1500; + + /** + * IP layer definitions. + */ + private static final byte IP_TYPE_UDP = (byte) 0x11; + + /** + * IP: Version 4, Header Length 20 bytes + */ + private static final byte IP_VERSION_HEADER_LEN = (byte) 0x45; + + /** + * IP: Flags 0, Fragment Offset 0, Don't Fragment + */ + private static final short IP_FLAGS_OFFSET = (short) 0x4000; + + /** + * IP: TOS + */ + private static final byte IP_TOS_LOWDELAY = (byte) 0x10; + + /** + * IP: TTL -- use default 64 from RFC1340 + */ + private static final byte IP_TTL = (byte) 0x40; + + /** + * The client DHCP port. + */ + static final short DHCP_CLIENT = (short) 68; + + /** + * The server DHCP port. + */ + static final short DHCP_SERVER = (short) 67; + + /** + * The message op code indicating a request from a client. + */ + protected static final byte DHCP_BOOTREQUEST = (byte) 1; + + /** + * The message op code indicating a response from the server. + */ + protected static final byte DHCP_BOOTREPLY = (byte) 2; + + /** + * The code type used to identify an Ethernet MAC address in the + * Client-ID field. + */ + protected static final byte CLIENT_ID_ETHER = (byte) 1; + + /** + * The maximum length of a packet that can be constructed. + */ + protected static final int MAX_LENGTH = 1500; + + /** + * The magic cookie that identifies this as a DHCP packet instead of BOOTP. + */ + private static final int DHCP_MAGIC_COOKIE = 0x63825363; + + /** + * DHCP Optional Type: DHCP Subnet Mask + */ + protected static final byte DHCP_SUBNET_MASK = 1; + protected Inet4Address mSubnetMask; + + /** + * DHCP Optional Type: DHCP Router + */ + protected static final byte DHCP_ROUTER = 3; + protected List <Inet4Address> mGateways; + + /** + * DHCP Optional Type: DHCP DNS Server + */ + protected static final byte DHCP_DNS_SERVER = 6; + protected List<Inet4Address> mDnsServers; + + /** + * DHCP Optional Type: DHCP Host Name + */ + protected static final byte DHCP_HOST_NAME = 12; + protected String mHostName; + + /** + * DHCP Optional Type: DHCP DOMAIN NAME + */ + protected static final byte DHCP_DOMAIN_NAME = 15; + protected String mDomainName; + + /** + * DHCP Optional Type: DHCP Interface MTU + */ + protected static final byte DHCP_MTU = 26; + protected Short mMtu; + + /** + * DHCP Optional Type: DHCP BROADCAST ADDRESS + */ + protected static final byte DHCP_BROADCAST_ADDRESS = 28; + protected Inet4Address mBroadcastAddress; + + /** + * DHCP Optional Type: Vendor specific information + */ + protected static final byte DHCP_VENDOR_INFO = 43; + protected String mVendorInfo; + + /** + * Value of the vendor specific option used to indicate that the network is metered + */ + public static final String VENDOR_INFO_ANDROID_METERED = "ANDROID_METERED"; + + /** + * DHCP Optional Type: Option overload option + */ + protected static final byte DHCP_OPTION_OVERLOAD = 52; + + /** + * Possible values of the option overload option. + */ + private static final byte OPTION_OVERLOAD_FILE = 1; + private static final byte OPTION_OVERLOAD_SNAME = 2; + private static final byte OPTION_OVERLOAD_BOTH = 3; + + /** + * DHCP Optional Type: DHCP Requested IP Address + */ + protected static final byte DHCP_REQUESTED_IP = 50; + protected Inet4Address mRequestedIp; + + /** + * DHCP Optional Type: DHCP Lease Time + */ + protected static final byte DHCP_LEASE_TIME = 51; + protected Integer mLeaseTime; + + /** + * DHCP Optional Type: DHCP Message Type + */ + protected static final byte DHCP_MESSAGE_TYPE = 53; + // the actual type values + protected static final byte DHCP_MESSAGE_TYPE_DISCOVER = 1; + protected static final byte DHCP_MESSAGE_TYPE_OFFER = 2; + protected static final byte DHCP_MESSAGE_TYPE_REQUEST = 3; + protected static final byte DHCP_MESSAGE_TYPE_DECLINE = 4; + protected static final byte DHCP_MESSAGE_TYPE_ACK = 5; + protected static final byte DHCP_MESSAGE_TYPE_NAK = 6; + protected static final byte DHCP_MESSAGE_TYPE_RELEASE = 7; + protected static final byte DHCP_MESSAGE_TYPE_INFORM = 8; + + /** + * DHCP Optional Type: DHCP Server Identifier + */ + protected static final byte DHCP_SERVER_IDENTIFIER = 54; + protected Inet4Address mServerIdentifier; + + /** + * DHCP Optional Type: DHCP Parameter List + */ + protected static final byte DHCP_PARAMETER_LIST = 55; + protected byte[] mRequestedParams; + + /** + * DHCP Optional Type: DHCP MESSAGE + */ + protected static final byte DHCP_MESSAGE = 56; + protected String mMessage; + + /** + * DHCP Optional Type: Maximum DHCP Message Size + */ + protected static final byte DHCP_MAX_MESSAGE_SIZE = 57; + protected Short mMaxMessageSize; + + /** + * DHCP Optional Type: DHCP Renewal Time Value + */ + protected static final byte DHCP_RENEWAL_TIME = 58; + protected Integer mT1; + + /** + * DHCP Optional Type: Rebinding Time Value + */ + protected static final byte DHCP_REBINDING_TIME = 59; + protected Integer mT2; + + /** + * DHCP Optional Type: Vendor Class Identifier + */ + protected static final byte DHCP_VENDOR_CLASS_ID = 60; + protected String mVendorId; + + /** + * DHCP Optional Type: DHCP Client Identifier + */ + protected static final byte DHCP_CLIENT_IDENTIFIER = 61; + protected byte[] mClientId; + + /** + * DHCP zero-length option code: rapid commit + */ + protected static final byte DHCP_OPTION_RAPID_COMMIT = 80; + + /** + * DHCP zero-length option code: pad + */ + protected static final byte DHCP_OPTION_PAD = 0x00; + + /** + * DHCP zero-length option code: end of options + */ + protected static final byte DHCP_OPTION_END = (byte) 0xff; + + /** + * The transaction identifier used in this particular DHCP negotiation + */ + protected final int mTransId; + + /** + * The seconds field in the BOOTP header. Per RFC, should be nonzero in client requests only. + */ + protected final short mSecs; + + /** + * The IP address of the client host. This address is typically + * proposed by the client (from an earlier DHCP negotiation) or + * supplied by the server. + */ + protected final Inet4Address mClientIp; + protected final Inet4Address mYourIp; + private final Inet4Address mNextIp; + protected final Inet4Address mRelayIp; + + /** + * Does the client request a broadcast response? + */ + protected boolean mBroadcast; + + /** + * The six-octet MAC of the client. + */ + protected final byte[] mClientMac; + + /** + * The server host name from server. + */ + protected String mServerHostName; + + /** + * Whether the packet should be built with rapid commit option + */ + protected boolean mRapidCommit; + + /** + * Asks the packet object to create a ByteBuffer serialization of + * the packet for transmission. + */ + public abstract ByteBuffer buildPacket(int encap, short destUdp, + short srcUdp); + + /** + * Allows the concrete class to fill in packet-type-specific details, + * typically optional parameters at the end of the packet. + */ + abstract void finishPacket(ByteBuffer buffer); + + // Set in unit tests, to ensure that the test does not break when run on different devices and + // on different releases. + static String testOverrideVendorId = null; + static String testOverrideHostname = null; + + protected DhcpPacket(int transId, short secs, Inet4Address clientIp, Inet4Address yourIp, + Inet4Address nextIp, Inet4Address relayIp, + byte[] clientMac, boolean broadcast, boolean rapidCommit) { + mTransId = transId; + mSecs = secs; + mClientIp = clientIp; + mYourIp = yourIp; + mNextIp = nextIp; + mRelayIp = relayIp; + mClientMac = clientMac; + mBroadcast = broadcast; + mRapidCommit = rapidCommit; + } + + protected DhcpPacket(int transId, short secs, Inet4Address clientIp, Inet4Address yourIp, + Inet4Address nextIp, Inet4Address relayIp, + byte[] clientMac, boolean broadcast) { + this(transId, secs, clientIp, yourIp, nextIp, + relayIp, clientMac, broadcast, false); + } + + /** + * Returns the transaction ID. + */ + public int getTransactionId() { + return mTransId; + } + + /** + * Returns the client MAC. + */ + public byte[] getClientMac() { + return mClientMac; + } + + // TODO: refactor DhcpClient to set clientId when constructing packets and remove + // hasExplicitClientId logic + /** + * Returns whether a client ID was set in the options for this packet. + */ + public boolean hasExplicitClientId() { + return mClientId != null; + } + + /** + * Convenience method to return the client ID if it was set explicitly, or null otherwise. + */ + @Nullable + public byte[] getExplicitClientIdOrNull() { + return hasExplicitClientId() ? getClientId() : null; + } + + /** + * Returns the client ID. If not set explicitly, this follows RFC 2132 and creates a client ID + * based on the hardware address. + */ + public byte[] getClientId() { + final byte[] clientId; + if (hasExplicitClientId()) { + clientId = Arrays.copyOf(mClientId, mClientId.length); + } else { + clientId = new byte[mClientMac.length + 1]; + clientId[0] = CLIENT_ID_ETHER; + System.arraycopy(mClientMac, 0, clientId, 1, mClientMac.length); + } + return clientId; + } + + /** + * Returns whether a parameter is included in the parameter request list option of this packet. + * + * <p>If there is no parameter request list option in the packet, false is returned. + * + * @param paramId ID of the parameter, such as {@link #DHCP_MTU} or {@link #DHCP_HOST_NAME}. + */ + public boolean hasRequestedParam(byte paramId) { + if (mRequestedParams == null) { + return false; + } + + for (byte reqParam : mRequestedParams) { + if (reqParam == paramId) { + return true; + } + } + return false; + } + + /** + * Creates a new L3 packet (including IP header) containing the + * DHCP udp packet. This method relies upon the delegated method + * finishPacket() to insert the per-packet contents. + */ + protected void fillInPacket(int encap, Inet4Address destIp, + Inet4Address srcIp, short destUdp, short srcUdp, ByteBuffer buf, + byte requestCode, boolean broadcast) { + byte[] destIpArray = destIp.getAddress(); + byte[] srcIpArray = srcIp.getAddress(); + int ipHeaderOffset = 0; + int ipLengthOffset = 0; + int ipChecksumOffset = 0; + int endIpHeader = 0; + int udpHeaderOffset = 0; + int udpLengthOffset = 0; + int udpChecksumOffset = 0; + + buf.clear(); + buf.order(ByteOrder.BIG_ENDIAN); + + if (encap == ENCAP_L2) { + buf.put(ETHER_BROADCAST); + buf.put(mClientMac); + buf.putShort((short) OsConstants.ETH_P_IP); + } + + // if a full IP packet needs to be generated, put the IP & UDP + // headers in place, and pre-populate with artificial values + // needed to seed the IP checksum. + if (encap <= ENCAP_L3) { + ipHeaderOffset = buf.position(); + buf.put(IP_VERSION_HEADER_LEN); + buf.put(IP_TOS_LOWDELAY); // tos: IPTOS_LOWDELAY + ipLengthOffset = buf.position(); + buf.putShort((short)0); // length + buf.putShort((short)0); // id + buf.putShort(IP_FLAGS_OFFSET); // ip offset: don't fragment + buf.put(IP_TTL); // TTL: use default 64 from RFC1340 + buf.put(IP_TYPE_UDP); + ipChecksumOffset = buf.position(); + buf.putShort((short) 0); // checksum + + buf.put(srcIpArray); + buf.put(destIpArray); + endIpHeader = buf.position(); + + // UDP header + udpHeaderOffset = buf.position(); + buf.putShort(srcUdp); + buf.putShort(destUdp); + udpLengthOffset = buf.position(); + buf.putShort((short) 0); // length + udpChecksumOffset = buf.position(); + buf.putShort((short) 0); // UDP checksum -- initially zero + } + + // DHCP payload + buf.put(requestCode); + buf.put((byte) 1); // Hardware Type: Ethernet + buf.put((byte) mClientMac.length); // Hardware Address Length + buf.put((byte) 0); // Hop Count + buf.putInt(mTransId); // Transaction ID + buf.putShort(mSecs); // Elapsed Seconds + + if (broadcast) { + buf.putShort((short) 0x8000); // Flags + } else { + buf.putShort((short) 0x0000); // Flags + } + + buf.put(mClientIp.getAddress()); + buf.put(mYourIp.getAddress()); + buf.put(mNextIp.getAddress()); + buf.put(mRelayIp.getAddress()); + buf.put(mClientMac); + buf.position(buf.position() + + (HWADDR_LEN - mClientMac.length) // pad addr to 16 bytes + + 64 // empty server host name (64 bytes) + + 128); // empty boot file name (128 bytes) + buf.putInt(DHCP_MAGIC_COOKIE); // magic number + finishPacket(buf); + + // round up to an even number of octets + if ((buf.position() & 1) == 1) { + buf.put((byte) 0); + } + + // If an IP packet is being built, the IP & UDP checksums must be + // computed. + if (encap <= ENCAP_L3) { + // fix UDP header: insert length + short udpLen = (short)(buf.position() - udpHeaderOffset); + buf.putShort(udpLengthOffset, udpLen); + // fix UDP header: checksum + // checksum for UDP at udpChecksumOffset + int udpSeed = 0; + + // apply IPv4 pseudo-header. Read IP address src and destination + // values from the IP header and accumulate checksum. + udpSeed += intAbs(buf.getShort(ipChecksumOffset + 2)); + udpSeed += intAbs(buf.getShort(ipChecksumOffset + 4)); + udpSeed += intAbs(buf.getShort(ipChecksumOffset + 6)); + udpSeed += intAbs(buf.getShort(ipChecksumOffset + 8)); + + // accumulate extra data for the pseudo-header + udpSeed += IP_TYPE_UDP; + udpSeed += udpLen; + // and compute UDP checksum + buf.putShort(udpChecksumOffset, (short) checksum(buf, udpSeed, + udpHeaderOffset, + buf.position())); + // fix IP header: insert length + buf.putShort(ipLengthOffset, (short)(buf.position() - ipHeaderOffset)); + // fixup IP-header checksum + buf.putShort(ipChecksumOffset, + (short) checksum(buf, 0, ipHeaderOffset, endIpHeader)); + } + } + + /** + * Converts a signed short value to an unsigned int value. Needed + * because Java does not have unsigned types. + */ + private static int intAbs(short v) { + return v & 0xFFFF; + } + + /** + * Performs an IP checksum (used in IP header and across UDP + * payload) on the specified portion of a ByteBuffer. The seed + * allows the checksum to commence with a specified value. + */ + private int checksum(ByteBuffer buf, int seed, int start, int end) { + int sum = seed; + int bufPosition = buf.position(); + + // set position of original ByteBuffer, so that the ShortBuffer + // will be correctly initialized + buf.position(start); + ShortBuffer shortBuf = buf.asShortBuffer(); + + // re-set ByteBuffer position + buf.position(bufPosition); + + short[] shortArray = new short[(end - start) / 2]; + shortBuf.get(shortArray); + + for (short s : shortArray) { + sum += intAbs(s); + } + + start += shortArray.length * 2; + + // see if a singleton byte remains + if (end != start) { + short b = buf.get(start); + + // make it unsigned + if (b < 0) { + b += 256; + } + + sum += b * 256; + } + + sum = ((sum >> 16) & 0xFFFF) + (sum & 0xFFFF); + sum = ((sum + ((sum >> 16) & 0xFFFF)) & 0xFFFF); + int negated = ~sum; + return intAbs((short) negated); + } + + /** + * Adds an optional parameter not containing any payload. + */ + protected static void addTlv(ByteBuffer buf, byte type) { + buf.put(type); + buf.put((byte) 0); + } + + /** + * Adds an optional parameter containing a single byte value. + */ + protected static void addTlv(ByteBuffer buf, byte type, byte value) { + buf.put(type); + buf.put((byte) 1); + buf.put(value); + } + + /** + * Adds an optional parameter containing an array of bytes. + * + * <p>This method is a no-op if the payload argument is null. + */ + protected static void addTlv(ByteBuffer buf, byte type, @Nullable byte[] payload) { + if (payload != null) { + if (payload.length > MAX_OPTION_LEN) { + throw new IllegalArgumentException("DHCP option too long: " + + payload.length + " vs. " + MAX_OPTION_LEN); + } + buf.put(type); + buf.put((byte) payload.length); + buf.put(payload); + } + } + + /** + * Adds an optional parameter containing an IP address. + * + * <p>This method is a no-op if the address argument is null. + */ + protected static void addTlv(ByteBuffer buf, byte type, @Nullable Inet4Address addr) { + if (addr != null) { + addTlv(buf, type, addr.getAddress()); + } + } + + /** + * Adds an optional parameter containing a list of IP addresses. + * + * <p>This method is a no-op if the addresses argument is null or empty. + */ + protected static void addTlv(ByteBuffer buf, byte type, @Nullable List<Inet4Address> addrs) { + if (addrs == null || addrs.size() == 0) return; + + int optionLen = 4 * addrs.size(); + if (optionLen > MAX_OPTION_LEN) { + throw new IllegalArgumentException("DHCP option too long: " + + optionLen + " vs. " + MAX_OPTION_LEN); + } + + buf.put(type); + buf.put((byte)(optionLen)); + + for (Inet4Address addr : addrs) { + buf.put(addr.getAddress()); + } + } + + /** + * Adds an optional parameter containing a short integer. + * + * <p>This method is a no-op if the value argument is null. + */ + protected static void addTlv(ByteBuffer buf, byte type, @Nullable Short value) { + if (value != null) { + buf.put(type); + buf.put((byte) 2); + buf.putShort(value.shortValue()); + } + } + + /** + * Adds an optional parameter containing a simple integer. + * + * <p>This method is a no-op if the value argument is null. + */ + protected static void addTlv(ByteBuffer buf, byte type, @Nullable Integer value) { + if (value != null) { + buf.put(type); + buf.put((byte) 4); + buf.putInt(value.intValue()); + } + } + + /** + * Adds an optional parameter containing an ASCII string. + * + * <p>This method is a no-op if the string argument is null. + */ + protected static void addTlv(ByteBuffer buf, byte type, @Nullable String str) { + if (str != null) { + try { + addTlv(buf, type, str.getBytes("US-ASCII")); + } catch (UnsupportedEncodingException e) { + throw new IllegalArgumentException("String is not US-ASCII: " + str); + } + } + } + + /** + * Adds the special end-of-optional-parameters indicator. + */ + protected static void addTlvEnd(ByteBuffer buf) { + buf.put((byte) 0xFF); + } + + private String getVendorId() { + if (testOverrideVendorId != null) return testOverrideVendorId; + return "android-dhcp-" + Build.VERSION.RELEASE; + } + + private String getHostname() { + if (testOverrideHostname != null) return testOverrideHostname; + return SystemProperties.get("net.hostname"); + } + + /** + * Adds common client TLVs. + * + * TODO: Does this belong here? The alternative would be to modify all the buildXyzPacket + * methods to take them. + */ + protected void addCommonClientTlvs(ByteBuffer buf) { + addTlv(buf, DHCP_MAX_MESSAGE_SIZE, (short) MAX_LENGTH); + addTlv(buf, DHCP_VENDOR_CLASS_ID, getVendorId()); + final String hn = getHostname(); + if (!TextUtils.isEmpty(hn)) addTlv(buf, DHCP_HOST_NAME, hn); + } + + protected void addCommonServerTlvs(ByteBuffer buf) { + addTlv(buf, DHCP_LEASE_TIME, mLeaseTime); + if (mLeaseTime != null && mLeaseTime != INFINITE_LEASE) { + // The client should renew at 1/2 the lease-expiry interval + addTlv(buf, DHCP_RENEWAL_TIME, (int) (Integer.toUnsignedLong(mLeaseTime) / 2)); + // Default rebinding time is set as below by RFC2131 + addTlv(buf, DHCP_REBINDING_TIME, + (int) (Integer.toUnsignedLong(mLeaseTime) * 875L / 1000L)); + } + addTlv(buf, DHCP_SUBNET_MASK, mSubnetMask); + addTlv(buf, DHCP_BROADCAST_ADDRESS, mBroadcastAddress); + addTlv(buf, DHCP_ROUTER, mGateways); + addTlv(buf, DHCP_DNS_SERVER, mDnsServers); + addTlv(buf, DHCP_DOMAIN_NAME, mDomainName); + addTlv(buf, DHCP_HOST_NAME, mHostName); + addTlv(buf, DHCP_VENDOR_INFO, mVendorInfo); + if (mMtu != null && Short.toUnsignedInt(mMtu) >= IPV4_MIN_MTU) { + addTlv(buf, DHCP_MTU, mMtu); + } + } + + /** + * Converts a MAC from an array of octets to an ASCII string. + */ + public static String macToString(byte[] mac) { + String macAddr = ""; + + for (int i = 0; i < mac.length; i++) { + String hexString = "0" + Integer.toHexString(mac[i]); + + // substring operation grabs the last 2 digits: this + // allows signed bytes to be converted correctly. + macAddr += hexString.substring(hexString.length() - 2); + + if (i != (mac.length - 1)) { + macAddr += ":"; + } + } + + return macAddr; + } + + public String toString() { + String macAddr = macToString(mClientMac); + + return macAddr; + } + + /** + * Reads a four-octet value from a ByteBuffer and construct + * an IPv4 address from that value. + */ + private static Inet4Address readIpAddress(ByteBuffer packet) { + Inet4Address result = null; + byte[] ipAddr = new byte[4]; + packet.get(ipAddr); + + try { + result = (Inet4Address) Inet4Address.getByAddress(ipAddr); + } catch (UnknownHostException ex) { + // ipAddr is numeric, so this should not be + // triggered. However, if it is, just nullify + result = null; + } + + return result; + } + + /** + * Reads a string of specified length from the buffer. + */ + private static String readAsciiString(ByteBuffer buf, int byteCount, boolean nullOk) { + byte[] bytes = new byte[byteCount]; + buf.get(bytes); + int length = bytes.length; + if (!nullOk) { + // Stop at the first null byte. This is because some DHCP options (e.g., the domain + // name) are passed to netd via FrameworkListener, which refuses arguments containing + // null bytes. We don't do this by default because vendorInfo is an opaque string which + // could in theory contain null bytes. + for (length = 0; length < bytes.length; length++) { + if (bytes[length] == 0) { + break; + } + } + } + return new String(bytes, 0, length, StandardCharsets.US_ASCII); + } + + private static boolean isPacketToOrFromClient(short udpSrcPort, short udpDstPort) { + return (udpSrcPort == DHCP_CLIENT) || (udpDstPort == DHCP_CLIENT); + } + + private static boolean isPacketServerToServer(short udpSrcPort, short udpDstPort) { + return (udpSrcPort == DHCP_SERVER) && (udpDstPort == DHCP_SERVER); + } + + public static class ParseException extends Exception { + public final int errorCode; + public ParseException(int errorCode, String msg, Object... args) { + super(String.format(msg, args)); + this.errorCode = errorCode; + } + } + + /** + * Creates a concrete DhcpPacket from the supplied ByteBuffer. The + * buffer may have an L2 encapsulation (which is the full EthernetII + * format starting with the source-address MAC) or an L3 encapsulation + * (which starts with the IP header). + * <br> + * A subset of the optional parameters are parsed and are stored + * in object fields. + */ + @VisibleForTesting + static DhcpPacket decodeFullPacket(ByteBuffer packet, int pktType) throws ParseException + { + // bootp parameters + int transactionId; + short secs; + Inet4Address clientIp; + Inet4Address yourIp; + Inet4Address nextIp; + Inet4Address relayIp; + byte[] clientMac; + byte[] clientId = null; + List<Inet4Address> dnsServers = new ArrayList<>(); + List<Inet4Address> gateways = new ArrayList<>(); // aka router + Inet4Address serverIdentifier = null; + Inet4Address netMask = null; + String message = null; + String vendorId = null; + String vendorInfo = null; + byte[] expectedParams = null; + String hostName = null; + String domainName = null; + Inet4Address ipSrc = null; + Inet4Address ipDst = null; + Inet4Address bcAddr = null; + Inet4Address requestedIp = null; + String serverHostName; + byte optionOverload = 0; + + // The following are all unsigned integers. Internally we store them as signed integers of + // the same length because that way we're guaranteed that they can't be out of the range of + // the unsigned field in the packet. Callers wanting to pass in an unsigned value will need + // to cast it. + Short mtu = null; + Short maxMessageSize = null; + Integer leaseTime = null; + Integer T1 = null; + Integer T2 = null; + + // dhcp options + byte dhcpType = (byte) 0xFF; + + packet.order(ByteOrder.BIG_ENDIAN); + + // check to see if we need to parse L2, IP, and UDP encaps + if (pktType == ENCAP_L2) { + if (packet.remaining() < MIN_PACKET_LENGTH_L2) { + throw new ParseException(DhcpErrorEvent.L2_TOO_SHORT, + "L2 packet too short, %d < %d", packet.remaining(), MIN_PACKET_LENGTH_L2); + } + + byte[] l2dst = new byte[6]; + byte[] l2src = new byte[6]; + + packet.get(l2dst); + packet.get(l2src); + + short l2type = packet.getShort(); + + if (l2type != OsConstants.ETH_P_IP) { + throw new ParseException(DhcpErrorEvent.L2_WRONG_ETH_TYPE, + "Unexpected L2 type 0x%04x, expected 0x%04x", l2type, OsConstants.ETH_P_IP); + } + } + + if (pktType <= ENCAP_L3) { + if (packet.remaining() < MIN_PACKET_LENGTH_L3) { + throw new ParseException(DhcpErrorEvent.L3_TOO_SHORT, + "L3 packet too short, %d < %d", packet.remaining(), MIN_PACKET_LENGTH_L3); + } + + byte ipTypeAndLength = packet.get(); + int ipVersion = (ipTypeAndLength & 0xf0) >> 4; + if (ipVersion != 4) { + throw new ParseException( + DhcpErrorEvent.L3_NOT_IPV4, "Invalid IP version %d", ipVersion); + } + + // System.out.println("ipType is " + ipType); + byte ipDiffServicesField = packet.get(); + short ipTotalLength = packet.getShort(); + short ipIdentification = packet.getShort(); + byte ipFlags = packet.get(); + byte ipFragOffset = packet.get(); + byte ipTTL = packet.get(); + byte ipProto = packet.get(); + short ipChksm = packet.getShort(); + + ipSrc = readIpAddress(packet); + ipDst = readIpAddress(packet); + + if (ipProto != IP_TYPE_UDP) { + throw new ParseException( + DhcpErrorEvent.L4_NOT_UDP, "Protocol not UDP: %d", ipProto); + } + + // Skip options. This cannot cause us to read beyond the end of the buffer because the + // IPv4 header cannot be more than (0x0f * 4) = 60 bytes long, and that is less than + // MIN_PACKET_LENGTH_L3. + int optionWords = ((ipTypeAndLength & 0x0f) - 5); + for (int i = 0; i < optionWords; i++) { + packet.getInt(); + } + + // assume UDP + short udpSrcPort = packet.getShort(); + short udpDstPort = packet.getShort(); + short udpLen = packet.getShort(); + short udpChkSum = packet.getShort(); + + // Only accept packets to or from the well-known client port (expressly permitting + // packets from ports other than the well-known server port; http://b/24687559), and + // server-to-server packets, e.g. for relays. + if (!isPacketToOrFromClient(udpSrcPort, udpDstPort) && + !isPacketServerToServer(udpSrcPort, udpDstPort)) { + // This should almost never happen because we use SO_ATTACH_FILTER on the packet + // socket to drop packets that don't have the right source ports. However, it's + // possible that a packet arrives between when the socket is bound and when the + // filter is set. http://b/26696823 . + throw new ParseException(DhcpErrorEvent.L4_WRONG_PORT, + "Unexpected UDP ports %d->%d", udpSrcPort, udpDstPort); + } + } + + // We need to check the length even for ENCAP_L3 because the IPv4 header is variable-length. + if (pktType > ENCAP_BOOTP || packet.remaining() < MIN_PACKET_LENGTH_BOOTP) { + throw new ParseException(DhcpErrorEvent.BOOTP_TOO_SHORT, + "Invalid type or BOOTP packet too short, %d < %d", + packet.remaining(), MIN_PACKET_LENGTH_BOOTP); + } + + byte type = packet.get(); + byte hwType = packet.get(); + int addrLen = packet.get() & 0xff; + byte hops = packet.get(); + transactionId = packet.getInt(); + secs = packet.getShort(); + short bootpFlags = packet.getShort(); + boolean broadcast = (bootpFlags & 0x8000) != 0; + byte[] ipv4addr = new byte[4]; + + try { + packet.get(ipv4addr); + clientIp = (Inet4Address) Inet4Address.getByAddress(ipv4addr); + packet.get(ipv4addr); + yourIp = (Inet4Address) Inet4Address.getByAddress(ipv4addr); + packet.get(ipv4addr); + nextIp = (Inet4Address) Inet4Address.getByAddress(ipv4addr); + packet.get(ipv4addr); + relayIp = (Inet4Address) Inet4Address.getByAddress(ipv4addr); + } catch (UnknownHostException ex) { + throw new ParseException(DhcpErrorEvent.L3_INVALID_IP, + "Invalid IPv4 address: %s", Arrays.toString(ipv4addr)); + } + + // Some DHCP servers have been known to announce invalid client hardware address values such + // as 0xff. The legacy DHCP client accepted these becuause it does not check the length at + // all but only checks that the interface MAC address matches the first bytes of the address + // in the packets. We're a bit stricter: if the length is obviously invalid (i.e., bigger + // than the size of the field), we fudge it to 6 (Ethernet). http://b/23725795 + // TODO: evaluate whether to make this test more liberal. + if (addrLen > HWADDR_LEN) { + addrLen = ETHER_BROADCAST.length; + } + + clientMac = new byte[addrLen]; + packet.get(clientMac); + + // skip over address padding (16 octets allocated) + packet.position(packet.position() + (16 - addrLen)); + serverHostName = readAsciiString(packet, 64, false); + packet.position(packet.position() + 128); + + // Ensure this is a DHCP packet with a magic cookie, and not BOOTP. http://b/31850211 + if (packet.remaining() < 4) { + throw new ParseException(DhcpErrorEvent.DHCP_NO_COOKIE, "not a DHCP message"); + } + + int dhcpMagicCookie = packet.getInt(); + if (dhcpMagicCookie != DHCP_MAGIC_COOKIE) { + throw new ParseException(DhcpErrorEvent.DHCP_BAD_MAGIC_COOKIE, + "Bad magic cookie 0x%08x, should be 0x%08x", + dhcpMagicCookie, DHCP_MAGIC_COOKIE); + } + + // parse options + boolean notFinishedOptions = true; + + while ((packet.position() < packet.limit()) && notFinishedOptions) { + final byte optionType = packet.get(); // cannot underflow because position < limit + try { + if (optionType == DHCP_OPTION_END) { + notFinishedOptions = false; + } else if (optionType == DHCP_OPTION_PAD) { + // The pad option doesn't have a length field. Nothing to do. + } else { + int optionLen = packet.get() & 0xFF; + int expectedLen = 0; + + switch(optionType) { + case DHCP_SUBNET_MASK: + netMask = readIpAddress(packet); + expectedLen = 4; + break; + case DHCP_ROUTER: + for (expectedLen = 0; expectedLen < optionLen; expectedLen += 4) { + gateways.add(readIpAddress(packet)); + } + break; + case DHCP_DNS_SERVER: + for (expectedLen = 0; expectedLen < optionLen; expectedLen += 4) { + dnsServers.add(readIpAddress(packet)); + } + break; + case DHCP_HOST_NAME: + expectedLen = optionLen; + hostName = readAsciiString(packet, optionLen, false); + break; + case DHCP_MTU: + expectedLen = 2; + mtu = packet.getShort(); + break; + case DHCP_DOMAIN_NAME: + expectedLen = optionLen; + domainName = readAsciiString(packet, optionLen, false); + break; + case DHCP_BROADCAST_ADDRESS: + bcAddr = readIpAddress(packet); + expectedLen = 4; + break; + case DHCP_REQUESTED_IP: + requestedIp = readIpAddress(packet); + expectedLen = 4; + break; + case DHCP_LEASE_TIME: + leaseTime = Integer.valueOf(packet.getInt()); + expectedLen = 4; + break; + case DHCP_MESSAGE_TYPE: + dhcpType = packet.get(); + expectedLen = 1; + break; + case DHCP_SERVER_IDENTIFIER: + serverIdentifier = readIpAddress(packet); + expectedLen = 4; + break; + case DHCP_PARAMETER_LIST: + expectedParams = new byte[optionLen]; + packet.get(expectedParams); + expectedLen = optionLen; + break; + case DHCP_MESSAGE: + expectedLen = optionLen; + message = readAsciiString(packet, optionLen, false); + break; + case DHCP_MAX_MESSAGE_SIZE: + expectedLen = 2; + maxMessageSize = Short.valueOf(packet.getShort()); + break; + case DHCP_RENEWAL_TIME: + expectedLen = 4; + T1 = Integer.valueOf(packet.getInt()); + break; + case DHCP_REBINDING_TIME: + expectedLen = 4; + T2 = Integer.valueOf(packet.getInt()); + break; + case DHCP_VENDOR_CLASS_ID: + expectedLen = optionLen; + // Embedded nulls are safe as this does not get passed to netd. + vendorId = readAsciiString(packet, optionLen, true); + break; + case DHCP_CLIENT_IDENTIFIER: { // Client identifier + byte[] id = new byte[optionLen]; + packet.get(id); + expectedLen = optionLen; + } break; + case DHCP_VENDOR_INFO: + expectedLen = optionLen; + // Embedded nulls are safe as this does not get passed to netd. + vendorInfo = readAsciiString(packet, optionLen, true); + break; + case DHCP_OPTION_OVERLOAD: + expectedLen = 1; + optionOverload = packet.get(); + optionOverload &= OPTION_OVERLOAD_BOTH; + break; + default: + // ignore any other parameters + for (int i = 0; i < optionLen; i++) { + expectedLen++; + byte throwaway = packet.get(); + } + } + + if (expectedLen != optionLen) { + final int errorCode = DhcpErrorEvent.errorCodeWithOption( + DhcpErrorEvent.DHCP_INVALID_OPTION_LENGTH, optionType); + throw new ParseException(errorCode, + "Invalid length %d for option %d, expected %d", + optionLen, optionType, expectedLen); + } + } + } catch (BufferUnderflowException e) { + final int errorCode = DhcpErrorEvent.errorCodeWithOption( + DhcpErrorEvent.BUFFER_UNDERFLOW, optionType); + throw new ParseException(errorCode, "BufferUnderflowException"); + } + } + + DhcpPacket newPacket; + + switch(dhcpType) { + case (byte) 0xFF: + throw new ParseException(DhcpErrorEvent.DHCP_NO_MSG_TYPE, + "No DHCP message type option"); + case DHCP_MESSAGE_TYPE_DISCOVER: + newPacket = new DhcpDiscoverPacket(transactionId, secs, relayIp, clientMac, + broadcast, ipSrc); + break; + case DHCP_MESSAGE_TYPE_OFFER: + newPacket = new DhcpOfferPacket( + transactionId, secs, broadcast, ipSrc, relayIp, clientIp, yourIp, clientMac); + break; + case DHCP_MESSAGE_TYPE_REQUEST: + newPacket = new DhcpRequestPacket( + transactionId, secs, clientIp, relayIp, clientMac, broadcast); + break; + case DHCP_MESSAGE_TYPE_DECLINE: + newPacket = new DhcpDeclinePacket( + transactionId, secs, clientIp, yourIp, nextIp, relayIp, + clientMac); + break; + case DHCP_MESSAGE_TYPE_ACK: + newPacket = new DhcpAckPacket( + transactionId, secs, broadcast, ipSrc, relayIp, clientIp, yourIp, clientMac); + break; + case DHCP_MESSAGE_TYPE_NAK: + newPacket = new DhcpNakPacket( + transactionId, secs, relayIp, clientMac, broadcast); + break; + case DHCP_MESSAGE_TYPE_RELEASE: + if (serverIdentifier == null) { + throw new ParseException(DhcpErrorEvent.MISC_ERROR, + "DHCPRELEASE without server identifier"); + } + newPacket = new DhcpReleasePacket( + transactionId, serverIdentifier, clientIp, relayIp, clientMac); + break; + case DHCP_MESSAGE_TYPE_INFORM: + newPacket = new DhcpInformPacket( + transactionId, secs, clientIp, yourIp, nextIp, relayIp, + clientMac); + break; + default: + throw new ParseException(DhcpErrorEvent.DHCP_UNKNOWN_MSG_TYPE, + "Unimplemented DHCP type %d", dhcpType); + } + + newPacket.mBroadcastAddress = bcAddr; + newPacket.mClientId = clientId; + newPacket.mDnsServers = dnsServers; + newPacket.mDomainName = domainName; + newPacket.mGateways = gateways; + newPacket.mHostName = hostName; + newPacket.mLeaseTime = leaseTime; + newPacket.mMessage = message; + newPacket.mMtu = mtu; + newPacket.mRequestedIp = requestedIp; + newPacket.mRequestedParams = expectedParams; + newPacket.mServerIdentifier = serverIdentifier; + newPacket.mSubnetMask = netMask; + newPacket.mMaxMessageSize = maxMessageSize; + newPacket.mT1 = T1; + newPacket.mT2 = T2; + newPacket.mVendorId = vendorId; + newPacket.mVendorInfo = vendorInfo; + if ((optionOverload & OPTION_OVERLOAD_SNAME) == 0) { + newPacket.mServerHostName = serverHostName; + } else { + newPacket.mServerHostName = ""; + } + return newPacket; + } + + /** + * Parse a packet from an array of bytes, stopping at the given length. + */ + public static DhcpPacket decodeFullPacket(byte[] packet, int length, int pktType) + throws ParseException { + ByteBuffer buffer = ByteBuffer.wrap(packet, 0, length).order(ByteOrder.BIG_ENDIAN); + try { + return decodeFullPacket(buffer, pktType); + } catch (ParseException e) { + throw e; + } catch (Exception e) { + throw new ParseException(DhcpErrorEvent.PARSING_ERROR, e.getMessage()); + } + } + + /** + * Construct a DhcpResults object from a DHCP reply packet. + */ + public DhcpResults toDhcpResults() { + Inet4Address ipAddress = mYourIp; + if (ipAddress.equals(IPV4_ADDR_ANY)) { + ipAddress = mClientIp; + if (ipAddress.equals(IPV4_ADDR_ANY)) { + return null; + } + } + + int prefixLength; + if (mSubnetMask != null) { + try { + prefixLength = Inet4AddressUtils.netmaskToPrefixLength(mSubnetMask); + } catch (IllegalArgumentException e) { + // Non-contiguous netmask. + return null; + } + } else { + prefixLength = Inet4AddressUtils.getImplicitNetmask(ipAddress); + } + + DhcpResults results = new DhcpResults(); + try { + results.ipAddress = new LinkAddress(ipAddress, prefixLength); + } catch (IllegalArgumentException e) { + return null; + } + + if (mGateways.size() > 0) { + results.gateway = mGateways.get(0); + } + + results.dnsServers.addAll(mDnsServers); + results.domains = mDomainName; + results.serverAddress = mServerIdentifier; + results.vendorInfo = mVendorInfo; + results.leaseDuration = (mLeaseTime != null) ? mLeaseTime : INFINITE_LEASE; + results.mtu = (mMtu != null && MIN_MTU <= mMtu && mMtu <= MAX_MTU) ? mMtu : 0; + results.serverHostName = mServerHostName; + + return results; + } + + /** + * Returns the parsed lease time, in milliseconds, or 0 for infinite. + */ + public long getLeaseTimeMillis() { + // dhcpcd treats the lack of a lease time option as an infinite lease. + if (mLeaseTime == null || mLeaseTime == INFINITE_LEASE) { + return 0; + } else if (0 <= mLeaseTime && mLeaseTime < MINIMUM_LEASE) { + return MINIMUM_LEASE * 1000; + } else { + return (mLeaseTime & 0xffffffffL) * 1000; + } + } + + /** + * Builds a DHCP-DISCOVER packet from the required specified + * parameters. + */ + public static ByteBuffer buildDiscoverPacket(int encap, int transactionId, + short secs, byte[] clientMac, boolean broadcast, byte[] expectedParams) { + return buildDiscoverPacket(encap, transactionId, secs, clientMac, + broadcast, expectedParams, false); + } + public static ByteBuffer buildDiscoverPacket(int encap, int transactionId, + short secs, byte[] clientMac, boolean broadcast, byte[] expectedParams, + boolean rapidCommit) { + DhcpPacket pkt = new DhcpDiscoverPacket(transactionId, secs, clientMac, broadcast, rapidCommit); + pkt.mRequestedParams = expectedParams; + return pkt.buildPacket(encap, DHCP_SERVER, DHCP_CLIENT); + } + + /** + * Builds a DHCP-OFFER packet from the required specified + * parameters. + */ + public static ByteBuffer buildOfferPacket(int encap, int transactionId, + boolean broadcast, Inet4Address serverIpAddr, Inet4Address relayIp, + Inet4Address yourIp, byte[] mac, Integer timeout, Inet4Address netMask, + Inet4Address bcAddr, List<Inet4Address> gateways, List<Inet4Address> dnsServers, + Inet4Address dhcpServerIdentifier, String domainName, String hostname, boolean metered, + short mtu) { + DhcpPacket pkt = new DhcpOfferPacket( + transactionId, (short) 0, broadcast, serverIpAddr, relayIp, + INADDR_ANY /* clientIp */, yourIp, mac); + pkt.mGateways = gateways; + pkt.mDnsServers = dnsServers; + pkt.mLeaseTime = timeout; + pkt.mDomainName = domainName; + pkt.mHostName = hostname; + pkt.mServerIdentifier = dhcpServerIdentifier; + pkt.mSubnetMask = netMask; + pkt.mBroadcastAddress = bcAddr; + pkt.mMtu = mtu; + if (metered) { + pkt.mVendorInfo = VENDOR_INFO_ANDROID_METERED; + } + return pkt.buildPacket(encap, DHCP_CLIENT, DHCP_SERVER); + } + + /** + * Builds a DHCP-ACK packet from the required specified parameters. + */ + public static ByteBuffer buildAckPacket(int encap, int transactionId, + boolean broadcast, Inet4Address serverIpAddr, Inet4Address relayIp, Inet4Address yourIp, + Inet4Address requestClientIp, byte[] mac, Integer timeout, Inet4Address netMask, + Inet4Address bcAddr, List<Inet4Address> gateways, List<Inet4Address> dnsServers, + Inet4Address dhcpServerIdentifier, String domainName, String hostname, boolean metered, + short mtu) { + DhcpPacket pkt = new DhcpAckPacket( + transactionId, (short) 0, broadcast, serverIpAddr, relayIp, requestClientIp, yourIp, + mac); + pkt.mGateways = gateways; + pkt.mDnsServers = dnsServers; + pkt.mLeaseTime = timeout; + pkt.mDomainName = domainName; + pkt.mHostName = hostname; + pkt.mSubnetMask = netMask; + pkt.mServerIdentifier = dhcpServerIdentifier; + pkt.mBroadcastAddress = bcAddr; + pkt.mMtu = mtu; + if (metered) { + pkt.mVendorInfo = VENDOR_INFO_ANDROID_METERED; + } + return pkt.buildPacket(encap, DHCP_CLIENT, DHCP_SERVER); + } + + /** + * Builds a DHCP-NAK packet from the required specified parameters. + */ + public static ByteBuffer buildNakPacket(int encap, int transactionId, Inet4Address serverIpAddr, + Inet4Address relayIp, byte[] mac, boolean broadcast, String message) { + DhcpPacket pkt = new DhcpNakPacket( + transactionId, (short) 0, relayIp, mac, broadcast); + pkt.mMessage = message; + pkt.mServerIdentifier = serverIpAddr; + return pkt.buildPacket(encap, DHCP_CLIENT, DHCP_SERVER); + } + + /** + * Builds a DHCP-REQUEST packet from the required specified parameters. + */ + public static ByteBuffer buildRequestPacket(int encap, + int transactionId, short secs, Inet4Address clientIp, boolean broadcast, + byte[] clientMac, Inet4Address requestedIpAddress, + Inet4Address serverIdentifier, byte[] requestedParams, String hostName) { + DhcpPacket pkt = new DhcpRequestPacket(transactionId, secs, clientIp, + INADDR_ANY /* relayIp */, clientMac, broadcast); + pkt.mRequestedIp = requestedIpAddress; + pkt.mServerIdentifier = serverIdentifier; + pkt.mHostName = hostName; + pkt.mRequestedParams = requestedParams; + ByteBuffer result = pkt.buildPacket(encap, DHCP_SERVER, DHCP_CLIENT); + return result; + } +} diff --git a/packages/NetworkStack/src/android/net/ip/IpClient.java b/packages/NetworkStack/src/android/net/ip/IpClient.java new file mode 100644 index 000000000000..e37b0d3adeae --- /dev/null +++ b/packages/NetworkStack/src/android/net/ip/IpClient.java @@ -0,0 +1,1795 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.net.ip; + +import static android.net.RouteInfo.RTN_UNICAST; +import static android.net.shared.IpConfigurationParcelableUtil.toStableParcelable; + +import static com.android.server.util.PermissionUtil.checkNetworkStackCallingPermission; + +import android.annotation.NonNull; +import android.content.Context; +import android.net.ConnectivityManager; +import android.net.DhcpResults; +import android.net.INetd; +import android.net.IpPrefix; +import android.net.LinkAddress; +import android.net.LinkProperties; +import android.net.NattKeepalivePacketDataParcelable; +import android.net.NetworkStackIpMemoryStore; +import android.net.ProvisioningConfigurationParcelable; +import android.net.ProxyInfo; +import android.net.RouteInfo; +import android.net.TcpKeepalivePacketDataParcelable; +import android.net.apf.ApfCapabilities; +import android.net.apf.ApfFilter; +import android.net.dhcp.DhcpClient; +import android.net.metrics.IpConnectivityLog; +import android.net.metrics.IpManagerEvent; +import android.net.shared.InitialConfiguration; +import android.net.shared.ProvisioningConfiguration; +import android.net.util.InterfaceParams; +import android.net.util.SharedLog; +import android.os.ConditionVariable; +import android.os.IBinder; +import android.os.Message; +import android.os.RemoteException; +import android.os.SystemClock; +import android.text.TextUtils; +import android.util.LocalLog; +import android.util.Log; +import android.util.Pair; +import android.util.SparseArray; + +import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.util.IState; +import com.android.internal.util.IndentingPrintWriter; +import com.android.internal.util.MessageUtils; +import com.android.internal.util.Preconditions; +import com.android.internal.util.State; +import com.android.internal.util.StateMachine; +import com.android.internal.util.WakeupMessage; +import com.android.server.NetworkObserverRegistry; +import com.android.server.NetworkStackService.NetworkStackServiceManager; + +import java.io.FileDescriptor; +import java.io.PrintWriter; +import java.net.InetAddress; +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.CountDownLatch; +import java.util.function.Predicate; +import java.util.stream.Collectors; +import java.nio.ByteBuffer; + + +/** + * IpClient + * + * This class provides the interface to IP-layer provisioning and maintenance + * functionality that can be used by transport layers like Wi-Fi, Ethernet, + * et cetera. + * + * [ Lifetime ] + * IpClient is designed to be instantiated as soon as the interface name is + * known and can be as long-lived as the class containing it (i.e. declaring + * it "private final" is okay). + * + * @hide + */ +public class IpClient extends StateMachine { + private static final boolean DBG = false; + + // For message logging. + private static final Class[] sMessageClasses = { IpClient.class, DhcpClient.class }; + private static final SparseArray<String> sWhatToString = + MessageUtils.findMessageNames(sMessageClasses); + // Two static concurrent hashmaps of interface name to logging classes. + // One holds StateMachine logs and the other connectivity packet logs. + private static final ConcurrentHashMap<String, SharedLog> sSmLogs = new ConcurrentHashMap<>(); + private static final ConcurrentHashMap<String, LocalLog> sPktLogs = new ConcurrentHashMap<>(); + private final NetworkStackIpMemoryStore mIpMemoryStore; + + /** + * Dump all state machine and connectivity packet logs to the specified writer. + * @param skippedIfaces Interfaces for which logs should not be dumped. + */ + public static void dumpAllLogs(PrintWriter writer, Set<String> skippedIfaces) { + for (String ifname : sSmLogs.keySet()) { + if (skippedIfaces.contains(ifname)) continue; + + writer.println(String.format("--- BEGIN %s ---", ifname)); + + final SharedLog smLog = sSmLogs.get(ifname); + if (smLog != null) { + writer.println("State machine log:"); + smLog.dump(null, writer, null); + } + + writer.println(""); + + final LocalLog pktLog = sPktLogs.get(ifname); + if (pktLog != null) { + writer.println("Connectivity packet log:"); + pktLog.readOnlyLocalLog().dump(null, writer, null); + } + + writer.println(String.format("--- END %s ---", ifname)); + } + } + + // Use a wrapper class to log in order to ensure complete and detailed + // logging. This method is lighter weight than annotations/reflection + // and has the following benefits: + // + // - No invoked method can be forgotten. + // Any new method added to IpClient.Callback must be overridden + // here or it will never be called. + // + // - No invoking call site can be forgotten. + // Centralized logging in this way means call sites don't need to + // remember to log, and therefore no call site can be forgotten. + // + // - No variation in log format among call sites. + // Encourages logging of any available arguments, and all call sites + // are necessarily logged identically. + // + // NOTE: Log first because passed objects may or may not be thread-safe and + // once passed on to the callback they may be modified by another thread. + // + // TODO: Find an lighter weight approach. + public static class IpClientCallbacksWrapper { + private static final String PREFIX = "INVOKE "; + private final IIpClientCallbacks mCallback; + private final SharedLog mLog; + + @VisibleForTesting + protected IpClientCallbacksWrapper(IIpClientCallbacks callback, SharedLog log) { + mCallback = callback; + mLog = log; + } + + private void log(String msg) { + mLog.log(PREFIX + msg); + } + + private void log(String msg, Throwable e) { + mLog.e(PREFIX + msg, e); + } + + public void onPreDhcpAction() { + log("onPreDhcpAction()"); + try { + mCallback.onPreDhcpAction(); + } catch (RemoteException e) { + log("Failed to call onPreDhcpAction", e); + } + } + + public void onPostDhcpAction() { + log("onPostDhcpAction()"); + try { + mCallback.onPostDhcpAction(); + } catch (RemoteException e) { + log("Failed to call onPostDhcpAction", e); + } + } + + public void onNewDhcpResults(DhcpResults dhcpResults) { + log("onNewDhcpResults({" + dhcpResults + "})"); + try { + mCallback.onNewDhcpResults(toStableParcelable(dhcpResults)); + } catch (RemoteException e) { + log("Failed to call onNewDhcpResults", e); + } + } + + public void onProvisioningSuccess(LinkProperties newLp) { + log("onProvisioningSuccess({" + newLp + "})"); + try { + mCallback.onProvisioningSuccess(newLp); + } catch (RemoteException e) { + log("Failed to call onProvisioningSuccess", e); + } + } + + public void onProvisioningFailure(LinkProperties newLp) { + log("onProvisioningFailure({" + newLp + "})"); + try { + mCallback.onProvisioningFailure(newLp); + } catch (RemoteException e) { + log("Failed to call onProvisioningFailure", e); + } + } + + public void onLinkPropertiesChange(LinkProperties newLp) { + log("onLinkPropertiesChange({" + newLp + "})"); + try { + mCallback.onLinkPropertiesChange(newLp); + } catch (RemoteException e) { + log("Failed to call onLinkPropertiesChange", e); + } + } + + public void onReachabilityLost(String logMsg) { + log("onReachabilityLost(" + logMsg + ")"); + try { + mCallback.onReachabilityLost(logMsg); + } catch (RemoteException e) { + log("Failed to call onReachabilityLost", e); + } + } + + public void onQuit() { + log("onQuit()"); + try { + mCallback.onQuit(); + } catch (RemoteException e) { + log("Failed to call onQuit", e); + } + } + + public void installPacketFilter(byte[] filter) { + log("installPacketFilter(byte[" + filter.length + "])"); + try { + mCallback.installPacketFilter(filter); + } catch (RemoteException e) { + log("Failed to call installPacketFilter", e); + } + } + + public void startReadPacketFilter() { + log("startReadPacketFilter()"); + try { + mCallback.startReadPacketFilter(); + } catch (RemoteException e) { + log("Failed to call startReadPacketFilter", e); + } + } + + public void setFallbackMulticastFilter(boolean enabled) { + log("setFallbackMulticastFilter(" + enabled + ")"); + try { + mCallback.setFallbackMulticastFilter(enabled); + } catch (RemoteException e) { + log("Failed to call setFallbackMulticastFilter", e); + } + } + + public void setNeighborDiscoveryOffload(boolean enable) { + log("setNeighborDiscoveryOffload(" + enable + ")"); + try { + mCallback.setNeighborDiscoveryOffload(enable); + } catch (RemoteException e) { + log("Failed to call setNeighborDiscoveryOffload", e); + } + } + } + + public static final String DUMP_ARG_CONFIRM = "confirm"; + + // Below constants are picked up by MessageUtils and exempt from ProGuard optimization. + private static final int CMD_TERMINATE_AFTER_STOP = 1; + private static final int CMD_STOP = 2; + private static final int CMD_START = 3; + private static final int CMD_CONFIRM = 4; + private static final int EVENT_PRE_DHCP_ACTION_COMPLETE = 5; + // Triggered by NetlinkTracker to communicate netlink events. + private static final int EVENT_NETLINK_LINKPROPERTIES_CHANGED = 6; + private static final int CMD_UPDATE_TCP_BUFFER_SIZES = 7; + private static final int CMD_UPDATE_HTTP_PROXY = 8; + private static final int CMD_SET_MULTICAST_FILTER = 9; + private static final int EVENT_PROVISIONING_TIMEOUT = 10; + private static final int EVENT_DHCPACTION_TIMEOUT = 11; + private static final int EVENT_READ_PACKET_FILTER_COMPLETE = 12; + private static final int CMD_ADD_KEEPALIVE_PACKET_FILTER_TO_APF = 13; + private static final int CMD_REMOVE_KEEPALIVE_PACKET_FILTER_FROM_APF = 14; + private static final int CMD_UPDATE_L2KEY_GROUPHINT = 15; + + // Internal commands to use instead of trying to call transitionTo() inside + // a given State's enter() method. Calling transitionTo() from enter/exit + // encounters a Log.wtf() that can cause trouble on eng builds. + private static final int CMD_JUMP_STARTED_TO_RUNNING = 100; + private static final int CMD_JUMP_RUNNING_TO_STOPPING = 101; + private static final int CMD_JUMP_STOPPING_TO_STOPPED = 102; + + // IpClient shares a handler with DhcpClient: commands must not overlap + public static final int DHCPCLIENT_CMD_BASE = 1000; + + private static final int MAX_LOG_RECORDS = 500; + private static final int MAX_PACKET_RECORDS = 100; + + private static final boolean NO_CALLBACKS = false; + private static final boolean SEND_CALLBACKS = true; + + // This must match the interface prefix in clatd.c. + // TODO: Revert this hack once IpClient and Nat464Xlat work in concert. + private static final String CLAT_PREFIX = "v4-"; + + private static final int IMMEDIATE_FAILURE_DURATION = 0; + + private static final int PROV_CHANGE_STILL_NOT_PROVISIONED = 1; + private static final int PROV_CHANGE_LOST_PROVISIONING = 2; + private static final int PROV_CHANGE_GAINED_PROVISIONING = 3; + private static final int PROV_CHANGE_STILL_PROVISIONED = 4; + + private final State mStoppedState = new StoppedState(); + private final State mStoppingState = new StoppingState(); + private final State mStartedState = new StartedState(); + private final State mRunningState = new RunningState(); + + private final String mTag; + private final Context mContext; + private final String mInterfaceName; + private final String mClatInterfaceName; + @VisibleForTesting + protected final IpClientCallbacksWrapper mCallback; + private final Dependencies mDependencies; + private final CountDownLatch mShutdownLatch; + private final ConnectivityManager mCm; + private final INetd mNetd; + private final NetworkObserverRegistry mObserverRegistry; + private final IpClientLinkObserver mLinkObserver; + private final WakeupMessage mProvisioningTimeoutAlarm; + private final WakeupMessage mDhcpActionTimeoutAlarm; + private final SharedLog mLog; + private final LocalLog mConnectivityPacketLog; + private final MessageHandlingLogger mMsgStateLogger; + private final IpConnectivityLog mMetricsLog = new IpConnectivityLog(); + private final InterfaceController mInterfaceCtrl; + + private InterfaceParams mInterfaceParams; + + /** + * Non-final member variables accessed only from within our StateMachine. + */ + private LinkProperties mLinkProperties; + private android.net.shared.ProvisioningConfiguration mConfiguration; + private IpReachabilityMonitor mIpReachabilityMonitor; + private DhcpClient mDhcpClient; + private DhcpResults mDhcpResults; + private String mTcpBufferSizes; + private ProxyInfo mHttpProxy; + private ApfFilter mApfFilter; + private String mL2Key; // The L2 key for this network, for writing into the memory store + private String mGroupHint; // The group hint for this network, for writing into the memory store + private boolean mMulticastFiltering; + private long mStartTimeMillis; + + /** + * Reading the snapshot is an asynchronous operation initiated by invoking + * Callback.startReadPacketFilter() and completed when the WiFi Service responds with an + * EVENT_READ_PACKET_FILTER_COMPLETE message. The mApfDataSnapshotComplete condition variable + * signals when a new snapshot is ready. + */ + private final ConditionVariable mApfDataSnapshotComplete = new ConditionVariable(); + + public static class Dependencies { + /** + * Get interface parameters for the specified interface. + */ + public InterfaceParams getInterfaceParams(String ifname) { + return InterfaceParams.getByName(ifname); + } + + /** + * Get a INetd connector. + */ + public INetd getNetd(Context context) { + return INetd.Stub.asInterface((IBinder) context.getSystemService(Context.NETD_SERVICE)); + } + } + + public IpClient(Context context, String ifName, IIpClientCallbacks callback, + NetworkObserverRegistry observerRegistry, NetworkStackServiceManager nssManager) { + this(context, ifName, callback, observerRegistry, nssManager, new Dependencies()); + } + + @VisibleForTesting + IpClient(Context context, String ifName, IIpClientCallbacks callback, + NetworkObserverRegistry observerRegistry, NetworkStackServiceManager nssManager, + Dependencies deps) { + super(IpClient.class.getSimpleName() + "." + ifName); + Preconditions.checkNotNull(ifName); + Preconditions.checkNotNull(callback); + + mTag = getName(); + + mContext = context; + mInterfaceName = ifName; + mClatInterfaceName = CLAT_PREFIX + ifName; + mDependencies = deps; + mShutdownLatch = new CountDownLatch(1); + mCm = mContext.getSystemService(ConnectivityManager.class); + mObserverRegistry = observerRegistry; + mIpMemoryStore = + new NetworkStackIpMemoryStore(context, nssManager.getIpMemoryStoreService()); + + sSmLogs.putIfAbsent(mInterfaceName, new SharedLog(MAX_LOG_RECORDS, mTag)); + mLog = sSmLogs.get(mInterfaceName); + sPktLogs.putIfAbsent(mInterfaceName, new LocalLog(MAX_PACKET_RECORDS)); + mConnectivityPacketLog = sPktLogs.get(mInterfaceName); + mMsgStateLogger = new MessageHandlingLogger(); + mCallback = new IpClientCallbacksWrapper(callback, mLog); + + // TODO: Consider creating, constructing, and passing in some kind of + // InterfaceController.Dependencies class. + mNetd = deps.getNetd(mContext); + mInterfaceCtrl = new InterfaceController(mInterfaceName, mNetd, mLog); + + mLinkObserver = new IpClientLinkObserver( + mInterfaceName, + () -> sendMessage(EVENT_NETLINK_LINKPROPERTIES_CHANGED)) { + @Override + public void onInterfaceAdded(String iface) { + super.onInterfaceAdded(iface); + if (mClatInterfaceName.equals(iface)) { + mCallback.setNeighborDiscoveryOffload(false); + } else if (!mInterfaceName.equals(iface)) { + return; + } + + final String msg = "interfaceAdded(" + iface + ")"; + logMsg(msg); + } + + @Override + public void onInterfaceRemoved(String iface) { + super.onInterfaceRemoved(iface); + // TODO: Also observe mInterfaceName going down and take some + // kind of appropriate action. + if (mClatInterfaceName.equals(iface)) { + // TODO: consider sending a message to the IpClient main + // StateMachine thread, in case "NDO enabled" state becomes + // tied to more things that 464xlat operation. + mCallback.setNeighborDiscoveryOffload(true); + } else if (!mInterfaceName.equals(iface)) { + return; + } + + final String msg = "interfaceRemoved(" + iface + ")"; + logMsg(msg); + } + + private void logMsg(String msg) { + Log.d(mTag, msg); + getHandler().post(() -> mLog.log("OBSERVED " + msg)); + } + }; + + mLinkProperties = new LinkProperties(); + mLinkProperties.setInterfaceName(mInterfaceName); + + mProvisioningTimeoutAlarm = new WakeupMessage(mContext, getHandler(), + mTag + ".EVENT_PROVISIONING_TIMEOUT", EVENT_PROVISIONING_TIMEOUT); + mDhcpActionTimeoutAlarm = new WakeupMessage(mContext, getHandler(), + mTag + ".EVENT_DHCPACTION_TIMEOUT", EVENT_DHCPACTION_TIMEOUT); + + // Anything the StateMachine may access must have been instantiated + // before this point. + configureAndStartStateMachine(); + + // Anything that may send messages to the StateMachine must only be + // configured to do so after the StateMachine has started (above). + startStateMachineUpdaters(); + } + + /** + * Make a IIpClient connector to communicate with this IpClient. + */ + public IIpClient makeConnector() { + return new IpClientConnector(); + } + + class IpClientConnector extends IIpClient.Stub { + @Override + public void completedPreDhcpAction() { + checkNetworkStackCallingPermission(); + IpClient.this.completedPreDhcpAction(); + } + @Override + public void confirmConfiguration() { + checkNetworkStackCallingPermission(); + IpClient.this.confirmConfiguration(); + } + @Override + public void readPacketFilterComplete(byte[] data) { + checkNetworkStackCallingPermission(); + IpClient.this.readPacketFilterComplete(data); + } + @Override + public void shutdown() { + checkNetworkStackCallingPermission(); + IpClient.this.shutdown(); + } + @Override + public void startProvisioning(ProvisioningConfigurationParcelable req) { + checkNetworkStackCallingPermission(); + IpClient.this.startProvisioning(ProvisioningConfiguration.fromStableParcelable(req)); + } + @Override + public void stop() { + checkNetworkStackCallingPermission(); + IpClient.this.stop(); + } + @Override + public void setL2KeyAndGroupHint(String l2Key, String groupHint) { + checkNetworkStackCallingPermission(); + IpClient.this.setL2KeyAndGroupHint(l2Key, groupHint); + } + @Override + public void setTcpBufferSizes(String tcpBufferSizes) { + checkNetworkStackCallingPermission(); + IpClient.this.setTcpBufferSizes(tcpBufferSizes); + } + @Override + public void setHttpProxy(ProxyInfo proxyInfo) { + checkNetworkStackCallingPermission(); + IpClient.this.setHttpProxy(proxyInfo); + } + @Override + public void setMulticastFilter(boolean enabled) { + checkNetworkStackCallingPermission(); + IpClient.this.setMulticastFilter(enabled); + } + @Override + public void addKeepalivePacketFilter(int slot, TcpKeepalivePacketDataParcelable pkt) { + checkNetworkStackCallingPermission(); + IpClient.this.addKeepalivePacketFilter(slot, pkt); + } + @Override + public void addNattKeepalivePacketFilter(int slot, NattKeepalivePacketDataParcelable pkt) { + checkNetworkStackCallingPermission(); + IpClient.this.addNattKeepalivePacketFilter(slot, pkt); + } + @Override + public void removeKeepalivePacketFilter(int slot) { + checkNetworkStackCallingPermission(); + IpClient.this.removeKeepalivePacketFilter(slot); + } + + @Override + public int getInterfaceVersion() { + return this.VERSION; + } + } + + public String getInterfaceName() { + return mInterfaceName; + } + + private void configureAndStartStateMachine() { + // CHECKSTYLE:OFF IndentationCheck + addState(mStoppedState); + addState(mStartedState); + addState(mRunningState, mStartedState); + addState(mStoppingState); + // CHECKSTYLE:ON IndentationCheck + + setInitialState(mStoppedState); + + super.start(); + } + + private void startStateMachineUpdaters() { + mObserverRegistry.registerObserverForNonblockingCallback(mLinkObserver); + } + + private void stopStateMachineUpdaters() { + mObserverRegistry.unregisterObserver(mLinkObserver); + } + + @Override + protected void onQuitting() { + mCallback.onQuit(); + mShutdownLatch.countDown(); + } + + /** + * Shut down this IpClient instance altogether. + */ + public void shutdown() { + stop(); + sendMessage(CMD_TERMINATE_AFTER_STOP); + } + + /** + * Start provisioning with the provided parameters. + */ + public void startProvisioning(ProvisioningConfiguration req) { + if (!req.isValid()) { + doImmediateProvisioningFailure(IpManagerEvent.ERROR_INVALID_PROVISIONING); + return; + } + + mInterfaceParams = mDependencies.getInterfaceParams(mInterfaceName); + if (mInterfaceParams == null) { + logError("Failed to find InterfaceParams for " + mInterfaceName); + doImmediateProvisioningFailure(IpManagerEvent.ERROR_INTERFACE_NOT_FOUND); + return; + } + + mCallback.setNeighborDiscoveryOffload(true); + sendMessage(CMD_START, new android.net.shared.ProvisioningConfiguration(req)); + } + + /** + * Stop this IpClient. + * + * <p>This does not shut down the StateMachine itself, which is handled by {@link #shutdown()}. + */ + public void stop() { + sendMessage(CMD_STOP); + } + + /** + * Confirm the provisioning configuration. + */ + public void confirmConfiguration() { + sendMessage(CMD_CONFIRM); + } + + /** + * For clients using {@link ProvisioningConfiguration.Builder#withPreDhcpAction()}, must be + * called after {@link IIpClientCallbacks#onPreDhcpAction} to indicate that DHCP is clear to + * proceed. + */ + public void completedPreDhcpAction() { + sendMessage(EVENT_PRE_DHCP_ACTION_COMPLETE); + } + + /** + * Indicate that packet filter read is complete. + */ + public void readPacketFilterComplete(byte[] data) { + sendMessage(EVENT_READ_PACKET_FILTER_COMPLETE, data); + } + + /** + * Set the TCP buffer sizes to use. + * + * This may be called, repeatedly, at any time before or after a call to + * #startProvisioning(). The setting is cleared upon calling #stop(). + */ + public void setTcpBufferSizes(String tcpBufferSizes) { + sendMessage(CMD_UPDATE_TCP_BUFFER_SIZES, tcpBufferSizes); + } + + /** + * Set the L2 key and group hint for storing info into the memory store. + */ + public void setL2KeyAndGroupHint(String l2Key, String groupHint) { + sendMessage(CMD_UPDATE_L2KEY_GROUPHINT, new Pair<>(l2Key, groupHint)); + } + + /** + * Set the HTTP Proxy configuration to use. + * + * This may be called, repeatedly, at any time before or after a call to + * #startProvisioning(). The setting is cleared upon calling #stop(). + */ + public void setHttpProxy(ProxyInfo proxyInfo) { + sendMessage(CMD_UPDATE_HTTP_PROXY, proxyInfo); + } + + /** + * Enable or disable the multicast filter. Attempts to use APF to accomplish the filtering, + * if not, Callback.setFallbackMulticastFilter() is called. + */ + public void setMulticastFilter(boolean enabled) { + sendMessage(CMD_SET_MULTICAST_FILTER, enabled); + } + + /** + * Called by WifiStateMachine to add TCP keepalive packet filter before setting up + * keepalive offload. + */ + public void addKeepalivePacketFilter(int slot, @NonNull TcpKeepalivePacketDataParcelable pkt) { + sendMessage(CMD_ADD_KEEPALIVE_PACKET_FILTER_TO_APF, slot, 0 /* Unused */, pkt); + } + + /** + * Called by WifiStateMachine to add NATT keepalive packet filter before setting up + * keepalive offload. + */ + public void addNattKeepalivePacketFilter(int slot, + @NonNull NattKeepalivePacketDataParcelable pkt) { + sendMessage(CMD_ADD_KEEPALIVE_PACKET_FILTER_TO_APF, slot, 0 /* Unused */ , pkt); + } + + /** + * Called by WifiStateMachine to remove keepalive packet filter after stopping keepalive + * offload. + */ + public void removeKeepalivePacketFilter(int slot) { + sendMessage(CMD_REMOVE_KEEPALIVE_PACKET_FILTER_FROM_APF, slot, 0 /* Unused */); + } + + /** + * Dump logs of this IpClient. + */ + public void dump(FileDescriptor fd, PrintWriter writer, String[] args) { + if (args != null && args.length > 0 && DUMP_ARG_CONFIRM.equals(args[0])) { + // Execute confirmConfiguration() and take no further action. + confirmConfiguration(); + return; + } + + // Thread-unsafe access to mApfFilter but just used for debugging. + final ApfFilter apfFilter = mApfFilter; + final android.net.shared.ProvisioningConfiguration provisioningConfig = mConfiguration; + final ApfCapabilities apfCapabilities = (provisioningConfig != null) + ? provisioningConfig.mApfCapabilities : null; + + IndentingPrintWriter pw = new IndentingPrintWriter(writer, " "); + pw.println(mTag + " APF dump:"); + pw.increaseIndent(); + if (apfFilter != null) { + if (apfCapabilities.hasDataAccess()) { + // Request a new snapshot, then wait for it. + mApfDataSnapshotComplete.close(); + mCallback.startReadPacketFilter(); + if (!mApfDataSnapshotComplete.block(1000)) { + pw.print("TIMEOUT: DUMPING STALE APF SNAPSHOT"); + } + } + apfFilter.dump(pw); + + } else { + pw.print("No active ApfFilter; "); + if (provisioningConfig == null) { + pw.println("IpClient not yet started."); + } else if (apfCapabilities == null || apfCapabilities.apfVersionSupported == 0) { + pw.println("Hardware does not support APF."); + } else { + pw.println("ApfFilter not yet started, APF capabilities: " + apfCapabilities); + } + } + pw.decreaseIndent(); + pw.println(); + pw.println(mTag + " current ProvisioningConfiguration:"); + pw.increaseIndent(); + pw.println(Objects.toString(provisioningConfig, "N/A")); + pw.decreaseIndent(); + + final IpReachabilityMonitor iprm = mIpReachabilityMonitor; + if (iprm != null) { + pw.println(); + pw.println(mTag + " current IpReachabilityMonitor state:"); + pw.increaseIndent(); + iprm.dump(pw); + pw.decreaseIndent(); + } + + pw.println(); + pw.println(mTag + " StateMachine dump:"); + pw.increaseIndent(); + mLog.dump(fd, pw, args); + pw.decreaseIndent(); + + pw.println(); + pw.println(mTag + " connectivity packet log:"); + pw.println(); + pw.println("Debug with python and scapy via:"); + pw.println("shell$ python"); + pw.println(">>> from scapy import all as scapy"); + pw.println(">>> scapy.Ether(\"<paste_hex_string>\".decode(\"hex\")).show2()"); + pw.println(); + + pw.increaseIndent(); + mConnectivityPacketLog.readOnlyLocalLog().dump(fd, pw, args); + pw.decreaseIndent(); + } + + + /** + * Internals. + */ + + @Override + protected String getWhatToString(int what) { + return sWhatToString.get(what, "UNKNOWN: " + Integer.toString(what)); + } + + @Override + protected String getLogRecString(Message msg) { + final String logLine = String.format( + "%s/%d %d %d %s [%s]", + mInterfaceName, (mInterfaceParams == null) ? -1 : mInterfaceParams.index, + msg.arg1, msg.arg2, Objects.toString(msg.obj), mMsgStateLogger); + + final String richerLogLine = getWhatToString(msg.what) + " " + logLine; + mLog.log(richerLogLine); + if (DBG) { + Log.d(mTag, richerLogLine); + } + + mMsgStateLogger.reset(); + return logLine; + } + + @Override + protected boolean recordLogRec(Message msg) { + // Don't log EVENT_NETLINK_LINKPROPERTIES_CHANGED. They can be noisy, + // and we already log any LinkProperties change that results in an + // invocation of IpClient.Callback#onLinkPropertiesChange(). + final boolean shouldLog = (msg.what != EVENT_NETLINK_LINKPROPERTIES_CHANGED); + if (!shouldLog) { + mMsgStateLogger.reset(); + } + return shouldLog; + } + + private void logError(String fmt, Object... args) { + final String msg = "ERROR " + String.format(fmt, args); + Log.e(mTag, msg); + mLog.log(msg); + } + + // This needs to be called with care to ensure that our LinkProperties + // are in sync with the actual LinkProperties of the interface. For example, + // we should only call this if we know for sure that there are no IP addresses + // assigned to the interface, etc. + private void resetLinkProperties() { + mLinkObserver.clearLinkProperties(); + mConfiguration = null; + mDhcpResults = null; + mTcpBufferSizes = ""; + mHttpProxy = null; + + mLinkProperties = new LinkProperties(); + mLinkProperties.setInterfaceName(mInterfaceName); + } + + private void recordMetric(final int type) { + // We may record error metrics prior to starting. + // Map this to IMMEDIATE_FAILURE_DURATION. + final long duration = (mStartTimeMillis > 0) + ? (SystemClock.elapsedRealtime() - mStartTimeMillis) + : IMMEDIATE_FAILURE_DURATION; + mMetricsLog.log(mInterfaceName, new IpManagerEvent(type, duration)); + } + + // For now: use WifiStateMachine's historical notion of provisioned. + @VisibleForTesting + static boolean isProvisioned(LinkProperties lp, InitialConfiguration config) { + // For historical reasons, we should connect even if all we have is + // an IPv4 address and nothing else. + if (lp.hasIpv4Address() || lp.isProvisioned()) { + return true; + } + if (config == null) { + return false; + } + + // When an InitialConfiguration is specified, ignore any difference with previous + // properties and instead check if properties observed match the desired properties. + return config.isProvisionedBy(lp.getLinkAddresses(), lp.getRoutes()); + } + + // TODO: Investigate folding all this into the existing static function + // LinkProperties.compareProvisioning() or some other single function that + // takes two LinkProperties objects and returns a ProvisioningChange + // object that is a correct and complete assessment of what changed, taking + // account of the asymmetries described in the comments in this function. + // Then switch to using it everywhere (IpReachabilityMonitor, etc.). + private int compareProvisioning(LinkProperties oldLp, LinkProperties newLp) { + int delta; + InitialConfiguration config = mConfiguration != null ? mConfiguration.mInitialConfig : null; + final boolean wasProvisioned = isProvisioned(oldLp, config); + final boolean isProvisioned = isProvisioned(newLp, config); + + if (!wasProvisioned && isProvisioned) { + delta = PROV_CHANGE_GAINED_PROVISIONING; + } else if (wasProvisioned && isProvisioned) { + delta = PROV_CHANGE_STILL_PROVISIONED; + } else if (!wasProvisioned && !isProvisioned) { + delta = PROV_CHANGE_STILL_NOT_PROVISIONED; + } else { + // (wasProvisioned && !isProvisioned) + // + // Note that this is true even if we lose a configuration element + // (e.g., a default gateway) that would not be required to advance + // into provisioned state. This is intended: if we have a default + // router and we lose it, that's a sure sign of a problem, but if + // we connect to a network with no IPv4 DNS servers, we consider + // that to be a network without DNS servers and connect anyway. + // + // See the comment below. + delta = PROV_CHANGE_LOST_PROVISIONING; + } + + final boolean lostIPv6 = oldLp.isIpv6Provisioned() && !newLp.isIpv6Provisioned(); + final boolean lostIPv4Address = oldLp.hasIpv4Address() && !newLp.hasIpv4Address(); + final boolean lostIPv6Router = oldLp.hasIpv6DefaultRoute() && !newLp.hasIpv6DefaultRoute(); + + // If bad wifi avoidance is disabled, then ignore IPv6 loss of + // provisioning. Otherwise, when a hotspot that loses Internet + // access sends out a 0-lifetime RA to its clients, the clients + // will disconnect and then reconnect, avoiding the bad hotspot, + // instead of getting stuck on the bad hotspot. http://b/31827713 . + // + // This is incorrect because if the hotspot then regains Internet + // access with a different prefix, TCP connections on the + // deprecated addresses will remain stuck. + // + // Note that we can still be disconnected by IpReachabilityMonitor + // if the IPv6 default gateway (but not the IPv6 DNS servers; see + // accompanying code in IpReachabilityMonitor) is unreachable. + final boolean ignoreIPv6ProvisioningLoss = + mConfiguration != null && mConfiguration.mUsingMultinetworkPolicyTracker + && mCm.shouldAvoidBadWifi(); + + // Additionally: + // + // Partial configurations (e.g., only an IPv4 address with no DNS + // servers and no default route) are accepted as long as DHCPv4 + // succeeds. On such a network, isProvisioned() will always return + // false, because the configuration is not complete, but we want to + // connect anyway. It might be a disconnected network such as a + // Chromecast or a wireless printer, for example. + // + // Because on such a network isProvisioned() will always return false, + // delta will never be LOST_PROVISIONING. So check for loss of + // provisioning here too. + if (lostIPv4Address || (lostIPv6 && !ignoreIPv6ProvisioningLoss)) { + delta = PROV_CHANGE_LOST_PROVISIONING; + } + + // Additionally: + // + // If the previous link properties had a global IPv6 address and an + // IPv6 default route then also consider the loss of that default route + // to be a loss of provisioning. See b/27962810. + if (oldLp.hasGlobalIpv6Address() && (lostIPv6Router && !ignoreIPv6ProvisioningLoss)) { + delta = PROV_CHANGE_LOST_PROVISIONING; + } + + return delta; + } + + private void dispatchCallback(int delta, LinkProperties newLp) { + switch (delta) { + case PROV_CHANGE_GAINED_PROVISIONING: + if (DBG) { + Log.d(mTag, "onProvisioningSuccess()"); + } + recordMetric(IpManagerEvent.PROVISIONING_OK); + mCallback.onProvisioningSuccess(newLp); + break; + + case PROV_CHANGE_LOST_PROVISIONING: + if (DBG) { + Log.d(mTag, "onProvisioningFailure()"); + } + recordMetric(IpManagerEvent.PROVISIONING_FAIL); + mCallback.onProvisioningFailure(newLp); + break; + + default: + if (DBG) { + Log.d(mTag, "onLinkPropertiesChange()"); + } + mCallback.onLinkPropertiesChange(newLp); + break; + } + } + + // Updates all IpClient-related state concerned with LinkProperties. + // Returns a ProvisioningChange for possibly notifying other interested + // parties that are not fronted by IpClient. + private int setLinkProperties(LinkProperties newLp) { + if (mApfFilter != null) { + mApfFilter.setLinkProperties(newLp); + } + if (mIpReachabilityMonitor != null) { + mIpReachabilityMonitor.updateLinkProperties(newLp); + } + + int delta = compareProvisioning(mLinkProperties, newLp); + mLinkProperties = new LinkProperties(newLp); + + if (delta == PROV_CHANGE_GAINED_PROVISIONING) { + // TODO: Add a proper ProvisionedState and cancel the alarm in + // its enter() method. + mProvisioningTimeoutAlarm.cancel(); + } + + return delta; + } + + private LinkProperties assembleLinkProperties() { + // [1] Create a new LinkProperties object to populate. + LinkProperties newLp = new LinkProperties(); + newLp.setInterfaceName(mInterfaceName); + + // [2] Pull in data from netlink: + // - IPv4 addresses + // - IPv6 addresses + // - IPv6 routes + // - IPv6 DNS servers + // + // N.B.: this is fundamentally race-prone and should be fixed by + // changing IpClientLinkObserver from a hybrid edge/level model to an + // edge-only model, or by giving IpClient its own netlink socket(s) + // so as to track all required information directly. + LinkProperties netlinkLinkProperties = mLinkObserver.getLinkProperties(); + newLp.setLinkAddresses(netlinkLinkProperties.getLinkAddresses()); + for (RouteInfo route : netlinkLinkProperties.getRoutes()) { + newLp.addRoute(route); + } + addAllReachableDnsServers(newLp, netlinkLinkProperties.getDnsServers()); + + // [3] Add in data from DHCPv4, if available. + // + // mDhcpResults is never shared with any other owner so we don't have + // to worry about concurrent modification. + if (mDhcpResults != null) { + final List<RouteInfo> routes = + mDhcpResults.toStaticIpConfiguration().getRoutes(mInterfaceName); + for (RouteInfo route : routes) { + newLp.addRoute(route); + } + addAllReachableDnsServers(newLp, mDhcpResults.dnsServers); + newLp.setDomains(mDhcpResults.domains); + + if (mDhcpResults.mtu != 0) { + newLp.setMtu(mDhcpResults.mtu); + } + } + + // [4] Add in TCP buffer sizes and HTTP Proxy config, if available. + if (!TextUtils.isEmpty(mTcpBufferSizes)) { + newLp.setTcpBufferSizes(mTcpBufferSizes); + } + if (mHttpProxy != null) { + newLp.setHttpProxy(mHttpProxy); + } + + // [5] Add data from InitialConfiguration + if (mConfiguration != null && mConfiguration.mInitialConfig != null) { + InitialConfiguration config = mConfiguration.mInitialConfig; + // Add InitialConfiguration routes and dns server addresses once all addresses + // specified in the InitialConfiguration have been observed with Netlink. + if (config.isProvisionedBy(newLp.getLinkAddresses(), null)) { + for (IpPrefix prefix : config.directlyConnectedRoutes) { + newLp.addRoute(new RouteInfo(prefix, null, mInterfaceName, RTN_UNICAST)); + } + } + addAllReachableDnsServers(newLp, config.dnsServers); + } + final LinkProperties oldLp = mLinkProperties; + if (DBG) { + Log.d(mTag, String.format("Netlink-seen LPs: %s, new LPs: %s; old LPs: %s", + netlinkLinkProperties, newLp, oldLp)); + } + + // TODO: also learn via netlink routes specified by an InitialConfiguration and specified + // from a static IP v4 config instead of manually patching them in in steps [3] and [5]. + return newLp; + } + + private static void addAllReachableDnsServers( + LinkProperties lp, Iterable<InetAddress> dnses) { + // TODO: Investigate deleting this reachability check. We should be + // able to pass everything down to netd and let netd do evaluation + // and RFC6724-style sorting. + for (InetAddress dns : dnses) { + if (!dns.isAnyLocalAddress() && lp.isReachable(dns)) { + lp.addDnsServer(dns); + } + } + } + + // Returns false if we have lost provisioning, true otherwise. + private boolean handleLinkPropertiesUpdate(boolean sendCallbacks) { + final LinkProperties newLp = assembleLinkProperties(); + if (Objects.equals(newLp, mLinkProperties)) { + return true; + } + final int delta = setLinkProperties(newLp); + // Most of the attributes stored in the memory store are deduced from + // the link properties, therefore when the properties update the memory + // store record should be updated too. + maybeSaveNetworkToIpMemoryStore(); + if (sendCallbacks) { + dispatchCallback(delta, newLp); + } + return (delta != PROV_CHANGE_LOST_PROVISIONING); + } + + private void handleIPv4Success(DhcpResults dhcpResults) { + mDhcpResults = new DhcpResults(dhcpResults); + final LinkProperties newLp = assembleLinkProperties(); + final int delta = setLinkProperties(newLp); + + if (DBG) { + Log.d(mTag, "onNewDhcpResults(" + Objects.toString(dhcpResults) + ")"); + } + mCallback.onNewDhcpResults(dhcpResults); + maybeSaveNetworkToIpMemoryStore(); + dispatchCallback(delta, newLp); + } + + private void handleIPv4Failure() { + // TODO: Investigate deleting this clearIPv4Address() call. + // + // DhcpClient will send us CMD_CLEAR_LINKADDRESS in all circumstances + // that could trigger a call to this function. If we missed handling + // that message in StartedState for some reason we would still clear + // any addresses upon entry to StoppedState. + mInterfaceCtrl.clearIPv4Address(); + mDhcpResults = null; + if (DBG) { + Log.d(mTag, "onNewDhcpResults(null)"); + } + mCallback.onNewDhcpResults(null); + + handleProvisioningFailure(); + } + + private void handleProvisioningFailure() { + final LinkProperties newLp = assembleLinkProperties(); + int delta = setLinkProperties(newLp); + // If we've gotten here and we're still not provisioned treat that as + // a total loss of provisioning. + // + // Either (a) static IP configuration failed or (b) DHCPv4 failed AND + // there was no usable IPv6 obtained before a non-zero provisioning + // timeout expired. + // + // Regardless: GAME OVER. + if (delta == PROV_CHANGE_STILL_NOT_PROVISIONED) { + delta = PROV_CHANGE_LOST_PROVISIONING; + } + + dispatchCallback(delta, newLp); + if (delta == PROV_CHANGE_LOST_PROVISIONING) { + transitionTo(mStoppingState); + } + } + + private void doImmediateProvisioningFailure(int failureType) { + logError("onProvisioningFailure(): %s", failureType); + recordMetric(failureType); + mCallback.onProvisioningFailure(new LinkProperties(mLinkProperties)); + } + + private boolean startIPv4() { + // If we have a StaticIpConfiguration attempt to apply it and + // handle the result accordingly. + if (mConfiguration.mStaticIpConfig != null) { + if (mInterfaceCtrl.setIPv4Address(mConfiguration.mStaticIpConfig.getIpAddress())) { + handleIPv4Success(new DhcpResults(mConfiguration.mStaticIpConfig)); + } else { + return false; + } + } else { + // Start DHCPv4. + mDhcpClient = DhcpClient.makeDhcpClient(mContext, IpClient.this, mInterfaceParams); + mDhcpClient.registerForPreDhcpNotification(); + if (mConfiguration.mRapidCommit || mConfiguration.mDiscoverSent) + mDhcpClient.sendMessage(DhcpClient.CMD_START_DHCP_RAPID_COMMIT, + (mConfiguration.mRapidCommit ? 1: 0), + (mConfiguration.mDiscoverSent ? 1: 0)); + else + mDhcpClient.sendMessage(DhcpClient.CMD_START_DHCP); + } + + return true; + } + + private boolean startIPv6() { + return mInterfaceCtrl.setIPv6PrivacyExtensions(true) + && mInterfaceCtrl.setIPv6AddrGenModeIfSupported(mConfiguration.mIPv6AddrGenMode) + && mInterfaceCtrl.enableIPv6(); + } + + private boolean applyInitialConfig(InitialConfiguration config) { + // TODO: also support specifying a static IPv4 configuration in InitialConfiguration. + for (LinkAddress addr : findAll(config.ipAddresses, LinkAddress::isIpv6)) { + if (!mInterfaceCtrl.addAddress(addr)) return false; + } + + return true; + } + + private boolean startIpReachabilityMonitor() { + try { + // TODO: Fetch these parameters from settings, and install a + // settings observer to watch for update and re-program these + // parameters (Q: is this level of dynamic updatability really + // necessary or does reading from settings at startup suffice?). + final int numSolicits = 5; + final int interSolicitIntervalMs = 750; + setNeighborParameters(mNetd, mInterfaceName, numSolicits, interSolicitIntervalMs); + } catch (Exception e) { + mLog.e("Failed to adjust neighbor parameters", e); + // Carry on using the system defaults (currently: 3, 1000); + } + + try { + mIpReachabilityMonitor = new IpReachabilityMonitor( + mContext, + mInterfaceParams, + getHandler(), + mLog, + new IpReachabilityMonitor.Callback() { + @Override + public void notifyLost(InetAddress ip, String logMsg) { + mCallback.onReachabilityLost(logMsg); + } + }, + mConfiguration.mUsingMultinetworkPolicyTracker); + } catch (IllegalArgumentException iae) { + // Failed to start IpReachabilityMonitor. Log it and call + // onProvisioningFailure() immediately. + // + // See http://b/31038971. + logError("IpReachabilityMonitor failure: %s", iae); + mIpReachabilityMonitor = null; + } + + return (mIpReachabilityMonitor != null); + } + + + public ByteBuffer buildDiscoverWithRapidCommitPacket() { + return mDhcpClient.buildDiscoverWithRapidCommitPacket(); + } + + private void stopAllIP() { + // We don't need to worry about routes, just addresses, because: + // - disableIpv6() will clear autoconf IPv6 routes as well, and + // - we don't get IPv4 routes from netlink + // so we neither react to nor need to wait for changes in either. + + mInterfaceCtrl.disableIPv6(); + mInterfaceCtrl.clearAllAddresses(); + } + + private void maybeSaveNetworkToIpMemoryStore() { + // TODO : implement this + } + + class StoppedState extends State { + @Override + public void enter() { + stopAllIP(); + + resetLinkProperties(); + if (mStartTimeMillis > 0) { + // Completed a life-cycle; send a final empty LinkProperties + // (cleared in resetLinkProperties() above) and record an event. + mCallback.onLinkPropertiesChange(new LinkProperties(mLinkProperties)); + recordMetric(IpManagerEvent.COMPLETE_LIFECYCLE); + mStartTimeMillis = 0; + } + } + + @Override + public boolean processMessage(Message msg) { + switch (msg.what) { + case CMD_TERMINATE_AFTER_STOP: + stopStateMachineUpdaters(); + quit(); + break; + + case CMD_STOP: + break; + + case CMD_START: + mConfiguration = (android.net.shared.ProvisioningConfiguration) msg.obj; + transitionTo(mStartedState); + break; + + case EVENT_NETLINK_LINKPROPERTIES_CHANGED: + handleLinkPropertiesUpdate(NO_CALLBACKS); + break; + + case CMD_UPDATE_TCP_BUFFER_SIZES: + mTcpBufferSizes = (String) msg.obj; + handleLinkPropertiesUpdate(NO_CALLBACKS); + break; + + case CMD_UPDATE_HTTP_PROXY: + mHttpProxy = (ProxyInfo) msg.obj; + handleLinkPropertiesUpdate(NO_CALLBACKS); + break; + + case CMD_UPDATE_L2KEY_GROUPHINT: { + final Pair<String, String> args = (Pair<String, String>) msg.obj; + mL2Key = args.first; + mGroupHint = args.second; + break; + } + + case CMD_SET_MULTICAST_FILTER: + mMulticastFiltering = (boolean) msg.obj; + break; + + case DhcpClient.CMD_ON_QUIT: + // Everything is already stopped. + logError("Unexpected CMD_ON_QUIT (already stopped)."); + break; + + default: + return NOT_HANDLED; + } + + mMsgStateLogger.handled(this, getCurrentState()); + return HANDLED; + } + } + + class StoppingState extends State { + @Override + public void enter() { + if (mDhcpClient == null) { + // There's no DHCPv4 for which to wait; proceed to stopped. + deferMessage(obtainMessage(CMD_JUMP_STOPPING_TO_STOPPED)); + } + } + + @Override + public boolean processMessage(Message msg) { + switch (msg.what) { + case CMD_JUMP_STOPPING_TO_STOPPED: + transitionTo(mStoppedState); + break; + + case CMD_STOP: + break; + + case DhcpClient.CMD_CLEAR_LINKADDRESS: + mInterfaceCtrl.clearIPv4Address(); + break; + + case DhcpClient.CMD_ON_QUIT: + mDhcpClient = null; + transitionTo(mStoppedState); + break; + + default: + deferMessage(msg); + } + + mMsgStateLogger.handled(this, getCurrentState()); + return HANDLED; + } + } + + class StartedState extends State { + @Override + public void enter() { + mStartTimeMillis = SystemClock.elapsedRealtime(); + + if (mConfiguration.mProvisioningTimeoutMs > 0) { + final long alarmTime = SystemClock.elapsedRealtime() + + mConfiguration.mProvisioningTimeoutMs; + mProvisioningTimeoutAlarm.schedule(alarmTime); + } + + if (readyToProceed()) { + deferMessage(obtainMessage(CMD_JUMP_STARTED_TO_RUNNING)); + } else { + // Clear all IPv4 and IPv6 before proceeding to RunningState. + // Clean up any leftover state from an abnormal exit from + // tethering or during an IpClient restart. + stopAllIP(); + } + } + + @Override + public void exit() { + mProvisioningTimeoutAlarm.cancel(); + } + + @Override + public boolean processMessage(Message msg) { + switch (msg.what) { + case CMD_JUMP_STARTED_TO_RUNNING: + transitionTo(mRunningState); + break; + + case CMD_STOP: + transitionTo(mStoppingState); + break; + + case EVENT_NETLINK_LINKPROPERTIES_CHANGED: + handleLinkPropertiesUpdate(NO_CALLBACKS); + if (readyToProceed()) { + transitionTo(mRunningState); + } + break; + + case CMD_UPDATE_L2KEY_GROUPHINT: { + final Pair<String, String> args = (Pair<String, String>) msg.obj; + mL2Key = args.first; + mGroupHint = args.second; + // TODO : attributes should be saved to the memory store with + // these new values if they differ from the previous ones. + // If the state machine is in pure StartedState, then the values to input + // are not known yet and should be updated when the LinkProperties are updated. + // If the state machine is in RunningState (which is a child of StartedState) + // then the next NUD check should be used to store the new values to avoid + // inputting current values for what may be a different L3 network. + break; + } + + case EVENT_PROVISIONING_TIMEOUT: + handleProvisioningFailure(); + break; + + default: + // It's safe to process messages out of order because the + // only message that can both + // a) be received at this time and + // b) affect provisioning state + // is EVENT_NETLINK_LINKPROPERTIES_CHANGED (handled above). + deferMessage(msg); + } + + mMsgStateLogger.handled(this, getCurrentState()); + return HANDLED; + } + + private boolean readyToProceed() { + return (!mLinkProperties.hasIpv4Address() && !mLinkProperties.hasGlobalIpv6Address()); + } + } + + class RunningState extends State { + private ConnectivityPacketTracker mPacketTracker; + private boolean mDhcpActionInFlight; + + @Override + public void enter() { + ApfFilter.ApfConfiguration apfConfig = new ApfFilter.ApfConfiguration(); + apfConfig.apfCapabilities = mConfiguration.mApfCapabilities; + apfConfig.multicastFilter = mMulticastFiltering; + // Get the Configuration for ApfFilter from Context + apfConfig.ieee802_3Filter = ApfCapabilities.getApfDrop8023Frames(); + apfConfig.ethTypeBlackList = ApfCapabilities.getApfEtherTypeBlackList(); + mApfFilter = ApfFilter.maybeCreate(mContext, apfConfig, mInterfaceParams, mCallback); + // TODO: investigate the effects of any multicast filtering racing/interfering with the + // rest of this IP configuration startup. + if (mApfFilter == null) { + mCallback.setFallbackMulticastFilter(mMulticastFiltering); + } + + mPacketTracker = createPacketTracker(); + if (mPacketTracker != null) mPacketTracker.start(mConfiguration.mDisplayName); + + if (mConfiguration.mEnableIPv6 && !startIPv6()) { + doImmediateProvisioningFailure(IpManagerEvent.ERROR_STARTING_IPV6); + enqueueJumpToStoppingState(); + return; + } + + if (mConfiguration.mEnableIPv4 && !startIPv4()) { + doImmediateProvisioningFailure(IpManagerEvent.ERROR_STARTING_IPV4); + enqueueJumpToStoppingState(); + return; + } + + final InitialConfiguration config = mConfiguration.mInitialConfig; + if ((config != null) && !applyInitialConfig(config)) { + // TODO introduce a new IpManagerEvent constant to distinguish this error case. + doImmediateProvisioningFailure(IpManagerEvent.ERROR_INVALID_PROVISIONING); + enqueueJumpToStoppingState(); + return; + } + + if (mConfiguration.mUsingIpReachabilityMonitor && !startIpReachabilityMonitor()) { + doImmediateProvisioningFailure( + IpManagerEvent.ERROR_STARTING_IPREACHABILITYMONITOR); + enqueueJumpToStoppingState(); + return; + } + } + + @Override + public void exit() { + stopDhcpAction(); + + if (mIpReachabilityMonitor != null) { + mIpReachabilityMonitor.stop(); + mIpReachabilityMonitor = null; + } + + if (mDhcpClient != null) { + mDhcpClient.sendMessage(DhcpClient.CMD_STOP_DHCP); + mDhcpClient.doQuit(); + } + + if (mPacketTracker != null) { + mPacketTracker.stop(); + mPacketTracker = null; + } + + if (mApfFilter != null) { + mApfFilter.shutdown(); + mApfFilter = null; + } + + resetLinkProperties(); + } + + private void enqueueJumpToStoppingState() { + deferMessage(obtainMessage(CMD_JUMP_RUNNING_TO_STOPPING)); + } + + private ConnectivityPacketTracker createPacketTracker() { + try { + return new ConnectivityPacketTracker( + getHandler(), mInterfaceParams, mConnectivityPacketLog); + } catch (IllegalArgumentException e) { + return null; + } + } + + private void ensureDhcpAction() { + if (!mDhcpActionInFlight) { + mCallback.onPreDhcpAction(); + mDhcpActionInFlight = true; + final long alarmTime = SystemClock.elapsedRealtime() + + mConfiguration.mRequestedPreDhcpActionMs; + mDhcpActionTimeoutAlarm.schedule(alarmTime); + } + } + + private void stopDhcpAction() { + mDhcpActionTimeoutAlarm.cancel(); + if (mDhcpActionInFlight) { + mCallback.onPostDhcpAction(); + mDhcpActionInFlight = false; + } + } + + @Override + public boolean processMessage(Message msg) { + switch (msg.what) { + case CMD_JUMP_RUNNING_TO_STOPPING: + case CMD_STOP: + transitionTo(mStoppingState); + break; + + case CMD_START: + logError("ALERT: START received in StartedState. Please fix caller."); + break; + + case CMD_CONFIRM: + // TODO: Possibly introduce a second type of confirmation + // that both probes (a) on-link neighbors and (b) does + // a DHCPv4 RENEW. We used to do this on Wi-Fi framework + // roams. + if (mIpReachabilityMonitor != null) { + mIpReachabilityMonitor.probeAll(); + } + break; + + case EVENT_PRE_DHCP_ACTION_COMPLETE: + // It's possible to reach here if, for example, someone + // calls completedPreDhcpAction() after provisioning with + // a static IP configuration. + if (mDhcpClient != null) { + mDhcpClient.sendMessage(DhcpClient.CMD_PRE_DHCP_ACTION_COMPLETE); + } + break; + + case EVENT_NETLINK_LINKPROPERTIES_CHANGED: + if (!handleLinkPropertiesUpdate(SEND_CALLBACKS)) { + transitionTo(mStoppingState); + } + break; + + case CMD_UPDATE_TCP_BUFFER_SIZES: + mTcpBufferSizes = (String) msg.obj; + // This cannot possibly change provisioning state. + handleLinkPropertiesUpdate(SEND_CALLBACKS); + break; + + case CMD_UPDATE_HTTP_PROXY: + mHttpProxy = (ProxyInfo) msg.obj; + // This cannot possibly change provisioning state. + handleLinkPropertiesUpdate(SEND_CALLBACKS); + break; + + case CMD_SET_MULTICAST_FILTER: { + mMulticastFiltering = (boolean) msg.obj; + if (mApfFilter != null) { + mApfFilter.setMulticastFilter(mMulticastFiltering); + } else { + mCallback.setFallbackMulticastFilter(mMulticastFiltering); + } + break; + } + + case EVENT_READ_PACKET_FILTER_COMPLETE: { + if (mApfFilter != null) { + mApfFilter.setDataSnapshot((byte[]) msg.obj); + } + mApfDataSnapshotComplete.open(); + break; + } + + case CMD_ADD_KEEPALIVE_PACKET_FILTER_TO_APF: { + final int slot = msg.arg1; + + if (mApfFilter != null) { + if (msg.obj instanceof NattKeepalivePacketDataParcelable) { + mApfFilter.addNattKeepalivePacketFilter(slot, + (NattKeepalivePacketDataParcelable) msg.obj); + } else if (msg.obj instanceof TcpKeepalivePacketDataParcelable) { + mApfFilter.addTcpKeepalivePacketFilter(slot, + (TcpKeepalivePacketDataParcelable) msg.obj); + } + } + break; + } + + case CMD_REMOVE_KEEPALIVE_PACKET_FILTER_FROM_APF: { + final int slot = msg.arg1; + if (mApfFilter != null) { + mApfFilter.removeKeepalivePacketFilter(slot); + } + break; + } + + case EVENT_DHCPACTION_TIMEOUT: + stopDhcpAction(); + break; + + case DhcpClient.CMD_PRE_DHCP_ACTION: + if (mConfiguration.mRequestedPreDhcpActionMs > 0) { + ensureDhcpAction(); + } else { + sendMessage(EVENT_PRE_DHCP_ACTION_COMPLETE); + } + break; + + case DhcpClient.CMD_CLEAR_LINKADDRESS: + mInterfaceCtrl.clearIPv4Address(); + break; + + case DhcpClient.CMD_CONFIGURE_LINKADDRESS: { + final LinkAddress ipAddress = (LinkAddress) msg.obj; + if (mInterfaceCtrl.setIPv4Address(ipAddress)) { + mDhcpClient.sendMessage(DhcpClient.EVENT_LINKADDRESS_CONFIGURED); + } else { + logError("Failed to set IPv4 address."); + dispatchCallback(PROV_CHANGE_LOST_PROVISIONING, + new LinkProperties(mLinkProperties)); + transitionTo(mStoppingState); + } + break; + } + + // This message is only received when: + // + // a) initial address acquisition succeeds, + // b) renew succeeds or is NAK'd, + // c) rebind succeeds or is NAK'd, or + // c) the lease expires, + // + // but never when initial address acquisition fails. The latter + // condition is now governed by the provisioning timeout. + case DhcpClient.CMD_POST_DHCP_ACTION: + stopDhcpAction(); + + switch (msg.arg1) { + case DhcpClient.DHCP_SUCCESS: + handleIPv4Success((DhcpResults) msg.obj); + break; + case DhcpClient.DHCP_FAILURE: + handleIPv4Failure(); + break; + default: + logError("Unknown CMD_POST_DHCP_ACTION status: %s", msg.arg1); + } + break; + + case DhcpClient.CMD_ON_QUIT: + // DHCPv4 quit early for some reason. + logError("Unexpected CMD_ON_QUIT."); + mDhcpClient = null; + break; + + default: + return NOT_HANDLED; + } + + mMsgStateLogger.handled(this, getCurrentState()); + return HANDLED; + } + } + + private static class MessageHandlingLogger { + public String processedInState; + public String receivedInState; + + public void reset() { + processedInState = null; + receivedInState = null; + } + + public void handled(State processedIn, IState receivedIn) { + processedInState = processedIn.getClass().getSimpleName(); + receivedInState = receivedIn.getName(); + } + + public String toString() { + return String.format("rcvd_in=%s, proc_in=%s", + receivedInState, processedInState); + } + } + + private static void setNeighborParameters( + INetd netd, String ifName, int numSolicits, int interSolicitIntervalMs) + throws RemoteException, IllegalArgumentException { + Preconditions.checkNotNull(netd); + Preconditions.checkArgument(!TextUtils.isEmpty(ifName)); + Preconditions.checkArgument(numSolicits > 0); + Preconditions.checkArgument(interSolicitIntervalMs > 0); + + for (int family : new Integer[]{INetd.IPV4, INetd.IPV6}) { + netd.setProcSysNet(family, INetd.NEIGH, ifName, "retrans_time_ms", + Integer.toString(interSolicitIntervalMs)); + netd.setProcSysNet(family, INetd.NEIGH, ifName, "ucast_solicit", + Integer.toString(numSolicits)); + } + } + + // TODO: extract out into CollectionUtils. + static <T> boolean any(Iterable<T> coll, Predicate<T> fn) { + for (T t : coll) { + if (fn.test(t)) { + return true; + } + } + return false; + } + + static <T> boolean all(Iterable<T> coll, Predicate<T> fn) { + return !any(coll, not(fn)); + } + + static <T> Predicate<T> not(Predicate<T> fn) { + return (t) -> !fn.test(t); + } + + static <T> String join(String delimiter, Collection<T> coll) { + return coll.stream().map(Object::toString).collect(Collectors.joining(delimiter)); + } + + static <T> T find(Iterable<T> coll, Predicate<T> fn) { + for (T t: coll) { + if (fn.test(t)) { + return t; + } + } + return null; + } + + static <T> List<T> findAll(Collection<T> coll, Predicate<T> fn) { + return coll.stream().filter(fn).collect(Collectors.toList()); + } +} diff --git a/packages/SettingsLib/Android.bp b/packages/SettingsLib/Android.bp index c244ca0505ed..5d8137c8308a 100644 --- a/packages/SettingsLib/Android.bp +++ b/packages/SettingsLib/Android.bp @@ -7,10 +7,35 @@ package { default_applicable_licenses: ["frameworks_base_license"], } +soong_config_module_type_import { + from: "device/qcom/qssi/Android.bp", + module_types: [ + "bredr_vs_btadva_java_defaults", + ], +} + +bredr_vs_btadva_java_defaults { + name: "btadva_settings_lib_java_defaults", + + soong_config_variables: { + bredr_or_btadva: { + btadva: { + srcs: [ + ":framework-settingslib-adva-srcs", + ], + } + } + } +} + android_library { name: "SettingsLib", + defaults: [ + "btadva_settings_lib_java_defaults", + ], + static_libs: [ "androidx.annotation_annotation", "androidx.appcompat_appcompat", @@ -24,7 +49,7 @@ android_library { "androidx.recyclerview_recyclerview", "com.google.android.material_material", "iconloader", - + "WifiTrackerLib", "WifiTrackerLibRes", "SettingsLibHelpUtils", "SettingsLibRestrictedLockUtils", diff --git a/packages/SettingsLib/res/drawable/ic_5g_uwb_mobiledata.xml b/packages/SettingsLib/res/drawable/ic_5g_uwb_mobiledata.xml new file mode 100644 index 000000000000..41a82af16d5d --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_5g_uwb_mobiledata.xml @@ -0,0 +1,49 @@ +<!--Copyright (c) 2018, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="36dp" + android:height="14dp" + android:viewportWidth="36" + android:viewportHeight="14"> + + <path + android:fillColor="#FFFFFF" + android:pathData="M2.4,5.5c-0.3,0-0.6,0.1-0.9,0.2C2.3,5.8,2.2,5.9,2,6.1l0.3-2.8h3.4v-1H1.1L0.6,7.4l1.1,0.1C1.9,7.2,2.1,7,2.2,6.9c0.2-0.2,0.5-0.3,0.9-0.3s0.9,0.2,1,0.6C4.5,7.5,4.6,8,4.6,8.7s-0.1,1.2-0.4,1.6c-0.3,0.4-0.6,0.6-1,0.6c-0.4,0-0.8-0.2-0.9-0.5C2,10.1,1.9,9.7,1.9,9.1H0.6l0,0c0,0.9,0.2,1.5,0.8,1.9c0.5,0.5,1.1,0.7,1.9,0.7c0.9,0,1.6-0.3,2.1-0.9S6,9.5,6,8.6c0-0.9-0.2-1.7-0.7-2.3C4.8,5.8,4.2,5.5,3.4,5.5z" /> + <path + android:fillColor="#FFFFFF" + android:pathData="M9.5,7v0.9h1.7v2.2c-0.1,0.2-0.3,0.4-0.6,0.5s-0.7,0.2-1,0.2c-0.6,0-1-0.2-1.4-0.7C7.8,9.7,7.6,9.1,7.6,8.3V5.4c0-0.8,0.2-1.4,0.5-1.8C8.5,3.3,9,3.1,9.5,3.1c0.6,0,0.9,0.2,1.2,0.5c0.3,0.3,0.5,0.8,0.5,1.3h1.2l0,0c0-0.9-0.2-1.5-0.8-2c-0.5-0.5-1.2-0.8-2.2-0.8c-0.9,0-1.7,0.3-2.4,0.9S6.3,4.4,6.3,5.5v2.8c0,1.1,0.3,2,0.9,2.6c0.6,0.6,1.4,0.9,2.4,0.9c0.8,0,1.4-0.1,1.9-0.4c0.5-0.3,0.9-0.6,1-0.9V7H9.5z" /> + <path + android:fillColor="#FFFFFF" + android:pathData="M17.5,2.2v6.3c0,1.7,0.6,2.2,1.3,2.2c0.8,0,1.3-0.6,1.3-2.2V2.2h1.1v6.1c0,2.4-1,3.3-2.4,3.3c-1.4,0-2.3-0.9-2.3-3.2V2.2H17.5z" /> + <path + android:fillColor="#FFFFFF" + android:pathData="M23.5,11.5l-1.8-9.3h1.1l0.8,4.5c0.2,1.2,0.3,2.2,0.5,3.4h0.1c0.1-1.2,0.3-2.2,0.6-3.4l0.9-4.5h0.9l0.9,4.4c0.2,1.1,0.4,2.2,0.5,3.5h0c0.2-1.3,0.3-2.4,0.5-3.4l0.8-4.4h1l-1.8,9.3h-1L26.4,7c-0.2-1-0.4-2-0.5-3.1h0C25.8,5,25.7,6,25.4,7l-0.9,4.5H23.5z" /> + <path + android:fillColor="#FFFFFF" + android:pathData="M30.8,2.2c0.5,0,1,0,1.6,0c0.8,0,1.6,0.2,2.1,0.7c0.4,0.4,0.6,0.9,0.6,1.6c0,1-0.5,1.7-1.4,2.1v0c1.1,0.3,1.7,1.2,1.7,2.4c0,0.8-0.2,1.4-0.7,1.9c-0.5,0.6-1.4,0.8-2.5,0.8c-0.7,0-1.1,0-1.4-0.1V2.2zM31.9,6.1h0.5c0.9,0,1.6-0.7,1.6-1.6C34,3.6,33.6,3,32.5,3C32.2,3,32,3,31.9,3V6.1zM31.9,10.7c0.1,0,0.3,0.1,0.5,0.1c1.1,0,1.8-0.7,1.8-1.9c0-1.3-0.9-1.9-1.9-1.9h-0.5V10.7z" /> +</vector> diff --git a/packages/SettingsLib/res/drawable/ic_adv_audio.xml b/packages/SettingsLib/res/drawable/ic_adv_audio.xml new file mode 100644 index 000000000000..34f670fcb369 --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_adv_audio.xml @@ -0,0 +1,76 @@ +<!-- +Copyright (c) 2020, The Linux Foundation. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + --> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="999" + android:viewportHeight="1024"> + <path + android:fillColor="#000" + android:pathData="M126.97,182.76c-69.56,50.96 -64.68,331.98 6.48,372.82 40.96, + 23.51 103.33,7.01 155.5,-41.12 11.31,-10.43 23.38,-18.97 26.84,-18.97 3.45, + 0 6.28,89.19 6.28,198.19v198.19h97.29l5.89,-154.84c12.93,-339.91 6.16, + -424.43 -37.81,-471.62 -8.7,-9.34 -15.82,-18.82 -15.82,-21.08 0, + -8.58 -42.51,-46.14 -52.22,-46.14 -5.6,0 -18.17,-5.6 -27.94,-12.44 -33.07, + -23.17 -134.44,-25.01 -164.49,-2.99zM677.16,172.87c-140.96,32.47 -196.8, + 164.49 -174.23,411.9 4.99,54.65 9.07,146.1 9.07,203.23v103.87h99.1v-198.19c0, + -109.01 2.83,-198.19 6.28,-198.19s15.79,8.82 27.42,19.6c78.81,73.08 184.06, + 62.19 200.65,-20.75 8.23,-41.14 5.84,-231.48 -3.31,-263.11 -15.38,-53.2 -83.2, + -77.2 -164.97,-58.36zM173.42,372.1c0,165.4 -0.69,172.93 -15.95,172.93 -67.68, + 0 -75.96,-327.13 -8.82,-348.86 23.27,-7.53 24.77,3.17 24.77,175.93zM299.36, + 207.78c7.95,4.13 14.45,11.1 14.45,15.48 0,4.38 3.53,7.97 7.83,7.97 11.05,0 49.97, + 37.26 49.97,47.84 0,4.83 5.84,14.62 12.98,21.76 20.07,20.07 31.7, + 148.52 24.55,271.05l-6.15,105.29h-64.4v-103.22c0,-111.14 -11.44,-130.96 -51.26, + -88.77 -18.66,19.77 -37.85,35.1 -43.95,35.1 -2.79,0 -10.64,5.58 -17.45,12.39 -33.37, + 33.37 -35.98,21.32 -35.98,-165.75v-178.14l47.48,5.76c26.12,3.17 53.99,9.14 61.94, + 13.27zM743.23,367.48c0,116.88 -2.92,177.55 -8.55,177.55 -12.77,0 -58.22,-29.95 -91.65, + -60.38 -41.28,-37.58 -52.36,-19.13 -54.9,91.35l-2.32,101.16h-54.51l-9.64,-98.54c-10.42, + -106.47 -2.79,-204.87 19.66,-253.67 6.59,-14.31 12.11,-29.18 12.27,-33.03 1.21, + -28.46 85.25,-91.54 127.7,-95.85 18.17,-1.84 39.54,-3.98 47.49,-4.74 13.36,-1.28 14.45, + 12.04 14.45,176.16zM812.47,218.55c22.28,34.01 19.36,270.05 -3.74,302.5 -37.51, + 52.68 -41.31,38.36 -39.66,-149.44 1.64,-185.86 7.76,-207.46 43.4,-153.06zM616.83, + 253.02c-6.6,6.6 0.86,19.49 11.27,19.49 4.27,0 7.77,-5.57 7.77,-12.39 0,-12.77 -9.74, + -16.41 -19.04,-7.1zM645.57,406.71c-1.32,35.85 0.16,39.14 17.14,38.27 13.26,-0.68 14.57, + -2.01 4.58,-4.65 -9.63,-2.54 -14.98,-14.48 -17.14,-38.27l-3.14,-34.58 -1.44,39.23zM688.67, + 383.3c-10.64,27.73 0.38,58.47 21.52,60.03 11.92,0.88 14.54,-0.25 6.19,-2.67 -7.95, + -2.31 -14.45,-9.22 -14.45,-15.37s6.5,-12.88 14.45,-14.95c13.76,-3.6 13.76,-3.82 0, + -4.73 -17.58,-1.17 -19.51,-17.47 -2.07,-17.47 6.82,0 12.39,-3.72 12.39,-8.26 0, + -12.74 -32.97,-9.77 -38.04,3.43zM214.71,412.9c0,30.76 1.56,32.97 22.71, + 32.08 13.97,-0.59 17.15,-2.41 8.26,-4.73 -10.22,-2.67 -14.45,-12.07 -14.45, + -32.08 0,-15.56 -3.72,-28.3 -8.26,-28.3s-8.26,14.87 -8.26,33.03zM264.26,412.9c0, + 30.76 1.56,32.97 22.71,32.08 13.97,-0.59 17.15,-2.41 8.26,-4.73 -7.95,-2.08 -14.45, + -8.81 -14.45,-14.95s6.5,-12.88 14.45,-14.95c13.76,-3.6 13.76,-3.82 0,-4.73 -7.95, + -0.53 -14.45,-4.4 -14.45,-8.61s6.5,-9.35 14.45,-11.43c8.89,-2.32 5.71,-4.14 -8.26, + -4.73 -21.15,-0.89 -22.71,1.31 -22.71,32.07zM396.39, + 788.64v86.71h-57.81v-173.42h57.81v86.71zM586.32, + 788.64v86.71h-49.55v-173.42h49.55v86.71zM546.68,807.22c1.86,35.6 5.58, + 47.49 14.86,47.49 9.29,0 13.01,-11.88 14.86,-47.49 2.27,-43.52 1.03,-47.48 -14.86, + -47.48 -15.89,0 -17.13,3.97 -14.86,47.48zM367.2,778.14c-7.37,19.21 -0.98,76.57 8.54, + 76.57 11.27,0 15.55,-70.34 4.93,-80.96 -5.85,-5.85 -10.07,-4.48 -13.47,4.38z" /> +</vector>
\ No newline at end of file diff --git a/packages/SettingsLib/res/drawable/ic_vowifi.xml b/packages/SettingsLib/res/drawable/ic_vowifi.xml new file mode 100644 index 000000000000..6f9245f39d37 --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_vowifi.xml @@ -0,0 +1,51 @@ +<!-- + Copyright (c) 2020, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="14dp" + android:height="14dp" + android:viewportWidth="14" + android:viewportHeight="14"> + <path + android:pathData="M9.21,6.91a3.13,3.13 0,0 0,-4.42 0,2.54 2.54,0 0,0 -0.29,0.36l1,0.79a1.13,1.13 0,0 1,0.22 -0.27,1.88 1.88,0 0,1 2.64,0 1.13,1.13 0,0 1,0.22 0.27l1,-0.79A2.54,2.54 0,0 0,9.21 6.91Z" + android:fillColor="#FFFFFF"/> + <path + android:pathData="M6.56,8.68a0.44,0.44 0,0 0,-0.12 0.18L7,9.32l0.56,-0.46a0.44,0.44 0,0 0,-0.12 -0.18A0.61,0.61 0,0 0,6.56 8.68Z" + android:strokeWidth="0.25" + android:fillColor="#FFFFFF" + android:strokeColor="#FFFFFF"/> + <path + android:pathData="M7,3.5A5.57,5.57 0,0 0,3 5.14a5.7,5.7 0,0 0,-0.45 0.55l1,0.79A5.19,5.19 0,0 1,3.91 6a4.37,4.37 0,0 1,6.18 0,5.19 5.19,0 0,1 0.37,0.45l1,-0.79A5.7,5.7 0,0 0,11 5.14,5.57 5.57,0 0,0 7,3.5Z" + android:fillColor="#FFFFFF"/> + <path + android:pathData="M12.74,3.38a8.11,8.11 0,0 0,-11.48 0,7.1 7.1,0 0,0 -0.63,0.71l1,0.81a8.06,8.06 0,0 1,0.52 -0.64,6.88 6.88,0 0,1 9.72,0 8.06,8.06 0,0 1,0.52 0.64l1,-0.81A7.1,7.1 0,0 0,12.74 3.38Z" + android:fillColor="#FFFFFF"/> + <path + android:pathData="M12.3,7.58a0.14,0.14 0,0 1,0.16 0l0,0 1.26,1.63a0.19,0.19 0,0 1,0 0.28l-0.08,0.09a9.22,9.22 0,0 1,-13.27 0,1.68 1.68,0 0,1 -0.16,-0.15 0.15,0.15 0,0 1,0 -0.19L0.44,9 1.66,7.6a0.13,0.13 0,0 1,0.19 0L4.09,9.4a0.12,0.12 0,0 1,0 0.15l-0.43,1a8.66,8.66 0,0 0,6.74 0l-0.43,-1a0.15,0.15 0,0 1,0 -0.13l0,0Z" + android:fillColor="#FFFFFF"/> +</vector>
\ No newline at end of file diff --git a/packages/SettingsLib/res/drawable/ic_vowifi_calling.xml b/packages/SettingsLib/res/drawable/ic_vowifi_calling.xml new file mode 100644 index 000000000000..6f9245f39d37 --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_vowifi_calling.xml @@ -0,0 +1,51 @@ +<!-- + Copyright (c) 2020, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="14dp" + android:height="14dp" + android:viewportWidth="14" + android:viewportHeight="14"> + <path + android:pathData="M9.21,6.91a3.13,3.13 0,0 0,-4.42 0,2.54 2.54,0 0,0 -0.29,0.36l1,0.79a1.13,1.13 0,0 1,0.22 -0.27,1.88 1.88,0 0,1 2.64,0 1.13,1.13 0,0 1,0.22 0.27l1,-0.79A2.54,2.54 0,0 0,9.21 6.91Z" + android:fillColor="#FFFFFF"/> + <path + android:pathData="M6.56,8.68a0.44,0.44 0,0 0,-0.12 0.18L7,9.32l0.56,-0.46a0.44,0.44 0,0 0,-0.12 -0.18A0.61,0.61 0,0 0,6.56 8.68Z" + android:strokeWidth="0.25" + android:fillColor="#FFFFFF" + android:strokeColor="#FFFFFF"/> + <path + android:pathData="M7,3.5A5.57,5.57 0,0 0,3 5.14a5.7,5.7 0,0 0,-0.45 0.55l1,0.79A5.19,5.19 0,0 1,3.91 6a4.37,4.37 0,0 1,6.18 0,5.19 5.19,0 0,1 0.37,0.45l1,-0.79A5.7,5.7 0,0 0,11 5.14,5.57 5.57,0 0,0 7,3.5Z" + android:fillColor="#FFFFFF"/> + <path + android:pathData="M12.74,3.38a8.11,8.11 0,0 0,-11.48 0,7.1 7.1,0 0,0 -0.63,0.71l1,0.81a8.06,8.06 0,0 1,0.52 -0.64,6.88 6.88,0 0,1 9.72,0 8.06,8.06 0,0 1,0.52 0.64l1,-0.81A7.1,7.1 0,0 0,12.74 3.38Z" + android:fillColor="#FFFFFF"/> + <path + android:pathData="M12.3,7.58a0.14,0.14 0,0 1,0.16 0l0,0 1.26,1.63a0.19,0.19 0,0 1,0 0.28l-0.08,0.09a9.22,9.22 0,0 1,-13.27 0,1.68 1.68,0 0,1 -0.16,-0.15 0.15,0.15 0,0 1,0 -0.19L0.44,9 1.66,7.6a0.13,0.13 0,0 1,0.19 0L4.09,9.4a0.12,0.12 0,0 1,0 0.15l-0.43,1a8.66,8.66 0,0 0,6.74 0l-0.43,-1a0.15,0.15 0,0 1,0 -0.13l0,0Z" + android:fillColor="#FFFFFF"/> +</vector>
\ No newline at end of file diff --git a/packages/SettingsLib/res/values-af/arrays.xml b/packages/SettingsLib/res/values-af/arrays.xml index a96ea0dcc86e..63c5ab22b440 100644 --- a/packages/SettingsLib/res/values-af/arrays.xml +++ b/packages/SettingsLib/res/values-af/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>-oudio"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>-oudio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Gebruik stelselkeuse (verstek)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>-oudio"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>-oudio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Gebruik stelselkeuse (verstek)"</item> diff --git a/packages/SettingsLib/res/values-am/arrays.xml b/packages/SettingsLib/res/values-am/arrays.xml index 5f7aec2abc00..11b9f53f4b04 100644 --- a/packages/SettingsLib/res/values-am/arrays.xml +++ b/packages/SettingsLib/res/values-am/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ኦዲዮ"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ኦዲዮ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"የስርዓቱን ምርጫ (ነባሪ) ተጠቀም"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ኦዲዮ"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ኦዲዮ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"የስርዓቱን ምርጫ (ነባሪ) ተጠቀም"</item> diff --git a/packages/SettingsLib/res/values-ar/arrays.xml b/packages/SettingsLib/res/values-ar/arrays.xml index 461c637ab0eb..97625029b49c 100644 --- a/packages/SettingsLib/res/values-ar/arrays.xml +++ b/packages/SettingsLib/res/values-ar/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"ﺹﻮﺗ <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"ﺹﻮﺗ <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"استخدام اختيار النظام (تلقائي)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"ﺹﻮﺗ <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"ﺹﻮﺗ <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"استخدام اختيار النظام (تلقائي)"</item> diff --git a/packages/SettingsLib/res/values-as/arrays.xml b/packages/SettingsLib/res/values-as/arrays.xml index 7e43ab322e60..4175973fa32c 100644 --- a/packages/SettingsLib/res/values-as/arrays.xml +++ b/packages/SettingsLib/res/values-as/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> অডিঅ\'"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> অডিঅ\'""</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"ছিষ্টেমৰ বাছনি ব্যৱহাৰ কৰক (ডিফ\'ল্ট)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> অডিঅ\'"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> অডিঅ\'""</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"ছিষ্টেমৰ বাছনি ব্যৱহাৰ কৰক (ডিফ\'ল্ট)"</item> diff --git a/packages/SettingsLib/res/values-az/arrays.xml b/packages/SettingsLib/res/values-az/arrays.xml index 357a2034ce9f..6b4d62d42eaa 100644 --- a/packages/SettingsLib/res/values-az/arrays.xml +++ b/packages/SettingsLib/res/values-az/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Sistem Seçimini istifadə edin (Defolt)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Sistem Seçimini istifadə edin (Defolt)"</item> diff --git a/packages/SettingsLib/res/values-b+sr+Latn/arrays.xml b/packages/SettingsLib/res/values-b+sr+Latn/arrays.xml index 0bcd9bcd5346..d30ac34efc7c 100644 --- a/packages/SettingsLib/res/values-b+sr+Latn/arrays.xml +++ b/packages/SettingsLib/res/values-b+sr+Latn/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Koristi izbor sistema (podrazumevano)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Koristi izbor sistema (podrazumevano)"</item> diff --git a/packages/SettingsLib/res/values-be/arrays.xml b/packages/SettingsLib/res/values-be/arrays.xml index 3f5da1119b4d..cbf3d922a6cf 100644 --- a/packages/SettingsLib/res/values-be/arrays.xml +++ b/packages/SettingsLib/res/values-be/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Аўдыя <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Аўдыя <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Выбар сістэмы (стандартны)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Аўдыя <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Аўдыя <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Выбар сістэмы (стандартны)"</item> diff --git a/packages/SettingsLib/res/values-bg/arrays.xml b/packages/SettingsLib/res/values-bg/arrays.xml index b80b5eb76423..c06b1d8fb103 100644 --- a/packages/SettingsLib/res/values-bg/arrays.xml +++ b/packages/SettingsLib/res/values-bg/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Аудио: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Аудио: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Използване на сист. избор (стандартно)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Аудио: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Аудио: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Използване на сист. избор (стандартно)"</item> diff --git a/packages/SettingsLib/res/values-bn/arrays.xml b/packages/SettingsLib/res/values-bn/arrays.xml index 71228c74a402..aaa5c6b6c13b 100644 --- a/packages/SettingsLib/res/values-bn/arrays.xml +++ b/packages/SettingsLib/res/values-bn/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> অডিওa"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> অডিও"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"সিস্টেমের নির্বাচন ব্যবহার করুন (ডিফল্ট)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> অডিওa"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> অডিও"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"সিস্টেমের নির্বাচন ব্যবহার করুন (ডিফল্ট)"</item> diff --git a/packages/SettingsLib/res/values-bs/arrays.xml b/packages/SettingsLib/res/values-bs/arrays.xml index f664618483d4..a40128fdc868 100644 --- a/packages/SettingsLib/res/values-bs/arrays.xml +++ b/packages/SettingsLib/res/values-bs/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Korištenje odabira sistema (zadano)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Korištenje odabira sistema (zadano)"</item> diff --git a/packages/SettingsLib/res/values-ca/arrays.xml b/packages/SettingsLib/res/values-ca/arrays.xml index 24761412f5b8..64e2568414fe 100644 --- a/packages/SettingsLib/res/values-ca/arrays.xml +++ b/packages/SettingsLib/res/values-ca/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Àudio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Àudio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Utilitza la selecció del sistema (predeterminada)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Àudio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Àudio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Utilitza la selecció del sistema (predeterminada)"</item> diff --git a/packages/SettingsLib/res/values-cs/arrays.xml b/packages/SettingsLib/res/values-cs/arrays.xml index c0b939543329..ff016044c732 100644 --- a/packages/SettingsLib/res/values-cs/arrays.xml +++ b/packages/SettingsLib/res/values-cs/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Zvuk <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Zvuk <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Použít systémový výběr (výchozí)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Zvuk <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Zvuk <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Použít systémový výběr (výchozí)"</item> diff --git a/packages/SettingsLib/res/values-da/arrays.xml b/packages/SettingsLib/res/values-da/arrays.xml index 163ee53535c1..1943b8193b1d 100644 --- a/packages/SettingsLib/res/values-da/arrays.xml +++ b/packages/SettingsLib/res/values-da/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>-lyd"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>-lyd"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Brug systemvalg (standard)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>-lyd"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>-lyd"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Brug systemvalg (standard)"</item> diff --git a/packages/SettingsLib/res/values-de/arrays.xml b/packages/SettingsLib/res/values-de/arrays.xml index 5e80e3c1e920..f35512fc2475 100644 --- a/packages/SettingsLib/res/values-de/arrays.xml +++ b/packages/SettingsLib/res/values-de/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>-Audio"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>-Audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Systemauswahl verwenden (Standard)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>-Audio"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>-Audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Systemauswahl verwenden (Standard)"</item> diff --git a/packages/SettingsLib/res/values-el/arrays.xml b/packages/SettingsLib/res/values-el/arrays.xml index 3d60335b57ea..4860fd0bcba9 100644 --- a/packages/SettingsLib/res/values-el/arrays.xml +++ b/packages/SettingsLib/res/values-el/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Ήχος <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Ήχος <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Χρήση επιλογής συστήματος (Προεπιλογή)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Ήχος <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Ήχος <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Χρήση επιλογής συστήματος (Προεπιλογή)"</item> diff --git a/packages/SettingsLib/res/values-en-rAU/arrays.xml b/packages/SettingsLib/res/values-en-rAU/arrays.xml index fa637be68f1e..67a9fc76df4c 100644 --- a/packages/SettingsLib/res/values-en-rAU/arrays.xml +++ b/packages/SettingsLib/res/values-en-rAU/arrays.xml @@ -62,6 +62,9 @@ <item msgid="695678520785580527">"Disabled"</item> <item msgid="6336372935919715515">"Enabled Filtered"</item> <item msgid="2779123106632690576">"Enabled"</item> + <item>Enabled Headers Filtered</item> + <item>Enabled Media Pkts Filtered</item> + <item>Enabled Profiles Filtered</item> </string-array> <string-array name="bt_hci_snoop_log_filters_entries"> <item msgid="195768089203590086">"Leave only ACL headers"</item> @@ -105,6 +108,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Use system selection (default)"</item> @@ -115,6 +120,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Use system selection (default)"</item> diff --git a/packages/SettingsLib/res/values-en-rCA/arrays.xml b/packages/SettingsLib/res/values-en-rCA/arrays.xml index ea8f2c503467..f94825ebac58 100644 --- a/packages/SettingsLib/res/values-en-rCA/arrays.xml +++ b/packages/SettingsLib/res/values-en-rCA/arrays.xml @@ -62,6 +62,9 @@ <item msgid="695678520785580527">"Disabled"</item> <item msgid="6336372935919715515">"Enabled Filtered"</item> <item msgid="2779123106632690576">"Enabled"</item> + <item>Enabled Headers Filtered</item> + <item>Enabled Media Pkts Filtered</item> + <item>Enabled Profiles Filtered</item> </string-array> <string-array name="bt_hci_snoop_log_filters_entries"> <item msgid="195768089203590086">"Leave only ACL headers"</item> @@ -105,6 +108,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Use System Selection (Default)"</item> @@ -115,6 +120,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Use System Selection (Default)"</item> diff --git a/packages/SettingsLib/res/values-en-rGB/arrays.xml b/packages/SettingsLib/res/values-en-rGB/arrays.xml index fa637be68f1e..67a9fc76df4c 100644 --- a/packages/SettingsLib/res/values-en-rGB/arrays.xml +++ b/packages/SettingsLib/res/values-en-rGB/arrays.xml @@ -62,6 +62,9 @@ <item msgid="695678520785580527">"Disabled"</item> <item msgid="6336372935919715515">"Enabled Filtered"</item> <item msgid="2779123106632690576">"Enabled"</item> + <item>Enabled Headers Filtered</item> + <item>Enabled Media Pkts Filtered</item> + <item>Enabled Profiles Filtered</item> </string-array> <string-array name="bt_hci_snoop_log_filters_entries"> <item msgid="195768089203590086">"Leave only ACL headers"</item> @@ -105,6 +108,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Use system selection (default)"</item> @@ -115,6 +120,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Use system selection (default)"</item> diff --git a/packages/SettingsLib/res/values-en-rIN/arrays.xml b/packages/SettingsLib/res/values-en-rIN/arrays.xml index fa637be68f1e..67a9fc76df4c 100644 --- a/packages/SettingsLib/res/values-en-rIN/arrays.xml +++ b/packages/SettingsLib/res/values-en-rIN/arrays.xml @@ -62,6 +62,9 @@ <item msgid="695678520785580527">"Disabled"</item> <item msgid="6336372935919715515">"Enabled Filtered"</item> <item msgid="2779123106632690576">"Enabled"</item> + <item>Enabled Headers Filtered</item> + <item>Enabled Media Pkts Filtered</item> + <item>Enabled Profiles Filtered</item> </string-array> <string-array name="bt_hci_snoop_log_filters_entries"> <item msgid="195768089203590086">"Leave only ACL headers"</item> @@ -105,6 +108,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Use system selection (default)"</item> @@ -115,6 +120,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Use system selection (default)"</item> diff --git a/packages/SettingsLib/res/values-en-rXC/arrays.xml b/packages/SettingsLib/res/values-en-rXC/arrays.xml index 6b404a8e2159..a677cae916b9 100644 --- a/packages/SettingsLib/res/values-en-rXC/arrays.xml +++ b/packages/SettingsLib/res/values-en-rXC/arrays.xml @@ -62,6 +62,9 @@ <item msgid="695678520785580527">"Disabled"</item> <item msgid="6336372935919715515">"Enabled Filtered"</item> <item msgid="2779123106632690576">"Enabled"</item> + <item>Enabled Headers Filtered</item> + <item>Enabled Media Pkts Filtered</item> + <item>Enabled Profiles Filtered</item> </string-array> <string-array name="bt_hci_snoop_log_filters_entries"> <item msgid="195768089203590086">"Leave only ACL headers"</item> @@ -105,6 +108,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Use System Selection (Default)"</item> @@ -115,6 +120,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Use System Selection (Default)"</item> diff --git a/packages/SettingsLib/res/values-es-rUS/arrays.xml b/packages/SettingsLib/res/values-es-rUS/arrays.xml index 27cdeeb6bd42..2777069a7ad8 100644 --- a/packages/SettingsLib/res/values-es-rUS/arrays.xml +++ b/packages/SettingsLib/res/values-es-rUS/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Usar selección del sistema (predeterminado)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Usar selección del sistema (predeterminado)"</item> diff --git a/packages/SettingsLib/res/values-es/arrays.xml b/packages/SettingsLib/res/values-es/arrays.xml index a16093aa65bd..ee251818df74 100644 --- a/packages/SettingsLib/res/values-es/arrays.xml +++ b/packages/SettingsLib/res/values-es/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Usar preferencia del sistema (predeterminado)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Usar preferencia del sistema (predeterminado)"</item> diff --git a/packages/SettingsLib/res/values-et/arrays.xml b/packages/SettingsLib/res/values-et/arrays.xml index d6869614ce87..4688839bf27a 100644 --- a/packages/SettingsLib/res/values-et/arrays.xml +++ b/packages/SettingsLib/res/values-et/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Heli: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Heli: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Süsteemivaliku kasutamine (vaikeseade)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Heli: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Heli: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Süsteemivaliku kasutamine (vaikeseade)"</item> diff --git a/packages/SettingsLib/res/values-eu/arrays.xml b/packages/SettingsLib/res/values-eu/arrays.xml index 3b980c5a5770..90f81c49690a 100644 --- a/packages/SettingsLib/res/values-eu/arrays.xml +++ b/packages/SettingsLib/res/values-eu/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audioa"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audioa"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Erabili sistema-hautapena (lehenetsia)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audioa"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audioa"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Erabili sistema-hautapena (lehenetsia)"</item> diff --git a/packages/SettingsLib/res/values-fa/arrays.xml b/packages/SettingsLib/res/values-fa/arrays.xml index 0eb381f90f45..259ce8757b4e 100644 --- a/packages/SettingsLib/res/values-fa/arrays.xml +++ b/packages/SettingsLib/res/values-fa/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"ﺹﻮﺗ <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"ﺹﻮﺗ <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"استفاده از انتخاب سیستم (پیشفرض)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"ﺹﻮﺗ <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"ﺹﻮﺗ <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"استفاده از انتخاب سیستم (پیشفرض)"</item> diff --git a/packages/SettingsLib/res/values-fi/arrays.xml b/packages/SettingsLib/res/values-fi/arrays.xml index a3cfd15ad119..a17a007b13ea 100644 --- a/packages/SettingsLib/res/values-fi/arrays.xml +++ b/packages/SettingsLib/res/values-fi/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ‑ääni"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ‑ääni"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Käytä järjestelmän valintaa (oletus)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ‑ääni"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ‑ääni"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Käytä järjestelmän valintaa (oletus)"</item> diff --git a/packages/SettingsLib/res/values-fr-rCA/arrays.xml b/packages/SettingsLib/res/values-fr-rCA/arrays.xml index 3fb18334638d..fe25c479959f 100644 --- a/packages/SettingsLib/res/values-fr-rCA/arrays.xml +++ b/packages/SettingsLib/res/values-fr-rCA/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Utiliser sélect. du système (par défaut)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Utiliser sélect. du système (par défaut)"</item> diff --git a/packages/SettingsLib/res/values-fr/arrays.xml b/packages/SettingsLib/res/values-fr/arrays.xml index a1a8c99f3eba..e9ad885a6ec7 100644 --- a/packages/SettingsLib/res/values-fr/arrays.xml +++ b/packages/SettingsLib/res/values-fr/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Utiliser la sélection du système (par défaut)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Utiliser la sélection du système (par défaut)"</item> diff --git a/packages/SettingsLib/res/values-gl/arrays.xml b/packages/SettingsLib/res/values-gl/arrays.xml index bd88e8351d2c..8701ca664c47 100644 --- a/packages/SettingsLib/res/values-gl/arrays.xml +++ b/packages/SettingsLib/res/values-gl/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Usa a selección do sistema (predeterminado)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Usar selección do sistema (predeterminado)"</item> diff --git a/packages/SettingsLib/res/values-gu/arrays.xml b/packages/SettingsLib/res/values-gu/arrays.xml index e33c7592cbcc..591a008e8917 100644 --- a/packages/SettingsLib/res/values-gu/arrays.xml +++ b/packages/SettingsLib/res/values-gu/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ઑડિઓ"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ઑડિઓ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"સિસ્ટમ પસંદગીનો ઉપયોગ કરો (ડિફૉલ્ટ)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ઑડિઓ"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ઑડિઓ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"સિસ્ટમ પસંદગીનો ઉપયોગ કરો (ડિફૉલ્ટ)"</item> diff --git a/packages/SettingsLib/res/values-hi/arrays.xml b/packages/SettingsLib/res/values-hi/arrays.xml index 2403848229bd..f6302b40f55b 100644 --- a/packages/SettingsLib/res/values-hi/arrays.xml +++ b/packages/SettingsLib/res/values-hi/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>ऑडियो"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ऑडियो"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"सिस्टम की डिफ़ॉल्ट सेटिंग का इस्तेमाल करें"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>ऑडियो"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ऑडियो"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"सिस्टम से चुने जाने का उपयोग करें (डिफ़ॉल्ट)"</item> diff --git a/packages/SettingsLib/res/values-hr/arrays.xml b/packages/SettingsLib/res/values-hr/arrays.xml index 3cb64abeb9b9..08c1f6c55ec0 100644 --- a/packages/SettingsLib/res/values-hr/arrays.xml +++ b/packages/SettingsLib/res/values-hr/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Koristi odabir sustava (zadano)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Koristi odabir sustava (zadano)"</item> diff --git a/packages/SettingsLib/res/values-hu/arrays.xml b/packages/SettingsLib/res/values-hu/arrays.xml index f4c11762035d..cb9656e2a8e0 100644 --- a/packages/SettingsLib/res/values-hu/arrays.xml +++ b/packages/SettingsLib/res/values-hu/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Hang: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Hang: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Rendszerérték (alapértelmezett)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Hang: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Hang: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Rendszerérték (alapértelmezett)"</item> diff --git a/packages/SettingsLib/res/values-hy/arrays.xml b/packages/SettingsLib/res/values-hy/arrays.xml index e9c366d9b25c..6729f38c7538 100644 --- a/packages/SettingsLib/res/values-hy/arrays.xml +++ b/packages/SettingsLib/res/values-hy/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> աուդիո"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> աուդիո"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Օգտագործել համակարգի կարգավորումը (կանխադրված)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> աուդիո"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> աուդիո"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Օգտագործել համակարգի կարգավորումը (կանխադրված)"</item> diff --git a/packages/SettingsLib/res/values-in/arrays.xml b/packages/SettingsLib/res/values-in/arrays.xml index 95aeee75d267..a29775355bbc 100644 --- a/packages/SettingsLib/res/values-in/arrays.xml +++ b/packages/SettingsLib/res/values-in/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Gunakan Pilihan Sistem (Default)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Gunakan Pilihan Sistem (Default)"</item> diff --git a/packages/SettingsLib/res/values-is/arrays.xml b/packages/SettingsLib/res/values-is/arrays.xml index f0ee71846879..d035acb4546c 100644 --- a/packages/SettingsLib/res/values-is/arrays.xml +++ b/packages/SettingsLib/res/values-is/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> hljóð"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> hljóð"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Nota val kerfisins (sjálfgefið)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> hljóð"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> hljóð"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Nota val kerfisins (sjálfgefið)"</item> diff --git a/packages/SettingsLib/res/values-it/arrays.xml b/packages/SettingsLib/res/values-it/arrays.xml index b6b2fdeae2a7..5c4bc31ed5eb 100644 --- a/packages/SettingsLib/res/values-it/arrays.xml +++ b/packages/SettingsLib/res/values-it/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Usa selezione di sistema (predefinita)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Usa selezione di sistema (predefinita)"</item> diff --git a/packages/SettingsLib/res/values-iw/arrays.xml b/packages/SettingsLib/res/values-iw/arrays.xml index ca3a4dd57082..1434484d6d86 100644 --- a/packages/SettingsLib/res/values-iw/arrays.xml +++ b/packages/SettingsLib/res/values-iw/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"אודיו <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"אודיו <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"שימוש בבחירת המערכת (ברירת המחדל)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"אודיו <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"אודיו <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"שימוש בבחירת המערכת (ברירת המחדל)"</item> diff --git a/packages/SettingsLib/res/values-ja/arrays.xml b/packages/SettingsLib/res/values-ja/arrays.xml index b3267fe3aa25..e66ca2ba831c 100644 --- a/packages/SettingsLib/res/values-ja/arrays.xml +++ b/packages/SettingsLib/res/values-ja/arrays.xml @@ -62,6 +62,9 @@ <item msgid="695678520785580527">"無効"</item> <item msgid="6336372935919715515">"有効(フィルタ済み)"</item> <item msgid="2779123106632690576">"有効"</item> + <item>"有効(ヘッダーのみ)"</item> + <item>"有効(メディアパケット除外)"</item> + <item>"有効 (プロファイルはフィルター処理されます)"</item> </string-array> <string-array name="bt_hci_snoop_log_filters_entries"> <item msgid="195768089203590086">"ACL ヘッダーのみを残す"</item> @@ -105,6 +108,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> オーディオ"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> オーディオ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"システムの選択(デフォルト)を使用"</item> @@ -115,6 +120,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> オーディオ"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> オーディオ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"システムの選択(デフォルト)を使用"</item> diff --git a/packages/SettingsLib/res/values-ka/arrays.xml b/packages/SettingsLib/res/values-ka/arrays.xml index ab6acfd4f628..87147b27a24d 100644 --- a/packages/SettingsLib/res/values-ka/arrays.xml +++ b/packages/SettingsLib/res/values-ka/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> აუდიო"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> აუდიო"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"სისტემის არჩეულის გამოყენება (ნაგულისხმევი)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> აუდიო"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> აუდიო"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"სისტემის არჩეულის გამოყენება (ნაგულისხმევი)"</item> diff --git a/packages/SettingsLib/res/values-kk/arrays.xml b/packages/SettingsLib/res/values-kk/arrays.xml index 2b1d700ed58e..6ff862dc9751 100644 --- a/packages/SettingsLib/res/values-kk/arrays.xml +++ b/packages/SettingsLib/res/values-kk/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"L34C"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> аудиокодегі"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> аудиокодегі"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Жүйенің таңдағанын алу (әдепкі)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"L34C"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> аудиокодегі"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> аудиокодегі"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Жүйенің таңдағанын алу (әдепкі)"</item> diff --git a/packages/SettingsLib/res/values-km/arrays.xml b/packages/SettingsLib/res/values-km/arrays.xml index 0f20bf0d1f81..6f076d48a603 100644 --- a/packages/SettingsLib/res/values-km/arrays.xml +++ b/packages/SettingsLib/res/values-km/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"ប្រើការជ្រើសរើសប្រព័ន្ធ (លំនាំដើម)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"ប្រើការជ្រើសរើសប្រព័ន្ធ (លំនាំដើម)"</item> diff --git a/packages/SettingsLib/res/values-kn/arrays.xml b/packages/SettingsLib/res/values-kn/arrays.xml index 00e8049d02c5..5f067b883f0a 100644 --- a/packages/SettingsLib/res/values-kn/arrays.xml +++ b/packages/SettingsLib/res/values-kn/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ಆಡಿಯೋ"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ಆಡಿಯೋ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"ಸಿಸ್ಟಂ ಆಯ್ಕೆಯನ್ನು ಬಳಸಿ (ಡಿಫಾಲ್ಟ್)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ಆಡಿಯೋ"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ಆಡಿಯೋ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"ಸಿಸ್ಟಂ ಆಯ್ಕೆಯನ್ನು ಬಳಸಿ (ಡಿಫಾಲ್ಟ್)"</item> diff --git a/packages/SettingsLib/res/values-ko/arrays.xml b/packages/SettingsLib/res/values-ko/arrays.xml index 85a0a4ad98b1..97fbd974f6b8 100644 --- a/packages/SettingsLib/res/values-ko/arrays.xml +++ b/packages/SettingsLib/res/values-ko/arrays.xml @@ -62,6 +62,9 @@ <item msgid="695678520785580527">"사용 중지됨"</item> <item msgid="6336372935919715515">"필터링 사용 설정됨"</item> <item msgid="2779123106632690576">"사용 설정됨"</item> + <item>"헤더 필터링 사용 설정됨"</item> + <item>"미디어 패킷 필터링 사용 설정됨"</item> + <item>"활성화됨(프로필 필터링됨)"</item> </string-array> <string-array name="bt_hci_snoop_log_filters_entries"> <item msgid="195768089203590086">"ACL 헤더만 남김"</item> @@ -105,6 +108,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> 오디오"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> 오디오"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"시스템 설정 사용(기본)"</item> @@ -115,6 +120,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> 오디오"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> 오디오"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"시스템 설정 사용(기본)"</item> diff --git a/packages/SettingsLib/res/values-ky/arrays.xml b/packages/SettingsLib/res/values-ky/arrays.xml index eb295ae76134..2e5709e5dc31 100644 --- a/packages/SettingsLib/res/values-ky/arrays.xml +++ b/packages/SettingsLib/res/values-ky/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> аудио"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> аудио"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Система тандаганды колдонуу (демейки)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> аудио"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> аудио"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Система тандаганды колдонуу (демейки)"</item> diff --git a/packages/SettingsLib/res/values-lo/arrays.xml b/packages/SettingsLib/res/values-lo/arrays.xml index ccb777b19464..6feee69e9a42 100644 --- a/packages/SettingsLib/res/values-lo/arrays.xml +++ b/packages/SettingsLib/res/values-lo/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"ສຽງ <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"ສຽງ <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"ໃຊ້ການເລືອກຂອງລະບົບ (ຄ່າເລີ່ມຕົ້ນ)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"ສຽງ <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"ສຽງ <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"ໃຊ້ການເລືອກຂອງລະບົບ (ຄ່າເລີ່ມຕົ້ນ)"</item> diff --git a/packages/SettingsLib/res/values-lt/arrays.xml b/packages/SettingsLib/res/values-lt/arrays.xml index 010b3b49c9fb..d0cdf586981b 100644 --- a/packages/SettingsLib/res/values-lt/arrays.xml +++ b/packages/SettingsLib/res/values-lt/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> garsas"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> garsas"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Naudoti sistemos pasirink. (numatytasis)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> garsas"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> garsas"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Naudoti sistemos pasirink. (numatytasis)"</item> diff --git a/packages/SettingsLib/res/values-lv/arrays.xml b/packages/SettingsLib/res/values-lv/arrays.xml index 2c7ac9846bb4..6b832233b7fd 100644 --- a/packages/SettingsLib/res/values-lv/arrays.xml +++ b/packages/SettingsLib/res/values-lv/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Sistēmas atlases izmantošana (nokl.)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Sistēmas atlases izmantošana (nokl.)"</item> diff --git a/packages/SettingsLib/res/values-mk/arrays.xml b/packages/SettingsLib/res/values-mk/arrays.xml index a276eb3a8200..a0944bdf4526 100644 --- a/packages/SettingsLib/res/values-mk/arrays.xml +++ b/packages/SettingsLib/res/values-mk/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> аудио"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> аудио"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Користи избор на системот (стандардно)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> аудио"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> аудио"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Користи избор на системот (стандардно)"</item> diff --git a/packages/SettingsLib/res/values-ml/arrays.xml b/packages/SettingsLib/res/values-ml/arrays.xml index 6eb432cb2213..54b97978294b 100644 --- a/packages/SettingsLib/res/values-ml/arrays.xml +++ b/packages/SettingsLib/res/values-ml/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ഓഡിയോ"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ഓഡിയോ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"സിസ്റ്റം സെലക്ഷൻ ഉപയോഗിക്കൂ (ഡിഫോൾട്ട്)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ഓഡിയോ"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ഓഡിയോ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"സിസ്റ്റം സെലക്ഷൻ ഉപയോഗിക്കൂ (ഡിഫോൾട്ട്)"</item> diff --git a/packages/SettingsLib/res/values-mn/arrays.xml b/packages/SettingsLib/res/values-mn/arrays.xml index 925c827d9bf3..507d5fd8acbf 100644 --- a/packages/SettingsLib/res/values-mn/arrays.xml +++ b/packages/SettingsLib/res/values-mn/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> аудио"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> аудио"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Системийн сонголтыг ашиглах (Өгөгдмөл)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> аудио"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> аудио"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Системийн сонголтыг ашиглах (Өгөгдмөл)"</item> diff --git a/packages/SettingsLib/res/values-mr/arrays.xml b/packages/SettingsLib/res/values-mr/arrays.xml index e3b6ae63ee51..172c7fd676bc 100644 --- a/packages/SettingsLib/res/values-mr/arrays.xml +++ b/packages/SettingsLib/res/values-mr/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ऑडिओ"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ऑडिओ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"सिस्टीम निवड वापरा (डीफॉल्ट)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ऑडिओ"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ऑडिओ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"सिस्टीम निवड वापरा (डीफॉल्ट)"</item> diff --git a/packages/SettingsLib/res/values-ms/arrays.xml b/packages/SettingsLib/res/values-ms/arrays.xml index 6b8bce4aaae9..8ae92cc672a3 100644 --- a/packages/SettingsLib/res/values-ms/arrays.xml +++ b/packages/SettingsLib/res/values-ms/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Gunakan Pilihan Sistem (Lalai)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Gunakan Pilihan Sistem (Lalai)"</item> diff --git a/packages/SettingsLib/res/values-my/arrays.xml b/packages/SettingsLib/res/values-my/arrays.xml index 59e1862b5cbe..97d87f21f95f 100644 --- a/packages/SettingsLib/res/values-my/arrays.xml +++ b/packages/SettingsLib/res/values-my/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> အသံ"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> အသံ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"စနစ်ရွေးချယ်မှုကို အသုံးပြုပါ (မူရင်း)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> အသံ"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> အသံ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"စနစ်ရွေးချယ်မှုကို အသုံးပြုပါ (မူရင်း)"</item> diff --git a/packages/SettingsLib/res/values-nb/arrays.xml b/packages/SettingsLib/res/values-nb/arrays.xml index c364c58d2013..77df6eeed986 100644 --- a/packages/SettingsLib/res/values-nb/arrays.xml +++ b/packages/SettingsLib/res/values-nb/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>-lyd"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>-lyd"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Bruk systemvalg (standard)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>-lyd"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>-lyd"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Bruk systemvalg (standard)"</item> diff --git a/packages/SettingsLib/res/values-ne/arrays.xml b/packages/SettingsLib/res/values-ne/arrays.xml index eaea3ba41bc2..e6c00f5becb6 100644 --- a/packages/SettingsLib/res/values-ne/arrays.xml +++ b/packages/SettingsLib/res/values-ne/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> अडियो"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> अडियो"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"सिस्टमको छनौट प्रयोग गरियोस् (डिफल्ट)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> अडियो"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> अडियो"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"सिस्टमको छनौट प्रयोग गरियोस् (डिफल्ट)"</item> diff --git a/packages/SettingsLib/res/values-nl/arrays.xml b/packages/SettingsLib/res/values-nl/arrays.xml index b8e945ff7982..bcb3fffe6215 100644 --- a/packages/SettingsLib/res/values-nl/arrays.xml +++ b/packages/SettingsLib/res/values-nl/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Gebruik systeemselectie (standaard)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audio"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Systeemselectie gebruiken (standaard)"</item> diff --git a/packages/SettingsLib/res/values-or/arrays.xml b/packages/SettingsLib/res/values-or/arrays.xml index d649907966f6..8e9bbffb995d 100644 --- a/packages/SettingsLib/res/values-or/arrays.xml +++ b/packages/SettingsLib/res/values-or/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ଅଡିଓ"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ଅଡିଓ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"ସିଷ୍ଟମ୍ର ଚୟନ (ଡିଫଲ୍ଟ୍) ବ୍ୟବହାର କରନ୍ତୁ"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ଅଡିଓ"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ଅଡିଓ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"ସିଷ୍ଟମ୍ର ଚୟନ (ଡିଫଲ୍ଟ୍) ବ୍ୟବହାର କରନ୍ତୁ"</item> diff --git a/packages/SettingsLib/res/values-pa/arrays.xml b/packages/SettingsLib/res/values-pa/arrays.xml index 4f58a3c7f150..08dae5c21529 100644 --- a/packages/SettingsLib/res/values-pa/arrays.xml +++ b/packages/SettingsLib/res/values-pa/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ਆਡੀਓ"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ਆਡੀਓ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"ਸਿਸਟਮ ਚੋਣ ਦੀ ਵਰਤੋਂ ਕਰੋ (ਪੂਰਵ-ਨਿਰਧਾਰਿਤ)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ਆਡੀਓ"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ਆਡੀਓ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"ਸਿਸਟਮ ਚੋਣ ਦੀ ਵਰਤੋਂ ਕਰੋ (ਪੂਰਵ-ਨਿਰਧਾਰਿਤ)"</item> diff --git a/packages/SettingsLib/res/values-pl/arrays.xml b/packages/SettingsLib/res/values-pl/arrays.xml index 671ae4129777..faeb7ddda2d4 100644 --- a/packages/SettingsLib/res/values-pl/arrays.xml +++ b/packages/SettingsLib/res/values-pl/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Używaj wyboru systemu (domyślnie)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Używaj wyboru systemu (domyślnie)"</item> diff --git a/packages/SettingsLib/res/values-pt-rBR/arrays.xml b/packages/SettingsLib/res/values-pt-rBR/arrays.xml index e3b77017c006..0af8e823b788 100644 --- a/packages/SettingsLib/res/values-pt-rBR/arrays.xml +++ b/packages/SettingsLib/res/values-pt-rBR/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Áudio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Áudio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Usar seleção do sistema (padrão)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Áudio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Áudio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Usar seleção do sistema (padrão)"</item> diff --git a/packages/SettingsLib/res/values-pt-rPT/arrays.xml b/packages/SettingsLib/res/values-pt-rPT/arrays.xml index ba302806de8a..ef54a9e4c106 100644 --- a/packages/SettingsLib/res/values-pt-rPT/arrays.xml +++ b/packages/SettingsLib/res/values-pt-rPT/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Áudio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Áudio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Usar seleção do sistema (predefinido)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Áudio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Áudio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Usar seleção do sistema (predefinido)"</item> diff --git a/packages/SettingsLib/res/values-pt/arrays.xml b/packages/SettingsLib/res/values-pt/arrays.xml index e3b77017c006..cb15151bba65 100644 --- a/packages/SettingsLib/res/values-pt/arrays.xml +++ b/packages/SettingsLib/res/values-pt/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Usar seleção do sistema (padrão)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Usar seleção do sistema (padrão)"</item> diff --git a/packages/SettingsLib/res/values-ro/arrays.xml b/packages/SettingsLib/res/values-ro/arrays.xml index 613a631811a6..bbf21f540286 100644 --- a/packages/SettingsLib/res/values-ro/arrays.xml +++ b/packages/SettingsLib/res/values-ro/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Folosește selectarea sistemului (prestabilit)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Audio <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Folosește selectarea sistemului (prestabilit)"</item> diff --git a/packages/SettingsLib/res/values-ru/arrays.xml b/packages/SettingsLib/res/values-ru/arrays.xml index c1bb31ee8d40..9c3a9eefeb7a 100644 --- a/packages/SettingsLib/res/values-ru/arrays.xml +++ b/packages/SettingsLib/res/values-ru/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Аудиокодек: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Аудиокодек: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Выбор системы (по умолчанию)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Аудиокодек: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Аудиокодек: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Выбор системы (по умолчанию)"</item> diff --git a/packages/SettingsLib/res/values-si/arrays.xml b/packages/SettingsLib/res/values-si/arrays.xml index 0fa107448db4..a97fe8ae772f 100644 --- a/packages/SettingsLib/res/values-si/arrays.xml +++ b/packages/SettingsLib/res/values-si/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ශ්රව්යය"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ශ්රව්යය"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"පද්ධති තේරීම භාවිත කරන්න (පෙරනිමි)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ශ්රව්යය"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ශ්රව්යය"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"පද්ධති තේරීම භාවිත කරන්න (පෙරනිමි)"</item> diff --git a/packages/SettingsLib/res/values-sk/arrays.xml b/packages/SettingsLib/res/values-sk/arrays.xml index ecc4afecc186..fd02dfdf69ab 100644 --- a/packages/SettingsLib/res/values-sk/arrays.xml +++ b/packages/SettingsLib/res/values-sk/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Zvuk: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Zvuk: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Použiť voľbu systému (predvolené)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Zvuk: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Zvuk: <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Použiť voľbu systému (predvolené)"</item> diff --git a/packages/SettingsLib/res/values-sl/arrays.xml b/packages/SettingsLib/res/values-sl/arrays.xml index 0f2225ae0ea5..43aec489cfb2 100644 --- a/packages/SettingsLib/res/values-sl/arrays.xml +++ b/packages/SettingsLib/res/values-sl/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Zvok <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Zvok <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Uporabi sistemsko izbiro (privzeto)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Zvok <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Zvok <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Uporabi sistemsko izbiro (privzeto)"</item> diff --git a/packages/SettingsLib/res/values-sq/arrays.xml b/packages/SettingsLib/res/values-sq/arrays.xml index d92ee582ed82..de410c4abb17 100644 --- a/packages/SettingsLib/res/values-sq/arrays.xml +++ b/packages/SettingsLib/res/values-sq/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Audioja e <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Audioja e <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Përdor përzgjedhjen e sistemit (e parazgjedhur)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Audioja e <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Audioja e <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Përdor përzgjedhjen e sistemit (e parazgjedhur)"</item> diff --git a/packages/SettingsLib/res/values-sr/arrays.xml b/packages/SettingsLib/res/values-sr/arrays.xml index 69564fa9848d..f98d474c36a1 100644 --- a/packages/SettingsLib/res/values-sr/arrays.xml +++ b/packages/SettingsLib/res/values-sr/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> аудио"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> аудио"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Користи избор система (подразумевано)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> аудио"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> аудио"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Користи избор система (подразумевано)"</item> diff --git a/packages/SettingsLib/res/values-sv/arrays.xml b/packages/SettingsLib/res/values-sv/arrays.xml index daaa1386492b..8cb36de689bd 100644 --- a/packages/SettingsLib/res/values-sv/arrays.xml +++ b/packages/SettingsLib/res/values-sv/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>-ljud"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>-ljud"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Använd systemval (standardinställning)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>-ljud"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>-ljud"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Använd systemval (standardinställning)"</item> diff --git a/packages/SettingsLib/res/values-sw/arrays.xml b/packages/SettingsLib/res/values-sw/arrays.xml index a5555969bf5c..d5b8ac6dcf38 100644 --- a/packages/SettingsLib/res/values-sw/arrays.xml +++ b/packages/SettingsLib/res/values-sw/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Sauti ya <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Sauti ya <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Tumia Uteuzi wa Mfumo (Chaguomsingi)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Sauti ya <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Sauti ya <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Tumia Uteuzi wa Mfumo (Chaguomsingi)"</item> diff --git a/packages/SettingsLib/res/values-ta/arrays.xml b/packages/SettingsLib/res/values-ta/arrays.xml index 6195e3c10e6e..385994c73a87 100644 --- a/packages/SettingsLib/res/values-ta/arrays.xml +++ b/packages/SettingsLib/res/values-ta/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ஆடியோ"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ஆடியோ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"சாதனத் தேர்வைப் பயன்படுத்து (இயல்பு)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ஆடியோ"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ஆடியோ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"சாதனத் தேர்வைப் பயன்படுத்து (இயல்பு)"</item> diff --git a/packages/SettingsLib/res/values-te/arrays.xml b/packages/SettingsLib/res/values-te/arrays.xml index 2a31c0dad2d0..2a3132f8a020 100644 --- a/packages/SettingsLib/res/values-te/arrays.xml +++ b/packages/SettingsLib/res/values-te/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ఆడియో"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ఆడియో"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"సిస్టమ్ ఎంపికను ఉపయోగించండి (ఆటోమేటిక్)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ఆడియో"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ఆడియో"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"సిస్టమ్ ఎంపికను ఉపయోగించండి (ఆటోమేటిక్)"</item> diff --git a/packages/SettingsLib/res/values-th/arrays.xml b/packages/SettingsLib/res/values-th/arrays.xml index b66fe5c8e635..defb600f302f 100644 --- a/packages/SettingsLib/res/values-th/arrays.xml +++ b/packages/SettingsLib/res/values-th/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"เสียง <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"เสียง <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"ใช้การเลือกของระบบ (ค่าเริ่มต้น)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"เสียง <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"เสียง <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"ใช้การเลือกของระบบ (ค่าเริ่มต้น)"</item> diff --git a/packages/SettingsLib/res/values-tl/arrays.xml b/packages/SettingsLib/res/values-tl/arrays.xml index d9fee742e54c..d5370771fe59 100644 --- a/packages/SettingsLib/res/values-tl/arrays.xml +++ b/packages/SettingsLib/res/values-tl/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> na audio"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> na audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Gamitin ang Pagpili ng System (Default)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> na audio"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> na audio"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Gamitin ang Pagpili ng System (Default)"</item> diff --git a/packages/SettingsLib/res/values-tr/arrays.xml b/packages/SettingsLib/res/values-tr/arrays.xml index e22ad902e3a6..1722b09282f9 100644 --- a/packages/SettingsLib/res/values-tr/arrays.xml +++ b/packages/SettingsLib/res/values-tr/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ses"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ses"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Sistem Seçimini Kullan (Varsayılan)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ses"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ses"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Sistem Seçimini Kullan (Varsayılan)"</item> diff --git a/packages/SettingsLib/res/values-uk/arrays.xml b/packages/SettingsLib/res/values-uk/arrays.xml index dc02eebc218c..ef3e3fe137cf 100644 --- a/packages/SettingsLib/res/values-uk/arrays.xml +++ b/packages/SettingsLib/res/values-uk/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Аудіо <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Аудіо <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Використовувати вибір системи (за умовчанням)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Аудіо <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Аудіо <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Використовувати вибір системи (за умовчанням)"</item> diff --git a/packages/SettingsLib/res/values-ur/arrays.xml b/packages/SettingsLib/res/values-ur/arrays.xml index be76762d9cde..6e6aa3c488ae 100644 --- a/packages/SettingsLib/res/values-ur/arrays.xml +++ b/packages/SettingsLib/res/values-ur/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ﺁڈیﻭ"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ﺁڈیﻭ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"سسٹم انتخاب کا استعمال کریں (ڈیفالٹ)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> ﺁڈیﻭ"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> ﺁڈیﻭ"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"سسٹم انتخاب کا استعمال کریں (ڈیفالٹ)"</item> diff --git a/packages/SettingsLib/res/values-uz/arrays.xml b/packages/SettingsLib/res/values-uz/arrays.xml index 860761e0fa6b..1b05452ceefe 100644 --- a/packages/SettingsLib/res/values-uz/arrays.xml +++ b/packages/SettingsLib/res/values-uz/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audiokodeki"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audiokodeki"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Tizim tanlovi (birlamchi)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> audiokodeki"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> audiokodeki"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Tizim tanlovi (birlamchi)"</item> diff --git a/packages/SettingsLib/res/values-vi/arrays.xml b/packages/SettingsLib/res/values-vi/arrays.xml index 4c6392b1a493..7a13130f67f0 100644 --- a/packages/SettingsLib/res/values-vi/arrays.xml +++ b/packages/SettingsLib/res/values-vi/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"Âm thanh <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049225">"Âm thanh <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Sử dụng lựa chọn của hệ thống (Mặc định)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"Âm thanh <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g>"</item> + <item msgid="6486050771049481">"Âm thanh <xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g>"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Sử dụng lựa chọn của hệ thống (Mặc định)"</item> diff --git a/packages/SettingsLib/res/values-zh-rCN/arrays.xml b/packages/SettingsLib/res/values-zh-rCN/arrays.xml index 679098a8411e..85d2d9f097ec 100644 --- a/packages/SettingsLib/res/values-zh-rCN/arrays.xml +++ b/packages/SettingsLib/res/values-zh-rCN/arrays.xml @@ -62,6 +62,9 @@ <item msgid="695678520785580527">"已停用"</item> <item msgid="6336372935919715515">"已启用“已过滤”"</item> <item msgid="2779123106632690576">"已启用"</item> + <item>"已过滤已启用的标题"</item> + <item>"已过滤已启用的媒体包"</item> + <item>"已启用(已过滤配置文件)"</item> </string-array> <string-array name="bt_hci_snoop_log_filters_entries"> <item msgid="195768089203590086">"只留下 ACL 标头"</item> @@ -105,6 +108,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> 音频"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> 音频"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"使用系统选择(默认)"</item> @@ -115,6 +120,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> 音频"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> 音频"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"使用系统选择(默认)"</item> @@ -282,4 +289,9 @@ <item msgid="8828567335701536560">"音频来源"</item> <item msgid="8688681727755534982">"MIDI"</item> </string-array> + <string-array name="origin_carrier_names"> + </string-array> + + <string-array name="locale_carrier_names"> + </string-array> </resources> diff --git a/packages/SettingsLib/res/values-zh-rHK/arrays.xml b/packages/SettingsLib/res/values-zh-rHK/arrays.xml index 746ac68f3afe..68454f888c05 100644 --- a/packages/SettingsLib/res/values-zh-rHK/arrays.xml +++ b/packages/SettingsLib/res/values-zh-rHK/arrays.xml @@ -62,6 +62,9 @@ <item msgid="695678520785580527">"已停用"</item> <item msgid="6336372935919715515">"已啟用篩選"</item> <item msgid="2779123106632690576">"已啟用"</item> + <item>"已過濾已啟用的標題"</item> + <item>"已過濾已啟用的媒體包"</item> + <item>"已啟用(已過濾配置文件)"</item> </string-array> <string-array name="bt_hci_snoop_log_filters_entries"> <item msgid="195768089203590086">"只保留 ACL 標題"</item> @@ -105,6 +108,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> 音訊"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> 音訊"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"使用系統選擇 (預設)"</item> @@ -115,6 +120,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> 音訊"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> 音訊"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"使用系統選擇 (預設)"</item> diff --git a/packages/SettingsLib/res/values-zh-rTW/arrays.xml b/packages/SettingsLib/res/values-zh-rTW/arrays.xml index b7fb99bcbf4a..89bafd9ed6ae 100644 --- a/packages/SettingsLib/res/values-zh-rTW/arrays.xml +++ b/packages/SettingsLib/res/values-zh-rTW/arrays.xml @@ -62,6 +62,9 @@ <item msgid="695678520785580527">"已停用"</item> <item msgid="6336372935919715515">"已啟用篩選結果"</item> <item msgid="2779123106632690576">"已啟用"</item> + <item>"已過濾已啟用的標題"</item> + <item>"已過濾已啟用的媒體包"</item> + <item>"已啟用(已過濾配置文件)"</item> </string-array> <string-array name="bt_hci_snoop_log_filters_entries"> <item msgid="195768089203590086">"僅保留 ACL 標頭"</item> @@ -105,6 +108,8 @@ <item msgid="3825367753087348007">"LDAC"</item> <item msgid="328951785723550863">"LC3"</item> <item msgid="506175145534048710">"Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> 音訊"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> 音訊"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"系統自動選擇 (預設)"</item> @@ -115,6 +120,8 @@ <item msgid="2553206901068987657">"LDAC"</item> <item msgid="3940992993241040716">"LC3"</item> <item msgid="7940970833006181407">"Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> 音訊"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> 音訊"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"系統自動選擇 (預設)"</item> diff --git a/packages/SettingsLib/res/values-zu/arrays.xml b/packages/SettingsLib/res/values-zu/arrays.xml index 63b19e25d1b7..e6ab93c3c987 100644 --- a/packages/SettingsLib/res/values-zu/arrays.xml +++ b/packages/SettingsLib/res/values-zu/arrays.xml @@ -105,6 +105,8 @@ <item msgid="3825367753087348007">"I-LDAC"</item> <item msgid="328951785723550863">"I-LC3"</item> <item msgid="506175145534048710">"I-Opus"</item> + <item msgid="8711430979086781450">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> umsindo"</item> + <item msgid="6486050771049225">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> umsindo"</item> </string-array> <string-array name="bluetooth_a2dp_codec_summaries"> <item msgid="8868109554557331312">"Sebenzisa ukukhetha kwesistimu (Okuzenzakalelayo)"</item> @@ -115,6 +117,8 @@ <item msgid="2553206901068987657">"I-LDAC"</item> <item msgid="3940992993241040716">"I-LC3"</item> <item msgid="7940970833006181407">"I-Opus"</item> + <item msgid="102988075927343894">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_ADAPTIVE">aptX™ Adaptive</xliff:g> umsindo"</item> + <item msgid="6486050771049481">"<xliff:g id="QUALCOMM">Qualcomm®</xliff:g> <xliff:g id="APTX_TWSP">aptX™ TWS+</xliff:g> umsindo"</item> </string-array> <string-array name="bluetooth_a2dp_codec_sample_rate_titles"> <item msgid="926809261293414607">"Sebenzisa ukukhetha kwesistimu (Okuzenzakalelayo)"</item> diff --git a/packages/SettingsLib/res/values/arrays.xml b/packages/SettingsLib/res/values/arrays.xml index 3adb882bc1b1..b83c89b7b918 100644 --- a/packages/SettingsLib/res/values/arrays.xml +++ b/packages/SettingsLib/res/values/arrays.xml @@ -107,6 +107,9 @@ <item>Disabled</item> <item>Enabled Filtered</item> <item>Enabled</item> + <item>Enabled Headers Filtered</item> + <item>Enabled Media Pkts Filtered</item> + <item>Enabled Profiles Filtered</item> </string-array> <!-- Values for Bluetooth HCI Snoop Logging --> @@ -114,6 +117,9 @@ <item>disabled</item> <item>filtered</item> <item>full</item> + <item>snoopheadersfiltered</item> + <item>mediapktsfiltered</item> + <item>profilesfiltered</item> </string-array> <!-- Titles for Bluetooth HCI Snoop Filtered Logging --> @@ -123,14 +129,14 @@ <item>Filter RFCOMM channel</item> </string-array> - <!-- Values for Bluetooth HCI Snoop Filtered Logging --> + <!-- Values for Bluetooth HCI Snoop Filtered Logging --> <string-array name="bt_hci_snoop_log_filters_values" translatable="false"> <item>headers</item> <item>profiles.a2dp</item> <item>profiles.rfcomm</item> </string-array> - <!-- Titles for Bluetooth HCI Snoop Filtered Logging --> + <!-- Titles for Bluetooth HCI Snoop Filtered Logging --> <string-array name="bt_hci_snoop_log_profile_filter_entries"> <item>Disable</item> <item>Fill with string of characters</item> @@ -138,7 +144,7 @@ <item>Fully remove</item> </string-array> - <!-- Values for Bluetooth HCI Snoop Filtered Logging --> + <!-- Values for Bluetooth HCI Snoop Filtered Logging --> <string-array name="bt_hci_snoop_log_profile_filter_values" translatable="false"> <item>disabled</item> <item>magic</item> @@ -146,6 +152,13 @@ <item>fullfilter</item> </string-array> + <!-- Values for Bluetooth HCI Snoop Logging Enhanced--> + <string-array name="bt_hci_snoop_log_values_enhanced" translatable="false"> + <item>snoopheadersfiltered</item> + <item>mediapktsfiltered</item> + <item>profilesfiltered</item> + </string-array> + <!-- Titles for Bluetooth AVRCP Versions --> <string-array name="bluetooth_avrcp_versions"> <item>AVRCP 1.5 (Default)</item> @@ -186,6 +199,8 @@ <item>LDAC</item> <item>LC3</item> <item>Opus</item> + <item><xliff:g id="qualcomm">Qualcomm®</xliff:g> <xliff:g id="aptx_adaptive">aptX™ Adaptive</xliff:g> audio</item> + <item><xliff:g id="qualcomm">Qualcomm®</xliff:g> <xliff:g id="aptx_twsp">aptX™ TWS+</xliff:g> audio</item> </string-array> <!-- Summaries for Bluetooth Audio Codec selection preference. [CHAR LIMIT=50]--> @@ -198,6 +213,8 @@ <item>LDAC</item> <item>LC3</item> <item>Opus</item> + <item><xliff:g id="qualcomm">Qualcomm®</xliff:g> <xliff:g id="aptx_adaptive">aptX™ Adaptive</xliff:g> audio</item> + <item><xliff:g id="qualcomm">Qualcomm®</xliff:g> <xliff:g id="aptx_twsp">aptX™ TWS+</xliff:g> audio</item> </string-array> <!-- Titles for Bluetooth Audio Codec Sample Rate selection preference. [CHAR LIMIT=50] --> diff --git a/packages/SettingsLib/res/values/config_qti.xml b/packages/SettingsLib/res/values/config_qti.xml new file mode 100644 index 000000000000..b2bcab34db3b --- /dev/null +++ b/packages/SettingsLib/res/values/config_qti.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Copyright (c) 2018, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> + +<resources> + <bool name="kg_hide_emgcy_btn_when_oos">false</bool> + <bool name="config_showEmergencyButton">false</bool> + <bool name="config_show_customize_carrier_name">false</bool> + <bool name="config_showRsrpSignalLevelforLTE">false</bool> + <bool name="config_alwaysShowTypeIcon">false</bool> + <bool name="config_hideNoInternetState">false</bool> + <bool name="config_display_volte">true</bool> + <bool name="config_display_vowifi">false</bool> +</resources> diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml index b44c0e0799b2..dd3188744624 100644 --- a/packages/SettingsLib/res/values/strings.xml +++ b/packages/SettingsLib/res/values/strings.xml @@ -36,6 +36,8 @@ <string name="wifi_security_short_eap_wpa">WPA-EAP</string> <!-- Concise terminology for wifi with WPA2/WPA3 802.1x EAP security [CHAR LIMIT=40] --> <string name="wifi_security_short_eap_wpa2_wpa3">RSN-EAP</string> + <!-- Concise terminology for wifi with DPP security [CHAR LIMIT=40] --> + <string name="wifi_security_short_dpp">DPP</string> <!-- Concise terminology for wifi with WPA3 security [CHAR LIMIT=40] --> <string name="wifi_security_short_sae">WPA3</string> <!-- Concise terminology for wifi with WPA2/WPA3 transition security [CHAR LIMIT=40] --> @@ -72,6 +74,8 @@ <string name="wifi_security_eap_wpa3">WPA3-Enterprise</string> <!-- Concise terminology for Passpoint network [CHAR LIMIT=40] --> <string name="wifi_security_passpoint">Passpoint</string> + <!-- Concise terminology for DPP network --> + <string name="wifi_security_dpp" translatable="false">DPP</string> <!-- Terminology for wifi with WPA3 security [CHAR LIMIT=40] --> <string name="wifi_security_sae">WPA3-Personal</string> <!-- Terminology for wifi with WPA2/WPA3 Transition mode security [CHAR LIMIT=40] --> @@ -220,6 +224,8 @@ <string name="bluetooth_profile_headset">Phone calls</string> <!-- Bluetooth settings. The user-visible string that is used whenever referring to the OPP profile. --> <string name="bluetooth_profile_opp">File transfer</string> + <!-- Bluetooth settings. The user-visible string that is used whenever referring to the Broadcast profile. --> + <string name="bluetooth_profile_broadcast">Broadcast</string> <!-- Bluetooth settings. The user-visible string that is used whenever referring to the HID profile. --> <string name="bluetooth_profile_hid">Input device</string> <!-- Bluetooth settings. The user-visible string that is used whenever referring to the PAN profile (accessing Internet through remote device). [CHAR LIMIT=40] --> @@ -234,6 +240,11 @@ <string name="bluetooth_profile_map">Text Messages</string> <!-- Bluetooth settings. The user-visible string that is used whenever referring to the SAP profile (sharing SIM card). --> <string name="bluetooth_profile_sap">SIM Access</string> + <!-- Bluetooth settings. The user-visible string that is used whenever referring to the dun profile. --> + <string name="bluetooth_profile_dun">Dial-up Network Access</string> + <!-- Bluetooth settings. The user-visible string that is used + whenever referring to the vcp profile. --> + <string name="bluetooth_profile_vcp">Volume control</string> <!-- Bluetooth settings. The user-visible string for the setting controlling whether to use a high-quality codec if the device supports it, along with the name of the codec (eg AAC, LDAC, aptX) --> <string name="bluetooth_profile_a2dp_high_quality">HD audio: <xliff:g id="codec_name">%1$s</xliff:g></string> @@ -268,6 +279,8 @@ <string name="bluetooth_pan_user_profile_summary_connected">Connected to device for internet access</string> <!-- Bluetooth settings. Connection options screen. The summary for the checkbox preference when PAN is connected (NAP role). [CHAR LIMIT=25]--> <string name="bluetooth_pan_nap_profile_summary_connected">Sharing local internet connection with device</string> + <!-- Bluetooth settings. Connection options screen. The summary for the DUN checkbox preference when DUN is connected. --> + <string name="bluetooth_dun_profile_summary_connected">Connected to Dun Server</string> <!-- Bluetooth settings. Connection options screen. The summary for the PAN checkbox preference that describes how checking it @@ -291,6 +304,8 @@ <string name="bluetooth_hearing_aid_profile_summary_use_for">Use for Hearing Aids</string> <!-- Bluetooth settings. Connection options screen. The summary for the LE_AUDIO checkbox preference that describes how checking it will set the LE_AUDIO profile as preferred. --> <string name="bluetooth_le_audio_profile_summary_use_for">Use for LE_AUDIO</string> + <!-- Bluetooth settings. Connection options screen. The summary for the dun checkbox preference that describes how checking it will set the dun profile as preferred. --> + <string name="bluetooth_dun_profile_summary_use_for">Use for Dial-up Network access</string> <!-- Button text for accepting an incoming pairing request. [CHAR LIMIT=20] --> <string name="bluetooth_pairing_accept">Pair</string> @@ -324,6 +339,9 @@ <!-- Message for telling the user the kind of BT device being displayed in list. [CHAR LIMIT=30 BACKUP_MESSAGE_ID=551146170554589119] --> <string name="bluetooth_talkback_imaging">Imaging</string> + <!-- Message for telling the user the kind of BT device being displayed. [CHAR LIMIT=30] --> + <string name="bluetooth_talkback_group">Group Devices</string> + <!-- Message for telling the user the kind of BT device being displayed in list. [CHAR LIMIT=30 BACKUP_MESSAGE_ID=26580326066627664] --> <string name="bluetooth_talkback_headphone">Headphone</string> @@ -634,6 +652,8 @@ <!-- Setting Checkbox title whether to show options for wireless display certification --> <string name="wifi_display_certification">Wireless display certification</string> + <!-- Setting Checkbox title whether to enable WiFi coverage extending feature. --> + <string name="wifi_coverage_extend">Enable Wi\u2011Fi Coverage Extend Feature</string> <!-- Setting Checkbox title whether to enable WiFi Verbose Logging. [CHAR LIMIT=40] --> <string name="wifi_verbose_logging">Enable Wi\u2011Fi Verbose Logging</string> <!-- Setting Checkbox title whether to disable WiFi Scan Throttling. [CHAR LIMIT=40] --> @@ -704,6 +724,9 @@ <!-- setting Checkbox summary whether to show options for wireless display certification --> <string name="wifi_display_certification_summary">Show options for wireless display certification</string> <!-- Setting Checkbox summary whether to enable Wifi verbose Logging [CHAR_LIMIT=NONE] --> + <!-- Setting Checkbox summary whether to enable WiFi coverage extending feature. --> + <string name="wifi_coverage_extend_summary">Enable extending Wi\u2011Fi coverage using Hotspot</string> + <!-- Setting Checkbox summary whether to enable Wifi verbose Logging [CHAR LIMIT=80] --> <string name="wifi_verbose_logging_summary">Increase Wi\u2011Fi logging level, show per SSID RSSI in Wi\u2011Fi Picker</string> <!-- Setting Checkbox summary whether to disable Wifi scan throttling [CHAR LIMIT=NONE] --> <string name="wifi_scan_throttling_summary">Reduces battery drain & improves network performance</string> diff --git a/packages/SettingsLib/res/values/strings_ba.xml b/packages/SettingsLib/res/values/strings_ba.xml new file mode 100644 index 000000000000..34035048be1e --- /dev/null +++ b/packages/SettingsLib/res/values/strings_ba.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (c) 2020, The Linux Foundation. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Bluetooth settings. The user-visible string that is used whenever + referring to BC profile. --> + <string name="bluetooth_profile_bc">BC Profile</string> + <!-- Bluetooth settings. Connection options screen. + The summary for the profile checkbox preference when BC is connected. --> + <string name="bluetooth_bc_profile_summary_connected">Connected to BA server + </string> + <!-- Bluetooth settings. Connection options screen. + The summary for the BC checkbox preference that describes how checking it + will set the BC profile as preferred. --> + <string name="bluetooth_bc_profile_summary_use_for">Use for BA</string> +</resources> diff --git a/packages/SettingsLib/res/values/strings_qti.xml b/packages/SettingsLib/res/values/strings_qti.xml new file mode 100755 index 000000000000..a87f2ec3baca --- /dev/null +++ b/packages/SettingsLib/res/values/strings_qti.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Copyright (c) 2018, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <string-array name="origin_carrier_names"></string-array> + + <string-array name="locale_carrier_names"></string-array> + + <!-- config 2G/3G/4G RAT strings for carriers --> + <string name="config_rat_unknown" translatable="false">""</string> + <string name="config_rat_2g" translatable="false">2G</string> + <string name="config_rat_3g" translatable="false">3G</string> + <string name="config_rat_4g" translatable="false">4G</string> + + <!-- Content description of the data connection type 5G Basic. [CHAR LIMIT=NONE] --> + <string name="data_connection_5g_basic" translate="false">5GBasic</string> + + <!-- Content description of the data connection type 5G UWB. [CHAR LIMIT=NONE] --> + <string name="data_connection_5g_uwb" translate="false">5GUWB</string> + + <!-- Content description of the data connection type 5G stand alone. [CHAR LIMIT=NONE] --> + <string name="data_connection_5g_sa" translate="false">5GSA</string> + + <!-- + The customization for last puk prompt + The format of array item: + MCCMNC:customized string + Example: + <string-array name="kg_wrong_puk_code_message_list"> + <item>46000:SIM is unusable. Contact ...</item> + <item>46001:SIM is unusable. Contact ...</item> + </string-array> + --> + <string-array name="kg_wrong_puk_code_message_list"></string-array> + +</resources> diff --git a/packages/SettingsLib/src/com/android/settingslib/Utils.java b/packages/SettingsLib/src/com/android/settingslib/Utils.java index c967b568042c..edd622540582 100644 --- a/packages/SettingsLib/src/com/android/settingslib/Utils.java +++ b/packages/SettingsLib/src/com/android/settingslib/Utils.java @@ -1,3 +1,9 @@ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.settingslib; import static android.app.admin.DevicePolicyResources.Strings.Settings.WORK_PROFILE_USER_LABEL; @@ -44,6 +50,7 @@ import android.telephony.NetworkRegistrationInfo; import android.telephony.ServiceState; import android.telephony.TelephonyManager; import android.util.Log; +import android.net.wifi.ScanResult; import androidx.annotation.NonNull; import androidx.annotation.RequiresApi; @@ -92,6 +99,38 @@ public class Utils { R.drawable.ic_show_x_wifi_signal_4 }; + static final int[] WIFI_4_PIE = { + com.android.internal.R.drawable.ic_wifi_4_signal_0, + com.android.internal.R.drawable.ic_wifi_4_signal_1, + com.android.internal.R.drawable.ic_wifi_4_signal_2, + com.android.internal.R.drawable.ic_wifi_4_signal_3, + com.android.internal.R.drawable.ic_wifi_4_signal_4 + }; + + static final int[] WIFI_5_PIE = { + com.android.internal.R.drawable.ic_wifi_5_signal_0, + com.android.internal.R.drawable.ic_wifi_5_signal_1, + com.android.internal.R.drawable.ic_wifi_5_signal_2, + com.android.internal.R.drawable.ic_wifi_5_signal_3, + com.android.internal.R.drawable.ic_wifi_5_signal_4 + }; + + static final int[] WIFI_6_PIE = { + com.android.internal.R.drawable.ic_wifi_6_signal_0, + com.android.internal.R.drawable.ic_wifi_6_signal_1, + com.android.internal.R.drawable.ic_wifi_6_signal_2, + com.android.internal.R.drawable.ic_wifi_6_signal_3, + com.android.internal.R.drawable.ic_wifi_6_signal_4 + }; + + static final int[] WIFI_7_PIE = { + com.android.internal.R.drawable.ic_wifi_7_signal_0, + com.android.internal.R.drawable.ic_wifi_7_signal_1, + com.android.internal.R.drawable.ic_wifi_7_signal_2, + com.android.internal.R.drawable.ic_wifi_7_signal_3, + com.android.internal.R.drawable.ic_wifi_7_signal_4 + }; + public static void updateLocationEnabled(Context context, boolean enabled, int userId, int source) { Settings.Secure.putIntForUser( @@ -464,7 +503,7 @@ public class Utils { * @throws IllegalArgumentException if an invalid RSSI level is given. */ public static int getWifiIconResource(int level) { - return getWifiIconResource(false /* showX */, level); + return getWifiIconResource(false /* showX */, level, 0 /* standard */); } /** @@ -476,10 +515,46 @@ public class Utils { * @throws IllegalArgumentException if an invalid RSSI level is given. */ public static int getWifiIconResource(boolean showX, int level) { + return getWifiIconResource(showX, level, 0 /* standard */); + } + + /** + * Returns the Wifi icon resource for a given RSSI level. + * + * @param level The number of bars to show (0-4) + * @throws IllegalArgumentException if an invalid RSSI level is given. + */ + public static int getWifiIconResource(int level, int standard) { + return getWifiIconResource(false /* showX */, level, standard); + } + + /** + * Returns the Wifi icon resource for a given RSSI level. + * + * @param showX True if a connected Wi-Fi network has the problem which should show Pie+x + * signal icon to users. + * @param level The number of bars to show (0-4) + * @throws IllegalArgumentException if an invalid RSSI level is given. + */ + public static int getWifiIconResource(boolean showX, int level, int standard) { if (level < 0 || level >= WIFI_PIE.length) { throw new IllegalArgumentException("No Wifi icon found for level: " + level); } - return showX ? SHOW_X_WIFI_PIE[level] : WIFI_PIE[level]; + + if (showX) return SHOW_X_WIFI_PIE[level]; + + switch (standard) { + case ScanResult.WIFI_STANDARD_11N: + return WIFI_4_PIE[level]; + case ScanResult.WIFI_STANDARD_11AC: + return WIFI_5_PIE[level]; + case ScanResult.WIFI_STANDARD_11AX: + return WIFI_6_PIE[level]; + case ScanResult.WIFI_STANDARD_11BE: + return WIFI_7_PIE[level]; + default: + return WIFI_PIE[level]; + } } public static int getDefaultStorageManagerDaysToRetain(Resources resources) { diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java index 91b852ab9f67..ab3264752ae1 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java @@ -42,6 +42,7 @@ import java.util.List; public class A2dpProfile implements LocalBluetoothProfile { private static final String TAG = "A2dpProfile"; + private static boolean V = true; private Context mContext; @@ -224,6 +225,11 @@ public class A2dpProfile implements LocalBluetoothProfile { } public boolean supportsHighQualityAudio(BluetoothDevice device) { + if (V) Log.d(TAG, " execute supportsHighQualityAudio()"); + if (mService == null) { + if (V) Log.d(TAG,"mService is null."); + return false; + } BluetoothDevice bluetoothDevice = (device != null) ? device : getActiveDevice(); if (bluetoothDevice == null) { return false; @@ -237,6 +243,11 @@ public class A2dpProfile implements LocalBluetoothProfile { */ @RequiresApi(Build.VERSION_CODES.TIRAMISU) public boolean isHighQualityAudioEnabled(BluetoothDevice device) { + if (V) Log.d(TAG, " execute isHighQualityAudioEnabled()"); + if (mService == null) { + if (V) Log.d(TAG,"mService is null."); + return false; + } BluetoothDevice bluetoothDevice = (device != null) ? device : getActiveDevice(); if (bluetoothDevice == null) { return false; @@ -262,14 +273,40 @@ public class A2dpProfile implements LocalBluetoothProfile { } } - public void setHighQualityAudioEnabled(BluetoothDevice device, boolean enabled) { - BluetoothDevice bluetoothDevice = (device != null) ? device : getActiveDevice(); + public boolean isMandatoryCodec(BluetoothDevice device) { + if (V) Log.d(TAG, " execute isMandatoryCodec()"); + if (mService == null) { + if (V) Log.d(TAG,"mService is null."); + return false; + } + BluetoothDevice bluetoothDevice = (device != null) ? device : mService.getActiveDevice(); if (bluetoothDevice == null) { - return; + return false; } + BluetoothCodecConfig codecConfig = null; + if (mService.getCodecStatus(bluetoothDevice) != null) { + codecConfig = mService.getCodecStatus(bluetoothDevice).getCodecConfig(); + } + if (codecConfig != null) { + return codecConfig.isMandatoryCodec(); + } else { + return false; + } + } + + public void setHighQualityAudioEnabled(BluetoothDevice device, boolean enabled) { + if (V) Log.d(TAG, " execute setHighQualityAudioEnabled()"); int prefValue = enabled ? BluetoothA2dp.OPTIONAL_CODECS_PREF_ENABLED : BluetoothA2dp.OPTIONAL_CODECS_PREF_DISABLED; + if (mService == null) { + if (V) Log.d(TAG,"mService is null."); + return; + } + BluetoothDevice bluetoothDevice = (device != null) ? device : getActiveDevice(); + if (bluetoothDevice == null) { + return; + } mService.setOptionalCodecsEnabled(bluetoothDevice, prefValue); if (getConnectionStatus(bluetoothDevice) != BluetoothProfile.STATE_CONNECTED) { return; @@ -289,6 +326,7 @@ public class A2dpProfile implements LocalBluetoothProfile { */ @RequiresApi(Build.VERSION_CODES.TIRAMISU) public String getHighQualityAudioOptionLabel(BluetoothDevice device) { + if (V) Log.d(TAG, " execute getHighQualityAudioOptionLabel()"); BluetoothDevice bluetoothDevice = (device != null) ? device : getActiveDevice(); int unknownCodecId = R.string.bluetooth_profile_a2dp_high_quality_unknown_codec; if (bluetoothDevice == null || !supportsHighQualityAudio(device) @@ -298,7 +336,7 @@ public class A2dpProfile implements LocalBluetoothProfile { // We want to get the highest priority codec, since that's the one that will be used with // this device, and see if it is high-quality (ie non-mandatory). List<BluetoothCodecConfig> selectable = null; - if (mService.getCodecStatus(device) != null) { + if (mService != null && mService.getCodecStatus(device) != null) { selectable = mService.getCodecStatus(device).getCodecsSelectableCapabilities(); // To get the highest priority, we sort in reverse. Collections.sort(selectable, @@ -329,12 +367,18 @@ public class A2dpProfile implements LocalBluetoothProfile { case BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC: index = 5; break; - case BluetoothCodecConfig.SOURCE_CODEC_TYPE_LC3: - index = 6; - break; - case BluetoothCodecConfig.SOURCE_CODEC_TYPE_OPUS: - index = 7; - break; + case BluetoothCodecConfig.SOURCE_CODEC_TYPE_LC3: + index = 6; + break; + case BluetoothCodecConfig.SOURCE_CODEC_TYPE_OPUS: + index = 7; + break; + case BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_ADAPTIVE: + index = 8; + break; + case BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_TWSP: + index = 9; + break; } if (index < 0) { diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java index fa056e2b77bd..4d74313a27cb 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothCallback.java @@ -16,6 +16,9 @@ package com.android.settingslib.bluetooth; +import android.bluetooth.BluetoothCodecStatus; + +import java.util.UUID; import static android.bluetooth.BluetoothAdapter.STATE_CONNECTED; import static android.bluetooth.BluetoothAdapter.STATE_CONNECTING; import static android.bluetooth.BluetoothAdapter.STATE_DISCONNECTED; @@ -180,4 +183,59 @@ public interface BluetoothCallback { }) @Retention(RetentionPolicy.SOURCE) @interface AdapterState {} + + /** + * Called when a2dp codec config is changed. It listens to + * {@link android.bluetooth.BluetoothA2dp#ACTION_CODEC_CONFIG_CHANGED}. + * + * @param cachedDevice Bluetooth device that changed + * @param codecStatus the current codec status of the a2dp profile + */ + default void onA2dpCodecConfigChanged(CachedBluetoothDevice cachedDevice, + BluetoothCodecStatus codecStatus) { + } + + /** + * Called when new device group has been identified with the bonded remote device + * + * @param cachedDevice Bluetooth device with which device group has been found. + * @param groupId Identifier of the device group. + * @param setPrimaryServiceUuid Primary service with which this Device Group + * is associated. + */ + default void onNewGroupFound(CachedBluetoothDevice cachedDevice, int groupId, + UUID setPrimaryServiceUuid) { + } + + /** + * Called when Group Discovery status has been changed. + * + * @param groupId Identifier of the coordinated set. + * @param status Status of the group discovery procedure. + * @param reason Reason for the change in status of discovery. + */ + default void onGroupDiscoveryStatusChanged (int groupId, int status, int reason) { + } + + /** + * Called when Broadcast state is changed. It listens to + * {@link android.bluetooth.BluetoothBroadcast#ACTION_BROADCAST_STATE_CHANGED} + * + * @param state the Bluetooth device connection state, the possible values are: + * {@link android.bluetooth.BluetoothBroadcast#STATE_DISABLED}, + * {@link android.bluetooth.BluetoothBroadcast#STATE_ENABLING}, + * {@link android.bluetooth.BluetoothBroadcast#STATE_ENABLED}, + * {@link android.bluetooth.BluetoothBroadcast#STATE_DISABLING}, + * {@link android.bluetooth.BluetoothBroadcast#STATE_STREAMING} + */ + default void onBroadcastStateChanged(int state) { + } + + /** + * Called when Broadcast key is changed. It listens to + * {@link android.bluetooth.BluetoothBroadcast#ACTION_BROADCAST_ENCRYPTION_KEY_GENERATED} + * + */ + default void onBroadcastKeyGenerated() { + } } diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java index f5bacb62b6b2..0a6eb2009123 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java @@ -18,12 +18,14 @@ package com.android.settingslib.bluetooth; import android.bluetooth.BluetoothA2dp; import android.bluetooth.BluetoothAdapter; +import android.bluetooth.BluetoothCodecStatus; import android.bluetooth.BluetoothCsipSetCoordinator; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothHeadset; import android.bluetooth.BluetoothHearingAid; import android.bluetooth.BluetoothLeAudio; import android.bluetooth.BluetoothProfile; +import android.bluetooth.BluetoothVcp; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; @@ -44,7 +46,9 @@ import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; - +import java.util.UUID; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; /** * BluetoothEventManager receives broadcasts and callbacks from the Bluetooth * API and dispatches the event on the UI thread to the right class in the @@ -64,6 +68,8 @@ public class BluetoothEventManager { private final android.os.Handler mReceiverHandler; private final UserHandle mUserHandle; private final Context mContext; + private final String ACT_BROADCAST_SOURCE_INFO = + "android.bluetooth.BroadcastAudioSAManager.action.BROADCAST_SOURCE_INFO"; interface Handler { void onReceive(Context context, Intent intent, BluetoothDevice device); @@ -108,10 +114,15 @@ public class BluetoothEventManager { // Pairing broadcasts addHandler(BluetoothDevice.ACTION_BOND_STATE_CHANGED, new BondStateChangedHandler()); + // CSIS Device broadcasts + addHandler(BluetoothCsipSetCoordinator.ACTION_CSIS_DEVICE_AVAILABLE, + new CsipGroupFoundHandler()); // Fine-grained state broadcasts addHandler(BluetoothDevice.ACTION_CLASS_CHANGED, new ClassChangedHandler()); addHandler(BluetoothDevice.ACTION_UUID, new UuidChangedHandler()); addHandler(BluetoothDevice.ACTION_BATTERY_LEVEL_CHANGED, new BatteryLevelChangedHandler()); + addHandler(BluetoothHeadset.ACTION_HF_TWSP_BATTERY_STATE_CHANGED , + new TwspBatteryLevelChangedHandler()); // Active device broadcasts addHandler(BluetoothA2dp.ACTION_ACTIVE_DEVICE_CHANGED, new ActiveDeviceChangedHandler()); @@ -130,6 +141,33 @@ public class BluetoothEventManager { // ACL connection changed broadcasts addHandler(BluetoothDevice.ACTION_ACL_CONNECTED, new AclStateChangedHandler()); addHandler(BluetoothDevice.ACTION_ACL_DISCONNECTED, new AclStateChangedHandler()); + addHandler(BluetoothA2dp.ACTION_CODEC_CONFIG_CHANGED, new A2dpCodecConfigChangedHandler()); + Object sourceInfoHandler = null; + try { + Class<?> classSourceInfoHandler = + Class.forName("com.android.settingslib.bluetooth.BroadcastSourceInfoHandler"); + Constructor ctor; + ctor = classSourceInfoHandler.getDeclaredConstructor( + new Class[] {CachedBluetoothDeviceManager.class}); + sourceInfoHandler = ctor.newInstance(mDeviceManager); + } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException + | InstantiationException | InvocationTargetException e) { + e.printStackTrace(); + } + if (sourceInfoHandler != null) { + Log.d(TAG, "adding SourceInfo Handler"); + addHandler(ACT_BROADCAST_SOURCE_INFO, + (Handler)sourceInfoHandler); + } + + // Broadcast broadcasts + addHandler("android.bluetooth.broadcast.profile.action.BROADCAST_STATE_CHANGED", + new BroadcastStateChangedHandler()); + addHandler("android.bluetooth.broadcast.profile.action.BROADCAST_ENCRYPTION_KEY_GENERATED", + new BroadcastKeyGeneratedHandler()); + // VCP state changed broadcasts + addHandler(BluetoothVcp.ACTION_CONNECTION_MODE_CHANGED, new VcpModeChangedHandler()); + addHandler(BluetoothVcp.ACTION_VOLUME_CHANGED, new VcpVolumeChangedHandler()); registerAdapterIntentReceiver(); } @@ -228,6 +266,18 @@ public class BluetoothEventManager { } } + private void dispatchBroadcastStateChanged(int state) { + for (BluetoothCallback callback : mCallbacks) { + callback.onBroadcastStateChanged(state); + } + } + + private void dispatchBroadcastKeyGenerated() { + for (BluetoothCallback callback : mCallbacks) { + callback.onBroadcastKeyGenerated(); + } + } + @VisibleForTesting void dispatchActiveDeviceChanged( @Nullable CachedBluetoothDevice activeDevice, @@ -263,6 +313,33 @@ public class BluetoothEventManager { } } + private void dispatchA2dpCodecConfigChanged(CachedBluetoothDevice cachedDevice, + BluetoothCodecStatus codecStatus) { + for (BluetoothCallback callback : mCallbacks) { + callback.onA2dpCodecConfigChanged(cachedDevice, codecStatus); + } + } + + protected void dispatchNewGroupFound( + CachedBluetoothDevice cachedDevice, int groupId, UUID setPrimaryServiceUuid) { + synchronized(mCallbacks) { + updateCacheDeviceInfo(groupId, cachedDevice); + for (BluetoothCallback callback : mCallbacks) { + callback.onNewGroupFound(cachedDevice, groupId, + setPrimaryServiceUuid); + } + } + } + + protected void dispatchGroupDiscoveryStatusChanged(int groupId, + int status, int reason) { + synchronized(mCallbacks) { + for (BluetoothCallback callback : mCallbacks) { + callback.onGroupDiscoveryStatusChanged(groupId, status, reason); + } + } + } + @VisibleForTesting void addHandler(String action, Handler handler) { mHandlerMap.put(action, handler); @@ -349,6 +426,22 @@ public class BluetoothEventManager { } } + private class BroadcastStateChangedHandler implements Handler { + //@Override + public void onReceive(Context context, Intent intent, BluetoothDevice device) { + int state = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, + BluetoothAdapter.ERROR); + dispatchBroadcastStateChanged(state); + } + } + + private class BroadcastKeyGeneratedHandler implements Handler { + //@Override + public void onReceive(Context context, Intent intent, BluetoothDevice device) { + dispatchBroadcastKeyGenerated(); + } + } + private class NameChangedHandler implements Handler { public void onReceive(Context context, Intent intent, BluetoothDevice device) { @@ -377,6 +470,21 @@ public class BluetoothEventManager { cachedDevice = mDeviceManager.addDevice(device); } + if(bondState == BluetoothDevice.BOND_BONDED) { + int groupId = intent.getIntExtra(BluetoothDevice.EXTRA_GROUP_ID, + BluetoothDevice.ERROR); + if (groupId != BluetoothDevice.ERROR && groupId >= 0) { + updateCacheDeviceInfo(groupId, cachedDevice); + } else if (intent.getBooleanExtra(BluetoothDevice.EXTRA_IS_PRIVATE_ADDRESS, + false)) { + /* + * Do not show private address in UI, just ignore assuming remaining + * events will receive on public address (connection, disconnection) + */ + Log.d(TAG, "Hide showing private address in UI " + cachedDevice); + updateIgnoreDeviceFlag(cachedDevice); + } + } for (BluetoothCallback callback : mCallbacks) { callback.onDeviceBondStateChanged(cachedDevice, bondState); } @@ -466,6 +574,24 @@ public class BluetoothEventManager { } } + private class TwspBatteryLevelChangedHandler implements Handler { + public void onReceive(Context context, Intent intent, + BluetoothDevice device) { + CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); + if (cachedDevice != null) { + cachedDevice.mTwspBatteryState = + intent.getIntExtra( + BluetoothHeadset.EXTRA_HF_TWSP_BATTERY_STATE, -1); + cachedDevice.mTwspBatteryLevel = + intent.getIntExtra( + BluetoothHeadset.EXTRA_HF_TWSP_BATTERY_LEVEL, -1); + Log.i(TAG, cachedDevice + ": mTwspBatteryState: " + cachedDevice.mTwspBatteryState + + "mTwspBatteryLevel: " + cachedDevice.mTwspBatteryLevel); + cachedDevice.refresh(); + } + } + } + private class ActiveDeviceChangedHandler implements Handler { @Override public void onReceive(Context context, Intent intent, BluetoothDevice device) { @@ -546,4 +672,84 @@ public class BluetoothEventManager { dispatchAudioModeChanged(); } } + + private class A2dpCodecConfigChangedHandler implements Handler { + + @Override + public void onReceive(Context context, Intent intent, BluetoothDevice device) { + final String action = intent.getAction(); + if (action == null) { + Log.w(TAG, "A2dpCodecConfigChangedHandler: action is null"); + return; + } + + CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); + if (cachedDevice == null) { + Log.w(TAG, "A2dpCodecConfigChangedHandler: device is null"); + return; + } + + BluetoothCodecStatus codecStatus = intent.getParcelableExtra( + BluetoothCodecStatus.EXTRA_CODEC_STATUS); + Log.d(TAG, "A2dpCodecConfigChangedHandler: device=" + device + + ", codecStatus=" + codecStatus); + dispatchA2dpCodecConfigChanged(cachedDevice, codecStatus); + } + } + + private class VcpModeChangedHandler implements Handler { + @Override + public void onReceive(Context context, Intent intent, BluetoothDevice device) { + CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); + int mode = intent.getIntExtra(BluetoothVcp.EXTRA_MODE, 0); + if (cachedDevice != null) { + Log.i(TAG, cachedDevice + " Vcp connection mode change to " + mode); + cachedDevice.refresh(); + } + } + } + + private class VcpVolumeChangedHandler implements Handler { + @Override + public void onReceive(Context context, Intent intent, BluetoothDevice device) { + CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); + if (cachedDevice != null) { + Log.i(TAG, cachedDevice + " Vcp volume change"); + cachedDevice.refresh(); + } + } + } + + private void updateCacheDeviceInfo(int groupId, CachedBluetoothDevice cachedDevice) { + BluetoothDevice device = cachedDevice.getDevice(); + boolean isGroup = cachedDevice.isGroupDevice(); + Log.d(TAG, "updateCacheDeviceInfo groupId " + groupId + + ", cachedDevice :" + cachedDevice + ", name :" + cachedDevice.getName() + +" isGroup :" + isGroup + " qgroupId " + cachedDevice.getQGroupId()); + if (isGroup) { + if (groupId != cachedDevice.getQGroupId()) { + Log.d(TAG, "groupId mismatch ignore " + cachedDevice.getQGroupId()); + return; + } + Log.d(TAG, "updateCacheDeviceInfo update ignored "); + } else { + cachedDevice.setDeviceType(groupId); + } + } + + private void updateIgnoreDeviceFlag(CachedBluetoothDevice cachedDevice) { + cachedDevice.setDeviceType(CachedBluetoothDevice.PRIVATE_ADDR); + } + + private class CsipGroupFoundHandler implements Handler { + public void onReceive(Context context, Intent intent, BluetoothDevice device) { + CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); + int groupId = intent.getIntExtra(BluetoothCsipSetCoordinator.EXTRA_CSIS_GROUP_ID, + BluetoothCsipSetCoordinator.GROUP_ID_INVALID); + Log.d(TAG, "CsipGroupFoundHandler " + cachedDevice + " " + groupId); + if (cachedDevice != null) { + cachedDevice.setGroupId(groupId); + } + } + } } diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java index f12aa26f6778..71564eacd6ac 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothUtils.java @@ -113,6 +113,14 @@ public class BluetoothUtils { default: // unrecognized device class; continue } + if (!cachedDevice.isLeAudioEnabled()) { + int tmpBtClass = btClass.getClassOfDevice() & BluetoothClass.Service.LE_AUDIO; + if (tmpBtClass == BluetoothClass.Service.LE_AUDIO) { + return new Pair<>( + getBluetoothDrawable(context, R.drawable.ic_adv_audio), + context.getString(R.string.bluetooth_talkback_group)); + } + } } List<LocalBluetoothProfile> profiles = cachedDevice.getProfiles(); diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java index 2e6bb535a8f0..6ac971908339 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java @@ -39,6 +39,7 @@ import android.util.Log; import android.util.LruCache; import android.util.Pair; +import android.os.SystemProperties; import androidx.annotation.VisibleForTesting; import com.android.internal.util.ArrayUtils; @@ -54,6 +55,9 @@ import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.lang.reflect.InvocationTargetException; /** * CachedBluetoothDevice represents a remote Bluetooth device. It contains @@ -71,6 +75,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> private static final long MAX_HOGP_DELAY_FOR_AUTO_CONNECT = 30000; private static final long MAX_LEAUDIO_DELAY_FOR_AUTO_CONNECT = 30000; private static final long MAX_MEDIA_PROFILE_CONNECT_DELAY = 60000; + private static final boolean mIsTwsConnectEnabled = false; private final Context mContext; private final BluetoothAdapter mLocalAdapter; @@ -78,7 +83,6 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> private final Object mProfileLock = new Object(); BluetoothDevice mDevice; private HearingAidInfo mHearingAidInfo; - private int mGroupId; private Timestamp mBondTimestamp; // Need this since there is no method for getting RSSI @@ -100,6 +104,8 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> private final Collection<Callback> mCallbacks = new CopyOnWriteArrayList<>(); + public int mTwspBatteryState; + public int mTwspBatteryLevel; /** * Last time a bt profile auto-connect was attempted. * If an ACTION_UUID intent comes in within @@ -127,6 +133,21 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> @VisibleForTesting LruCache<String, BitmapDrawable> mDrawableCache; + private int mGroupId; + + private int mQGroupId; + + private boolean mIsGroupDevice = false; + + private boolean mIsIgnore = false; + + private final int UNKNOWN = -1, BREDR = 100, GROUPID_START = 0, GROUPID_END = 15; + private int mType = UNKNOWN; + static final int PRIVATE_ADDR = 101; + + private boolean mIsLeAudioEnabled = false; + + private final Handler mHandler = new Handler(Looper.getMainLooper()) { @Override public void handleMessage(Message msg) { @@ -160,7 +181,22 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> mDevice = device; fillData(); mGroupId = BluetoothCsipSetCoordinator.GROUP_ID_INVALID; + mQGroupId = BluetoothCsipSetCoordinator.GROUP_ID_INVALID; + initDrawableCache(); + mTwspBatteryState = -1; + mTwspBatteryLevel = -1; + mUnpairing = false; + } + + CachedBluetoothDevice(CachedBluetoothDevice cachedDevice) { + mContext = cachedDevice.mContext; + mLocalAdapter = BluetoothAdapter.getDefaultAdapter(); + mProfileManager = cachedDevice.mProfileManager; + mDevice = cachedDevice.mDevice; + fillData(); initDrawableCache(); + mTwspBatteryState = -1; + mTwspBatteryLevel = -1; mUnpairing = false; } @@ -181,6 +217,22 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> }; } + /* Gets Device for seondary TWS device + * @param mDevice Primary TWS device to get secondary + * @return Description of the device + */ + + private BluetoothDevice getTwsPeerDevice() { + BluetoothAdapter bluetoothAdapter; + BluetoothDevice peerDevice = null; + if (mDevice.isTwsPlusDevice()) { + bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); + String peerAddress = mDevice.getTwsPlusPeerAddress(); + peerDevice = bluetoothAdapter.getRemoteDevice(peerAddress); + } + return peerDevice; + } + /** * Describes the current device and profile for logging. * @@ -276,6 +328,10 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> mProfiles.remove(profile); mRemovedProfiles.add(profile); mLocalNapRoleConnected = false; + } else if (profile instanceof HeadsetProfile + && newProfileState == BluetoothProfile.STATE_DISCONNECTED) { + mTwspBatteryState = -1; + mTwspBatteryLevel = -1; } } @@ -353,6 +409,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> } mConnectAttempted = SystemClock.elapsedRealtime(); + Log.d(TAG, "connect: mConnectAttempted = " + mConnectAttempted); connectDevice(); } @@ -414,6 +471,15 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> } /** + * Get the coordinated set QC group id. + * + * @return the group id. + */ + public int getQGroupId() { + return mQGroupId; + } + + /** * Set the coordinated set group id. * * @param id the group id from the CSIP. @@ -443,6 +509,14 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> Log.d(TAG, "No profiles. Maybe we will connect later for device " + mDevice); return; } + // BondingInitiatedLocally flag should be reset in onBondingStateChanged + // But Settings executing onBondingStateChanged twice and its lead to auto connection + // failure. this flag will be moved from here once settings issue fixed. + if (mDevice.isBondingInitiatedLocally()) { + Log.w(TAG, "reset BondingInitiatedLocally flag"); + mDevice.setBondingInitiatedLocally(false); + } + Log.d(TAG, "connect " + this); mDevice.connect(); if (getGroupId() != BluetoothCsipSetCoordinator.GROUP_ID_INVALID) { @@ -510,6 +584,17 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> if (state != BluetoothDevice.BOND_NONE) { final BluetoothDevice dev = mDevice; + if (mDevice.isTwsPlusDevice()) { + BluetoothDevice peerDevice = getTwsPeerDevice(); + if (peerDevice != null) { + final boolean peersuccessful = peerDevice.removeBond(); + if (peersuccessful) { + if (BluetoothUtils.D) { + Log.d(TAG, "Command sent successfully:REMOVE_BOND " + peerDevice.getName()); + } + } + } + } if (dev != null) { mUnpairing = true; final boolean successful = dev.removeBond(); @@ -538,7 +623,7 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> fetchActiveDevices(); migratePhonebookPermissionChoice(); migrateMessagePermissionChoice(); - + setLeAudioEnabled(); dispatchAttributesChanged(); } @@ -899,9 +984,15 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> if (bondState == BluetoothDevice.BOND_BONDED) { mBondTimestamp = new Timestamp(System.currentTimeMillis()); - - if (mDevice.isBondingInitiatedLocally()) { - connect(); + boolean mIsBondingInitiatedLocally = mDevice.isBondingInitiatedLocally(); + Log.w(TAG, "mIsBondingInitiatedLocally" + mIsBondingInitiatedLocally); + if (mIsTwsConnectEnabled) { + Log.d(TAG, "Initiating connection to" + mDevice); + if (mIsBondingInitiatedLocally || mDevice.isTwsPlusDevice()) { + connect(); + } + } else if (mIsBondingInitiatedLocally) { + connect(); } } } @@ -918,13 +1009,49 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> return new ArrayList<>(mProfiles); } + public boolean isBASeeker() { + if (mDevice == null) { + Log.e(TAG, "isBASeeker: mDevice is null"); + return false; + } + boolean ret = false; + Class<?> bCProfileClass = null; + String BC_PROFILE_CLASS = "com.android.settingslib.bluetooth.BCProfile"; + Method baSeeker; + try { + bCProfileClass = Class.forName(BC_PROFILE_CLASS); + baSeeker = bCProfileClass.getDeclaredMethod("isBASeeker", BluetoothDevice.class); + ret = (boolean)baSeeker.invoke(null, mDevice); + } catch (ClassNotFoundException | NoSuchMethodException + | IllegalAccessException | InvocationTargetException e) { + e.printStackTrace(); + } + return ret; + } + public List<LocalBluetoothProfile> getConnectableProfiles() { List<LocalBluetoothProfile> connectableProfiles = new ArrayList<LocalBluetoothProfile>(); + Class<?> bCProfileClass = null; + String BC_PROFILE_CLASS = "com.android.settingslib.bluetooth.BCProfile"; + try { + bCProfileClass = Class.forName(BC_PROFILE_CLASS); + } catch (ClassNotFoundException ex) { + Log.e(TAG, "no BCProfileClass: exists"); + bCProfileClass = null; + } synchronized (mProfileLock) { for (LocalBluetoothProfile profile : mProfiles) { - if (profile.accessProfileEnabled()) { - connectableProfiles.add(profile); + if (bCProfileClass != null && bCProfileClass.isInstance(profile)) { + if (isBASeeker()) { + connectableProfiles.add(profile); + } else { + Log.d(TAG, "BC profile is not enabled for" + mDevice); + } + } else { + if (profile.accessProfileEnabled()) { + connectableProfiles.add(profile); + } } } } @@ -1143,11 +1270,28 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> // BluetoothDevice.BATTERY_LEVEL_BLUETOOTH_OFF, or BluetoothDevice.BATTERY_LEVEL_UNKNOWN, // any other value should be a framework bug. Thus assume here that if value is greater // than BluetoothDevice.BATTERY_LEVEL_UNKNOWN, it must be valid - final int batteryLevel = getBatteryLevel(); - if (batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) { - // TODO: name com.android.settingslib.bluetooth.Utils something different - batteryLevelPercentageString = + + if (mDevice.isTwsPlusDevice() && mTwspBatteryState != -1 && + mTwspBatteryLevel != -1) { + String s = "TWSP: "; + String chargingState; + if (mTwspBatteryState == 1) { + chargingState = "Charging, "; + } else { + chargingState = "Discharging, "; + } + s = s.concat (chargingState); + s = s.concat( + com.android.settingslib.Utils.formatPercentage(mTwspBatteryLevel)); + batteryLevelPercentageString = s; + Log.i(TAG, "UI string" + batteryLevelPercentageString); + } else { + final int batteryLevel = getBatteryLevel(); + if (batteryLevel > BluetoothDevice.BATTERY_LEVEL_UNKNOWN) { + // TODO: name com.android.settingslib.bluetooth.Utils something different + batteryLevelPercentageString = com.android.settingslib.Utils.formatPercentage(batteryLevel); + } } int stringRes = R.string.bluetooth_pairing; @@ -1398,8 +1542,16 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> */ public boolean isConnectedA2dpDevice() { A2dpProfile a2dpProfile = mProfileManager.getA2dpProfile(); - return a2dpProfile != null && a2dpProfile.getConnectionStatus(mDevice) == + A2dpSinkProfile a2dpSinkProfile = mProfileManager.getA2dpSinkProfile(); + Log.i(TAG, "a2dpProfile :" + a2dpProfile + " a2dpSinkProfile :" + a2dpSinkProfile); + if (a2dpProfile != null) { + return a2dpProfile.getConnectionStatus(mDevice) == BluetoothProfile.STATE_CONNECTED; + } else if (a2dpSinkProfile != null) { + return a2dpSinkProfile.getConnectionStatus(mDevice) == + BluetoothProfile.STATE_CONNECTED; + } + return false; } /** @@ -1567,7 +1719,59 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> mDrawableCache.evictAll(); } + public boolean isGroupDevice() { + return mIsGroupDevice; + } + + public boolean isPrivateAddr() { + return mIsIgnore; + } + + public void setDeviceType(int deviceType) { + if (deviceType!= mType) { + mType = deviceType; + if (mType == UNKNOWN || mType == BREDR) { + mIsGroupDevice = false; + mQGroupId = UNKNOWN; + mIsIgnore = false; + } else if (mType == PRIVATE_ADDR) { + mIsGroupDevice = false; + mQGroupId = UNKNOWN; + mIsIgnore = true; + } else if (mType >= GROUPID_START && mType <= GROUPID_END ) { + mQGroupId = mType; + mIsIgnore = false; + mIsGroupDevice = true; + } else { + Log.e(TAG, "setDeviceType error type " + mType); + } + } + /* Log.d(TAG, "setDeviceType mType " + mType + " mIsGroupDevice " + mIsGroupDevice + + " mQGroupId " + mQGroupId + " mIsIgnore " + mIsIgnore + + " name " + getName() + " addr " + getAddress()); */ + } + + public boolean isTypeUnKnown() { + if (mType == UNKNOWN) { + return true; + } else { + return false; + } + } + + public int getmType() { + return mType; + } + boolean getUnpairing() { return mUnpairing; } + + void setLeAudioEnabled(){ + mIsLeAudioEnabled = (mProfileManager.getLeAudioProfile() != null ); + } + + boolean isLeAudioEnabled(){ + return mIsLeAudioEnabled; + } } diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java index 0c1b793102bf..324710b0438f 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java @@ -28,6 +28,7 @@ import com.android.internal.annotations.VisibleForTesting; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Collection; +import java.util.HashSet; import java.util.List; import java.util.Set; @@ -93,7 +94,8 @@ public class CachedBluetoothDeviceManager { return cachedDevice; } // Check the member devices for the coordinated set if it exists - final Set<CachedBluetoothDevice> memberDevices = cachedDevice.getMemberDevice(); + final Set<CachedBluetoothDevice> memberDevices = + new HashSet<CachedBluetoothDevice>(cachedDevice.getMemberDevice()); if (!memberDevices.isEmpty()) { for (CachedBluetoothDevice memberDevice : memberDevices) { if (memberDevice.getDevice().equals(device)) { @@ -271,6 +273,13 @@ public class CachedBluetoothDeviceManager { } } + public synchronized void clearAllDevices() { + for (int i = mCachedDevices.size() - 1; i >= 0; i--) { + CachedBluetoothDevice cachedDevice = mCachedDevices.get(i); + mCachedDevices.remove(i); + } + } + public synchronized void onScanningStateChanged(boolean started) { if (!started) return; // If starting a new scan, clear old visibility @@ -318,6 +327,9 @@ public class CachedBluetoothDeviceManager { cachedDevice.release(); mCachedDevices.remove(i); } + //Clear if there any Tws battery info on BT turning OFF + cachedDevice.mTwspBatteryState = -1; + cachedDevice.mTwspBatteryLevel = -1; } // To clear the SetMemberPair flag when the Bluetooth is turning off. diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CsipDeviceManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CsipDeviceManager.java index 3a6da2c98a65..55e90e33f7aa 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CsipDeviceManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CsipDeviceManager.java @@ -73,9 +73,10 @@ public class CsipDeviceManager { } for (Map.Entry<Integer, ParcelUuid> entry : groupIdMap.entrySet()) { - if (entry.getValue().equals(BluetoothUuid.CAP)) { + // Based on Spec CAP UUID is not mandatory, also we see failures with PTS + //if (entry.getValue().equals(BluetoothUuid.CAP)) { return entry.getKey(); - } + //} } } return BluetoothCsipSetCoordinator.GROUP_ID_INVALID; diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/DeviceGroupClientProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/DeviceGroupClientProfile.java new file mode 100644 index 000000000000..5a3f33a7c433 --- /dev/null +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/DeviceGroupClientProfile.java @@ -0,0 +1,377 @@ +/****************************************************************************** + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +package com.android.settingslib.bluetooth; + +import android.bluetooth.BluetoothAdapter; +import android.bluetooth.BluetoothClass; +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothDeviceGroup; +import android.bluetooth.BluetoothGroupCallback; +import android.bluetooth.BluetoothProfile; +import android.bluetooth.DeviceGroup; +import android.content.Context; +import android.app.ActivityThread; +import android.os.Handler; +import android.os.Looper; +import android.util.Log; + +import com.android.settingslib.R; + +import java.util.List; +import java.util.UUID; + +/** + * DeviceGroupClientProfile handles group operations required in client Role. + */ +public class DeviceGroupClientProfile implements LocalBluetoothProfile { + private static final String TAG = "DeviceGroupClientProfile"; + + private BluetoothDeviceGroup mService; + private boolean mIsProfileReady; + + private final CachedBluetoothDeviceManager mDeviceManager; + private final LocalBluetoothProfileManager mProfileManager; + + static final String NAME = "DeviceGroup Client"; + private static final String GROUP_APP = "com.android.settings"; + private String mCallingPackage; + + // Order of this profile in device profiles list + private static final int ORDINAL = 3; + + DeviceGroupClientProfile(Context context, + CachedBluetoothDeviceManager deviceManager, + LocalBluetoothProfileManager profileManager) { + mDeviceManager = deviceManager; + mProfileManager = profileManager; + mCallingPackage = ActivityThread.currentOpPackageName(); + BluetoothAdapter.getDefaultAdapter() + .getProfileProxy(context, new GroupClientServiceListener(), + BluetoothProfile.GROUP_CLIENT); + } + + // These callbacks run on the main thread. + private final class GroupClientServiceListener + implements BluetoothProfile.ServiceListener { + + public void onServiceConnected(int profile, BluetoothProfile proxy) { + mService = (BluetoothDeviceGroup) proxy; + mIsProfileReady = true; + Log.d(TAG, "onServiceConnected: mCallingPackage = " + mCallingPackage); + // register Group Client App + if (GROUP_APP.equals(mCallingPackage)) { + mService.registerGroupClientApp(mGroupCallback, + new Handler(Looper.getMainLooper())); + } + } + + public void onServiceDisconnected(int profile) { + mIsProfileReady=false; + } + } + + private final BluetoothGroupCallback mGroupCallback = new BluetoothGroupCallback() { + + @Override + public void onNewGroupFound (int groupId, BluetoothDevice device, UUID uuid) { + Log.d(TAG, "onNewGroupFound()"); + + CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); + if (cachedDevice == null) { + cachedDevice = mDeviceManager.addDevice(device); + } + + mProfileManager.mEventManager.dispatchNewGroupFound( + cachedDevice, groupId, uuid); + Log.d(TAG, "Start Group Discovery for Audio capable device"); + //if (device.isAdvAudioDevice()) + mService.startGroupDiscovery(groupId); + } + + @Override + public void onGroupDiscoveryStatusChanged (int groupId, + int status, int reason) { + Log.d(TAG, "onGroupDiscoveryStatusChanged()"); + + mProfileManager.mEventManager.dispatchGroupDiscoveryStatusChanged( + groupId, status, reason); + } + + }; + + public boolean connectGroup (int groupId) { + Log.d(TAG, "connectGroup(): groupId = " + groupId); + boolean isTriggered = false; + + if(mService == null || mIsProfileReady == false) { + Log.e(TAG, "connectGroup: mService = " + mService + + " mIsProfileReady = " + mIsProfileReady); + return false; + } + + DeviceGroup mGroup = mService.getGroup(groupId); + + if (mGroup == null || mGroup.getDeviceGroupMembers().size() == 0) { + Log.e(TAG, "Requested device group not found"); + return false; + } + + for (BluetoothDevice device: mGroup.getDeviceGroupMembers()) { + CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); + if (cachedDevice == null) { + Log.w(TAG, "CachedBluetoothDevice not found for device: " + device); + continue; + } + + if (!cachedDevice.isConnected()) { + cachedDevice.connect(true); + isTriggered = true; + } + } + return isTriggered; + } + + public boolean disconnectGroup (int groupId) { + Log.d(TAG, "disconnectGroup(): groupId = " + groupId); + boolean isTriggered = false; + + if(mService == null || mIsProfileReady == false) { + Log.e(TAG, "connectGroup: mService = " + mService + + " mIsProfileReady = " + mIsProfileReady); + return false; + } + + DeviceGroup mGroup = mService.getGroup(groupId); + + if (mGroup == null || mGroup.getDeviceGroupMembers().size() == 0) { + Log.e(TAG, "Requested device group is not found"); + return false; + } + + for (BluetoothDevice device: mGroup.getDeviceGroupMembers()) { + CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); + if (cachedDevice == null) { + Log.w(TAG, "CachedBluetoothDevice not found for device: " + device); + continue; + } + + if (cachedDevice.isConnected()) { + cachedDevice.disconnect(); + isTriggered = true; + } + } + + return isTriggered; + } + + public boolean forgetGroup(int groupId) { + Log.d(TAG, "forgetGroup(): groupId = " + groupId); + + if(mService == null || mIsProfileReady == false) { + Log.e(TAG, "forgetGroup: mService = " + mService + + " mIsProfileReady = " + mIsProfileReady); + return false; + } + + DeviceGroup mGroup = mService.getGroup(groupId); + if (mGroup == null || mGroup.getDeviceGroupMembers().size() == 0) { + Log.e(TAG, "Requested device group is not found"); + return false; + } + + for (BluetoothDevice device: mGroup.getDeviceGroupMembers()) { + CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); + if (cachedDevice == null) { + Log.w(TAG, "CachedBluetoothDevice not found for device: " + device); + continue; + } + cachedDevice.unpair(); + } + + return true; + } + + public boolean startGroupDiscovery (int groupId) { + Log.d(TAG, "startGroupDiscovery: groupId = " + groupId); + + if(mService == null || mIsProfileReady == false) { + Log.e(TAG, "startGroupDiscovery: mService = " + mService + + " mIsProfileReady = " + mIsProfileReady); + return false; + } + + return mService.startGroupDiscovery(groupId); + } + + public boolean stopGroupDiscovery (int groupId) { + Log.d(TAG, "stopGroupDiscovery: groupId = " + groupId); + + if(mService == null || mIsProfileReady == false) { + Log.e(TAG, "stopGroupDiscovery: mService = " + mService + + " mIsProfileReady = " + mIsProfileReady); + return false; + } + + return mService.stopGroupDiscovery(groupId); + } + + public DeviceGroup getGroup (int groupId) { + Log.d(TAG, "getGroup: groupId = " + groupId); + + if(mService == null || mIsProfileReady == false) { + Log.e(TAG, "getGroup: mService = " + mService + + " mIsProfileReady = " + mIsProfileReady); + return null; + } + + return mService.getGroup(groupId, true); + } + + public List<DeviceGroup> getDiscoveredGroups () { + Log.d(TAG, "getDiscoveredGroups"); + + if(mService == null || mIsProfileReady == false) { + Log.e(TAG, "getDiscoveredGroups: mService = " + mService + + " mIsProfileReady = " + mIsProfileReady); + return null; + } + + return mService.getDiscoveredGroups(true); + } + + public boolean isGroupDiscoveryInProgress (int groupId) { + Log.d(TAG, "isGroupDiscoveryInProgress: groupId = " + groupId); + + if (mService == null) { + Log.e(TAG, "Not connected to Profile Service. Return."); + return false; + } + + return mService.isGroupDiscoveryInProgress(groupId); + } + + public int getRemoteDeviceGroupId (BluetoothDevice device) { + Log.d(TAG, "getRemoteDeviceGroupId: device = " + device); + + if(mService == null || mIsProfileReady == false) { + Log.e(TAG, "getRemoteDeviceGroupId: mService = " + mService + + " mIsProfileReady = " + mIsProfileReady); + return BluetoothDeviceGroup.INVALID_GROUP_ID; + } + + return mService.getRemoteDeviceGroupId(device, null, true); + } + + public boolean isProfileReady() { + return mIsProfileReady; + } + + @Override + public int getProfileId() { + return BluetoothProfile.GROUP_CLIENT; + } + + public boolean accessProfileEnabled() { + return false; + } + + public boolean isAutoConnectable() { + return false; + } + + public void setPreferred(BluetoothDevice device, boolean preferred) {} + + public int getPreferred(BluetoothDevice device) { return BluetoothProfile.PRIORITY_OFF;} + + public boolean isPreferred(BluetoothDevice device) {return false;} + + public boolean connect(BluetoothDevice device) { return false;} + + public boolean disconnect(BluetoothDevice device) {return false;} + + public int getConnectionStatus(BluetoothDevice device) { + return BluetoothProfile.STATE_DISCONNECTED; + } + + @Override + public boolean isEnabled(BluetoothDevice device) { + if (mService == null) { + return false; + } + return true; + } + + @Override + public int getConnectionPolicy(BluetoothDevice device) { + return 0; + } + + @Override + public boolean setEnabled(BluetoothDevice device, boolean enabled) { + boolean isEnabled = false; + + return isEnabled; + } + + public String toString() { + return NAME; + } + + public int getOrdinal() { + return ORDINAL; + } + + public int getNameResource(BluetoothDevice device) { + return 0;//R.string.bluetooth_profile_group_client; + } + + public int getSummaryResourceForDevice(BluetoothDevice device) { + return 0; + } + + public int getDrawableResource(BluetoothClass btClass) { + return 0; + } + + protected void finalize() { + Log.d(TAG, "finalize()"); + if (mService != null) { + try { + BluetoothAdapter.getDefaultAdapter() + .closeProfileProxy(BluetoothProfile.GROUP_CLIENT, + mService); + mService = null; + }catch (Throwable t) { + Log.w(TAG, "Error cleaning up BluetoothDeviceGroup proxy Object", t); + } + } + } +} + diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/DunServerProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/DunServerProfile.java new file mode 100644 index 000000000000..e9a467812b8d --- /dev/null +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/DunServerProfile.java @@ -0,0 +1,168 @@ +/* +*Copyright (c) 2013, 2015, The Linux Foundation. All rights reserved. +* +*Redistribution and use in source and binary forms, with or without +*modification, are permitted provided that the following conditions are +*met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials provided +* with the distribution. +* * Neither the name of The Linux Foundation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +*THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +*WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +*MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +*ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +*BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +*CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +*SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +*WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +*OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +*IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +package com.android.settingslib.bluetooth; + +import android.bluetooth.BluetoothAdapter; +import android.bluetooth.BluetoothClass; +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothDun; +import android.bluetooth.BluetoothProfile; +import android.content.Context; +import android.util.Log; +import java.util.HashMap; +import java.util.List; + +import com.android.settingslib.R; + +/** + * DunServerProfile handles Bluetooth DUN server profile. + */ +public final class DunServerProfile implements LocalBluetoothProfile { + private static final String TAG = "DunServerProfile"; + private static boolean V = true; + + private BluetoothDun mService; + private boolean mIsProfileReady; + + static final String NAME = "DUN Server"; + + // Order of this profile in device profiles list + private static final int ORDINAL = 11; + + // These callbacks run on the main thread. + private final class DunServiceListener + implements BluetoothProfile.ServiceListener { + + public void onServiceConnected(int profile, BluetoothProfile proxy) { + if (V) Log.d(TAG,"Bluetooth service connected"); + mService = (BluetoothDun) proxy; + mIsProfileReady = true; + } + + public void onServiceDisconnected(int profile) { + if (V) Log.d(TAG,"Bluetooth service disconnected"); + mIsProfileReady = false; + } + } + + public boolean isProfileReady() { + return mIsProfileReady; + } + + @Override + public int getProfileId() { + return BluetoothProfile.DUN; + } + + DunServerProfile(Context context) { + BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); + adapter.getProfileProxy(context, new DunServiceListener(), + BluetoothProfile.DUN); + } + + public boolean accessProfileEnabled() { + return true; + } + + public boolean isAutoConnectable() { + return false; + } + + public boolean connect(BluetoothDevice device) { + return false; + } + + public boolean disconnect(BluetoothDevice device) { + if (mService == null) return false; + return mService.disconnect(device); + } + + public int getConnectionStatus(BluetoothDevice device) { + if (mService == null) { + return BluetoothProfile.STATE_DISCONNECTED; + } + return mService.getConnectionState(device); + } + + public boolean isEnabled(BluetoothDevice device) { + return true; + } + + public int getConnectionPolicy(BluetoothDevice device) { + return -1; + } + + public boolean setEnabled(BluetoothDevice device, boolean enabled) { + // ignore: isEnabled is always true for DUN + return true; + } + + public String toString() { + return NAME; + } + + public int getOrdinal() { + return ORDINAL; + } + + public int getNameResource(BluetoothDevice device) { + return R.string.bluetooth_profile_dun; + } + + public int getSummaryResourceForDevice(BluetoothDevice device) { + int state = getConnectionStatus(device); + switch (state) { + case BluetoothProfile.STATE_DISCONNECTED: + return R.string.bluetooth_dun_profile_summary_use_for; + + case BluetoothProfile.STATE_CONNECTED: + return R.string.bluetooth_dun_profile_summary_connected; + default: + return BluetoothUtils.getConnectionStateSummary(state); + } + } + + public int getDrawableResource(BluetoothClass btClass) { + return com.android.internal.R.drawable.ic_bt_network_pan; + } + + protected void finalize() { + if (V) Log.d(TAG, "finalize()"); + if (mService != null) { + try { + BluetoothAdapter.getDefaultAdapter().closeProfileProxy + (BluetoothProfile.DUN, mService); + mService = null; + } catch (Throwable t) { + Log.w(TAG, "Error cleaning up DUN proxy", t); + } + } + } +} diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcastAssistant.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcastAssistant.java index b0392be9d336..6ae6fc30e82d 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcastAssistant.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcastAssistant.java @@ -62,6 +62,8 @@ public class LocalBluetoothLeBroadcastAssistant implements LocalBluetoothProfile private BluetoothLeBroadcastMetadata mBluetoothLeBroadcastMetadata; private BluetoothLeBroadcastMetadata.Builder mBuilder; private boolean mIsProfileReady; + private Object mBassLock = new Object(); + private BluetoothLeBroadcastAssistant.Callback mCallback = null; private final ServiceListener mServiceListener = new ServiceListener() { @Override @@ -132,7 +134,13 @@ public class LocalBluetoothLeBroadcastAssistant implements LocalBluetoothProfile Log.d(TAG, "The BluetoothLeBroadcastAssistant is null"); return; } - mService.addSource(sink, metadata, isGroupOp); + synchronized(mBassLock) { + if (mCallback == null) { + Log.d(TAG, "addSource: Callback is not registered yet"); + return; + } + mService.addSource(sink, metadata, isGroupOp); + } } /** @@ -189,7 +197,13 @@ public class LocalBluetoothLeBroadcastAssistant implements LocalBluetoothProfile Log.d(TAG, "The BluetoothLeBroadcastAssistant is null"); return; } - mService.removeSource(sink, sourceId); + synchronized(mBassLock) { + if (mCallback == null) { + Log.d(TAG, "removeSource: Callback is not registered yet"); + return; + } + mService.removeSource(sink, sourceId); + } } public void startSearchingForSources(@NonNull List<android.bluetooth.le.ScanFilter> filters) { @@ -200,7 +214,30 @@ public class LocalBluetoothLeBroadcastAssistant implements LocalBluetoothProfile Log.d(TAG, "The BluetoothLeBroadcastAssistant is null"); return; } - mService.startSearchingForSources(filters); + synchronized(mBassLock) { + if (mCallback == null) { + Log.d(TAG, "startSearchingForSources: Callback is not registered yet"); + return; + } + mService.startSearchingForSources(filters); + } + } + + public void stopSearchingForSources() { + if (DEBUG) { + Log.d(TAG, "stopSearchingForSources()"); + } + if (mService == null) { + Log.d(TAG, "The BluetoothLeBroadcastAssistant is null"); + return; + } + synchronized(mBassLock) { + if (mCallback == null) { + Log.d(TAG, "stopSearchingForSources: Callback is not registered yet"); + return; + } + mService.stopSearchingForSources(); + } } /** @@ -246,8 +283,14 @@ public class LocalBluetoothLeBroadcastAssistant implements LocalBluetoothProfile Log.d(TAG, "The BluetoothLeBroadcast is null."); return; } - - mService.registerCallback(executor, callback); + synchronized(mBassLock) { + if (mCallback != null) { + Log.d(TAG, "Callback is already registered."); + return; + } + mCallback = callback; + mService.registerCallback(executor, mCallback); + } } public void unregisterServiceCallBack( @@ -257,7 +300,17 @@ public class LocalBluetoothLeBroadcastAssistant implements LocalBluetoothProfile return; } - mService.unregisterCallback(callback); + synchronized(mBassLock) { + if (mCallback == null) { + Log.d(TAG, "Callback is not registered yet."); + return; + } + if (mCallback != callback) { + Log.e(TAG, "Invalid callback, use registered callback"); + } + mService.unregisterCallback(mCallback); + mCallback = null; + } } public boolean isProfileReady() { diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java index 0e7b79ba297a..803ad1ce8d09 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java @@ -19,6 +19,7 @@ package com.android.settingslib.bluetooth; import android.bluetooth.BluetoothA2dp; import android.bluetooth.BluetoothA2dpSink; import android.bluetooth.BluetoothAdapter; +import android.bluetooth.BluetoothDeviceGroup; import android.bluetooth.BluetoothCsipSetCoordinator; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothHapClient; @@ -34,9 +35,11 @@ import android.bluetooth.BluetoothMapClient; import android.bluetooth.BluetoothPan; import android.bluetooth.BluetoothPbap; import android.bluetooth.BluetoothPbapClient; +import android.bluetooth.BluetoothDun; import android.bluetooth.BluetoothProfile; import android.bluetooth.BluetoothSap; import android.bluetooth.BluetoothUuid; +import android.bluetooth.BluetoothVcp; import android.bluetooth.BluetoothVolumeControl; import android.content.Context; import android.content.Intent; @@ -48,12 +51,18 @@ import androidx.annotation.VisibleForTesting; import com.android.internal.util.ArrayUtils; import com.android.internal.util.CollectionUtils; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.CopyOnWriteArrayList; +import android.os.SystemProperties; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; /** @@ -90,20 +99,23 @@ public class LocalBluetoothProfileManager { private final Context mContext; private final CachedBluetoothDeviceManager mDeviceManager; - private final BluetoothEventManager mEventManager; + protected final BluetoothEventManager mEventManager; private A2dpProfile mA2dpProfile; private A2dpSinkProfile mA2dpSinkProfile; + private DeviceGroupClientProfile mGroupClientProfile; private HeadsetProfile mHeadsetProfile; private HfpClientProfile mHfpClientProfile; private MapProfile mMapProfile; private MapClientProfile mMapClientProfile; private HidProfile mHidProfile; + private LocalBluetoothProfile mBCProfile; private HidDeviceProfile mHidDeviceProfile; private OppProfile mOppProfile; private PanProfile mPanProfile; private PbapClientProfile mPbapClientProfile; private PbapServerProfile mPbapProfile; + private DunServerProfile mDunProfile; private HearingAidProfile mHearingAidProfile; private HapClientProfile mHapClientProfile; private CsipSetCoordinatorProfile mCsipSetCoordinatorProfile; @@ -111,8 +123,12 @@ public class LocalBluetoothProfileManager { private LocalBluetoothLeBroadcast mLeAudioBroadcast; private LocalBluetoothLeBroadcastAssistant mLeAudioBroadcastAssistant; private SapProfile mSapProfile; + private Object mBroadcastProfileObject; + private VcpProfile mVcpProfile; private VolumeControlProfile mVolumeControlProfile; + private static final String BC_CONNECTION_STATE_CHANGED = + "android.bluetooth.bc.profile.action.CONNECTION_STATE_CHANGED"; /** * Mapping from profile name, e.g. "HEADSET" to profile object. */ @@ -228,6 +244,23 @@ public class LocalBluetoothProfileManager { addProfile(mPbapClientProfile, PbapClientProfile.NAME, BluetoothPbapClient.ACTION_CONNECTION_STATE_CHANGED); } + if (mBCProfile == null && supportedList.contains(BluetoothProfile.BC_PROFILE)) { + if (DEBUG) Log.d(TAG, "Adding local BC profile"); + try { + Class<?> classBCProfile = + Class.forName("com.android.settingslib.bluetooth.BCProfile"); + Constructor ctor; + ctor = classBCProfile.getDeclaredConstructor(new Class[] {Context.class, + CachedBluetoothDeviceManager.class, + LocalBluetoothProfileManager.class}); + mBCProfile = (LocalBluetoothProfile)ctor.newInstance(mContext, mDeviceManager, this); + addProfile(mBCProfile, "BCProfile", + BC_CONNECTION_STATE_CHANGED); + } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException + | InstantiationException | InvocationTargetException e) { + e.printStackTrace(); + } + } if (mSapProfile == null && supportedList.contains(BluetoothProfile.SAP)) { if (DEBUG) { Log.d(TAG, "Adding local SAP profile"); @@ -235,6 +268,42 @@ public class LocalBluetoothProfileManager { mSapProfile = new SapProfile(mContext, mDeviceManager, this); addProfile(mSapProfile, SapProfile.NAME, BluetoothSap.ACTION_CONNECTION_STATE_CHANGED); } + if (mBroadcastProfileObject == null && supportedList.contains(BluetoothProfile.BROADCAST)) { + if (DEBUG) { + Log.d(TAG, "Adding local Broadcast profile"); + } + try { + //mBroadcastProfileObject = new BroadcastProfile(mContext); + Class<?> classBroadcastProfile = + Class.forName("com.android.settingslib.bluetooth.BroadcastProfile"); + Constructor ctor; + ctor = classBroadcastProfile.getDeclaredConstructor(new Class[] {Context.class}); + mBroadcastProfileObject = ctor.newInstance(mContext); + mProfileNameMap.put("Broadcast", + (LocalBluetoothProfile) mBroadcastProfileObject); + } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException + | InstantiationException | InvocationTargetException e) { + e.printStackTrace(); + } + } + if (mDunProfile == null && supportedList.contains(BluetoothProfile.DUN)) { + if(DEBUG) Log.d(TAG, "Adding local DUN profile"); + mDunProfile = new DunServerProfile(mContext); + addProfile(mDunProfile, DunServerProfile.NAME, + BluetoothDun.ACTION_CONNECTION_STATE_CHANGED); + } + if (mGroupClientProfile == null && supportedList.contains(BluetoothProfile.GROUP_CLIENT)) { + if (DEBUG) Log.d(TAG, "Adding local GROUP CLIENT profile"); + mGroupClientProfile = new DeviceGroupClientProfile(mContext, mDeviceManager, this); + addProfile(mGroupClientProfile, mGroupClientProfile.NAME, + BluetoothDeviceGroup.ACTION_CONNECTION_STATE_CHANGED); + } + if (mVcpProfile == null && supportedList.contains(BluetoothProfile.VCP)) { + if(DEBUG) Log.d(TAG, "Adding local VCP profile"); + mVcpProfile = new VcpProfile(mContext, mDeviceManager, this); + addProfile(mVcpProfile, VcpProfile.NAME, + BluetoothVcp.ACTION_CONNECTION_STATE_CHANGED); + } if (mVolumeControlProfile == null && supportedList.contains(BluetoothProfile.VOLUME_CONTROL)) { if (DEBUG) { @@ -330,6 +399,11 @@ public class LocalBluetoothProfileManager { } public void onReceive(Context context, Intent intent, BluetoothDevice device) { + if (device == null) { + Log.w(TAG, "StateChangedHandler receives state-change for invalid device"); + return; + } + CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); if (cachedDevice == null) { Log.w(TAG, "StateChangedHandler found new device: " + device); @@ -394,10 +468,11 @@ public class LocalBluetoothProfileManager { .getGroupUuidMapByDevice(cachedDevice.getDevice()); if (groupIdMap != null) { for (Map.Entry<Integer, ParcelUuid> entry: groupIdMap.entrySet()) { - if (entry.getValue().equals(BluetoothUuid.CAP)) { + //Based on spec CAP UUID is not mandatory,also we see failures with PTS + //if (entry.getValue().equals(BluetoothUuid.CAP)) { cachedDevice.setGroupId(entry.getKey()); break; - } + //} } } } @@ -572,6 +647,35 @@ public class LocalBluetoothProfileManager { return mSapProfile; } + private boolean isBASeeker(BluetoothDevice device) { + if (device == null) { + Log.e(TAG, "isBASeeker: device is null"); + return false; + } + boolean ret = false; + Class<?> bcProfileClass = null; + String BC_PROFILE_CLASS = "com.android.settingslib.bluetooth.BCProfile"; + Method baSeeker; + try { + bcProfileClass = Class.forName(BC_PROFILE_CLASS); + baSeeker = bcProfileClass.getDeclaredMethod("isBASeeker", BluetoothDevice.class); + ret = (boolean)baSeeker.invoke(null, device); + } catch (ClassNotFoundException | NoSuchMethodException + | IllegalAccessException | InvocationTargetException e) { + e.printStackTrace(); + } + return ret; + } + + public Object getBroadcastProfile() { + return mBroadcastProfileObject; + } + + public LocalBluetoothProfile getBCProfile() { + Log.d(TAG, "getBCProfile returning: " + mBCProfile); + return mBCProfile; + } + @VisibleForTesting HidProfile getHidProfile() { return mHidProfile; @@ -582,6 +686,14 @@ public class LocalBluetoothProfileManager { return mHidDeviceProfile; } + public DeviceGroupClientProfile getDeviceGroupClientProfile() { + return mGroupClientProfile; + } + + public VcpProfile getVcpProfile() { + return mVcpProfile; + } + public CsipSetCoordinatorProfile getCsipSetCoordinatorProfile() { return mCsipSetCoordinatorProfile; } @@ -628,7 +740,8 @@ public class LocalBluetoothProfileManager { if ((ArrayUtils.contains(localUuids, BluetoothUuid.HSP_AG) && ArrayUtils.contains(uuids, BluetoothUuid.HSP)) || (ArrayUtils.contains(localUuids, BluetoothUuid.HFP_AG) - && ArrayUtils.contains(uuids, BluetoothUuid.HFP))) { + && ArrayUtils.contains(uuids, BluetoothUuid.HFP)) + || (mHeadsetProfile.getConnectionStatus(device) == BluetoothProfile.STATE_CONNECTED)) { profiles.add(mHeadsetProfile); removedProfiles.remove(mHeadsetProfile); } @@ -641,11 +754,46 @@ public class LocalBluetoothProfileManager { removedProfiles.remove(mHfpClientProfile); } - if (BluetoothUuid.containsAnyUuid(uuids, A2dpProfile.SINK_UUIDS) && mA2dpProfile != null) { + if ((mA2dpProfile != null) + && (BluetoothUuid.containsAnyUuid(uuids, A2dpProfile.SINK_UUIDS) + || (mA2dpProfile.getConnectionStatus(device) == BluetoothProfile.STATE_CONNECTED))) { profiles.add(mA2dpProfile); removedProfiles.remove(mA2dpProfile); } + if (mHeadsetProfile != null) { + if (ArrayUtils.contains(uuids, BluetoothUuid.ADVANCE_VOICE_P_UUID) + || ArrayUtils.contains(uuids, BluetoothUuid.ADVANCE_VOICE_T_UUID) + || ArrayUtils.contains(uuids, BluetoothUuid.ADVANCE_HEARINGAID_UUID) + || (mHeadsetProfile.getConnectionStatus(device) + == BluetoothProfile.STATE_CONNECTED)) { + if (!profiles.contains(mHeadsetProfile)) { + profiles.add(mHeadsetProfile); + removedProfiles.remove(mHeadsetProfile); + if (DEBUG) Log.d(TAG, "Advance Audio Voice supported"); + } else { + if (DEBUG) Log.d(TAG, "HeadsetProfile already added"); + } + } + } + + if ((mA2dpProfile != null) + && (ArrayUtils.contains(uuids, BluetoothUuid.ADVANCE_MEDIA_T_UUID) + || ArrayUtils.contains(uuids, BluetoothUuid.ADVANCE_HEARINGAID_UUID) + || ArrayUtils.contains(uuids, BluetoothUuid.ADVANCE_MEDIA_P_UUID) + || ArrayUtils.contains(uuids, BluetoothUuid.ADVANCE_MEDIA_G_UUID) + || ArrayUtils.contains(uuids, BluetoothUuid.ADVANCE_MEDIA_W_UUID) + || (mA2dpProfile.getConnectionStatus(device) + == BluetoothProfile.STATE_CONNECTED))) { + if (!profiles.contains(mA2dpProfile)) { + profiles.add(mA2dpProfile); + removedProfiles.remove(mA2dpProfile); + if (DEBUG) Log.d(TAG, "Advance Audio Media supported"); + } else { + if (DEBUG) Log.d(TAG, "A2dpProfile already added"); + } + } + if (BluetoothUuid.containsAnyUuid(uuids, A2dpSinkProfile.SRC_UUIDS) && mA2dpSinkProfile != null) { profiles.add(mA2dpSinkProfile); @@ -684,8 +832,8 @@ public class LocalBluetoothProfileManager { mMapProfile.setEnabled(device, true); } - if ((mPbapProfile != null) && - (mPbapProfile.getConnectionStatus(device) == BluetoothProfile.STATE_CONNECTED)) { + if ((mPbapProfile != null) + && BluetoothUuid.containsAnyUuid(uuids, PbapServerProfile.PBAB_CLIENT_UUIDS) ) { profiles.add(mPbapProfile); removedProfiles.remove(mPbapProfile); mPbapProfile.setEnabled(device, true); @@ -718,6 +866,11 @@ public class LocalBluetoothProfileManager { removedProfiles.remove(mSapProfile); } + if (mBCProfile != null && isBASeeker(device)) { + profiles.add(mBCProfile); + removedProfiles.remove(mBCProfile); + if(DEBUG) Log.d(TAG, "BC profile added"); + } if (mVolumeControlProfile != null && ArrayUtils.contains(uuids, BluetoothUuid.VOLUME_CONTROL)) { profiles.add(mVolumeControlProfile); diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/VcpProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/VcpProfile.java new file mode 100644 index 000000000000..1ed9f27b4e82 --- /dev/null +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/VcpProfile.java @@ -0,0 +1,213 @@ +/****************************************************************************** + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *****************************************************************************/ + +package com.android.settingslib.bluetooth; + +import static android.bluetooth.BluetoothProfile.CONNECTION_POLICY_UNKNOWN; + +import android.bluetooth.BluetoothAdapter; +import android.bluetooth.BluetoothClass; +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothVcp; +import android.bluetooth.BluetoothProfile; +import android.content.Context; +import android.util.Log; + +import com.android.settingslib.R; + +import java.util.ArrayList; +import java.util.List; + +public class VcpProfile implements LocalBluetoothProfile { + private static final String TAG = "VcpProfile"; + private static boolean V = true; + + private Context mContext; + + private BluetoothVcp mService; + private boolean mIsProfileReady; + + private final CachedBluetoothDeviceManager mDeviceManager; + + static final String NAME = "VCP"; + private final LocalBluetoothProfileManager mProfileManager; + private final BluetoothAdapter mBluetoothAdapter; + + // Order of this profile in device profiles list + private static final int ORDINAL = 1; + + // These callbacks run on the main thread. + private final class VcpServiceListener + implements BluetoothProfile.ServiceListener { + + public void onServiceConnected(int profile, BluetoothProfile proxy) { + mService = (BluetoothVcp) proxy; + Log.w(TAG, "Bluetooth service Connected"); + mIsProfileReady=true; + mProfileManager.callServiceConnectedListeners(); + } + + public void onServiceDisconnected(int profile) { + Log.w(TAG, "Bluetooth service Disconnected"); + mIsProfileReady=false; + } + } + + public boolean isProfileReady() { + return mIsProfileReady; + } + + @Override + public int getProfileId() { + return BluetoothProfile.VCP; + } + + VcpProfile(Context context, CachedBluetoothDeviceManager deviceManager, + LocalBluetoothProfileManager profileManager) { + mContext = context; + mDeviceManager = deviceManager; + mProfileManager = profileManager; + mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); + mBluetoothAdapter.getProfileProxy(context, + new VcpServiceListener(), BluetoothProfile.VCP); + } + + public boolean accessProfileEnabled() { + return false; + } + + public boolean isAutoConnectable() { + return false; + } + + public int getConnectionStatus(BluetoothDevice device) { + if (mService == null) { + return BluetoothProfile.STATE_DISCONNECTED; + } + return mService.getConnectionState(device); + } + + public int getConnectionMode(BluetoothDevice device) { + if (mService == null) { + return BluetoothProfile.STATE_DISCONNECTED; + } + return mService.getConnectionMode(device); + } + + @Override + public boolean isEnabled(BluetoothDevice device) { + return false; + } + + @Override + public int getConnectionPolicy(BluetoothDevice device) { + return CONNECTION_POLICY_UNKNOWN; + } + + @Override + public boolean setEnabled(BluetoothDevice device, boolean enabled) { + return false; + } + + public void setAbsoluteVolume(BluetoothDevice device, int volume) { + if (mService == null) { + return; + } + mService.setAbsoluteVolume(device, volume); + } + + public int getAbsoluteVolume(BluetoothDevice device) { + if (mService == null) { + return -1; + } + return mService.getAbsoluteVolume(device); + } + + public void setMute(BluetoothDevice device, boolean enableMute) { + if (mService == null) { + return; + } + mService.setMute(device, enableMute); + } + + public boolean isMute(BluetoothDevice device) { + if (mService == null) { + return false; + } + return mService.isMute(device); + } + + public boolean setActiveProfile(BluetoothDevice device, int audioType, int profile) { + if(mService != null) { + return mService.setActiveProfile(device, audioType, profile); + } + return false; + } + + public int getActiveProfile(int audioType) { + if(mService != null) { + return mService.getActiveProfile(audioType); + } + return -1; + } + + public String toString() { + return NAME; + } + + public int getOrdinal() { + return ORDINAL; + } + + public int getNameResource(BluetoothDevice device) { + return R.string.bluetooth_profile_vcp; + } + + public int getSummaryResourceForDevice(BluetoothDevice device) { + return 0; // VCP profile not displayed in UI + } + + public int getDrawableResource(BluetoothClass btClass) { + return 0; // no icon for VCP + } + + protected void finalize() { + Log.d(TAG, "finalize()"); + if (mService != null) { + try { + BluetoothAdapter.getDefaultAdapter().closeProfileProxy(BluetoothProfile.VCP, + mService); + mService = null; + }catch (Throwable t) { + Log.w(TAG, "Error cleaning up Vcp proxy", t); + } + } + } +} + diff --git a/packages/SettingsLib/src/com/android/settingslib/datetime/ZoneGetter.java b/packages/SettingsLib/src/com/android/settingslib/datetime/ZoneGetter.java index bbb1ec6a5623..07c4c8e82b57 100644..100755 --- a/packages/SettingsLib/src/com/android/settingslib/datetime/ZoneGetter.java +++ b/packages/SettingsLib/src/com/android/settingslib/datetime/ZoneGetter.java @@ -269,6 +269,11 @@ public class ZoneGetter { } private static String getCanonicalZoneId(TimeZone timeZone) { + // Canonicalize the zone ID for ICU. It will only return valid strings for zone IDs + // that match ICUs zone IDs (which are similar but not guaranteed the same as those + // in timezones.xml). timezones.xml and related files uses the IANA IDs. ICU IDs are + // stable and IANA IDs have changed over time so they have drifted. + // See http://bugs.icu-project.org/trac/ticket/13070 / http://b/36469833. final String id = timeZone.getID(); final String canonicalId = android.icu.util.TimeZone.getCanonicalID(id); if (canonicalId != null) { diff --git a/packages/SettingsLib/src/com/android/settingslib/enterprise/BiometricActionDisabledByAdminController.java b/packages/SettingsLib/src/com/android/settingslib/enterprise/BiometricActionDisabledByAdminController.java index 714accc09763..aa4b59b7d180 100644 --- a/packages/SettingsLib/src/com/android/settingslib/enterprise/BiometricActionDisabledByAdminController.java +++ b/packages/SettingsLib/src/com/android/settingslib/enterprise/BiometricActionDisabledByAdminController.java @@ -61,6 +61,7 @@ public class BiometricActionDisabledByAdminController extends BaseActionDisabled final Intent intent = new Intent(Settings.ACTION_MANAGE_SUPERVISOR_RESTRICTED_SETTING) .putExtra(Settings.EXTRA_SUPERVISOR_RESTRICTED_SETTING_KEY, Settings.SUPERVISOR_VERIFICATION_SETTING_BIOMETRICS) + .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) .setData(new Uri.Builder() .scheme("policy") .appendPath("biometric") diff --git a/packages/SettingsLib/src/com/android/settingslib/location/SettingsInjector.java b/packages/SettingsLib/src/com/android/settingslib/location/SettingsInjector.java index 6fb01797fbf4..ae24d294c08b 100644 --- a/packages/SettingsLib/src/com/android/settingslib/location/SettingsInjector.java +++ b/packages/SettingsLib/src/com/android/settingslib/location/SettingsInjector.java @@ -94,8 +94,7 @@ public class SettingsInjector { * {@link Message#what} value sent after the timeout waiting for a status message. */ private static final int WHAT_TIMEOUT = 3; - - private final Context mContext; + protected final Context mContext; /** * The settings that were injected @@ -218,7 +217,7 @@ public class SettingsInjector { * * Duplicates some code from {@link android.content.pm.RegisteredServicesCache}. */ - private static InjectedSetting parseServiceInfo(ResolveInfo service, UserHandle userHandle, + protected InjectedSetting parseServiceInfo(ResolveInfo service, UserHandle userHandle, PackageManager pm) throws XmlPullParserException, IOException { ServiceInfo si = service.serviceInfo; diff --git a/packages/SettingsLib/src/com/android/settingslib/mobile/MobileMappings.java b/packages/SettingsLib/src/com/android/settingslib/mobile/MobileMappings.java index 840c9364de32..c771fbe64cd0 100644 --- a/packages/SettingsLib/src/com/android/settingslib/mobile/MobileMappings.java +++ b/packages/SettingsLib/src/com/android/settingslib/mobile/MobileMappings.java @@ -18,6 +18,7 @@ package com.android.settingslib.mobile; import android.content.Context; import android.content.res.Resources; import android.os.PersistableBundle; +import android.os.SystemProperties; import android.telephony.Annotation; import android.telephony.CarrierConfigManager; import android.telephony.SubscriptionManager; @@ -218,6 +219,14 @@ public class MobileMappings { public boolean hspaDataDistinguishable; public boolean alwaysShowDataRatIcon = false; + public boolean showRsrpSignalLevelforLTE = false; + public boolean hideNoInternetState = false; + public boolean showVolteIcon = false; + public boolean alwaysShowNetworkTypeIcon = false; + public boolean enableRatIconEnhancement = false; + public boolean showVowifiIcon = false; + public boolean enableDdsRatIconEnhancement = false; + /** * Reads the latest configs. */ @@ -249,6 +258,24 @@ public class MobileMappings { config.hideLtePlus = b.getBoolean( CarrierConfigManager.KEY_HIDE_LTE_PLUS_DATA_ICON_BOOL); } + + config.alwaysShowNetworkTypeIcon = res.getBoolean(R.bool.config_alwaysShowTypeIcon); + config.showRsrpSignalLevelforLTE = + res.getBoolean(R.bool.config_showRsrpSignalLevelforLTE); + config.hideNoInternetState = res.getBoolean(R.bool.config_hideNoInternetState); + config.showVolteIcon = res.getBoolean(R.bool.config_display_volte); + config.showVowifiIcon = res.getBoolean(R.bool.config_display_vowifi); + if ( config.alwaysShowNetworkTypeIcon ) { + config.hideLtePlus = false; + } + + config.enableRatIconEnhancement = + SystemProperties.getBoolean("persist.sysui.rat_icon_enhancement", false); + config.enableDdsRatIconEnhancement = + SystemProperties.getBoolean("persist.sysui.dds_rat_icon_enhancement", false); + config.showVowifiIcon |= + SystemProperties.getBoolean("persist.sysui.enable_vowifi_icon", false); + return config; } diff --git a/packages/SettingsLib/src/com/android/settingslib/mobile/MobileStatusTracker.java b/packages/SettingsLib/src/com/android/settingslib/mobile/MobileStatusTracker.java index 35e3dd3379f0..c2b0b6d821be 100644 --- a/packages/SettingsLib/src/com/android/settingslib/mobile/MobileStatusTracker.java +++ b/packages/SettingsLib/src/com/android/settingslib/mobile/MobileStatusTracker.java @@ -26,6 +26,8 @@ import android.telephony.TelephonyDisplayInfo; import android.telephony.TelephonyManager; import android.util.Log; +import com.android.settingslib.Utils; + /** * Tracks the mobile signal status for the SysUI and Settings. * @@ -36,6 +38,7 @@ import android.util.Log; */ public class MobileStatusTracker { private static final String TAG = "MobileStatusTracker"; + private final TelephonyManager mPhone; private final SubscriptionInfo mSubscriptionInfo; private final Callback mCallback; diff --git a/packages/SettingsLib/src/com/android/settingslib/mobile/TelephonyIcons.java b/packages/SettingsLib/src/com/android/settingslib/mobile/TelephonyIcons.java index 094567c400a3..3ca7cd397e7c 100644 --- a/packages/SettingsLib/src/com/android/settingslib/mobile/TelephonyIcons.java +++ b/packages/SettingsLib/src/com/android/settingslib/mobile/TelephonyIcons.java @@ -45,6 +45,11 @@ public class TelephonyIcons { public static final int ICON_5G = R.drawable.ic_5g_mobiledata; public static final int ICON_5G_PLUS = R.drawable.ic_5g_plus_mobiledata; public static final int ICON_CWF = R.drawable.ic_carrier_wifi; + public static final int ICON_5G_SA = R.drawable.ic_5g_mobiledata; + public static final int ICON_5G_BASIC = R.drawable.ic_5g_mobiledata; + public static final int ICON_5G_UWB = R.drawable.ic_5g_uwb_mobiledata; + public static final int ICON_VOWIFI = R.drawable.ic_vowifi; + public static final int ICON_VOWIFI_CALLING = R.drawable.ic_vowifi_calling; public static final MobileIconGroup CARRIER_NETWORK_CHANGE = new MobileIconGroup( "CARRIER_NETWORK_CHANGE", @@ -172,6 +177,36 @@ public class TelephonyIcons { // When adding a new MobileIconGroup, check if the dataContentDescription has to be filtered // in QSCarrier#hasValidTypeContentDescription + // + public static final MobileIconGroup FIVE_G = new MobileIconGroup( + "5G", + R.string.data_connection_5g, + TelephonyIcons.ICON_5G); + + public static final MobileIconGroup FIVE_G_BASIC = new MobileIconGroup( + "5GBasic", + R.string.data_connection_5g_basic, + TelephonyIcons.ICON_5G_BASIC); + + public static final MobileIconGroup FIVE_G_UWB = new MobileIconGroup( + "5GUWB", + R.string.data_connection_5g_uwb, + TelephonyIcons.ICON_5G_UWB); + + public static final MobileIconGroup FIVE_G_SA = new MobileIconGroup( + "5GSA", + R.string.data_connection_5g_sa, + TelephonyIcons.ICON_5G_SA); + + public static final MobileIconGroup VOWIFI = new MobileIconGroup( + "VoWIFI", + 0, + TelephonyIcons.ICON_VOWIFI); + + public static final MobileIconGroup VOWIFI_CALLING = new MobileIconGroup( + "VoWIFICall", + 0, + TelephonyIcons.ICON_VOWIFI_CALLING); /** Mapping icon name(lower case) to the icon object. */ public static final Map<String, MobileIconGroup> ICON_NAME_TO_ICON; @@ -195,6 +230,7 @@ public class TelephonyIcons { ICON_NAME_TO_ICON.put("lte+", LTE_PLUS); ICON_NAME_TO_ICON.put("5g", NR_5G); ICON_NAME_TO_ICON.put("5g_plus", NR_5G_PLUS); + ICON_NAME_TO_ICON.put("5guwb", FIVE_G_UWB); ICON_NAME_TO_ICON.put("datadisable", DATA_DISABLED); ICON_NAME_TO_ICON.put("notdefaultdata", NOT_DEFAULT_DATA); } diff --git a/packages/SettingsLib/src/com/android/settingslib/net/NetworkCycleDataForUidLoader.java b/packages/SettingsLib/src/com/android/settingslib/net/NetworkCycleDataForUidLoader.java index 504390cd0b63..a832d5323e17 100644 --- a/packages/SettingsLib/src/com/android/settingslib/net/NetworkCycleDataForUidLoader.java +++ b/packages/SettingsLib/src/com/android/settingslib/net/NetworkCycleDataForUidLoader.java @@ -73,7 +73,10 @@ public class NetworkCycleDataForUidLoader extends builder.setBackgroundUsage(totalUsage - totalForeground) .setForegroundUsage(totalForeground); } - mData.add(builder.build()); + NetworkCycleDataForUid mObject = builder.build(); + if (mObject.getBackgroudUsage() >= 0) { + mData.add(mObject); + } } } catch (Exception e) { Log.e(TAG, "Exception querying network detail.", e); diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java index 303ee3c9fca2..d3b9f634a70d 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java @@ -126,6 +126,16 @@ public class AccessPoint implements Comparable<AccessPoint> { */ public static final int HIGHER_FREQ_60GHZ = 70200; + /** + * Lower bound on the 6.0 GHz (802.11ax) WLAN channels + */ + public static final int LOWER_FREQ_6GHZ = 5935; + + /** + * Upper bound on the 6.0 GHz (802.11ax) WLAN channels + */ + public static final int HIGHER_FREQ_6GHZ = 7115; + /** The key which identifies this AccessPoint grouping. */ private String mKey; @@ -224,7 +234,8 @@ public class AccessPoint implements Comparable<AccessPoint> { public static final int SECURITY_SAE = 5; public static final int SECURITY_EAP_SUITE_B = 6; public static final int SECURITY_EAP_WPA3_ENTERPRISE = 7; - public static final int SECURITY_MAX_VAL = 8; // Has to be the last + public static final int SECURITY_DPP = 8; + public static final int SECURITY_MAX_VAL = 9; // Has to be the last private static final int PSK_UNKNOWN = 0; private static final int PSK_WPA = 1; @@ -258,6 +269,9 @@ public class AccessPoint implements Comparable<AccessPoint> { private int mRssi = UNREACHABLE_RSSI; + private int mDeviceWifiStandard; + private int mWifiStandard = ScanResult.WIFI_STANDARD_LEGACY; + private WifiInfo mInfo; private NetworkInfo mNetworkInfo; AccessPointListener mAccessPointListener; @@ -358,6 +372,8 @@ public class AccessPoint implements Comparable<AccessPoint> { // Calculate required fields updateKey(); updateBestRssiInfo(); + updateDeviceWifiGenerationInfo(); + updateWifiGeneration(); } /** @@ -368,6 +384,7 @@ public class AccessPoint implements Comparable<AccessPoint> { mContext = context; loadConfig(config); updateKey(); + updateDeviceWifiGenerationInfo(); } /** @@ -386,6 +403,7 @@ public class AccessPoint implements Comparable<AccessPoint> { mPasspointConfigurationVersion = PasspointConfigurationVersion.NO_OSU_PROVISIONED; } updateKey(); + updateDeviceWifiGenerationInfo(); } /** @@ -399,6 +417,7 @@ public class AccessPoint implements Comparable<AccessPoint> { mConfig = config; mPasspointUniqueId = config.getKey(); mFqdn = config.FQDN; + updateDeviceWifiGenerationInfo(); setScanResultsPasspoint(homeScans, roamingScans); updateKey(); } @@ -410,12 +429,14 @@ public class AccessPoint implements Comparable<AccessPoint> { @NonNull Collection<ScanResult> results) { mContext = context; mOsuProvider = provider; + updateDeviceWifiGenerationInfo(); setScanResults(results); updateKey(); } AccessPoint(Context context, Collection<ScanResult> results) { mContext = context; + updateDeviceWifiGenerationInfo(); setScanResults(results); updateKey(); } @@ -1047,6 +1068,9 @@ public class AccessPoint implements Comparable<AccessPoint> { case SECURITY_WEP: return concise ? context.getString(R.string.wifi_security_short_wep) : context.getString(R.string.wifi_security_wep); + case SECURITY_DPP: + return concise ? context.getString(R.string.wifi_security_short_dpp) : + context.getString(R.string.wifi_security_dpp); case SECURITY_SAE: return concise ? context.getString(R.string.wifi_security_short_sae) : context.getString(R.string.wifi_security_sae); @@ -1461,6 +1485,7 @@ public class AccessPoint implements Comparable<AccessPoint> { mScanResults.addAll(scanResults); } updateBestRssiInfo(); + updateWifiGeneration(); int newLevel = getLevel(); // If newLevel is 0, there will be no displayed Preference since the AP is unreachable @@ -1528,6 +1553,9 @@ public class AccessPoint implements Comparable<AccessPoint> { // are still seen, we will investigate further. update(config); // Notifies the AccessPointListener of the change } + if (getWifiStandard() != info.getWifiStandard()) { + updated = true; + } if (mRssi != info.getRssi() && info.getRssi() != WifiInfo.INVALID_RSSI) { mRssi = info.getRssi(); updated = true; @@ -1541,6 +1569,7 @@ public class AccessPoint implements Comparable<AccessPoint> { updated = true; mInfo = null; mNetworkInfo = null; + updateWifiGeneration(); } if (updated && mAccessPointListener != null) { ThreadUtils.postOnMainThread(() -> { @@ -1759,6 +1788,7 @@ public class AccessPoint implements Comparable<AccessPoint> { final boolean isEap = result.capabilities.contains("EAP"); final boolean isOwe = result.capabilities.contains("OWE"); final boolean isOweTransition = result.capabilities.contains("OWE_TRANSITION"); + final boolean isDpp = result.capabilities.contains("DPP"); if (isSae && isPsk) { final WifiManager wifiManager = (WifiManager) @@ -1771,7 +1801,9 @@ public class AccessPoint implements Comparable<AccessPoint> { return wifiManager.isEnhancedOpenSupported() ? SECURITY_OWE : SECURITY_NONE; } - if (isWep) { + if (isDpp) { + return SECURITY_DPP; + } else if (isWep) { return SECURITY_WEP; } else if (isSae) { return SECURITY_SAE; @@ -1801,6 +1833,9 @@ public class AccessPoint implements Comparable<AccessPoint> { config.allowedKeyManagement.get(KeyMgmt.IEEE8021X)) { return SECURITY_EAP; } + if (config.allowedKeyManagement.get(KeyMgmt.DPP)) { + return SECURITY_DPP; + } if (config.allowedKeyManagement.get(KeyMgmt.OWE)) { return SECURITY_OWE; } @@ -1824,6 +1859,8 @@ public class AccessPoint implements Comparable<AccessPoint> { return "PSK"; } else if (security == SECURITY_EAP) { return "EAP"; + } else if (security == SECURITY_DPP) { + return "DPP"; } else if (security == SECURITY_SAE) { return "SAE"; } else if (security == SECURITY_EAP_SUITE_B) { @@ -2063,4 +2100,46 @@ public class AccessPoint implements Comparable<AccessPoint> { } return false; } + + private void updateDeviceWifiGenerationInfo() { + final WifiManager wifiManager = getWifiManager(); + + if (wifiManager.isWifiStandardSupported(ScanResult.WIFI_STANDARD_11AX)) + mDeviceWifiStandard = ScanResult.WIFI_STANDARD_11AX; + else if (wifiManager.isWifiStandardSupported(ScanResult.WIFI_STANDARD_11AC)) + mDeviceWifiStandard = ScanResult.WIFI_STANDARD_11AC; + else if (wifiManager.isWifiStandardSupported(ScanResult.WIFI_STANDARD_11N)) + mDeviceWifiStandard = ScanResult.WIFI_STANDARD_11N; + else + mDeviceWifiStandard = ScanResult.WIFI_STANDARD_LEGACY; + } + + /** + * Updates {@link #mWifiStandard}. + * + * <p>If the given connection is active, the existing values are valid. + * If the given AccessPoint is not connected, a value will be calculated from previous scan + * results, based on minimum capability for all BSSIDs and capability of device. + */ + private void updateWifiGeneration() { + int currResultWifiStandard; + int minConnectionCapability = mDeviceWifiStandard; + + for (ScanResult result : mScanResults) { + currResultWifiStandard = result.getWifiStandard(); + + if (currResultWifiStandard < minConnectionCapability) { + minConnectionCapability = currResultWifiStandard; + } + } + + mWifiStandard = minConnectionCapability; + } + + public int getWifiStandard() { + if (this.isActive() && mInfo != null) + return mInfo.getWifiStandard(); + + return mWifiStandard; + } } diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java index fd986e5d13fd..341b1c1eee9f 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java @@ -74,6 +74,7 @@ public class AccessPointPreference extends Preference { private AccessPoint mAccessPoint; private Drawable mBadge; private int mLevel; + private int mWifiStandard; private CharSequence mContentDescription; private int mDefaultIconResId; private int mWifiSpeed = Speed.NONE; @@ -174,14 +175,14 @@ public class AccessPointPreference extends Preference { notifyChanged(); } - protected void updateIcon(int level, Context context) { + protected void updateIcon(int level, int standard, Context context) { if (level == -1) { safeSetDefaultIcon(); return; } TronUtils.logWifiSettingsSpeed(context, mWifiSpeed); - Drawable drawable = mIconInjector.getIcon(level); + Drawable drawable = mIconInjector.getIcon(level, standard); if (!mForSavedNetworks && drawable != null) { drawable.setTintList(Utils.getColorAttr(context, android.R.attr.colorControlNormal)); setIcon(drawable); @@ -236,17 +237,34 @@ public class AccessPointPreference extends Preference { final Context context = getContext(); int level = mAccessPoint.getLevel(); int wifiSpeed = mAccessPoint.getSpeed(); - if (level != mLevel || wifiSpeed != mWifiSpeed) { + int wifiStandard = mAccessPoint.getWifiStandard(); + + if (level != mLevel || + wifiSpeed != mWifiSpeed || + wifiStandard != mWifiStandard) { mLevel = level; mWifiSpeed = wifiSpeed; - updateIcon(mLevel, context); + mWifiStandard = wifiStandard; + updateIcon(mLevel, mWifiStandard, context); notifyChanged(); } updateBadge(context); - setSummary(mForSavedNetworks ? mAccessPoint.getSavedNetworkSummary() - : mAccessPoint.getSettingsSummary()); + String summary = mForSavedNetworks ? mAccessPoint.getSavedNetworkSummary() + : mAccessPoint.getSettingsSummary(); + + if (mAccessPoint.isPskSaeTransitionMode()) { + summary = "WPA3(SAE Transition Mode) " + summary; + } else if (mAccessPoint.isOweTransitionMode()) { + summary = "WPA3(OWE Transition Mode) " + summary; + } else if (mAccessPoint.getSecurity() == AccessPoint.SECURITY_SAE) { + summary = "WPA3(SAE) " + summary; + } else if (mAccessPoint.getSecurity() == AccessPoint.SECURITY_OWE) { + summary = "WPA3(OWE) " + summary; + } + + setSummary(summary); mContentDescription = buildContentDescription(getContext(), this /* pref */, mAccessPoint); } @@ -333,5 +351,9 @@ public class AccessPointPreference extends Preference { public Drawable getIcon(int level) { return mContext.getDrawable(Utils.getWifiIconResource(level)); } + + public Drawable getIcon(int level, int standard) { + return mContext.getDrawable(Utils.getWifiIconResource(level, standard)); + } } } diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiEntryPreference.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiEntryPreference.java new file mode 100644 index 000000000000..e6f5ceaa18cb --- /dev/null +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiEntryPreference.java @@ -0,0 +1,331 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.settingslib.wifi; + +import android.annotation.Nullable; +import android.content.Context; +import android.content.res.Resources; +import android.content.res.TypedArray; +import android.graphics.drawable.Drawable; +import android.graphics.drawable.StateListDrawable; +import android.text.TextUtils; +import android.view.View; +import android.widget.ImageButton; +import android.widget.ImageView; + +import androidx.annotation.DrawableRes; +import androidx.annotation.NonNull; +import androidx.annotation.VisibleForTesting; +import androidx.preference.Preference; +import androidx.preference.PreferenceViewHolder; + +import com.android.settingslib.R; +import com.android.settingslib.Utils; +import com.android.wifitrackerlib.WifiEntry; + +/** + * Preference to display a WifiEntry in a wifi picker. + */ +public class WifiEntryPreference extends Preference implements WifiEntry.WifiEntryCallback, + View.OnClickListener { + + private static final int[] STATE_SECURED = { + R.attr.state_encrypted + }; + + private static final int[] FRICTION_ATTRS = { + R.attr.wifi_friction + }; + + // These values must be kept within [WifiEntry.WIFI_LEVEL_MIN, WifiEntry.WIFI_LEVEL_MAX] + private static final int[] WIFI_CONNECTION_STRENGTH = { + R.string.accessibility_no_wifi, + R.string.accessibility_wifi_one_bar, + R.string.accessibility_wifi_two_bars, + R.string.accessibility_wifi_three_bars, + R.string.accessibility_wifi_signal_full + }; + + // StateListDrawable to display secured lock / metered "$" icon + @Nullable private final StateListDrawable mFrictionSld; + private final IconInjector mIconInjector; + private WifiEntry mWifiEntry; + private int mLevel = -1; + private int mWifiStandard; + private boolean mShowX; // Shows the Wi-Fi signl icon of Pie+x when it's true. + private CharSequence mContentDescription; + private OnButtonClickListener mOnButtonClickListener; + + public WifiEntryPreference(@NonNull Context context, @NonNull WifiEntry wifiEntry) { + this(context, wifiEntry, new IconInjector(context)); + } + + @VisibleForTesting + WifiEntryPreference(@NonNull Context context, @NonNull WifiEntry wifiEntry, + @NonNull IconInjector iconInjector) { + super(context); + + setLayoutResource(R.layout.preference_access_point); + setWidgetLayoutResource(R.layout.access_point_friction_widget); + mFrictionSld = getFrictionStateListDrawable(); + mWifiEntry = wifiEntry; + mWifiEntry.setListener(this); + mIconInjector = iconInjector; + refresh(); + } + + public WifiEntry getWifiEntry() { + return mWifiEntry; + } + + @Override + public void onBindViewHolder(final PreferenceViewHolder view) { + super.onBindViewHolder(view); + final Drawable drawable = getIcon(); + if (drawable != null) { + drawable.setLevel(mLevel); + } + + view.itemView.setContentDescription(mContentDescription); + + // Turn off divider + view.findViewById(R.id.two_target_divider).setVisibility(View.INVISIBLE); + + // Enable the icon button when the help string in this WifiEntry is not null. + final ImageButton imageButton = (ImageButton) view.findViewById(R.id.icon_button); + final ImageView frictionImageView = (ImageView) view.findViewById( + R.id.friction_icon); + if (mWifiEntry.getHelpUriString() != null + && mWifiEntry.getConnectedState() == WifiEntry.CONNECTED_STATE_DISCONNECTED) { + final Drawable drawablehelp = getDrawable(R.drawable.ic_help); + drawablehelp.setTintList( + Utils.getColorAttr(getContext(), android.R.attr.colorControlNormal)); + ((ImageView) imageButton).setImageDrawable(drawablehelp); + imageButton.setVisibility(View.VISIBLE); + imageButton.setOnClickListener(this); + imageButton.setContentDescription( + getContext().getText(R.string.help_label)); + + if (frictionImageView != null) { + frictionImageView.setVisibility(View.GONE); + } + } else { + imageButton.setVisibility(View.GONE); + + if (frictionImageView != null) { + frictionImageView.setVisibility(View.VISIBLE); + bindFrictionImage(frictionImageView); + } + } + } + + /** + * Updates the title and summary; may indirectly call notifyChanged(). + */ + public void refresh() { + setTitle(mWifiEntry.getTitle()); + final int level = mWifiEntry.getLevel(); + final int standard = mWifiEntry.getWifiStandard(); + final boolean showX = mWifiEntry.shouldShowXLevelIcon(); + + if (level != mLevel || showX != mShowX || standard != mWifiStandard) { + mLevel = level; + mWifiStandard = standard; + mShowX = showX; + updateIcon(mShowX, mLevel, mWifiStandard); + notifyChanged(); + } + + String summary = mWifiEntry.getSummary(false /* concise */); + + if (mWifiEntry.isPskSaeTransitionMode()) { + summary = "WPA3(SAE Transition Mode) " + summary; + } else if (mWifiEntry.isOweTransitionMode()) { + summary = "WPA3(OWE Transition Mode) " + summary; + } else if (mWifiEntry.getSecurity() == WifiEntry.SECURITY_SAE) { + summary = "WPA3(SAE) " + summary; + } else if (mWifiEntry.getSecurity() == WifiEntry.SECURITY_OWE) { + summary = "WPA3(OWE) " + summary; + } + + setSummary(summary); + + mContentDescription = buildContentDescription(); + } + + /** + * Indicates the state of the WifiEntry has changed and clients may retrieve updates through + * the WifiEntry getter methods. + */ + public void onUpdated() { + // TODO(b/70983952): Fill this method in + refresh(); + } + + /** + * Result of the connect request indicated by the WifiEntry.CONNECT_STATUS constants. + */ + public void onConnectResult(int status) { + // TODO(b/70983952): Fill this method in + } + + /** + * Result of the disconnect request indicated by the WifiEntry.DISCONNECT_STATUS constants. + */ + public void onDisconnectResult(int status) { + // TODO(b/70983952): Fill this method in + } + + /** + * Result of the forget request indicated by the WifiEntry.FORGET_STATUS constants. + */ + public void onForgetResult(int status) { + // TODO(b/70983952): Fill this method in + } + + /** + * Result of the sign-in request indecated by the WifiEntry.SIGNIN_STATUS constants + */ + public void onSignInResult(int status) { + // TODO(b/70983952): Fill this method in + } + + protected int getIconColorAttr() { + final boolean accent = (mWifiEntry.hasInternetAccess() + && mWifiEntry.getConnectedState() == WifiEntry.CONNECTED_STATE_CONNECTED); + return accent ? android.R.attr.colorAccent : android.R.attr.colorControlNormal; + } + + private void updateIcon(boolean showX, int level, int standard) { + if (level == -1) { + setIcon(null); + return; + } + + final Drawable drawable = mIconInjector.getIcon(showX, level, standard); + if (drawable != null) { + drawable.setTint(Utils.getColorAttrDefaultColor(getContext(), getIconColorAttr())); + setIcon(drawable); + } else { + setIcon(null); + } + } + + @Nullable + private StateListDrawable getFrictionStateListDrawable() { + TypedArray frictionSld; + try { + frictionSld = getContext().getTheme().obtainStyledAttributes(FRICTION_ATTRS); + } catch (Resources.NotFoundException e) { + // Fallback for platforms that do not need friction icon resources. + frictionSld = null; + } + return frictionSld != null ? (StateListDrawable) frictionSld.getDrawable(0) : null; + } + + /** + * Binds the friction icon drawable using a StateListDrawable. + * + * <p>Friction icons will be rebound when notifyChange() is called, and therefore + * do not need to be managed in refresh()</p>. + */ + private void bindFrictionImage(ImageView frictionImageView) { + if (frictionImageView == null || mFrictionSld == null) { + return; + } + if ((mWifiEntry.getSecurity() != WifiEntry.SECURITY_NONE) + && (mWifiEntry.getSecurity() != WifiEntry.SECURITY_OWE)) { + mFrictionSld.setState(STATE_SECURED); + } + frictionImageView.setImageDrawable(mFrictionSld.getCurrent()); + } + + /** + * Helper method to generate content description string. + */ + @VisibleForTesting + CharSequence buildContentDescription() { + final Context context = getContext(); + + CharSequence contentDescription = getTitle(); + final CharSequence summary = getSummary(); + if (!TextUtils.isEmpty(summary)) { + contentDescription = TextUtils.concat(contentDescription, ",", summary); + } + int level = mWifiEntry.getLevel(); + if (level >= 0 && level < WIFI_CONNECTION_STRENGTH.length) { + contentDescription = TextUtils.concat(contentDescription, ",", + context.getString(WIFI_CONNECTION_STRENGTH[level])); + } + return TextUtils.concat(contentDescription, ",", + mWifiEntry.getSecurity() == WifiEntry.SECURITY_NONE + ? context.getString(R.string.accessibility_wifi_security_type_none) + : context.getString(R.string.accessibility_wifi_security_type_secured)); + } + + + static class IconInjector { + private final Context mContext; + + IconInjector(Context context) { + mContext = context; + } + + public Drawable getIcon(boolean showX, int level, int standard) { + return mContext.getDrawable(WifiUtils.getInternetIconResource(level, showX, standard)); + } + } + + /** + * Set listeners, who want to listen the button client event. + */ + public void setOnButtonClickListener(OnButtonClickListener listener) { + mOnButtonClickListener = listener; + notifyChanged(); + } + + @Override + public void onClick(View view) { + if (view.getId() == R.id.icon_button) { + if (mOnButtonClickListener != null) { + mOnButtonClickListener.onButtonClick(this); + } + } + } + + /** + * Callback to inform the caller that the icon button is clicked. + */ + public interface OnButtonClickListener { + + /** + * Register to listen the button click event. + */ + void onButtonClick(WifiEntryPreference preference); + } + + private Drawable getDrawable(@DrawableRes int iconResId) { + Drawable buttonIcon = null; + + try { + buttonIcon = getContext().getDrawable(iconResId); + } catch (Resources.NotFoundException exception) { + // Do nothing + } + return buttonIcon; + } + +} diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiStatusTracker.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiStatusTracker.java index c45d77471932..9ffc4119fed5 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiStatusTracker.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiStatusTracker.java @@ -169,6 +169,7 @@ public class WifiStatusTracker { public int rssi; public int level; public String statusLabel; + public int wifiStandard; public WifiStatusTracker(Context context, WifiManager wifiManager, NetworkScoreManager networkScoreManager, ConnectivityManager connectivityManager, @@ -273,6 +274,9 @@ public class WifiStatusTracker { } else { ssid = getValidSsid(mWifiInfo); } + updateRssi(mWifiInfo.getRssi()); + maybeRequestNetworkScore(); + wifiStandard = mWifiInfo.getWifiStandard(); isCarrierMerged = mWifiInfo.isCarrierMerged(); subId = mWifiInfo.getSubscriptionId(); updateRssi(mWifiInfo.getRssi()); diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java index 426ea42eb2c5..6c97b316cc4e 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java @@ -880,6 +880,7 @@ public class WifiTracker implements LifecycleObserver, OnStart, OnStop, OnDestro @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); + sVerboseLogging = mWifiManager.isVerboseLoggingEnabled(); if (WifiManager.WIFI_STATE_CHANGED_ACTION.equals(action)) { updateWifiState( diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java index afab0469d114..d52ab4c98e01 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java @@ -12,6 +12,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear */ package com.android.settingslib.wifi; @@ -103,6 +107,38 @@ public class WifiUtils { R.drawable.ic_no_internet_wifi_signal_4 }; + static final int[] WIFI_4_PIE = { + com.android.internal.R.drawable.ic_wifi_4_signal_0, + com.android.internal.R.drawable.ic_wifi_4_signal_1, + com.android.internal.R.drawable.ic_wifi_4_signal_2, + com.android.internal.R.drawable.ic_wifi_4_signal_3, + com.android.internal.R.drawable.ic_wifi_4_signal_4 + }; + + static final int[] WIFI_5_PIE = { + com.android.internal.R.drawable.ic_wifi_5_signal_0, + com.android.internal.R.drawable.ic_wifi_5_signal_1, + com.android.internal.R.drawable.ic_wifi_5_signal_2, + com.android.internal.R.drawable.ic_wifi_5_signal_3, + com.android.internal.R.drawable.ic_wifi_5_signal_4 + }; + + static final int[] WIFI_6_PIE = { + com.android.internal.R.drawable.ic_wifi_6_signal_0, + com.android.internal.R.drawable.ic_wifi_6_signal_1, + com.android.internal.R.drawable.ic_wifi_6_signal_2, + com.android.internal.R.drawable.ic_wifi_6_signal_3, + com.android.internal.R.drawable.ic_wifi_6_signal_4 + }; + + static final int[] WIFI_7_PIE = { + com.android.internal.R.drawable.ic_wifi_7_signal_0, + com.android.internal.R.drawable.ic_wifi_7_signal_1, + com.android.internal.R.drawable.ic_wifi_7_signal_2, + com.android.internal.R.drawable.ic_wifi_7_signal_3, + com.android.internal.R.drawable.ic_wifi_7_signal_4 + }; + public static String buildLoggingSummary(AccessPoint accessPoint, WifiConfiguration config) { final StringBuilder summary = new StringBuilder(); final WifiInfo info = accessPoint.getInfo(); @@ -161,6 +197,7 @@ public class WifiUtils { StringBuilder scans24GHz = new StringBuilder(); StringBuilder scans5GHz = new StringBuilder(); StringBuilder scans60GHz = new StringBuilder(); + StringBuilder scans6GHz = new StringBuilder(); String bssid = null; if (accessPoint.isActive() && info != null) { @@ -181,10 +218,12 @@ public class WifiUtils { visibility.append(String.format("rx=%.1f", info.getSuccessfulRxPacketsPerSecond())); } + int maxRssi6 = INVALID_RSSI; int maxRssi5 = INVALID_RSSI; int maxRssi24 = INVALID_RSSI; int maxRssi60 = INVALID_RSSI; final int maxDisplayedScans = 4; + int num6 = 0; // number of scanned BSSID on 6GHz band int num5 = 0; // number of scanned BSSID on 5GHz band int num24 = 0; // number of scanned BSSID on 2.4Ghz band int num60 = 0; // number of scanned BSSID on 60Ghz band @@ -196,7 +235,19 @@ public class WifiUtils { if (result == null) { continue; } - if (result.frequency >= AccessPoint.LOWER_FREQ_5GHZ + if (result.frequency >= AccessPoint.LOWER_FREQ_6GHZ + && result.frequency <= AccessPoint.HIGHER_FREQ_6GHZ) { + num6++; + + if (result.level > maxRssi6) { + maxRssi6 = result.level; + } + if (num6 <= maxDisplayedScans) { + scans6GHz.append( + verboseScanResultSummary(accessPoint, result, bssid, + nowMs)); + } + } else if (result.frequency >= AccessPoint.LOWER_FREQ_5GHZ && result.frequency <= AccessPoint.HIGHER_FREQ_5GHZ) { // Strictly speaking: [4915, 5825] num5++; @@ -261,6 +312,14 @@ public class WifiUtils { } visibility.append(scans60GHz.toString()); } + visibility.append(";"); + if (num6 > 0) { + visibility.append("(").append(num6).append(")"); + if (num6 > maxDisplayedScans) { + visibility.append("max=").append(maxRssi6).append(","); + } + visibility.append(scans6GHz.toString()); + } if (numBlockListed > 0) { visibility.append("!").append(numBlockListed); } @@ -319,6 +378,17 @@ public class WifiUtils { * @param noInternet True if a connected Wi-Fi network cannot access the Internet */ public static int getInternetIconResource(int level, boolean noInternet) { + return getInternetIconResource(level, noInternet, 0 /* standard */); + } + + /** + * Returns the Internet icon resource for a given RSSI level. + * + * @param level The number of bars to show (0-4) + * @param noInternet True if a connected Wi-Fi network cannot access the Internet + * @throws IllegalArgumentException if an invalid RSSI level is given. + */ + public static int getInternetIconResource(int level, boolean noInternet, int standard) { int wifiLevel = level; if (wifiLevel < 0) { Log.e(TAG, "Wi-Fi level is out of range! level:" + level); @@ -327,7 +397,19 @@ public class WifiUtils { Log.e(TAG, "Wi-Fi level is out of range! level:" + level); wifiLevel = WIFI_PIE.length - 1; } - return noInternet ? NO_INTERNET_WIFI_PIE[wifiLevel] : WIFI_PIE[wifiLevel]; + if (noInternet) return NO_INTERNET_WIFI_PIE[wifiLevel]; + switch (standard) { + case ScanResult.WIFI_STANDARD_11N: + return WIFI_4_PIE[wifiLevel]; + case ScanResult.WIFI_STANDARD_11AC: + return WIFI_5_PIE[wifiLevel]; + case ScanResult.WIFI_STANDARD_11AX: + return WIFI_6_PIE[wifiLevel]; + case ScanResult.WIFI_STANDARD_11BE: + return WIFI_7_PIE[wifiLevel]; + default: + return WIFI_PIE[wifiLevel]; + } } /** diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/A2dpProfileTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/A2dpProfileTest.java index a252f522261c..c9a3c23e89df 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/A2dpProfileTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/A2dpProfileTest.java @@ -152,7 +152,7 @@ public class A2dpProfileTest { private static String KNOWN_CODEC_LABEL = "Use high quality audio: %1$s"; private static String UNKNOWN_CODEC_LABEL = "Use high quality audio"; private static String[] CODEC_NAMES = - new String[]{"Default", "SBC", "AAC", "aptX", "aptX HD", "LDAC"}; + new String[] { "Default", "SBC", "AAC", "aptX", "aptX HD", "LDAC", "aptX Adaptive", "aptX TWS+" }; /** * Helper for setting up several tests of getHighQualityAudioOptionLabel diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/PowerAllowlistBackendTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/PowerAllowlistBackendTest.java index b656253ba147..982e92a81ea5 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/PowerAllowlistBackendTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/PowerAllowlistBackendTest.java @@ -69,6 +69,7 @@ public class PowerAllowlistBackendTest { MockitoAnnotations.initMocks(this); mContext = spy(RuntimeEnvironment.application); doReturn(mContext).when(mContext).getApplicationContext(); + doReturn(mDevicePolicyManager).when(mContext).getSystemService(DevicePolicyManager.class); doReturn(new String[] {}).when(mDeviceIdleService).getFullPowerWhitelist(); doReturn(new String[] {}).when(mDeviceIdleService).getSystemPowerWhitelist(); doReturn(new String[] {}).when(mDeviceIdleService).getSystemPowerWhitelistExceptIdle(); diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml index a93cd62e6301..5397434b0850 100644 --- a/packages/SettingsProvider/res/values/defaults.xml +++ b/packages/SettingsProvider/res/values/defaults.xml @@ -138,6 +138,8 @@ <bool name="def_dtmf_tones_enabled">true</bool> <!-- Default for UI touch sounds enabled --> <bool name="def_sound_effects_enabled">true</bool> + <!-- Default for connected mo call tones enabled --> + <bool name="def_call_connected_tones_enabled">false</bool> <!-- Development settings --> <bool name="def_stay_on_while_plugged_in">false</bool> @@ -228,6 +230,9 @@ <!-- Default for Settings.Global.APPLY_RAMPING_RINGER --> <bool name="def_apply_ramping_ringer">false</bool> + <!-- Default for Settings.Global.NTP_SERVER_2's property name --> + <string name="def_ntp_server_2" translatable="false">persist.vendor.ntp.svr_2</string> + <!-- Default for Settings.Secure.CHARGING_VIBRATION_ENABLED --> <bool name="def_charging_vibration_enabled">true</bool> @@ -270,6 +275,9 @@ <!-- Default for Settings.Secure.LOCK_SCREEN_SHOW_QR_CODE_SCANNER --> <bool name="def_lock_screen_show_qr_code_scanner">true</bool> + <!-- Default for Settings.System.TIME_12_24 --> + <string name="def_time_format" translatable="false">12</string> + <!-- ========================================== --> <!-- Default values for wear specific settings. --> diff --git a/packages/SettingsProvider/src/android/provider/settings/validators/SystemSettingsValidators.java b/packages/SettingsProvider/src/android/provider/settings/validators/SystemSettingsValidators.java index 753c860bd5d6..a12b3339c936 100644 --- a/packages/SettingsProvider/src/android/provider/settings/validators/SystemSettingsValidators.java +++ b/packages/SettingsProvider/src/android/provider/settings/validators/SystemSettingsValidators.java @@ -219,6 +219,7 @@ public class SystemSettingsValidators { VALIDATORS.put(System.WIFI_STATIC_DNS2, LENIENT_IP_ADDRESS_VALIDATOR); VALIDATORS.put(System.SHOW_BATTERY_PERCENT, BOOLEAN_VALIDATOR); VALIDATORS.put(System.NOTIFICATION_LIGHT_PULSE, BOOLEAN_VALIDATOR); + VALIDATORS.put(System.CALL_CONNECTED_TONE_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(System.WEAR_ACCESSIBILITY_GESTURE_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(System.CLOCKWORK_BLUETOOTH_SETTINGS_PREF, BOOLEAN_VALIDATOR); VALIDATORS.put(System.UNREAD_NOTIFICATION_DOT_INDICATOR, BOOLEAN_VALIDATOR); diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index ed5654d4f259..faa1d52ea926 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -2239,6 +2239,9 @@ class DatabaseHelper extends SQLiteOpenHelper { // Set default tty mode loadSetting(stmt, Settings.System.TTY_MODE, 0); + // Set default time format + loadStringSetting(stmt, Settings.System.TIME_12_24, R.string.def_time_format); + loadIntegerSetting(stmt, Settings.System.SCREEN_BRIGHTNESS, R.integer.def_screen_brightness); @@ -2279,6 +2282,8 @@ class DatabaseHelper extends SQLiteOpenHelper { R.bool.def_sound_effects_enabled); loadBooleanSetting(stmt, Settings.System.HAPTIC_FEEDBACK_ENABLED, R.bool.def_haptic_feedback); + loadBooleanSetting(stmt, Settings.System.CALL_CONNECTED_TONE_ENABLED, + R.bool.def_call_connected_tones_enabled); loadIntegerSetting(stmt, Settings.System.LOCKSCREEN_SOUNDS_ENABLED, R.integer.def_lockscreen_sounds_enabled); @@ -2582,6 +2587,8 @@ class DatabaseHelper extends SQLiteOpenHelper { defaultLidBehavior = 0; } loadSetting(stmt, Settings.Global.LID_BEHAVIOR, defaultLidBehavior); + loadStringSetting(stmt, Settings.Global.NTP_SERVER_2, + R.string.def_ntp_server_2); /* * IMPORTANT: Do not add any more upgrade steps here as the global, diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java index a83bfda41f3d..7eaabd8a9d99 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java @@ -1126,6 +1126,9 @@ class SettingsProtoDumpUtil { dumpSetting(s, p, Settings.Global.NTP_TIMEOUT, GlobalSettingsProto.Ntp.TIMEOUT_MS); + dumpSetting(s, p, + Settings.Global.NTP_SERVER_2, + GlobalSettingsProto.Ntp.SERVER_2); p.end(ntpToken); final long uasbToken = p.start(GlobalSettingsProto.USER_ABSENT_SMALL_BATTERY); diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java index 765edd72cfbd..2bb72eacae14 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java @@ -4685,6 +4685,16 @@ public class SettingsProvider extends ContentProvider { null, true, SettingsState.SYSTEM_PACKAGE_NAME); } + // Update the settings for NTP_SERVER_2 + final Setting currentSetting = globalSettings.getSettingLocked( + Global.NTP_SERVER_2); + if (currentSetting.isNull()) { + globalSettings.insertSettingLocked( + Global.NTP_SERVER_2, + getContext().getResources().getString( + R.string.def_ntp_server_2), + null, true, SettingsState.SYSTEM_PACKAGE_NAME); + } currentVersion = 170; } diff --git a/packages/SoundPicker/src/com/android/soundpicker/RingtonePickerActivity.java b/packages/SoundPicker/src/com/android/soundpicker/RingtonePickerActivity.java index 56b940c534fb..a0ee82ba3877 100644 --- a/packages/SoundPicker/src/com/android/soundpicker/RingtonePickerActivity.java +++ b/packages/SoundPicker/src/com/android/soundpicker/RingtonePickerActivity.java @@ -574,6 +574,10 @@ public final class RingtonePickerActivity extends AlertActivity implements protected void onStop() { super.onStop(); + // must remove mHandler 's callback, or will result in one random issue: + // media playback occurs even though this activity has been destroyed. + mHandler.removeCallbacks(this); + if (!isChangingConfigurations()) { stopAnyPlayingRingtone(); } else { diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp index 7df3dfb89d96..ea585a2eb46a 100644 --- a/packages/SystemUI/Android.bp +++ b/packages/SystemUI/Android.bp @@ -132,9 +132,6 @@ android_library { android_library { name: "SystemUI-core", - defaults: [ - "SystemUI_compose_defaults", - ], srcs: [ "src/**/*.kt", "src/**/*.java", @@ -199,6 +196,14 @@ android_library { "motion_tool_lib", ], manifest: "AndroidManifest.xml", + defaults: [ + "SystemUI_compose_defaults", + ], + libs: [ + "android.car", + "ims-common", + "extphonelib", + ], javacflags: ["-Adagger.fastInit=enabled"], kotlincflags: ["-Xjvm-default=enable"], @@ -392,6 +397,8 @@ android_library { "android.test.runner", "android.test.base", "android.test.mock", + "ims-common", + "extphonelib", ], kotlincflags: ["-Xjvm-default=enable"], aaptflags: [ @@ -515,6 +522,13 @@ android_app { certificate: "platform", privileged: true, + libs: [ + "android.car", + "ims-common", + "extphonelib", + ], + enforce_uses_libs: false, + kotlincflags: ["-Xjvm-default=enable"], dxflags: ["--multi-dex"], diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml index 5c036988eb30..6ed3fc774252 100644 --- a/packages/SystemUI/AndroidManifest.xml +++ b/packages/SystemUI/AndroidManifest.xml @@ -319,7 +319,10 @@ <uses-permission android:name="android.permission.ADD_TRUSTED_DISPLAY" /> <!-- Permission for Smartspace. --> - <uses-permission android:name="android.permission.MANAGE_SMARTSPACE" /> + <uses-permission android:name="android.permission.MANAGE_SMARTSPACE"/> + + <!-- Permission to access ExtTelephony bound service --> + <uses-permission android:name="com.qualcomm.qti.permission.USE_EXT_TELEPHONY_SERVICE" /> <uses-permission android:name="android.permission.READ_PEOPLE_DATA" /> @@ -1095,6 +1098,7 @@ <action android:name="com.android.systemui.action.DISMISS_MEDIA_OUTPUT_DIALOG" /> </intent-filter> </receiver> + <uses-library android:name="com.qti.extphone.extphonelib"/> <receiver android:name=".volume.VolumePanelDialogReceiver" android:exported="true"> diff --git a/packages/SystemUI/plugin/src/com/android/systemui/plugins/DarkIconDispatcher.java b/packages/SystemUI/plugin/src/com/android/systemui/plugins/DarkIconDispatcher.java index b33c5449c1eb..7240dd62c740 100644 --- a/packages/SystemUI/plugin/src/com/android/systemui/plugins/DarkIconDispatcher.java +++ b/packages/SystemUI/plugin/src/com/android/systemui/plugins/DarkIconDispatcher.java @@ -90,6 +90,14 @@ public interface DarkIconDispatcher { * @return true if more than half of the view area are in any of the given * areas, false otherwise */ + static float getDarkIntensity(Rect tintArea, View view, float intensity) { + if (isInArea(tintArea, view)) { + return intensity; + } else { + return 0f; + } + } + static boolean isInAreas(ArrayList<Rect> areas, View view) { if (areas.isEmpty()) { return true; diff --git a/packages/SystemUI/res-keyguard/layout/status_bar_mobile_signal_group_inner.xml b/packages/SystemUI/res-keyguard/layout/status_bar_mobile_signal_group_inner.xml index c85449d0c570..045a5948bf3c 100644 --- a/packages/SystemUI/res-keyguard/layout/status_bar_mobile_signal_group_inner.xml +++ b/packages/SystemUI/res-keyguard/layout/status_bar_mobile_signal_group_inner.xml @@ -28,6 +28,12 @@ android:gravity="center_vertical" android:orientation="horizontal" > + <ImageView + android:id="@+id/mobile_volte" + android:layout_height="wrap_content" + android:layout_width="wrap_content" + android:visibility="gone" + android:paddingEnd="2dp"/> <FrameLayout android:id="@+id/inout_container" android:layout_height="17dp" diff --git a/packages/SystemUI/res-keyguard/values-zh-rCN/strings.xml b/packages/SystemUI/res-keyguard/values-zh-rCN/strings.xml index 0f0feb548eb9..b009623c492e 100644 --- a/packages/SystemUI/res-keyguard/values-zh-rCN/strings.xml +++ b/packages/SystemUI/res-keyguard/values-zh-rCN/strings.xml @@ -103,6 +103,10 @@ <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="4252405904570284368">"您已经 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次画错解锁图案。\n\n请在 <xliff:g id="NUMBER_1">%2$d</xliff:g> 秒后重试。"</string> <string name="kg_password_wrong_pin_code_pukked" msgid="8047350661459040581">"SIM 卡 PIN 码不正确,您现在必须联系运营商为您解锁设备。"</string> <string name="kg_password_wrong_pin_code" msgid="5629415765976820357">"{count,plural, =1{SIM 卡 PIN 码不正确,您还可以尝试 # 次,如果仍不正确,则必须联系运营商帮您解锁设备。}other{SIM 卡 PIN 码不正确,您还可以尝试 # 次。}}"</string> + <plurals name="kg_password_wrong_pin_code_multi_sim" formatted="false"> + <item quantity="other">SIM 卡<xliff:g id="slotid">%d</xliff:g> PIN 码不正确,您还有 <xliff:g id="NUMBER_1">%d</xliff:g> 次尝试机会。</item> + <item quantity="one">SIM 卡<xliff:g id="slotid">%d</xliff:g> PIN 码不正确,您还有 <xliff:g id="NUMBER_0">%d</xliff:g> 次尝试机会。如果仍不正确,则需要联系运营商帮您解锁设备。</item> + </plurals> <string name="kg_password_wrong_puk_code_dead" msgid="3698285357028468617">"SIM 卡无法使用,请与您的运营商联系。"</string> <string name="kg_password_wrong_puk_code" msgid="6820515467645087827">"{count,plural, =1{SIM 卡 PUK 码不正确,您还可以尝试 # 次,如果仍不正确,SIM 卡将永远无法使用。}other{SIM 卡 PUK 码不正确,您还可以尝试 # 次,如果仍不正确,SIM 卡将永远无法使用。}}"</string> <string name="kg_password_pin_failed" msgid="5136259126330604009">"SIM 卡 PIN 码操作失败!"</string> @@ -121,6 +125,10 @@ <string name="kg_face_sensor_privacy_enabled" msgid="939511161763558512">"如需使用人脸解锁功能,请在“设置”中开启摄像头使用权限"</string> <string name="kg_password_default_pin_message" msgid="1434544655827987873">"{count,plural, =1{请输入 SIM 卡 PIN 码。您还可以尝试 # 次,如果仍不正确,则必须联系运营商帮您解锁设备。}other{请输入 SIM 卡 PIN 码。您还可以尝试 # 次。}}"</string> <string name="kg_password_default_puk_message" msgid="1025139786449741950">"{count,plural, =1{SIM 卡现已停用,请输入 PUK 码继续使用。您还可以尝试 # 次,如果仍不正确,SIM 卡将永远无法使用。有关详情,请联系运营商。}other{SIM 卡现已停用,请输入 PUK 码继续使用。您还可以尝试 # 次,如果仍不正确,SIM 卡将永远无法使用。有关详情,请联系运营商。}}"</string> + <plurals name="kg_password_default_pin_message_multi_sim" formatted="false"> + <item quantity="other">请输入 SIM 卡<xliff:g id="slotid">%d</xliff:g> PIN 码,您还可以尝试 <xliff:g id="NUMBER_1">%d</xliff:g> 次。</item> + <item quantity="one">请输入 SIM 卡<xliff:g id="slotid">%d</xliff:g> PIN 码,您还可以尝试 <xliff:g id="NUMBER_0">%d</xliff:g> 次。如果仍不正确,则需要联系运营商帮您解锁设备。</item> + </plurals> <string name="clock_title_default" msgid="6342735240617459864">"默认"</string> <string name="clock_title_bubble" msgid="2204559396790593213">"泡泡"</string> <string name="clock_title_analog" msgid="8409262532900918273">"指针"</string> diff --git a/packages/SystemUI/res-keyguard/values-zh-rHK/strings.xml b/packages/SystemUI/res-keyguard/values-zh-rHK/strings.xml index 701100fc44f9..794fa0038a26 100644 --- a/packages/SystemUI/res-keyguard/values-zh-rHK/strings.xml +++ b/packages/SystemUI/res-keyguard/values-zh-rHK/strings.xml @@ -103,6 +103,10 @@ <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="4252405904570284368">"你已畫錯解鎖圖案 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次。\n\n請在 <xliff:g id="NUMBER_1">%2$d</xliff:g> 秒後再試一次。"</string> <string name="kg_password_wrong_pin_code_pukked" msgid="8047350661459040581">"SIM 卡 PIN 碼不正確,你現在必須聯絡流動網絡供應商為你的裝置解鎖。"</string> <string name="kg_password_wrong_pin_code" msgid="5629415765976820357">"{count,plural, =1{SIM 卡的 PIN 碼不正確,你還可以再試 # 次。如果仍然輸入錯誤,你必須聯絡流動網絡供應商解鎖你的裝置。}other{SIM 卡的 PIN 碼不正確,你還可以再試 # 次。}}"</string> + <plurals name="kg_password_wrong_pin_code_multi_sim" formatted="false"> + <item quantity="other">SIM 卡<xliff:g id="slotid">%d</xliff:g>的 PIN 碼不正確,您還有 <xliff:g id="NUMBER_1">%d</xliff:g> 次輸入機會。</item> + <item quantity="one">SIM 卡<xliff:g id="slotid">%d</xliff:g>的 PIN 碼不正確,您還有 <xliff:g id="NUMBER_0">%d</xliff:g> 次輸入機會。如果仍然輸入錯誤,您必須聯絡流動網絡供應商為您的裝置解鎖。</item> + </plurals> <string name="kg_password_wrong_puk_code_dead" msgid="3698285357028468617">"SIM 卡無法使用,請聯絡你的流動網絡供應商。"</string> <string name="kg_password_wrong_puk_code" msgid="6820515467645087827">"{count,plural, =1{SIM 卡的 PUK 碼不正確,你還可以再試 # 次。如果仍然輪入錯誤,SIM 卡將永久無法使用。}other{SIM 卡的 PUK 碼不正確,你還可以再試 # 次。如果仍然輪入錯誤,SIM 卡將永久無法使用。}}"</string> <string name="kg_password_pin_failed" msgid="5136259126330604009">"無法使用 SIM 卡 PIN 碼解鎖!"</string> @@ -121,6 +125,10 @@ <string name="kg_face_sensor_privacy_enabled" msgid="939511161763558512">"如要使用「面孔解鎖」,請在「設定」開啟相機存取權"</string> <string name="kg_password_default_pin_message" msgid="1434544655827987873">"{count,plural, =1{輸入 SIM 卡的 PIN,你還可以再試 # 次。如果仍然輸入錯誤,你必須聯絡流動網絡供應商解鎖你的裝置。}other{輸入 SIM 卡的 PIN。你還可以再試 # 次。}}"</string> <string name="kg_password_default_puk_message" msgid="1025139786449741950">"{count,plural, =1{SIM 卡已停用。請輸入 PUK 碼以繼續進行。你還可以再試 # 次。如果仍然輸入錯誤,SIM 卡將永久無法使用。詳情請向流動網絡供應商查詢。}other{SIM 卡已停用。請輸入 PUK 碼以繼續進行。你還可以再試 # 次。如果仍然輸入錯誤,SIM 卡將永久無法使用。詳情請向流動網絡供應商查詢。}}"</string> + <plurals name="kg_password_default_pin_message_multi_sim" formatted="false"> + <item quantity="other">輸入 SIM 卡<xliff:g id="slotid">%d</xliff:g>的 PIN,您還可以再試 <xliff:g id="NUMBER_1">%d</xliff:g> 次。</item> + <item quantity="one">輸入 SIM 卡<xliff:g id="slotid">%d</xliff:g>的 PIN,您還可以再試 <xliff:g id="NUMBER_0">%d</xliff:g> 次。如果仍然輸入錯誤,您必須聯絡流動網絡供應商解鎖您的裝置。</item> + </plurals> <string name="clock_title_default" msgid="6342735240617459864">"預設"</string> <string name="clock_title_bubble" msgid="2204559396790593213">"泡泡"</string> <string name="clock_title_analog" msgid="8409262532900918273">"指針"</string> diff --git a/packages/SystemUI/res-keyguard/values-zh-rTW/strings.xml b/packages/SystemUI/res-keyguard/values-zh-rTW/strings.xml index 4ac27f2df42f..c1c383833ec8 100644 --- a/packages/SystemUI/res-keyguard/values-zh-rTW/strings.xml +++ b/packages/SystemUI/res-keyguard/values-zh-rTW/strings.xml @@ -103,6 +103,10 @@ <string name="kg_too_many_failed_pattern_attempts_dialog_message" msgid="4252405904570284368">"你已畫出錯誤的解鎖圖案 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次。\n\n請在 <xliff:g id="NUMBER_1">%2$d</xliff:g> 秒後再試一次。"</string> <string name="kg_password_wrong_pin_code_pukked" msgid="8047350661459040581">"SIM 卡的 PIN 碼輸入錯誤,你現在必須請電信業者為裝置解鎖。"</string> <string name="kg_password_wrong_pin_code" msgid="5629415765976820357">"{count,plural, =1{SIM 卡 PIN 碼輸入錯誤,您還可以再試 # 次。如果仍然失敗,就必須聯絡電信業者為裝置解鎖。}other{SIM 卡 PIN 碼輸入錯誤,您還可以再試 # 次。}}"</string> + <plurals name="kg_password_wrong_pin_code_multi_sim" formatted="false"> + <item quantity="other">SIM 卡<xliff:g id="slotid">%d</xliff:g>的 PIN 碼輸入錯誤,你還可以再試 <xliff:g id="NUMBER_1">%d</xliff:g> 次。</item> + <item quantity="one">SIM 卡<xliff:g id="slotid">%d</xliff:g>的 PIN 碼輸入錯誤,你還可以再試 <xliff:g id="NUMBER_0">%d</xliff:g> 次。如果仍然失敗,就必須請電信業者為裝置解鎖。</item> + </plurals> <string name="kg_password_wrong_puk_code_dead" msgid="3698285357028468617">"SIM 卡無法使用,請與你的電信業者聯絡。"</string> <string name="kg_password_wrong_puk_code" msgid="6820515467645087827">"{count,plural, =1{SIM 卡 PUK 碼輸入錯誤,您還可以再試 # 次,如果仍然失敗,SIM 卡將永久無法使用。}other{SIM 卡 PUK 碼輸入錯誤,您還可以再試 # 次,如果仍然失敗,SIM 卡將永久無法使用。}}"</string> <string name="kg_password_pin_failed" msgid="5136259126330604009">"SIM 卡 PIN 碼解鎖失敗!"</string> @@ -121,6 +125,10 @@ <string name="kg_face_sensor_privacy_enabled" msgid="939511161763558512">"如要使用人臉解鎖功能,請在「設定」中開啟相機存取權。"</string> <string name="kg_password_default_pin_message" msgid="1434544655827987873">"{count,plural, =1{請輸入 SIM 卡 PIN 碼,您還可以再試 # 次,如果仍然失敗,就必須聯絡電信業者為裝置解鎖。}other{輸入 SIM 卡 PIN 碼您還可以再試 # 次}}"</string> <string name="kg_password_default_puk_message" msgid="1025139786449741950">"{count,plural, =1{SIM 卡現在已遭停用。請輸入 PUK 碼以繼續。您還可以再試 # 次,如果仍然失敗,SIM 卡將永久無法使用。詳情請洽詢電信業者。}other{SIM 卡現在已遭停用。請輸入 PUK 碼以繼續。您還可以再試 # 次,如果仍然失敗,SIM 卡將永久無法使用。詳情請洽詢電信業者。}}"</string> + <plurals name="kg_password_default_pin_message_multi_sim" formatted="false"> + <item quantity="other">請輸入 SIM 卡<xliff:g id="slotid">%d</xliff:g>的 PIN 碼,你還可以再試 <xliff:g id="NUMBER_1">%d</xliff:g> 次。</item> + <item quantity="one">請輸入 SIM 卡的<xliff:g id="slotid">%d</xliff:g> PIN 碼,你還可以再試 <xliff:g id="NUMBER_0">%d</xliff:g> 次。如果仍然失敗,就必須請電信業者為裝置解鎖。</item> + </plurals> <string name="clock_title_default" msgid="6342735240617459864">"預設"</string> <string name="clock_title_bubble" msgid="2204559396790593213">"泡泡"</string> <string name="clock_title_analog" msgid="8409262532900918273">"類比"</string> diff --git a/packages/SystemUI/res-keyguard/values/strings.xml b/packages/SystemUI/res-keyguard/values/strings.xml index badad584824b..dd94177dbdc5 100644 --- a/packages/SystemUI/res-keyguard/values/strings.xml +++ b/packages/SystemUI/res-keyguard/values/strings.xml @@ -274,6 +274,10 @@ =1 {Incorrect SIM PIN code, you have # remaining attempt before you must contact your carrier to unlock your device.} other {Incorrect SIM PIN code, you have # remaining attempts. } }</string> + <plurals name="kg_password_wrong_pin_code_multi_sim"> + <item quantity="one">Incorrect SIM<xliff:g id="slotid">%d</xliff:g> PIN code, you have <xliff:g id="number">%d</xliff:g> remaining attempt before you must contact your carrier to unlock your device.</item> + <item quantity="other">Incorrect SIM<xliff:g id="slotid">%d</xliff:g> PIN code, you have <xliff:g id="number">%d</xliff:g> remaining attempts.</item> + </plurals> <!-- Instructions telling the user that they have exhausted SIM PUK retries and the SIM is now unusable. Displayed in a dialog box. --> @@ -333,6 +337,10 @@ =1 {Enter SIM PIN. You have # remaining attempt before you must contact your carrier to unlock your device.} other {Enter SIM PIN. You have # remaining attempts.} }</string> + <plurals name="kg_password_default_pin_message_multi_sim"> + <item quantity="one">Enter SIM<xliff:g id="slotid">%d</xliff:g> PIN, you have <xliff:g id="number">%d</xliff:g> remaining attempt before you must contact your carrier to unlock your device.</item> + <item quantity="other">Enter SIM<xliff:g id="slotid">%d</xliff:g> PIN, you have <xliff:g id="number">%d</xliff:g> remaining attempts.</item> + </plurals> <!-- Instructions telling the user remaining times when enter SIM PUK view. [CHAR LIMIT=NONE] --> <string name="kg_password_default_puk_message">{count, plural, diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_4_0.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_4_0.xml new file mode 100644 index 000000000000..31159a67cf01 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_4_0.xml @@ -0,0 +1,50 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="32dp" + android:height="29.5dp" + android:viewportWidth="30" + android:viewportHeight="24"> + <group + android:translateX="0.8" + android:translateY="-0.9"> + <!-- no Internet --> + <path + android:pathData="m 2.3281583,14.028369 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.822012,1.822009 -1.830163,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.001793,0.38 1.381793,0 l 1.830155,-1.830164 1.830163,1.830163 c 0.38,0.39 1.001796,0.379999 1.381793,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 l -1.830163,-1.830164 1.830163,-1.830163 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.997718,-0.38 -1.377717,0 l -1.821926,1.822011 -1.82201,-1.822011 c -0.19,-0.19 -0.438859,-0.285326 -0.688859,-0.285326 z" + android:fillColor="#FFFFFFFF"/> + <!-- number 4--> + <path + android:pathData="m 26.892869,17.71889 h -1.056598 v 1.849791 H 24.330062 V 17.71889 h -3.602534 v -1.359946 l 3.344006,-5.871601 h 1.764737 v 5.884492 h 1.056598 z m -2.562807,-1.347055 v -2.971248 q 0,-0.348044 0.01967,-0.754093 0.01968,-0.406048 0.03092,-0.522067 v 0 q -0.146131,0.360936 -0.528296,1.044134 v 0 l -1.83781,3.203274 z" + android:fillColor="#FFFFFFFF"/> + <!-- light signal level 4--> + <path + android:pathData="M 12,3 C 6.44,3 2.3284239,5.360652 0.55842392,6.570652 c -0.51,0.35 -0.6082608,1.060761 -0.2282609,1.540761 L 3.4524458,12 h 6.6644022 v 8.298912 l 1.043478,1.300271 c 0.42,0.530001 1.228968,0.530001 1.658968,0 l 6.505435,-8.091032 a 4.0677967,4.4745761 0 0 1 -0.0041,-0.0856 4.0677967,4.4745761 0 0 1 3.64402,-4.44701 l 0.697013,-0.86413 c 0.39,-0.48 0.28989,-1.190761 -0.22011,-1.540761 C 21.671576,5.360652 17.55,3 12,3 Z" + android:fillColor="#4DFFFFFF"/> + </group> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_4_1.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_4_1.xml new file mode 100644 index 000000000000..2c2318266543 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_4_1.xml @@ -0,0 +1,46 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <!-- no Internet --> + <path + android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z" + android:fillColor="@android:color/white"/> + <!-- number 4--> + <path + android:pathData="m 25.107866,17.646981 h -1.056598 v 1.849791 h -1.506209 v -1.849791 h -3.602534 v -1.359946 l 3.344006,-5.871601 h 1.764737 v 5.884492 h 1.056598 z m -2.562807,-1.347055 v -2.971248 q 0,-0.348044 0.01967,-0.754093 0.01968,-0.406048 0.03092,-0.522067 v 0 q -0.146131,0.360936 -0.528296,1.044134 v 0 l -1.83781,3.203274 z" + android:fillColor="@android:color/white"/> + <!-- signal level 1--> + <path + android:pathData="M 11.999999,2.002712 C 7.25,2.002712 2.969999,4.081299 -9.9999999e-7,7.391299 L 4.133152,12.425266 H 6.721467 L 2.698369,7.529886 c 2.569999,-2.26 5.881631,-3.529891 9.30163,-3.529891 3.42,0 6.731632,1.269891 9.30163,3.529891 l -5.836956,7.104619 c -0.820053,-0.997437 -2.066757,-1.634511 -3.464674,-1.634511 -0.175,0 -0.339745,0.03762 -0.509511,0.05707 v 5.17663 3.14674 l 0.509511,0.619563 4.418479,-5.368205 c -6.04e-4,-0.003 -0.0035,-0.0052 -0.0041,-0.0082 l 2.771739,-3.370924 a 3.762712,3.8644067 0 0 1 -0.08152,-0.774457 3.762712,3.8644067 0 0 1 3.762228,-3.86413 3.762712,3.8644067 0 0 1 0.122283,0.0082 l 1.010869,-1.230978 c -2.970002,-3.31005 -7.25,-5.388637 -12,-5.388637 z" + android:fillColor="@android:color/white"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_4_2.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_4_2.xml new file mode 100644 index 000000000000..b1bec7d72fc1 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_4_2.xml @@ -0,0 +1,46 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <!-- no Internet --> + <path + android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z" + android:fillColor="@android:color/white"/> + <!-- number 4--> + <path + android:pathData="m 25.107866,17.646981 h -1.056598 v 1.849791 h -1.506209 v -1.849791 h -3.602534 v -1.359946 l 3.344006,-5.871601 h 1.764737 v 5.884492 h 1.056598 z m -2.562807,-1.347055 v -2.971248 q 0,-0.348044 0.01967,-0.754093 0.01968,-0.406048 0.03092,-0.522067 v 0 q -0.146131,0.360936 -0.528296,1.044134 v 0 l -1.83781,3.203274 z" + android:fillColor="@android:color/white"/> + <!-- signal level 2--> + <path + android:pathData="m 11.999999,2.002716 c -4.7500004,0 -9.03,2.078587 -12.00000007,5.388587 L 4.133151,12.42527 H 6.7214663 L 6.6114119,12.290759 h 4.8790761 v 5.942935 3.14674 L 11.94701,21.93478 12,22 19.186141,13.252719 a 3.762712,3.8644067 0 0 1 -0.08152,-0.774457 3.762712,3.8644067 0 0 1 3.762228,-3.86413 3.762712,3.8644067 0 0 1 0.122283,0.0082 l 1.01087,-1.230978 c -2.97,-3.31 -7.25,-5.388587 -12,-5.388587 z m 0,1.997282 c 3.42,0 6.731631,1.269891 9.30163,3.529892 l -3.908967,4.760869 c -0.01997,-0.02087 -0.03686,-0.04459 -0.05706,-0.06522 -1.359999,-1.42 -3.268587,-2.298914 -5.388587,-2.298914 -2.120001,0 -4.0285872,0.878914 -5.3885872,2.298914 L 2.6983684,7.52989 C 5.2683675,5.269889 8.5799987,3.999998 11.999999,3.999998 Z" + android:fillColor="@android:color/white"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_4_3.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_4_3.xml new file mode 100644 index 000000000000..5925bd190349 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_4_3.xml @@ -0,0 +1,46 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <!-- no Internet --> + <path + android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z" + android:fillColor="@android:color/white"/> + <!-- number 4--> + <path + android:pathData="m 25.107866,17.646981 h -1.056598 v 1.849791 h -1.506209 v -1.849791 h -3.602534 v -1.359946 l 3.344006,-5.871601 h 1.764737 v 5.884492 h 1.056598 z m -2.562807,-1.347055 v -2.971248 q 0,-0.348044 0.01967,-0.754093 0.01968,-0.406048 0.03092,-0.522067 v 0 q -0.146131,0.360936 -0.528296,1.044134 v 0 l -1.83781,3.203274 z" + android:fillColor="@android:color/white"/> + <!-- signal level 3--> + <path + android:pathData="m 11.999999,1.868205 c -4.75,0 -9.030001,2.078587 -12.0000010434783,5.388587 L 3.301629,11.275813 4.13315,12.290759 h 2.588316 4.769022 v 5.808424 3.14674 l 0.509511,0.619563 7.129076,-8.677988 0.05706,-0.06929 a 3.762712,3.8644067 0 0 1 -0.08152,-0.774456 3.762712,3.8644067 0 0 1 3.762228,-3.86413 3.762712,3.8644067 0 0 1 0.122283,0.0082 l 1.01087,-1.230978 c -2.970003,-3.31 -7.250001,-5.388587 -12,-5.388587 z m 0,1.997283 c 3.42,0 6.731631,1.269891 9.30163,3.529891 L 19.349183,9.771737 C 17.427804,7.959487 14.85815,6.857335 11.999999,6.857335 c -2.8581,0 -5.427817,1.111503 -7.349186,2.914402 L 2.698368,7.395379 c 2.569999,-2.26 5.881631,-3.529891 9.301631,-3.529891 z" + android:fillColor="@android:color/white"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_4_4.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_4_4.xml new file mode 100644 index 000000000000..eed48ddd0f45 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_4_4.xml @@ -0,0 +1,46 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="26" + android:viewportHeight="24"> + <!-- no Internet --> + <path + android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z" + android:fillColor="@android:color/white"/> + <!-- number 4--> + <path + android:pathData="m 25.107866,17.646981 h -1.056598 v 1.849791 h -1.506209 v -1.849791 h -3.602534 v -1.359946 l 3.344006,-5.871601 h 1.764737 v 5.884492 h 1.056598 z m -2.562807,-1.347055 v -2.971248 q 0,-0.348044 0.01967,-0.754093 0.01968,-0.406048 0.03092,-0.522067 v 0 q -0.146131,0.360936 -0.528296,1.044134 v 0 l -1.83781,3.203274 z" + android:fillColor="@android:color/white"/> + <!-- signal level 4--> + <path + android:pathData="M 12,2.001359 C 7.2500003,2.001359 2.9700004,4.0799457 3.45e-7,7.3899455 L 4.0230983,12.289402 h 7.4673907 v 9.089674 L 12,21.998641 19.263587,13.157609 A 3.4516399,3.5235489 0 0 1 19.129076,12.1875 3.4516399,3.5235489 0 0 1 22.577445,8.6657608 3.4516399,3.5235489 0 0 1 22.936141,8.6820598 L 24,7.3899455 C 21.03,4.0799457 16.75,2.001359 12,2.001359 Z" + android:fillColor="@android:color/white"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_5_0.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_5_0.xml new file mode 100644 index 000000000000..e286ade500f9 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_5_0.xml @@ -0,0 +1,50 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="32dp" + android:height="29.5dp" + android:viewportWidth="30" + android:viewportHeight="24"> + <group + android:translateX="0.8" + android:translateY="-0.9"> + <!-- no Internet --> + <path + android:pathData="m 2.3281583,14.028369 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.822012,1.822009 -1.830163,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.001793,0.38 1.381793,0 l 1.830155,-1.830164 1.830163,1.830163 c 0.38,0.39 1.001796,0.379999 1.381793,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 l -1.830163,-1.830164 1.830163,-1.830163 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.997718,-0.38 -1.377717,0 l -1.821926,1.822011 -1.82201,-1.822011 c -0.19,-0.19 -0.438859,-0.285326 -0.688859,-0.285326 z" + android:fillColor="#FFFFFFFF"/> + <!-- number 5--> + <path + android:pathData="m 27.651626,16.765723 v 0 q 0,1.36304 -0.84885,2.1693 -0.84886,0.80626 -2.32751,0.80626 v 0 q -1.29001,0 -2.06585,-0.58112 -0.77583,-0.58112 -0.95838,-1.6825 v 0 l 1.70988,-0.13995 q 0.13387,0.54765 0.47462,0.79713 0.34076,0.24949 0.85799,0.24949 v 0 q 0.63892,0 1.01923,-0.4077 0.38031,-0.40769 0.38031,-1.1744 v 0 q 0,-0.67543 -0.35901,-1.08008 -0.35902,-0.40465 -1.00402,-0.40465 v 0 q -0.71195,0 -1.16223,0.55373 v 0 h -1.66729 l 0.29817,-4.825391 h 5.15397 v 1.27176 h -3.6023 l -0.13996,2.166251 q 0.62067,-0.54764 1.55167,-0.54764 v 0 q 1.22308,0 1.95632,0.76062 0.73324,0.76062 0.73324,2.06889 z" + android:fillColor="#FFFFFFFF"/> + <!-- light signal level 4--> + <path + android:pathData="M 12,3 C 6.44,3 2.3284239,5.360652 0.55842392,6.570652 c -0.51,0.35 -0.6082608,1.060761 -0.2282609,1.540761 L 3.4524458,12 h 6.6644022 v 8.298912 l 1.043478,1.300271 c 0.42,0.530001 1.228968,0.530001 1.658968,0 l 6.505435,-8.091032 a 4.0677967,4.4745761 0 0 1 -0.0041,-0.0856 4.0677967,4.4745761 0 0 1 3.64402,-4.44701 l 0.697013,-0.86413 c 0.39,-0.48 0.28989,-1.190761 -0.22011,-1.540761 C 21.671576,5.360652 17.55,3 12,3 Z" + android:fillColor="#4DFFFFFF"/> + </group> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_5_1.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_5_1.xml new file mode 100644 index 000000000000..c29ef4376297 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_5_1.xml @@ -0,0 +1,46 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="28" + android:viewportHeight="24"> + <!-- no Internet --> + <path + android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z" + android:fillColor="@android:color/white"/> + <!-- number 5--> + <path + android:pathData="m 26.712686,15.940325 v 0 q 0,1.36304 -0.84885,2.1693 -0.84886,0.80626 -2.32751,0.80626 v 0 q -1.29001,0 -2.06585,-0.58112 -0.77583,-0.58112 -0.95838,-1.6825 v 0 l 1.70988,-0.13995 q 0.13387,0.54765 0.47462,0.79713 0.34076,0.24949 0.85799,0.24949 v 0 q 0.63892,0 1.01923,-0.4077 0.38031,-0.40769 0.38031,-1.1744 v 0 q 0,-0.67543 -0.35901,-1.08008 -0.35902,-0.40465 -1.00402,-0.40465 v 0 q -0.71195,0 -1.16223,0.55373 v 0 h -1.66729 l 0.29817,-4.825391 h 5.15397 v 1.27176 h -3.6023 l -0.13996,2.166251 q 0.62067,-0.54764 1.55167,-0.54764 v 0 q 1.22308,0 1.95632,0.76062 0.73324,0.76062 0.73324,2.06889 z" + android:fillColor="@android:color/white"/> + <!-- signal level 1--> + <path + android:pathData="M 11.999999,2.002712 C 7.25,2.002712 2.969999,4.081299 -9.9999999e-7,7.391299 L 4.133152,12.425266 H 6.721467 L 2.698369,7.529886 c 2.569999,-2.26 5.881631,-3.529891 9.30163,-3.529891 3.42,0 6.731632,1.269891 9.30163,3.529891 l -5.836956,7.104619 c -0.820053,-0.997437 -2.066757,-1.634511 -3.464674,-1.634511 -0.175,0 -0.339745,0.03762 -0.509511,0.05707 v 5.17663 3.14674 l 0.509511,0.619563 4.418479,-5.368205 c -6.04e-4,-0.003 -0.0035,-0.0052 -0.0041,-0.0082 l 2.771739,-3.370924 a 3.762712,3.8644067 0 0 1 -0.08152,-0.774457 3.762712,3.8644067 0 0 1 3.762228,-3.86413 3.762712,3.8644067 0 0 1 0.122283,0.0082 l 1.010869,-1.230978 c -2.970002,-3.31005 -7.25,-5.388637 -12,-5.388637 z" + android:fillColor="@android:color/white"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_5_2.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_5_2.xml new file mode 100644 index 000000000000..69fa60019fc5 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_5_2.xml @@ -0,0 +1,46 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="28" + android:viewportHeight="24"> + <!-- no Internet --> + <path + android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z" + android:fillColor="@android:color/white"/> + <!-- number 5--> + <path + android:pathData="m 26.712686,15.940325 v 0 q 0,1.36304 -0.84885,2.1693 -0.84886,0.80626 -2.32751,0.80626 v 0 q -1.29001,0 -2.06585,-0.58112 -0.77583,-0.58112 -0.95838,-1.6825 v 0 l 1.70988,-0.13995 q 0.13387,0.54765 0.47462,0.79713 0.34076,0.24949 0.85799,0.24949 v 0 q 0.63892,0 1.01923,-0.4077 0.38031,-0.40769 0.38031,-1.1744 v 0 q 0,-0.67543 -0.35901,-1.08008 -0.35902,-0.40465 -1.00402,-0.40465 v 0 q -0.71195,0 -1.16223,0.55373 v 0 h -1.66729 l 0.29817,-4.825391 h 5.15397 v 1.27176 h -3.6023 l -0.13996,2.166251 q 0.62067,-0.54764 1.55167,-0.54764 v 0 q 1.22308,0 1.95632,0.76062 0.73324,0.76062 0.73324,2.06889 z" + android:fillColor="@android:color/white"/> + <!-- signal level 2--> + <path + android:pathData="m 11.999999,2.002716 c -4.7500004,0 -9.03,2.078587 -12.00000007,5.388587 L 4.133151,12.42527 H 6.7214663 L 6.6114119,12.290759 h 4.8790761 v 5.942935 3.14674 L 11.94701,21.93478 12,22 19.186141,13.252719 a 3.762712,3.8644067 0 0 1 -0.08152,-0.774457 3.762712,3.8644067 0 0 1 3.762228,-3.86413 3.762712,3.8644067 0 0 1 0.122283,0.0082 l 1.01087,-1.230978 c -2.97,-3.31 -7.25,-5.388587 -12,-5.388587 z m 0,1.997282 c 3.42,0 6.731631,1.269891 9.30163,3.529892 l -3.908967,4.760869 c -0.01997,-0.02087 -0.03686,-0.04459 -0.05706,-0.06522 -1.359999,-1.42 -3.268587,-2.298914 -5.388587,-2.298914 -2.120001,0 -4.0285872,0.878914 -5.3885872,2.298914 L 2.6983684,7.52989 C 5.2683675,5.269889 8.5799987,3.999998 11.999999,3.999998 Z" + android:fillColor="@android:color/white"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_5_3.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_5_3.xml new file mode 100644 index 000000000000..f92fb8fba228 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_5_3.xml @@ -0,0 +1,47 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="28" + android:viewportHeight="24"> + <!-- no Internet --> + <path + android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z" + android:fillColor="@android:color/white"/> + <!-- number 5--> + <path + android:pathData="m 26.712686,15.940325 v 0 q 0,1.36304 -0.84885,2.1693 -0.84886,0.80626 -2.32751,0.80626 v 0 q -1.29001,0 -2.06585,-0.58112 -0.77583,-0.58112 -0.95838,-1.6825 v 0 l 1.70988,-0.13995 q 0.13387,0.54765 0.47462,0.79713 0.34076,0.24949 0.85799,0.24949 v 0 q 0.63892,0 1.01923,-0.4077 0.38031,-0.40769 0.38031,-1.1744 v 0 q 0,-0.67543 -0.35901,-1.08008 -0.35902,-0.40465 -1.00402,-0.40465 v 0 q -0.71195,0 -1.16223,0.55373 v 0 h -1.66729 l 0.29817,-4.825391 h 5.15397 v 1.27176 h -3.6023 l -0.13996,2.166251 q 0.62067,-0.54764 1.55167,-0.54764 v 0 q 1.22308,0 1.95632,0.76062 0.73324,0.76062 0.73324,2.06889 z" + android:fillColor="@android:color/white"/> + <!-- signal level 3--> + <path + android:pathData="m 11.999999,1.868205 c -4.75,0 -9.030001,2.078587 -12.0000010434783,5.388587 L 3.301629,11.275813 4.13315,12.290759 h 2.588316 4.769022 v 5.808424 3.14674 l 0.509511,0.619563 7.129076,-8.677988 0.05706,-0.06929 a 3.762712,3.8644067 0 0 1 -0.08152,-0.774456 3.762712,3.8644067 0 0 1 3.762228,-3.86413 3.762712,3.8644067 0 0 1 0.122283,0.0082 l 1.01087,-1.230978 c -2.970003,-3.31 -7.250001,-5.388587 -12,-5.388587 z m 0,1.997283 c 3.42,0 6.731631,1.269891 9.30163,3.529891 L 19.349183,9.771737 C 17.427804,7.959487 14.85815,6.857335 11.999999,6.857335 c -2.8581,0 -5.427817,1.111503 -7.349186,2.914402 L 2.698368,7.395379 c 2.569999,-2.26 5.881631,-3.529891 9.301631,-3.529891 z" + android:fillColor="@android:color/white"/> +</vector> + diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_5_4.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_5_4.xml new file mode 100644 index 000000000000..abb28708ca9f --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_5_4.xml @@ -0,0 +1,46 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="28" + android:viewportHeight="24"> + <!-- no Internet --> + <path + android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z" + android:fillColor="@android:color/white"/> + <!-- number 5--> + <path + android:pathData="m 26.712686,15.940325 v 0 q 0,1.36304 -0.84885,2.1693 -0.84886,0.80626 -2.32751,0.80626 v 0 q -1.29001,0 -2.06585,-0.58112 -0.77583,-0.58112 -0.95838,-1.6825 v 0 l 1.70988,-0.13995 q 0.13387,0.54765 0.47462,0.79713 0.34076,0.24949 0.85799,0.24949 v 0 q 0.63892,0 1.01923,-0.4077 0.38031,-0.40769 0.38031,-1.1744 v 0 q 0,-0.67543 -0.35901,-1.08008 -0.35902,-0.40465 -1.00402,-0.40465 v 0 q -0.71195,0 -1.16223,0.55373 v 0 h -1.66729 l 0.29817,-4.825391 h 5.15397 v 1.27176 h -3.6023 l -0.13996,2.166251 q 0.62067,-0.54764 1.55167,-0.54764 v 0 q 1.22308,0 1.95632,0.76062 0.73324,0.76062 0.73324,2.06889 z" + android:fillColor="@android:color/white"/> + <!-- signal level 4--> + <path + android:pathData="M 12,2.001359 C 7.2500003,2.001359 2.9700004,4.0799457 3.45e-7,7.3899455 L 4.0230983,12.289402 h 7.4673907 v 9.089674 L 12,21.998641 19.263587,13.157609 A 3.4516399,3.5235489 0 0 1 19.129076,12.1875 3.4516399,3.5235489 0 0 1 22.577445,8.6657608 3.4516399,3.5235489 0 0 1 22.936141,8.6820598 L 24,7.3899455 C 21.03,4.0799457 16.75,2.001359 12,2.001359 Z" + android:fillColor="@android:color/white"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_6_0.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_6_0.xml new file mode 100644 index 000000000000..280589cce7aa --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_6_0.xml @@ -0,0 +1,50 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="32dp" + android:height="29.5dp" + android:viewportWidth="30" + android:viewportHeight="24"> + <group + android:translateX="0.8" + android:translateY="-0.9"> + <!-- no Internet --> + <path + android:pathData="m 2.3281583,14.028369 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.822012,1.822009 -1.830163,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.001793,0.38 1.381793,0 l 1.830155,-1.830164 1.830163,1.830163 c 0.38,0.39 1.001796,0.379999 1.381793,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 l -1.830163,-1.830164 1.830163,-1.830163 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.997718,-0.38 -1.377717,0 l -1.821926,1.822011 -1.82201,-1.822011 c -0.19,-0.19 -0.438859,-0.285326 -0.688859,-0.285326 z" + android:fillColor="#FFFFFFFF"/> + <!-- number 6--> + <path + android:pathData="m 27.397427,16.704042 v 0 q 0,1.31751 -0.814213,2.067022 -0.814212,0.749513 -2.248777,0.749513 v 0 q -1.609039,0 -2.471717,-1.0218 -0.862677,-1.021801 -0.862677,-3.030264 v 0 q 0,-2.207557 0.875601,-3.323047 0.875602,-1.11549 2.504027,-1.11549 v 0 q 1.156698,0 1.825516,0.462592 0.668817,0.462591 0.946684,1.434619 v 0 l -1.712431,0.216656 q -0.245556,-0.813927 -1.098541,-0.813927 v 0 q -0.730207,0 -1.147005,0.661682 -0.4168,0.661682 -0.4168,2.008467 v 0 q 0.29079,-0.439168 0.807751,-0.673393 0.51696,-0.234223 1.169623,-0.234223 v 0 q 1.221318,0 1.932139,0.702671 0.71082,0.702671 0.71082,1.908922 z m -1.822285,0.04685 v 0 q 0,-0.70267 -0.358641,-1.0745 -0.358642,-0.37183 -0.985456,-0.37183 v 0 q -0.600966,0 -0.962838,0.348408 -0.361873,0.348407 -0.361873,0.922255 v 0 q 0,0.720242 0.378028,1.191617 0.378026,0.471375 0.991917,0.471375 v 0 q 0.61389,0 0.956377,-0.395255 0.342486,-0.395254 0.342486,-1.09207 z" + android:fillColor="#FFFFFFFF"/> + <!-- light signal level 4--> + <path + android:pathData="M 12,3 C 6.44,3 2.3284239,5.360652 0.55842392,6.570652 c -0.51,0.35 -0.6082608,1.060761 -0.2282609,1.540761 L 3.4524458,12 h 6.6644022 v 8.298912 l 1.043478,1.300271 c 0.42,0.530001 1.228968,0.530001 1.658968,0 l 6.505435,-8.091032 a 4.0677967,4.4745761 0 0 1 -0.0041,-0.0856 4.0677967,4.4745761 0 0 1 3.64402,-4.44701 l 0.697013,-0.86413 c 0.39,-0.48 0.28989,-1.190761 -0.22011,-1.540761 C 21.671576,5.360652 17.55,3 12,3 Z" + android:fillColor="#4DFFFFFF"/> + </group> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_6_1.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_6_1.xml new file mode 100644 index 000000000000..74d5bb664661 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_6_1.xml @@ -0,0 +1,46 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="28" + android:viewportHeight="24"> + <!-- no Internet --> + <path + android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z" + android:fillColor="@android:color/white"/> + <!-- number 6--> + <path + android:pathData="m 26.554082,16.242125 v 0 q 0,1.31751 -0.814213,2.067022 -0.814212,0.749513 -2.248777,0.749513 v 0 q -1.609039,0 -2.471717,-1.0218 -0.862677,-1.021801 -0.862677,-3.030264 v 0 q 0,-2.207557 0.875601,-3.323047 0.875602,-1.11549 2.504027,-1.11549 v 0 q 1.156698,0 1.825516,0.462592 0.668817,0.462591 0.946684,1.434619 v 0 l -1.712431,0.216656 q -0.245556,-0.813927 -1.098541,-0.813927 v 0 q -0.730207,0 -1.147005,0.661682 -0.4168,0.661682 -0.4168,2.008467 v 0 q 0.29079,-0.439168 0.807751,-0.673393 0.51696,-0.234223 1.169623,-0.234223 v 0 q 1.221318,0 1.932139,0.702671 0.71082,0.702671 0.71082,1.908922 z m -1.822285,0.04685 v 0 q 0,-0.70267 -0.358641,-1.0745 -0.358642,-0.37183 -0.985456,-0.37183 v 0 q -0.600966,0 -0.962838,0.348408 -0.361873,0.348407 -0.361873,0.922255 v 0 q 0,0.720242 0.378028,1.191617 0.378026,0.471375 0.991917,0.471375 v 0 q 0.61389,0 0.956377,-0.395255 0.342486,-0.395254 0.342486,-1.09207 z" + android:fillColor="@android:color/white"/> + <!-- signal level 1--> + <path + android:pathData="M 11.999999,2.002712 C 7.25,2.002712 2.969999,4.081299 -9.9999999e-7,7.391299 L 4.133152,12.425266 H 6.721467 L 2.698369,7.529886 c 2.569999,-2.26 5.881631,-3.529891 9.30163,-3.529891 3.42,0 6.731632,1.269891 9.30163,3.529891 l -5.836956,7.104619 c -0.820053,-0.997437 -2.066757,-1.634511 -3.464674,-1.634511 -0.175,0 -0.339745,0.03762 -0.509511,0.05707 v 5.17663 3.14674 l 0.509511,0.619563 4.418479,-5.368205 c -6.04e-4,-0.003 -0.0035,-0.0052 -0.0041,-0.0082 l 2.771739,-3.370924 a 3.762712,3.8644067 0 0 1 -0.08152,-0.774457 3.762712,3.8644067 0 0 1 3.762228,-3.86413 3.762712,3.8644067 0 0 1 0.122283,0.0082 l 1.010869,-1.230978 c -2.970002,-3.31005 -7.25,-5.388637 -12,-5.388637 z" + android:fillColor="@android:color/white"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_6_2.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_6_2.xml new file mode 100644 index 000000000000..b583f2784a2c --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_6_2.xml @@ -0,0 +1,46 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="28" + android:viewportHeight="24"> + <!-- no Internet --> + <path + android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z" + android:fillColor="@android:color/white"/> + <!-- number 6--> + <path + android:pathData="m 26.554082,16.242125 v 0 q 0,1.31751 -0.814213,2.067022 -0.814212,0.749513 -2.248777,0.749513 v 0 q -1.609039,0 -2.471717,-1.0218 -0.862677,-1.021801 -0.862677,-3.030264 v 0 q 0,-2.207557 0.875601,-3.323047 0.875602,-1.11549 2.504027,-1.11549 v 0 q 1.156698,0 1.825516,0.462592 0.668817,0.462591 0.946684,1.434619 v 0 l -1.712431,0.216656 q -0.245556,-0.813927 -1.098541,-0.813927 v 0 q -0.730207,0 -1.147005,0.661682 -0.4168,0.661682 -0.4168,2.008467 v 0 q 0.29079,-0.439168 0.807751,-0.673393 0.51696,-0.234223 1.169623,-0.234223 v 0 q 1.221318,0 1.932139,0.702671 0.71082,0.702671 0.71082,1.908922 z m -1.822285,0.04685 v 0 q 0,-0.70267 -0.358641,-1.0745 -0.358642,-0.37183 -0.985456,-0.37183 v 0 q -0.600966,0 -0.962838,0.348408 -0.361873,0.348407 -0.361873,0.922255 v 0 q 0,0.720242 0.378028,1.191617 0.378026,0.471375 0.991917,0.471375 v 0 q 0.61389,0 0.956377,-0.395255 0.342486,-0.395254 0.342486,-1.09207 z" + android:fillColor="@android:color/white"/> + <!-- signal level 2--> + <path + android:pathData="m 11.999999,2.002716 c -4.7500004,0 -9.03,2.078587 -12.00000007,5.388587 L 4.133151,12.42527 H 6.7214663 L 6.6114119,12.290759 h 4.8790761 v 5.942935 3.14674 L 11.94701,21.93478 12,22 19.186141,13.252719 a 3.762712,3.8644067 0 0 1 -0.08152,-0.774457 3.762712,3.8644067 0 0 1 3.762228,-3.86413 3.762712,3.8644067 0 0 1 0.122283,0.0082 l 1.01087,-1.230978 c -2.97,-3.31 -7.25,-5.388587 -12,-5.388587 z m 0,1.997282 c 3.42,0 6.731631,1.269891 9.30163,3.529892 l -3.908967,4.760869 c -0.01997,-0.02087 -0.03686,-0.04459 -0.05706,-0.06522 -1.359999,-1.42 -3.268587,-2.298914 -5.388587,-2.298914 -2.120001,0 -4.0285872,0.878914 -5.3885872,2.298914 L 2.6983684,7.52989 C 5.2683675,5.269889 8.5799987,3.999998 11.999999,3.999998 Z" + android:fillColor="@android:color/white"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_6_3.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_6_3.xml new file mode 100644 index 000000000000..3a9db72ce1e4 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_6_3.xml @@ -0,0 +1,46 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="28" + android:viewportHeight="24"> + <!-- no Internet --> + <path + android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z" + android:fillColor="@android:color/white"/> + <!-- number 6--> + <path + android:pathData="m 26.554082,16.242125 v 0 q 0,1.31751 -0.814213,2.067022 -0.814212,0.749513 -2.248777,0.749513 v 0 q -1.609039,0 -2.471717,-1.0218 -0.862677,-1.021801 -0.862677,-3.030264 v 0 q 0,-2.207557 0.875601,-3.323047 0.875602,-1.11549 2.504027,-1.11549 v 0 q 1.156698,0 1.825516,0.462592 0.668817,0.462591 0.946684,1.434619 v 0 l -1.712431,0.216656 q -0.245556,-0.813927 -1.098541,-0.813927 v 0 q -0.730207,0 -1.147005,0.661682 -0.4168,0.661682 -0.4168,2.008467 v 0 q 0.29079,-0.439168 0.807751,-0.673393 0.51696,-0.234223 1.169623,-0.234223 v 0 q 1.221318,0 1.932139,0.702671 0.71082,0.702671 0.71082,1.908922 z m -1.822285,0.04685 v 0 q 0,-0.70267 -0.358641,-1.0745 -0.358642,-0.37183 -0.985456,-0.37183 v 0 q -0.600966,0 -0.962838,0.348408 -0.361873,0.348407 -0.361873,0.922255 v 0 q 0,0.720242 0.378028,1.191617 0.378026,0.471375 0.991917,0.471375 v 0 q 0.61389,0 0.956377,-0.395255 0.342486,-0.395254 0.342486,-1.09207 z" + android:fillColor="@android:color/white"/> + <!-- signal level 3--> + <path + android:pathData="m 11.999999,1.868205 c -4.75,0 -9.030001,2.078587 -12.0000010434783,5.388587 L 3.301629,11.275813 4.13315,12.290759 h 2.588316 4.769022 v 5.808424 3.14674 l 0.509511,0.619563 7.129076,-8.677988 0.05706,-0.06929 a 3.762712,3.8644067 0 0 1 -0.08152,-0.774456 3.762712,3.8644067 0 0 1 3.762228,-3.86413 3.762712,3.8644067 0 0 1 0.122283,0.0082 l 1.01087,-1.230978 c -2.970003,-3.31 -7.250001,-5.388587 -12,-5.388587 z m 0,1.997283 c 3.42,0 6.731631,1.269891 9.30163,3.529891 L 19.349183,9.771737 C 17.427804,7.959487 14.85815,6.857335 11.999999,6.857335 c -2.8581,0 -5.427817,1.111503 -7.349186,2.914402 L 2.698368,7.395379 c 2.569999,-2.26 5.881631,-3.529891 9.301631,-3.529891 z" + android:fillColor="@android:color/white"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_6_4.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_6_4.xml new file mode 100644 index 000000000000..50a4a8eeecd6 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_6_4.xml @@ -0,0 +1,46 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="24dp" + android:height="24dp" + android:viewportWidth="28" + android:viewportHeight="24"> + <!-- no Internet --> + <path + android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z" + android:fillColor="@android:color/white"/> + <!-- number 6--> + <path + android:pathData="m 26.554082,16.242125 v 0 q 0,1.31751 -0.814213,2.067022 -0.814212,0.749513 -2.248777,0.749513 v 0 q -1.609039,0 -2.471717,-1.0218 -0.862677,-1.021801 -0.862677,-3.030264 v 0 q 0,-2.207557 0.875601,-3.323047 0.875602,-1.11549 2.504027,-1.11549 v 0 q 1.156698,0 1.825516,0.462592 0.668817,0.462591 0.946684,1.434619 v 0 l -1.712431,0.216656 q -0.245556,-0.813927 -1.098541,-0.813927 v 0 q -0.730207,0 -1.147005,0.661682 -0.4168,0.661682 -0.4168,2.008467 v 0 q 0.29079,-0.439168 0.807751,-0.673393 0.51696,-0.234223 1.169623,-0.234223 v 0 q 1.221318,0 1.932139,0.702671 0.71082,0.702671 0.71082,1.908922 z m -1.822285,0.04685 v 0 q 0,-0.70267 -0.358641,-1.0745 -0.358642,-0.37183 -0.985456,-0.37183 v 0 q -0.600966,0 -0.962838,0.348408 -0.361873,0.348407 -0.361873,0.922255 v 0 q 0,0.720242 0.378028,1.191617 0.378026,0.471375 0.991917,0.471375 v 0 q 0.61389,0 0.956377,-0.395255 0.342486,-0.395254 0.342486,-1.09207 z" + android:fillColor="@android:color/white"/> + <!-- signal level 4--> + <path + android:pathData="M 12,2.001359 C 7.2500003,2.001359 2.9700004,4.0799457 3.45e-7,7.3899455 L 4.0230983,12.289402 h 7.4673907 v 9.089674 L 12,21.998641 19.263587,13.157609 A 3.4516399,3.5235489 0 0 1 19.129076,12.1875 3.4516399,3.5235489 0 0 1 22.577445,8.6657608 3.4516399,3.5235489 0 0 1 22.936141,8.6820598 L 24,7.3899455 C 21.03,4.0799457 16.75,2.001359 12,2.001359 Z" + android:fillColor="@android:color/white"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_7_0.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_7_0.xml new file mode 100644 index 000000000000..5d55f2b7c764 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_7_0.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="32dp"
+ android:height="29.5dp"
+ android:viewportWidth="30"
+ android:viewportHeight="24">
+ <group
+ android:translateX="0.8"
+ android:translateY="-0.9">
+ <!-- no Internet -->
+ <path
+ android:pathData="m 2.3281583,14.028369 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.822012,1.822009 -1.830163,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.001793,0.38 1.381793,0 l 1.830155,-1.830164 1.830163,1.830163 c 0.38,0.39 1.001796,0.379999 1.381793,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 l -1.830163,-1.830164 1.830163,-1.830163 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.997718,-0.38 -1.377717,0 l -1.821926,1.822011 -1.82201,-1.822011 c -0.19,-0.19 -0.438859,-0.285326 -0.688859,-0.285326 z"
+ android:fillColor="#FFFFFFFF"/>
+ <!-- number 7-->
+ <path
+ android:pathData="m27.5,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"
+ android:fillColor="#FFFFFFFF"/>
+ <!-- light signal level 4-->
+ <path
+ android:pathData="M 12,3 C 6.44,3 2.3284239,5.360652 0.55842392,6.570652 c -0.51,0.35 -0.6082608,1.060761 -0.2282609,1.540761 L 3.4524458,12 h 6.6644022 v 8.298912 l 1.043478,1.300271 c 0.42,0.530001 1.228968,0.530001 1.658968,0 l 6.505435,-8.091032 a 4.0677967,4.4745761 0 0 1 -0.0041,-0.0856 4.0677967,4.4745761 0 0 1 3.64402,-4.44701 l 0.697013,-0.86413 c 0.39,-0.48 0.28989,-1.190761 -0.22011,-1.540761 C 21.671576,5.360652 17.55,3 12,3 Z"
+ android:fillColor="#4DFFFFFF"/>
+ </group>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_7_1.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_7_1.xml new file mode 100644 index 000000000000..a09b069e986b --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_7_1.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="28"
+ android:viewportHeight="24">
+ <!-- no Internet -->
+ <path
+ android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z"
+ android:fillColor="@android:color/white"/>
+ <!-- number 7-->
+ <path
+ android:pathData="m27,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"
+ android:fillColor="@android:color/white"/>
+ <!-- signal level 1-->
+ <path
+ android:pathData="M 11.999999,2.002712 C 7.25,2.002712 2.969999,4.081299 -9.9999999e-7,7.391299 L 4.133152,12.425266 H 6.721467 L 2.698369,7.529886 c 2.569999,-2.26 5.881631,-3.529891 9.30163,-3.529891 3.42,0 6.731632,1.269891 9.30163,3.529891 l -5.836956,7.104619 c -0.820053,-0.997437 -2.066757,-1.634511 -3.464674,-1.634511 -0.175,0 -0.339745,0.03762 -0.509511,0.05707 v 5.17663 3.14674 l 0.509511,0.619563 4.418479,-5.368205 c -6.04e-4,-0.003 -0.0035,-0.0052 -0.0041,-0.0082 l 2.771739,-3.370924 a 3.762712,3.8644067 0 0 1 -0.08152,-0.774457 3.762712,3.8644067 0 0 1 3.762228,-3.86413 3.762712,3.8644067 0 0 1 0.122283,0.0082 l 1.010869,-1.230978 c -2.970002,-3.31005 -7.25,-5.388637 -12,-5.388637 z"
+ android:fillColor="@android:color/white"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_7_2.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_7_2.xml new file mode 100644 index 000000000000..54f42b5ed32f --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_7_2.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="28"
+ android:viewportHeight="24">
+ <!-- no Internet -->
+ <path
+ android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z"
+ android:fillColor="@android:color/white"/>
+ <!-- number 7-->
+ <path
+ android:pathData="m27,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"
+ android:fillColor="@android:color/white"/>
+ <!-- signal level 2-->
+ <path
+ android:pathData="m 11.999999,2.002716 c -4.7500004,0 -9.03,2.078587 -12.00000007,5.388587 L 4.133151,12.42527 H 6.7214663 L 6.6114119,12.290759 h 4.8790761 v 5.942935 3.14674 L 11.94701,21.93478 12,22 19.186141,13.252719 a 3.762712,3.8644067 0 0 1 -0.08152,-0.774457 3.762712,3.8644067 0 0 1 3.762228,-3.86413 3.762712,3.8644067 0 0 1 0.122283,0.0082 l 1.01087,-1.230978 c -2.97,-3.31 -7.25,-5.388587 -12,-5.388587 z m 0,1.997282 c 3.42,0 6.731631,1.269891 9.30163,3.529892 l -3.908967,4.760869 c -0.01997,-0.02087 -0.03686,-0.04459 -0.05706,-0.06522 -1.359999,-1.42 -3.268587,-2.298914 -5.388587,-2.298914 -2.120001,0 -4.0285872,0.878914 -5.3885872,2.298914 L 2.6983684,7.52989 C 5.2683675,5.269889 8.5799987,3.999998 11.999999,3.999998 Z"
+ android:fillColor="@android:color/white"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_7_3.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_7_3.xml new file mode 100644 index 000000000000..f67ba5cbfc92 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_7_3.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="28"
+ android:viewportHeight="24">
+ <!-- no Internet -->
+ <path
+ android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z"
+ android:fillColor="@android:color/white"/>
+ <!-- number 7-->
+ <path
+ android:pathData="m27,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"
+ android:fillColor="@android:color/white"/>
+ <!-- signal level 3-->
+ <path
+ android:pathData="m 11.999999,1.868205 c -4.75,0 -9.030001,2.078587 -12.0000010434783,5.388587 L 3.301629,11.275813 4.13315,12.290759 h 2.588316 4.769022 v 5.808424 3.14674 l 0.509511,0.619563 7.129076,-8.677988 0.05706,-0.06929 a 3.762712,3.8644067 0 0 1 -0.08152,-0.774456 3.762712,3.8644067 0 0 1 3.762228,-3.86413 3.762712,3.8644067 0 0 1 0.122283,0.0082 l 1.01087,-1.230978 c -2.970003,-3.31 -7.250001,-5.388587 -12,-5.388587 z m 0,1.997283 c 3.42,0 6.731631,1.269891 9.30163,3.529891 L 19.349183,9.771737 C 17.427804,7.959487 14.85815,6.857335 11.999999,6.857335 c -2.8581,0 -5.427817,1.111503 -7.349186,2.914402 L 2.698368,7.395379 c 2.569999,-2.26 5.881631,-3.529891 9.301631,-3.529891 z"
+ android:fillColor="@android:color/white"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_7_4.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_7_4.xml new file mode 100644 index 000000000000..ca1079e98d8a --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_7_4.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ SPDX-License-Identifier: BSD-3-Clause-Clear
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="28"
+ android:viewportHeight="24">
+ <!-- no Internet -->
+ <path
+ android:pathData="m 3.3972509,13.819005 c -0.25,0 -0.498859,0.09533 -0.688859,0.285326 l -0.01223,0.01223 c -0.38,0.38 -0.38,0.997718 0,1.377718 l 1.8220122,1.822009 -1.8301632,1.830163 c -0.38,0.38 -0.38,0.997717 0,1.377717 l 0.0082,0.01223 c 0.38,0.38 1.0017933,0.38 1.3817933,0 l 1.8301549,-1.830164 1.8301631,1.830163 c 0.38,0.39 1.0017959,0.379999 1.3817929,0 0.3800012,-0.38 0.3800012,-1.001794 0,-1.381793 L 7.2899522,17.32444 9.1201151,15.494277 c 0.3800012,-0.38 0.3777722,-0.999946 -0.01231,-1.389946 -0.379999,-0.38 -0.9977179,-0.38 -1.3777169,0 L 5.9081621,15.926342 4.0861522,14.104331 c -0.19,-0.19 -0.438859,-0.285326 -0.6888593,-0.285326 z"
+ android:fillColor="@android:color/white"/>
+ <!-- number 7-->
+ <path
+ android:pathData="m27,11.959 l-3.454,5.584l-2.157,-0.024l3.586,-5.634l-3.855,-0.043l0.014,-1.343l5.881,0.066z"
+ android:fillColor="@android:color/white"/>
+ <!-- signal level 4-->
+ <path
+ android:pathData="M 12,2.001359 C 7.2500003,2.001359 2.9700004,4.0799457 3.45e-7,7.3899455 L 4.0230983,12.289402 h 7.4673907 v 9.089674 L 12,21.998641 19.263587,13.157609 A 3.4516399,3.5235489 0 0 1 19.129076,12.1875 3.4516399,3.5235489 0 0 1 22.577445,8.6657608 3.4516399,3.5235489 0 0 1 22.936141,8.6820598 L 24,7.3899455 C 21.03,4.0799457 16.75,2.001359 12,2.001359 Z"
+ android:fillColor="@android:color/white"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_volte.xml b/packages/SystemUI/res/drawable/ic_volte.xml new file mode 100644 index 000000000000..e4c5d6df5bea --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volte.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Copyright (c) 2018, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="14dp" + android:height="17dp" + android:viewportWidth="14" + android:viewportHeight="17"> + + <path + android:pathData="M 1.2 4 H 13.7 V 13.2 H 1.2 V 4 Z" /> + <path + android:fillColor="#FFFFFF" + android:pathData="M1.9,12.6V4h0.8v3.5h3.2V4h0.8v8.6H5.9v-4H2.7v4H1.9z" /> + <path + android:fillColor="#FFFFFF" + android:pathData="M8,12.6V4h2.1c0.5,0,0.8,0,1.1,0.1c0.4,0.1,0.7,0.3,0.9,0.6c0.3,0.4,0.6,0.9,0.7,1.5s0.2,1.3,0.2,2c0,0.7-0.1,1.2-0.2,1.7c-0.1,0.5-0.2,0.9-0.4,1.3S12.2,11.8,12,12s-0.4,0.3-0.7,0.4s-0.6,0.1-1,0.1H8zM8.8,11.6h1.3c0.4,0,0.7-0.1,0.9-0.2c0.2-0.1,0.4-0.3,0.5-0.4c0.2-0.3,0.3-0.6,0.4-1.1c0.1-0.5,0.2-1,0.2-1.7c0-0.9-0.1-1.6-0.3-2.1c-0.2-0.5-0.5-0.8-0.8-1C11,5.1,10.6,5,10.1,5H8.8V11.6z" /> + <path + android:fillColor="#000000" + android:pathData="M 2 9 L 1 9 L 1 9 L 2 9 Z" /> +</vector>
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_volte_no_voice.xml b/packages/SystemUI/res/drawable/ic_volte_no_voice.xml new file mode 100644 index 000000000000..490b624927f0 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_volte_no_voice.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="utf-8"?> +<!--Copyright (c) 2018, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> + +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="14dp" + android:height="17dp" + android:viewportWidth="14" + android:viewportHeight="17"> + + <path + android:pathData="M 1.2 4 H 13.7 V 13.2 H 1.2 V 4 Z" /> + <path + android:fillColor="#FFFFFF" + android:pathData="M1.9,12.6V4h0.8v3.5h3.2V4h0.8v8.6H5.9v-4H2.7v4H1.9z" /> + <path + android:fillColor="#FFFFFF" + android:pathData="M8,12.6V4h2.1c0.5,0,0.8,0,1.1,0.1c0.4,0.1,0.7,0.3,0.9,0.6c0.3,0.4,0.6,0.9,0.7,1.5s0.2,1.3,0.2,2c0,0.7-0.1,1.2-0.2,1.7c-0.1,0.5-0.2,0.9-0.4,1.3S12.2,11.8,12,12s-0.4,0.3-0.7,0.4s-0.6,0.1-1,0.1H8zM8.8,11.6h1.3c0.4,0,0.7-0.1,0.9-0.2c0.2-0.1,0.4-0.3,0.5-0.4c0.2-0.3,0.3-0.6,0.4-1.1c0.1-0.5,0.2-1,0.2-1.7c0-0.9-0.1-1.6-0.3-2.1c-0.2-0.5-0.5-0.8-0.8-1C11,5.1,10.6,5,10.1,5H8.8V11.6z" /> + <path + android:fillColor="#000000" + android:pathData="M 2 9 L 1 9 L 1 9 L 2 9 Z" /> + <path + android:fillColor="#FFFFFF" + android:pathData="M 0.5 9 H 13.5 V 10 H 0.5 V 9 Z" /> +</vector>
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_wifi_4_hotspot.xml b/packages/SystemUI/res/drawable/ic_wifi_4_hotspot.xml new file mode 100644 index 000000000000..2895467b407e --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_wifi_4_hotspot.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="54dp" + android:height="48dp" + android:viewportWidth="27.0" + android:viewportHeight="24.0"> + <group + android:translateY="-0.32"> + <path + android:pathData="m 11.951087,3.004076 c -0.36936,0.00196 -0.743424,0.022092 -1.120924,0.065217 -4.6200001,0.52 -8.3498914,4.3292391 -8.7798913,8.95924 a 9.966,9.966 0 0 0 4.0190217,9.012227 c 0.48,0.350001 1.1592392,0.200223 1.4592392,-0.309782 0.2499999,-0.43 0.1432065,-0.99212 -0.2567935,-1.29212 -2.28,-1.689999 -3.6530436,-4.549728 -3.1630435,-7.699728 0.54,-3.4999999 3.462337,-6.2907066 6.9823374,-6.6807066 3.778225,-0.4311254 7.072769,1.8079636 8.335598,5.0625006 A 7.7288137,8.3389834 0 0 1 20.910326,8.4864129 C 19.25166,5.2212048 15.864479,2.9832791 11.951087,3.004076 Z M 11.820652,7.0067935 A 6,6 0 0 0 11.25,7.0516305 C 8.6299999,7.3716306 6.4692934,9.4592936 6.0692934,12.069294 c -0.32,2.139999 0.489837,4.112662 1.919837,5.392662 0.48,0.43 1.2411412,0.327663 1.5611413,-0.232337 0.24,-0.42 0.1398908,-0.939511 -0.2201088,-1.25951 A 3.99,3.99 0 0 1 8.1114131,12.028533 3.954,3.954 0 0 1 11.009511,9.1182064 4.0069999,4.0069999 0 0 1 15.998642,12.998641 c 0,1.18 -0.508805,2.233315 -1.328805,2.963315 -0.36,0.33 -0.468261,0.847663 -0.228261,1.267663 0.31,0.54 1.04,0.69125 1.5,0.28125 A 5.97,5.97 0 0 0 18,12.998641 6,6 0 0 0 11.820652,7.0067935 Z m 0.179347,3.9945655 c -1.1,0 -2.0013592,0.897282 -2.0013592,1.997282 0,1.1 0.9013592,2.001359 2.0013592,2.001359 1.1,0 2.001359,-0.901359 2.001359,-2.001359 0,-1.1 -0.901359,-1.997282 -2.001359,-1.997282 z m 6.342393,6.843749 c -0.462479,0.60136 -1.002053,1.142421 -1.614131,1.59375 -0.4,0.3 -0.506793,0.85212 -0.256793,1.29212 0.3,0.519999 0.979239,0.659783 1.459239,0.309782 a 9.96,9.96 0 0 0 1.353261,-1.210597 7.7288137,8.3389834 0 0 1 -0.941576,-1.985055 z" + android:fillColor="#FFFFFFFF"/> + <path + android:pathData="m 25.46914,17.155238 h -1.056598 v 2.015506 H 22.906333 V 17.155238 H 19.303799 V 15.67346 l 3.344006,-6.3976129 h 1.764737 v 6.4116589 h 1.056598 z m -2.562807,-1.467732 v -3.23743 q 0,-0.379223 0.01967,-0.821649 0.01968,-0.442424 0.03092,-0.568836 v 0 q -0.146131,0.39327 -0.528296,1.137673 v 0 l -1.83781,3.490242 z" + android:fillColor="#FFFFFFFF"/> + </group> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_wifi_5_hotspot.xml b/packages/SystemUI/res/drawable/ic_wifi_5_hotspot.xml new file mode 100644 index 000000000000..b51ccc5d9742 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_wifi_5_hotspot.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="54dp" + android:height="48dp" + android:viewportWidth="27.0" + android:viewportHeight="24.0"> + <group + android:translateY="-0.32"> + <path + android:pathData="m 11.951087,3.004076 c -0.36936,0.00196 -0.743424,0.022092 -1.120924,0.065217 -4.6200001,0.52 -8.3498914,4.3292391 -8.7798913,8.95924 a 9.966,9.966 0 0 0 4.0190217,9.012227 c 0.48,0.350001 1.1592392,0.200223 1.4592392,-0.309782 0.2499999,-0.43 0.1432065,-0.99212 -0.2567935,-1.29212 -2.28,-1.689999 -3.6530436,-4.549728 -3.1630435,-7.699728 0.54,-3.4999999 3.462337,-6.2907066 6.9823374,-6.6807066 3.778225,-0.4311254 7.072769,1.8079636 8.335598,5.0625006 A 7.7288137,8.3389834 0 0 1 20.910326,8.4864129 C 19.25166,5.2212048 15.864479,2.9832791 11.951087,3.004076 Z M 11.820652,7.0067935 A 6,6 0 0 0 11.25,7.0516305 C 8.6299999,7.3716306 6.4692934,9.4592936 6.0692934,12.069294 c -0.32,2.139999 0.489837,4.112662 1.919837,5.392662 0.48,0.43 1.2411412,0.327663 1.5611413,-0.232337 0.24,-0.42 0.1398908,-0.939511 -0.2201088,-1.25951 A 3.99,3.99 0 0 1 8.1114131,12.028533 3.954,3.954 0 0 1 11.009511,9.1182064 4.0069999,4.0069999 0 0 1 15.998642,12.998641 c 0,1.18 -0.508805,2.233315 -1.328805,2.963315 -0.36,0.33 -0.468261,0.847663 -0.228261,1.267663 0.31,0.54 1.04,0.69125 1.5,0.28125 A 5.97,5.97 0 0 0 18,12.998641 6,6 0 0 0 11.820652,7.0067935 Z m 0.179347,3.9945655 c -1.1,0 -2.0013592,0.897282 -2.0013592,1.997282 0,1.1 0.9013592,2.001359 2.0013592,2.001359 1.1,0 2.001359,-0.901359 2.001359,-2.001359 0,-1.1 -0.901359,-1.997282 -2.001359,-1.997282 z m 6.342393,6.843749 c -0.462479,0.60136 -1.002053,1.142421 -1.614131,1.59375 -0.4,0.3 -0.506793,0.85212 -0.256793,1.29212 0.3,0.519999 0.979239,0.659783 1.459239,0.309782 a 9.96,9.96 0 0 0 1.353261,-1.210597 7.7288137,8.3389834 0 0 1 -0.941576,-1.985055 z" + android:fillColor="#FFFFFFFF"/> + <path + android:pathData="m 25.626571,16.562335 v 0 q 0,1.36304 -0.84885,2.1693 -0.84886,0.80626 -2.32751,0.80626 v 0 q -1.29001,0 -2.06585,-0.58112 -0.77583,-0.58112 -0.95838,-1.6825 v 0 l 1.70988,-0.13995 q 0.13387,0.54765 0.47462,0.79713 0.34076,0.24949 0.85799,0.24949 v 0 q 0.63892,0 1.01923,-0.4077 0.38031,-0.40769 0.38031,-1.1744 v 0 q 0,-0.67543 -0.35901,-1.08008 -0.35902,-0.40465 -1.00402,-0.40465 v 0 q -0.71195,0 -1.16223,0.55373 v 0 h -1.66729 l 0.29817,-4.825391 h 5.15397 v 1.27176 h -3.6023 l -0.13996,2.166251 q 0.62067,-0.54764 1.55167,-0.54764 v 0 q 1.22308,0 1.95632,0.76062 0.73324,0.76062 0.73324,2.06889 z" + android:fillColor="#FFFFFFFF"/> + </group> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_wifi_6_hotspot.xml b/packages/SystemUI/res/drawable/ic_wifi_6_hotspot.xml new file mode 100644 index 000000000000..9a77cfa35b72 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_wifi_6_hotspot.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="54dp" + android:height="48dp" + android:viewportWidth="27.0" + android:viewportHeight="24.0"> + <group + android:translateY="-0.32"> + <path + android:pathData="m 11.951087,3.004076 c -0.36936,0.00196 -0.743424,0.022092 -1.120924,0.065217 -4.6200001,0.52 -8.3498914,4.3292391 -8.7798913,8.95924 a 9.966,9.966 0 0 0 4.0190217,9.012227 c 0.48,0.350001 1.1592392,0.200223 1.4592392,-0.309782 0.2499999,-0.43 0.1432065,-0.99212 -0.2567935,-1.29212 -2.28,-1.689999 -3.6530436,-4.549728 -3.1630435,-7.699728 0.54,-3.4999999 3.462337,-6.2907066 6.9823374,-6.6807066 3.778225,-0.4311254 7.072769,1.8079636 8.335598,5.0625006 A 7.7288137,8.3389834 0 0 1 20.910326,8.4864129 C 19.25166,5.2212048 15.864479,2.9832791 11.951087,3.004076 Z M 11.820652,7.0067935 A 6,6 0 0 0 11.25,7.0516305 C 8.6299999,7.3716306 6.4692934,9.4592936 6.0692934,12.069294 c -0.32,2.139999 0.489837,4.112662 1.919837,5.392662 0.48,0.43 1.2411412,0.327663 1.5611413,-0.232337 0.24,-0.42 0.1398908,-0.939511 -0.2201088,-1.25951 A 3.99,3.99 0 0 1 8.1114131,12.028533 3.954,3.954 0 0 1 11.009511,9.1182064 4.0069999,4.0069999 0 0 1 15.998642,12.998641 c 0,1.18 -0.508805,2.233315 -1.328805,2.963315 -0.36,0.33 -0.468261,0.847663 -0.228261,1.267663 0.31,0.54 1.04,0.69125 1.5,0.28125 A 5.97,5.97 0 0 0 18,12.998641 6,6 0 0 0 11.820652,7.0067935 Z m 0.179347,3.9945655 c -1.1,0 -2.0013592,0.897282 -2.0013592,1.997282 0,1.1 0.9013592,2.001359 2.0013592,2.001359 1.1,0 2.001359,-0.901359 2.001359,-2.001359 0,-1.1 -0.901359,-1.997282 -2.001359,-1.997282 z m 6.342393,6.843749 c -0.462479,0.60136 -1.002053,1.142421 -1.614131,1.59375 -0.4,0.3 -0.506793,0.85212 -0.256793,1.29212 0.3,0.519999 0.979239,0.659783 1.459239,0.309782 a 9.96,9.96 0 0 0 1.353261,-1.210597 7.7288137,8.3389834 0 0 1 -0.941576,-1.985055 z" + android:fillColor="#FFFFFFFF"/> + <path + android:pathData="m 26.031315,16.070676 v 0 q 0,1.31751 -0.814213,2.067022 -0.814212,0.749513 -2.248777,0.749513 v 0 q -1.609039,0 -2.471717,-1.0218 -0.862677,-1.021801 -0.862677,-3.030264 v 0 q 0,-2.207557 0.875601,-3.323047 0.875602,-1.11549 2.504027,-1.11549 v 0 q 1.156698,0 1.825516,0.462592 0.668817,0.462591 0.946684,1.434619 v 0 l -1.712431,0.216656 Q 23.827772,11.69655 22.974787,11.69655 v 0 q -0.730207,0 -1.147005,0.661682 -0.4168,0.661682 -0.4168,2.008467 v 0 q 0.29079,-0.439168 0.807751,-0.673393 0.51696,-0.234223 1.169623,-0.234223 v 0 q 1.221318,0 1.932139,0.702671 0.71082,0.702671 0.71082,1.908922 z m -1.822285,0.04685 v 0 q 0,-0.70267 -0.358641,-1.0745 -0.358642,-0.37183 -0.985456,-0.37183 v 0 q -0.600966,0 -0.962838,0.348408 -0.361873,0.348407 -0.361873,0.922255 v 0 q 0,0.720242 0.378028,1.191617 0.378026,0.471375 0.991917,0.471375 v 0 q 0.61389,0 0.956377,-0.395255 0.342486,-0.395254 0.342486,-1.09207 z" + android:fillColor="#FFFFFFFF"/> + </group> +</vector> diff --git a/packages/SystemUI/res/drawable/settingslib_thumb_disabled.xml b/packages/SystemUI/res/drawable/settingslib_thumb_disabled.xml index b41762f7908e..8de134a1f5eb 100644 --- a/packages/SystemUI/res/drawable/settingslib_thumb_disabled.xml +++ b/packages/SystemUI/res/drawable/settingslib_thumb_disabled.xml @@ -18,8 +18,6 @@ <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:top="@dimen/settingslib_switch_thumb_margin" - android:left="@dimen/settingslib_switch_thumb_margin" - android:right="@dimen/settingslib_switch_thumb_margin" android:bottom="@dimen/settingslib_switch_thumb_margin"> <shape android:shape="oval"> <size diff --git a/packages/SystemUI/res/drawable/settingslib_thumb_selector.xml b/packages/SystemUI/res/drawable/settingslib_thumb_selector.xml index 06bb779b91ef..3a8514150dee 100644 --- a/packages/SystemUI/res/drawable/settingslib_thumb_selector.xml +++ b/packages/SystemUI/res/drawable/settingslib_thumb_selector.xml @@ -16,7 +16,7 @@ --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/settingslib_thumb_disabled" android:state_enabled="false"/> <item android:drawable="@drawable/settingslib_thumb_on" android:state_checked="true"/> <item android:drawable="@drawable/settingslib_thumb_off" android:state_checked="false"/> - <item android:drawable="@drawable/settingslib_thumb_disabled" android:state_enabled="false"/> </selector> diff --git a/packages/SystemUI/res/drawable/settingslib_track_selector.xml b/packages/SystemUI/res/drawable/settingslib_track_selector.xml index a38c3b4241a3..28804925b698 100644 --- a/packages/SystemUI/res/drawable/settingslib_track_selector.xml +++ b/packages/SystemUI/res/drawable/settingslib_track_selector.xml @@ -16,7 +16,7 @@ --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:drawable="@drawable/settingslib_track_disabled_background" android:state_enabled="false"/> <item android:drawable="@drawable/settingslib_track_on_background" android:state_checked="true"/> <item android:drawable="@drawable/settingslib_track_off_background" android:state_checked="false"/> - <item android:drawable="@drawable/settingslib_track_disabled_background" android:state_enabled="false"/> </selector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_4_hotspot.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_4_hotspot.xml new file mode 100644 index 000000000000..d9cfadd312a9 --- /dev/null +++ b/packages/SystemUI/res/drawable/stat_sys_wifi_4_hotspot.xml @@ -0,0 +1,48 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<inset xmlns:android="http://schemas.android.com/apk/res/android" + android:insetLeft="2.5dp" + android:insetRight="2.5dp"> + <vector + android:width="22.0dp" + android:height="18.0dp" + android:viewportWidth="22.0" + android:viewportHeight="18.0"> + <group + android:translateX="0.5" + android:translateY="0.5" > + <path + android:pathData="m 9.2771788,1.842391 c -0.5341993,-0.05549 -1.0854891,-0.0556 -1.6467391,0.0081 -3.4399999,0.39 -6.2098912,3.2184785 -6.5298912,6.6684783 -0.26000004,2.6099997 0.8777717,5.1510867 2.9877717,6.7010867 0.36,0.26 0.8623912,0.151739 1.0923913,-0.228261 0.1899999,-0.32 0.098424,-0.741957 -0.1915761,-0.961957 -1.7,-1.259997 -2.7078261,-3.380975 -2.3478261,-5.7309751 C 3.0413094,5.698863 5.2101681,3.620113 7.8301679,3.3301128 10.338407,3.0436568 12.553222,4.3446002 13.675277,6.3423412 A 7.0169487,8.1355924 0 0 1 14.478266,4.8097325 C 13.262879,3.1798315 11.402845,2.063138 9.2771788,1.842341 Z M 8.4986462,4.9605977 c -0.18,0 -0.3498912,0.00854 -0.5298912,0.028533 -1.86,0.23 -3.3884784,1.7125 -3.6684783,3.5624999 -0.2300001,1.5200004 0.351413,2.9092944 1.361413,3.8192934 0.34,0.3 0.8764674,0.228804 1.0964673,-0.171195 0.1699993,-0.3 0.1010337,-0.668587 -0.1589677,-0.888586 C 5.8191898,10.611142 5.4791354,9.5390216 5.7391354,8.5190215 c 0.25,-1.0199998 1.0425001,-1.8084238 2.0624999,-2.0584238 1.5200001,-0.38 3.0583697,0.5384239 3.4483697,2.0584238 0.06,0.2300002 0.08967,0.462935 0.08967,0.6929351 0,0.8400004 -0.361577,1.5791854 -0.941577,2.0991854 -0.25,0.23 -0.328968,0.600814 -0.158968,0.900814 0.22,0.38 0.739783,0.489729 1.059783,0.199729 0.92,-0.81 1.451087,-1.979728 1.451087,-3.1997284 0,-2.3500003 -1.901359,-4.2513589 -4.2513588,-4.2513589 z m 0,2.8288044 c -0.78,0 -1.4184783,0.6425543 -1.4184783,1.4225545 0,0.78 0.6384783,1.4184784 1.4184783,1.4184784 0.78,0 1.4225543,-0.6384784 1.4225543,-1.4184784 0,-0.7800002 -0.6425543,-1.4225545 -1.4225543,-1.4225545 z m 4.9361418,4.7160329 c -0.387159,0.579128 -0.84606,1.109077 -1.40625,1.524456 -0.3,0.22 -0.3775,0.631957 -0.1875,0.961957 0.22,0.39 0.728315,0.488261 1.088315,0.228261 0.438174,-0.322866 0.826135,-0.698796 1.177989,-1.100544 a 7.0169487,8.1355924 0 0 1 -0.672554,-1.61413 z" + android:fillColor="#FFFFFFFF"/> + <path + android:pathData="M 20.617078,11.488485 H 19.56048 v 1.849791 H 18.054271 V 11.488485 H 14.451737 V 10.128539 L 17.795743,4.2569388 H 19.56048 V 10.14143 h 1.056598 z M 18.054271,10.14143 V 7.1701828 q 0,-0.348044 0.01967,-0.754093 0.01968,-0.406048 0.03092,-0.522067 v 0 q -0.146131,0.360936 -0.528296,1.044134 v 0 l -1.83781,3.2032732 z" + android:fillColor="#FFFFFFFF"/> + </group> + </vector> +</inset> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_5_hotspot.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_5_hotspot.xml new file mode 100644 index 000000000000..aeb7aa49ce83 --- /dev/null +++ b/packages/SystemUI/res/drawable/stat_sys_wifi_5_hotspot.xml @@ -0,0 +1,48 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<inset xmlns:android="http://schemas.android.com/apk/res/android" + android:insetLeft="2.5dp" + android:insetRight="2.5dp"> + <vector + android:width="22.0dp" + android:height="18.0dp" + android:viewportWidth="22.0" + android:viewportHeight="18.0"> + <group + android:translateX="0.5" + android:translateY="0.5" > + <path + android:pathData="m 9.2771788,1.842391 c -0.5341993,-0.05549 -1.0854891,-0.0556 -1.6467391,0.0081 -3.4399999,0.39 -6.2098912,3.2184785 -6.5298912,6.6684783 -0.26000004,2.6099997 0.8777717,5.1510867 2.9877717,6.7010867 0.36,0.26 0.8623912,0.151739 1.0923913,-0.228261 0.1899999,-0.32 0.098424,-0.741957 -0.1915761,-0.961957 -1.7,-1.259997 -2.7078261,-3.380975 -2.3478261,-5.7309751 C 3.0413094,5.698863 5.2101681,3.620113 7.8301679,3.3301128 10.338407,3.0436568 12.553222,4.3446002 13.675277,6.3423412 A 7.0169487,8.1355924 0 0 1 14.478266,4.8097325 C 13.262879,3.1798315 11.402845,2.063138 9.2771788,1.842341 Z M 8.4986462,4.9605977 c -0.18,0 -0.3498912,0.00854 -0.5298912,0.028533 -1.86,0.23 -3.3884784,1.7125 -3.6684783,3.5624999 -0.2300001,1.5200004 0.351413,2.9092944 1.361413,3.8192934 0.34,0.3 0.8764674,0.228804 1.0964673,-0.171195 0.1699993,-0.3 0.1010337,-0.668587 -0.1589677,-0.888586 C 5.8191898,10.611142 5.4791354,9.5390216 5.7391354,8.5190215 c 0.25,-1.0199998 1.0425001,-1.8084238 2.0624999,-2.0584238 1.5200001,-0.38 3.0583697,0.5384239 3.4483697,2.0584238 0.06,0.2300002 0.08967,0.462935 0.08967,0.6929351 0,0.8400004 -0.361577,1.5791854 -0.941577,2.0991854 -0.25,0.23 -0.328968,0.600814 -0.158968,0.900814 0.22,0.38 0.739783,0.489729 1.059783,0.199729 0.92,-0.81 1.451087,-1.979728 1.451087,-3.1997284 0,-2.3500003 -1.901359,-4.2513589 -4.2513588,-4.2513589 z m 0,2.8288044 c -0.78,0 -1.4184783,0.6425543 -1.4184783,1.4225545 0,0.78 0.6384783,1.4184784 1.4184783,1.4184784 0.78,0 1.4225543,-0.6384784 1.4225543,-1.4184784 0,-0.7800002 -0.6425543,-1.4225545 -1.4225543,-1.4225545 z m 4.9361418,4.7160329 c -0.387159,0.579128 -0.84606,1.109077 -1.40625,1.524456 -0.3,0.22 -0.3775,0.631957 -0.1875,0.961957 0.22,0.39 0.728315,0.488261 1.088315,0.228261 0.438174,-0.322866 0.826135,-0.698796 1.177989,-1.100544 a 7.0169487,8.1355924 0 0 1 -0.672554,-1.61413 z" + android:fillColor="#FFFFFFFF"/> + <path + android:pathData="m 21.045878,10.964692 v 0 q 0,1.36304 -0.84885,2.1693 -0.84886,0.80626 -2.32751,0.80626 v 0 q -1.29001,0 -2.06585,-0.58112 -0.77583,-0.58112 -0.95838,-1.6825 v 0 l 1.70988,-0.13995 q 0.13387,0.54765 0.47462,0.79713 0.34076,0.24949 0.85799,0.24949 v 0 q 0.63892,0 1.01923,-0.4077 0.38031,-0.40769 0.38031,-1.1744 v 0 q 0,-0.67543 -0.35901,-1.0800798 -0.35902,-0.40465 -1.00402,-0.40465 v 0 q -0.71195,0 -1.16223,0.5537298 v 0 h -1.66729 l 0.29817,-4.8253905 h 5.15397 v 1.27176 h -3.6023 l -0.13996,2.1662507 q 0.62067,-0.5476397 1.55167,-0.5476397 v 0 q 1.22308,0 1.95632,0.7606197 0.73324,0.76062 0.73324,2.0688898 z" + android:fillColor="#FFFFFFFF"/> + </group> + </vector> +</inset> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_6_hotspot.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_6_hotspot.xml new file mode 100644 index 000000000000..9b5e28e01f7b --- /dev/null +++ b/packages/SystemUI/res/drawable/stat_sys_wifi_6_hotspot.xml @@ -0,0 +1,48 @@ +<!-- + Copyright (c) 2019, The Linux Foundation. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<inset xmlns:android="http://schemas.android.com/apk/res/android" + android:insetLeft="2.5dp" + android:insetRight="2.5dp"> + <vector + android:width="22.0dp" + android:height="18.0dp" + android:viewportWidth="22.0" + android:viewportHeight="18.0"> + <group + android:translateX="0.5" + android:translateY="0.5" > + <path + android:pathData="m 9.2771788,1.842391 c -0.5341993,-0.05549 -1.0854891,-0.0556 -1.6467391,0.0081 -3.4399999,0.39 -6.2098912,3.2184785 -6.5298912,6.6684783 -0.26000004,2.6099997 0.8777717,5.1510867 2.9877717,6.7010867 0.36,0.26 0.8623912,0.151739 1.0923913,-0.228261 0.1899999,-0.32 0.098424,-0.741957 -0.1915761,-0.961957 -1.7,-1.259997 -2.7078261,-3.380975 -2.3478261,-5.7309751 C 3.0413094,5.698863 5.2101681,3.620113 7.8301679,3.3301128 10.338407,3.0436568 12.553222,4.3446002 13.675277,6.3423412 A 7.0169487,8.1355924 0 0 1 14.478266,4.8097325 C 13.262879,3.1798315 11.402845,2.063138 9.2771788,1.842341 Z M 8.4986462,4.9605977 c -0.18,0 -0.3498912,0.00854 -0.5298912,0.028533 -1.86,0.23 -3.3884784,1.7125 -3.6684783,3.5624999 -0.2300001,1.5200004 0.351413,2.9092944 1.361413,3.8192934 0.34,0.3 0.8764674,0.228804 1.0964673,-0.171195 0.1699993,-0.3 0.1010337,-0.668587 -0.1589677,-0.888586 C 5.8191898,10.611142 5.4791354,9.5390216 5.7391354,8.5190215 c 0.25,-1.0199998 1.0425001,-1.8084238 2.0624999,-2.0584238 1.5200001,-0.38 3.0583697,0.5384239 3.4483697,2.0584238 0.06,0.2300002 0.08967,0.462935 0.08967,0.6929351 0,0.8400004 -0.361577,1.5791854 -0.941577,2.0991854 -0.25,0.23 -0.328968,0.600814 -0.158968,0.900814 0.22,0.38 0.739783,0.489729 1.059783,0.199729 0.92,-0.81 1.451087,-1.979728 1.451087,-3.1997284 0,-2.3500003 -1.901359,-4.2513589 -4.2513588,-4.2513589 z m 0,2.8288044 c -0.78,0 -1.4184783,0.6425543 -1.4184783,1.4225545 0,0.78 0.6384783,1.4184784 1.4184783,1.4184784 0.78,0 1.4225543,-0.6384784 1.4225543,-1.4184784 0,-0.7800002 -0.6425543,-1.4225545 -1.4225543,-1.4225545 z m 4.9361418,4.7160329 c -0.387159,0.579128 -0.84606,1.109077 -1.40625,1.524456 -0.3,0.22 -0.3775,0.631957 -0.1875,0.961957 0.22,0.39 0.728315,0.488261 1.088315,0.228261 0.438174,-0.322866 0.826135,-0.698796 1.177989,-1.100544 a 7.0169487,8.1355924 0 0 1 -0.672554,-1.61413 z" + android:fillColor="#FFFFFFFF"/> + <path + android:pathData="m 21.149959,10.98593 v 0 q 0,1.31751 -0.814213,2.067022 -0.814212,0.749513 -2.248777,0.749513 v 0 q -1.609039,0 -2.471717,-1.0218 -0.862677,-1.021801 -0.862677,-3.0302636 v 0 q 0,-2.2075569 0.875601,-3.3230469 0.875602,-1.11549 2.504027,-1.11549 v 0 q 1.156698,0 1.825516,0.462592 0.668817,0.462591 0.946684,1.434619 v 0 l -1.712431,0.216656 q -0.245556,-0.813927 -1.098541,-0.813927 v 0 q -0.730207,0 -1.147005,0.661682 -0.4168,0.661682 -0.4168,2.008467 v 0 q 0.29079,-0.439168 0.807751,-0.673393 0.51696,-0.234223 1.169623,-0.234223 v 0 q 1.221318,0 1.932139,0.702671 0.71082,0.7026709 0.71082,1.9089215 z m -1.822285,0.04685 v 0 q 0,-0.70267 -0.358641,-1.0744998 -0.358642,-0.3718297 -0.985456,-0.3718297 v 0 q -0.600966,0 -0.962838,0.3484077 -0.361873,0.3484068 -0.361873,0.9222548 v 0 q 0,0.720242 0.378028,1.191617 0.378026,0.471375 0.991917,0.471375 v 0 q 0.61389,0 0.956377,-0.395255 0.342486,-0.395254 0.342486,-1.09207 z" + android:fillColor="#FFFFFFFF"/> + </group> + </vector> +</inset> diff --git a/packages/SystemUI/res/layout/keyguard_bottom_area.xml b/packages/SystemUI/res/layout/keyguard_bottom_area.xml index a3a7135dabad..42c854efc867 100644..100755 --- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml +++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml @@ -59,6 +59,15 @@ </LinearLayout> + <include layout="@layout/keyguard_emergency_carrier_area" + android:id="@+id/keyguard_selector_fade_container" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="60dp" + android:orientation="vertical" + android:layout_gravity="bottom|center_horizontal" + android:gravity="center_horizontal" /> + <com.android.systemui.animation.view.LaunchableImageView android:id="@+id/start_button" android:layout_height="@dimen/keyguard_affordance_fixed_height" diff --git a/packages/SystemUI/res/layout/mobile_signal_group.xml b/packages/SystemUI/res/layout/mobile_signal_group.xml index bfd079b59054..9b93e5c60c5b 100644 --- a/packages/SystemUI/res/layout/mobile_signal_group.xml +++ b/packages/SystemUI/res/layout/mobile_signal_group.xml @@ -1,5 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <!-- +/* + * Copyright (c) 2015-2017 The Linux Foundation. All rights reserved. + * Not a Contribution. +*/ +/* ** ** Copyright 2011, The Android Open Source Project ** @@ -62,7 +67,7 @@ <FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_gravity="center_vertical"> + > <com.android.systemui.statusbar.AnimatedImageView android:id="@+id/mobile_signal" android:layout_height="@dimen/qs_header_mobile_icon_size" diff --git a/packages/SystemUI/res/layout/qs_diaglog_secondary_generic_mobile_network.xml b/packages/SystemUI/res/layout/qs_diaglog_secondary_generic_mobile_network.xml new file mode 100644 index 000000000000..09f5e61dd6e5 --- /dev/null +++ b/packages/SystemUI/res/layout/qs_diaglog_secondary_generic_mobile_network.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + SPDX-License-Identifier: BSD-3-Clause-Clear +--> + +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + style="@style/InternetDialog.Network"> + + <FrameLayout + android:layout_width="24dp" + android:layout_height="24dp" + android:clickable="false" + android:layout_gravity="center_vertical|start"> + <ImageView + android:id="@+id/secondary_generic_signal_icon" + android:autoMirrored="true" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center"/> + </FrameLayout> + + <LinearLayout + android:layout_weight="1" + android:orientation="vertical" + android:clickable="false" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:gravity="start|center_vertical"> + <TextView + android:id="@+id/secondary_generic_mobile_title" + android:maxLines="1" + style="@style/InternetDialog.NetworkTitle"/> + <TextView + android:id="@+id/secondary_generic_mobile_summary" + style="@style/InternetDialog.NetworkSummary"/> + <TextView + android:id="@+id/secondary_generic_airplane_mode_summary" + android:text="@string/airplane_mode" + android:visibility="gone" + style="@style/InternetDialog.NetworkSummary"/> + </LinearLayout> + + <View + android:id="@+id/secondary_generic_mobile_toggle_divider" + android:layout_width="1dp" + android:layout_height="28dp" + android:layout_marginStart="7dp" + android:layout_marginEnd="16dp" + android:layout_gravity="center_vertical" + android:background="?android:attr/textColorSecondary"/> + + <FrameLayout + android:layout_width="@dimen/settingslib_switch_track_width" + android:layout_height="48dp" + android:layout_gravity="end|center_vertical"> + <Switch + android:id="@+id/secondary_generic_mobile_toggle" + android:contentDescription="@string/mobile_data_settings_title" + android:switchMinWidth="@dimen/settingslib_switch_track_width" + android:layout_gravity="center" + android:layout_width="@dimen/settingslib_switch_track_width" + android:layout_height="match_parent" + android:track="@drawable/settingslib_track_selector" + android:thumb="@drawable/settingslib_thumb_selector" + android:theme="@style/MainSwitch.Settingslib"/> + </FrameLayout> + +</LinearLayout> diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml index 18fc39692b82..e8b67b6279bc 100644 --- a/packages/SystemUI/res/values-zh-rCN/strings.xml +++ b/packages/SystemUI/res/values-zh-rCN/strings.xml @@ -14,6 +14,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear */ --> @@ -811,6 +815,7 @@ <string name="running_foreground_services_msg" msgid="3009459259222695385">"点按即可详细了解电量和流量消耗情况"</string> <string name="mobile_data_disable_title" msgid="5366476131671617790">"要关闭移动数据网络吗?"</string> <string name="mobile_data_disable_message" msgid="8604966027899770415">"您将无法通过<xliff:g id="CARRIER">%s</xliff:g>使用移动数据或互联网,只能通过 WLAN 连接到互联网。"</string> + <string name="mobile_data_disable_message_on_dual_data">"您将无法通过<xliff:g id="CARRIER">%s</xliff:g>使用移动数据或互联网。"</string> <string name="mobile_data_disable_message_default_carrier" msgid="6496033312431658238">"您的运营商"</string> <string name="auto_data_switch_disable_title" msgid="5146527155665190652">"是否要切换回 <xliff:g id="CARRIER">%s</xliff:g>?"</string> <string name="auto_data_switch_disable_message" msgid="5885533647399535852">"移动流量不会根据网络可用情况自动切换"</string> @@ -1158,4 +1163,5 @@ <string name="assistant_attention_content_description" msgid="6830215897604642875">"已开启 Google 助理感知功能"</string> <string name="set_default_notes_app_toast_content" msgid="2812374329662610753">"在设置中设置默认记事应用"</string> <string name="install_app" msgid="5066668100199613936">"安装应用"</string> + <string name="mobile_data_summary_not_allowed_to_disable_data">其它SIM卡通话期间,不可用</string> </resources> diff --git a/packages/SystemUI/res/values-zh-rCN/strings_qti.xml b/packages/SystemUI/res/values-zh-rCN/strings_qti.xml new file mode 100644 index 000000000000..d6f1183dcb95 --- /dev/null +++ b/packages/SystemUI/res/values-zh-rCN/strings_qti.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + --> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string-array name="customization_carrier_name_list"> + <item>46000:中国移动</item> + <item>46002:中国移动</item> + <item>46004:中国移动</item> + <item>46007:中国移动</item> + <item>46008:中国移动</item> + <item>46020:中国移动</item> + <item>46021:中国移动</item> + <item>46022:中国移动</item> + + <item>46001:中国联通</item> + <item>46006:中国联通</item> + <item>46009:中国联通</item> + <item>46031:中国联通</item> + <item>46032:中国联通</item> + + <item>46003:中国电信</item> + <item>46005:中国电信</item> + <item>46011:中国电信</item> + <item>46050:中国电信</item> + <item>46051:中国电信</item> + + <item>46015:中国广电</item> + <item>46060:中国广电</item> + <item>46061:中国广电</item> + </string-array> +</resources> diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index 166bd2ac4439..4fc98b48bfde 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -345,7 +345,7 @@ <bool name="config_enableNotificationShadeDrag">true</bool> <!-- Whether to show activity indicators in the status bar --> - <bool name="config_showActivity">false</bool> + <bool name="config_showActivity">true</bool> <!-- Whether or not the button to clear all notifications will be shown. --> <bool name="config_enableNotificationsClearAll">true</bool> @@ -373,6 +373,7 @@ the other notifications need to be manually expanded by the user. --> <bool name="config_alwaysExpandNonGroupedNotifications">false</bool> + <!-- Whether or not an expandable notification can be manually expanded or collapsed by the user. Grouped notifications are still expandable even if this value is false. --> <bool name="config_enableNonGroupedNotificationExpand">true</bool> @@ -414,6 +415,9 @@ <item>120</item> </integer-array> + + + <!-- Smart replies in notifications: Whether smart replies in notifications are enabled. --> <bool name="config_smart_replies_in_notifications_enabled">true</bool> diff --git a/packages/SystemUI/res/values/config_qti.xml b/packages/SystemUI/res/values/config_qti.xml new file mode 100644 index 000000000000..b20022c81dcc --- /dev/null +++ b/packages/SystemUI/res/values/config_qti.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + --> +<resources> + <bool name="config_show_roaming_customization_carrier_name">false</bool> + <dimen name="internet_dialog_text_size">16sp</dimen> + <dimen name="internet_dialog_text_size_second">14sp</dimen> +</resources> diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 070748cb92f8..dd5b82c9ee3b 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -14,6 +14,11 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * + * Changes from Qualcomm Innovation Center are provided under the following license: + * + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear */ --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> @@ -2233,6 +2238,17 @@ <!-- Message body of the dialog to turn off data usage [CHAR LIMIT=NONE] --> <string name="mobile_data_disable_message">You won\’t have access to data or the internet through <xliff:g id="carrier" example="T-Mobile">%s</xliff:g>. Internet will only be available via Wi-Fi.</string> + <string name="mobile_data_disable_message_on_dual_data">You won\’t have access to data or the internet through <xliff:g id="carrier" example="T-Mobile">%s</xliff:g>.</string> + + <!-- Message body of the dialog to turn off mobile data when IMS is registered on C_IWLAN, UE is in C_IWLAN-only mode, and device is in a call [CHAR LIMIT=NONE] --> + <string name="data_disable_ciwlan_call_will_drop_message">Disabling mobile data will cause ongoing call drop.</string> + + <!-- Message body of the dialog to turn off mobile data when IMS is registered on C_IWLAN, UE might be in C_IWLAN-only mode, and device is in a call [CHAR LIMIT=NONE] --> + <string name="data_disable_ciwlan_call_might_drop_message">Disabling mobile data might cause ongoing call drop.</string> + + <!-- Internet dialog, summary of mobile network when there is an ongoing call on the non default data subscription. [CHAR LIMIT=NONE] --> + <string name="mobile_data_summary_not_allowed_to_disable_data">Unavailable during a call on the other SIM</string> + <!-- Text used to refer to the user's current carrier in mobile_data_disable_message if the users's mobile network carrier name is not available [CHAR LIMIT=NONE] --> <string name="mobile_data_disable_message_default_carrier">your carrier</string> @@ -2712,7 +2728,7 @@ <string name="media_output_broadcast_last_update_error">Can\u2019t save.</string> <!-- The hint message when Broadcast code is less than 4 characters [CHAR LIMIT=60] --> <string name="media_output_broadcast_code_hint_no_less_than_min">Use at least 4 characters</string> - <!-- The hint message when Broadcast edit is more than 16/254 characters [CHAR LIMIT=60] --> + <!-- The hint message when Broadcast edit is more than 16/32 characters [CHAR LIMIT=60] --> <string name="media_output_broadcast_edit_hint_no_more_than_max">Use fewer than <xliff:g id="length" example="16">%1$d</xliff:g> characters</string> <!-- Label for clip data when copying the build number off QS [CHAR LIMIT=NONE]--> diff --git a/packages/SystemUI/res/values/strings_qti.xml b/packages/SystemUI/res/values/strings_qti.xml new file mode 100644 index 000000000000..c78157620c02 --- /dev/null +++ b/packages/SystemUI/res/values/strings_qti.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + --> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string-array name="customization_carrier_name_list"> + <item>46000:CHN-CMCC</item> + <item>46002:CHN-CMCC</item> + <item>46004:CHN-CMCC</item> + <item>46007:CHN-CMCC</item> + <item>46008:CHN-CMCC</item> + <item>46020:CHN-CMCC</item> + <item>46021:CHN-CMCC</item> + <item>46022:CHN-CMCC</item> + + <item>46001:CHN-CU</item> + <item>46006:CHN-CU</item> + <item>46009:CHN-CU</item> + <item>46031:CHN-CU</item> + <item>46032:CHN-CU</item> + + <item>46003:CHN-CT</item> + <item>46005:CHN-CT</item> + <item>46011:CHN-CT</item> + <item>46050:CHN-CT</item> + <item>46051:CHN-CT</item> + + <item>46015:CHN-CBN</item> + <item>46060:CHN-CBN</item> + <item>46061:CHN-CBN</item> + </string-array> + <string name="connector" translatable="false">ꚙ</string> +</resources> diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index cb5342a0d66b..5fcde457b09d 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -14,6 +14,14 @@ limitations under the License. --> +<!-- +** +** Changes from Qualcomm Innovation Center are provided under the following license: +** Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. +** SPDX-License-Identifier: BSD-3-Clause-Clear +*/ +--> + <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"> @@ -1169,13 +1177,13 @@ <style name="TextAppearance.InternetDialog"> <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item> - <item name="android:textSize">16sp</item> + <item name="android:textSize">@dimen/internet_dialog_text_size</item> <item name="android:textColor">?android:attr/textColorPrimary</item> <item name="android:textDirection">locale</item> </style> <style name="TextAppearance.InternetDialog.Secondary"> - <item name="android:textSize">14sp</item> + <item name="android:textSize">@dimen/internet_dialog_text_size_second</item> <item name="android:textColor">?android:attr/textColorSecondary</item> </style> diff --git a/packages/SystemUI/src/com/android/keyguard/CarrierText.java b/packages/SystemUI/src/com/android/keyguard/CarrierText.java index 87a9b0f17a1c..9fc61eb76256 100644 --- a/packages/SystemUI/src/com/android/keyguard/CarrierText.java +++ b/packages/SystemUI/src/com/android/keyguard/CarrierText.java @@ -17,6 +17,7 @@ package com.android.keyguard; import android.content.Context; +import android.content.res.Configuration; import android.content.res.TypedArray; import android.text.TextUtils; import android.text.method.SingleLineTransformationMethod; @@ -34,6 +35,7 @@ public class CarrierText extends TextView { private final boolean mShowAirplaneMode; private final String mDebugLocation; + private OnConfigurationChangedListener mOnConfigurationChangedListener; public CarrierText(Context context) { this(context, null); @@ -97,4 +99,20 @@ public class CarrierText extends TextView { return source; } } + + public void setOnConfigurationChangedListener(OnConfigurationChangedListener listener) { + mOnConfigurationChangedListener = listener; + } + + @Override + protected void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + if (mOnConfigurationChangedListener != null) { + mOnConfigurationChangedListener.onConfigurationChanged(newConfig); + } + } + + interface OnConfigurationChangedListener { + void onConfigurationChanged(Configuration newConfig); + } } diff --git a/packages/SystemUI/src/com/android/keyguard/CarrierTextController.java b/packages/SystemUI/src/com/android/keyguard/CarrierTextController.java index 33f9ecd03bca..eb75a00dc5a2 100644 --- a/packages/SystemUI/src/com/android/keyguard/CarrierTextController.java +++ b/packages/SystemUI/src/com/android/keyguard/CarrierTextController.java @@ -16,8 +16,13 @@ package com.android.keyguard; +import android.content.res.Configuration; +import android.telephony.TelephonyManager; + import com.android.systemui.util.ViewController; +import java.util.Locale; + import javax.inject.Inject; /** @@ -26,6 +31,7 @@ import javax.inject.Inject; public class CarrierTextController extends ViewController<CarrierText> { private final CarrierTextManager mCarrierTextManager; private final KeyguardUpdateMonitor mKeyguardUpdateMonitor; + private Locale mLocale; private final CarrierTextManager.CarrierTextCallback mCarrierTextCallback = new CarrierTextManager.CarrierTextCallback() { @Override @@ -56,6 +62,8 @@ public class CarrierTextController extends ViewController<CarrierText> { .setDebugLocationString(mView.getDebugLocation()) .build(); mKeyguardUpdateMonitor = keyguardUpdateMonitor; + mView.setOnConfigurationChangedListener(this::refreshInfoIfNeeded); + mLocale = mView.getResources().getConfiguration().locale; } @Override @@ -73,4 +81,13 @@ public class CarrierTextController extends ViewController<CarrierText> { protected void onViewDetached() { mCarrierTextManager.setListening(null); } + + private void refreshInfoIfNeeded(Configuration newConfig) { + if (mLocale != newConfig.locale) { + mCarrierTextManager.loadCarrierMap(); + mCarrierTextManager.updateCarrierText(); + mLocale = newConfig.locale; + } + + } } diff --git a/packages/SystemUI/src/com/android/keyguard/CarrierTextManager.java b/packages/SystemUI/src/com/android/keyguard/CarrierTextManager.java index b52ee01bfa61..16b26028d728 100644 --- a/packages/SystemUI/src/com/android/keyguard/CarrierTextManager.java +++ b/packages/SystemUI/src/com/android/keyguard/CarrierTextManager.java @@ -14,6 +14,12 @@ * limitations under the License. */ +/** + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.keyguard; import static com.android.keyguard.logging.CarrierTextManagerLogger.REASON_ACTIVE_DATA_SUB_CHANGED; @@ -44,7 +50,10 @@ import com.android.systemui.dagger.qualifiers.Background; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.keyguard.WakefulnessLifecycle; import com.android.systemui.statusbar.pipeline.wifi.data.repository.WifiRepository; +import com.android.systemui.statusbar.policy.FiveGServiceClient; +import com.android.systemui.statusbar.policy.FiveGServiceClient.FiveGServiceState; import com.android.systemui.telephony.TelephonyListenerManager; +import com.android.systemui.util.CarrierNameCustomization; import java.util.Arrays; import java.util.List; @@ -100,7 +109,8 @@ public class CarrierTextManager { if (callback != null) callback.startedGoingToSleep(); } }; - + private FiveGServiceClient mFiveGServiceClient; + private CarrierNameCustomization mCarrierNameCustomization; @VisibleForTesting protected final KeyguardUpdateMonitorCallback mCallback = new KeyguardUpdateMonitorCallback() { @Override @@ -181,8 +191,8 @@ public class CarrierTextManager { @Main Executor mainExecutor, @Background Executor bgExecutor, KeyguardUpdateMonitor keyguardUpdateMonitor, - CarrierTextManagerLogger logger) { - + CarrierTextManagerLogger logger, + CarrierNameCustomization carrierNameCustomization) { mContext = context; mIsEmergencyCallCapable = telephonyManager.isVoiceCapable(); @@ -208,6 +218,7 @@ public class CarrierTextManager { handleSetListening(mCarrierTextCallback); } }); + mCarrierNameCustomization = carrierNameCustomization; } private TelephonyManager getTelephonyManager() { @@ -307,15 +318,19 @@ public class CarrierTextManager { return mKeyguardUpdateMonitor.getFilteredSubscriptionInfo(); } - protected void updateCarrierText() { + public void updateCarrierText() { Trace.beginSection("CarrierTextManager#updateCarrierText"); boolean allSimsMissing = true; boolean anySimReadyAndInService = false; + boolean missingSimsWithSubs = false; + boolean showCustomizeName = getContext().getResources().getBoolean( + com.android.systemui.R.bool.config_show_customize_carrier_name); CharSequence displayText = null; List<SubscriptionInfo> subs = getSubscriptionInfo(); final int numSubs = subs.size(); final int[] subsIds = new int[numSubs]; + if (DEBUG) Log.d(TAG, "updateCarrierText(): " + numSubs); // This array will contain in position i, the index of subscription in slot ID i. // -1 if no subscription in that slot final int[] subOrderBySlot = new int[mSimSlotsNumber]; @@ -332,6 +347,14 @@ public class CarrierTextManager { subOrderBySlot[subs.get(i).getSimSlotIndex()] = i; int simState = mKeyguardUpdateMonitor.getSimState(subId); CharSequence carrierName = subs.get(i).getCarrierName(); + if (showCustomizeName) { + if (mCarrierNameCustomization.isRoamingCustomizationEnabled() + && mCarrierNameCustomization.isRoaming(subId)) { + carrierName = mCarrierNameCustomization.getRoamingCarrierName(subId); + } else { + carrierName = getCustomizeCarrierName(carrierName, subs.get(i)); + } + } CharSequence carrierTextForSimState = getCarrierTextForSimState(simState, carrierName); mLogger.logUpdateLoopStart(subId, simState, String.valueOf(carrierName)); if (carrierTextForSimState != null) { @@ -557,6 +580,7 @@ public class CarrierTextManager { return CarrierTextManager.StatusMode.SimLocked; case TelephonyManager.SIM_STATE_PUK_REQUIRED: return CarrierTextManager.StatusMode.SimPukLocked; + case TelephonyManager.SIM_STATE_LOADED: case TelephonyManager.SIM_STATE_READY: return CarrierTextManager.StatusMode.Normal; case TelephonyManager.SIM_STATE_PERM_DISABLED: @@ -657,6 +681,7 @@ public class CarrierTextManager { private boolean mShowAirplaneMode; private boolean mShowMissingSim; private String mDebugLocation; + private CarrierNameCustomization mCarrierNameCustomization; @Inject public Builder( @@ -669,7 +694,8 @@ public class CarrierTextManager { @Main Executor mainExecutor, @Background Executor bgExecutor, KeyguardUpdateMonitor keyguardUpdateMonitor, - CarrierTextManagerLogger logger) { + CarrierTextManagerLogger logger, + CarrierNameCustomization carrierNameCustomization) { mContext = context; mSeparator = resources.getString( com.android.internal.R.string.kg_text_message_separator); @@ -681,6 +707,7 @@ public class CarrierTextManager { mBgExecutor = bgExecutor; mKeyguardUpdateMonitor = keyguardUpdateMonitor; mLogger = logger; + mCarrierNameCustomization = carrierNameCustomization; } /** */ @@ -710,7 +737,7 @@ public class CarrierTextManager { return new CarrierTextManager( mContext, mSeparator, mShowAirplaneMode, mShowMissingSim, mWifiRepository, mTelephonyManager, mTelephonyListenerManager, mWakefulnessLifecycle, - mMainExecutor, mBgExecutor, mKeyguardUpdateMonitor, mLogger); + mMainExecutor, mBgExecutor, mKeyguardUpdateMonitor, mLogger, mCarrierNameCustomization); } } @@ -771,4 +798,123 @@ public class CarrierTextManager { */ default void finishedWakingUp() {}; } + + private String getCustomizeCarrierName(CharSequence originCarrierName, + SubscriptionInfo sub) { + StringBuilder newCarrierName = new StringBuilder(); + int networkType = getNetworkType(sub.getSubscriptionId()); + String networkClass = networkTypeToString(networkType); + + String fiveGNetworkClass = get5GNetworkClass(sub, networkType); + if ( fiveGNetworkClass != null ) { + networkClass = fiveGNetworkClass; + } + + if (!TextUtils.isEmpty(originCarrierName)) { + String[] names = originCarrierName.toString().split(mSeparator.toString(), 2); + for (int j = 0; j < names.length; j++) { + names[j] = getLocalString( + names[j], com.android.systemui.R.array.origin_carrier_names, + com.android.systemui.R.array.locale_carrier_names); + if (!TextUtils.isEmpty(names[j])) { + if (!TextUtils.isEmpty(networkClass)) { + names[j] = new StringBuilder().append(names[j]).append(" ") + .append(networkClass).toString(); + } + if (j > 0 && names[j].equals(names[j - 1])) { + continue; + } + if (j > 0) { + newCarrierName.append(mSeparator); + } + newCarrierName.append(names[j]); + } + } + } + return newCarrierName.toString(); + } + + /** + * parse the string to current language. + * + * @param originalString original string + * @param originNamesId the id of the original string array. + * @param localNamesId the id of the local string keys. + * @return local language string + */ + private String getLocalString(String originalString, + int originNamesId, int localNamesId) { + String[] origNames = getContext().getResources().getStringArray(originNamesId); + String[] localNames = getContext().getResources().getStringArray(localNamesId); + for (int i = 0; i < origNames.length; i++) { + if (origNames[i].equalsIgnoreCase(originalString)) { + return localNames[i]; + } + } + return originalString; + } + + private int getNetworkType(int subId) { + int networkType = TelephonyManager.NETWORK_TYPE_UNKNOWN; + ServiceState ss = mKeyguardUpdateMonitor.mServiceStates.get(subId); + if (ss != null && (ss.getDataRegState() == ServiceState.STATE_IN_SERVICE + || ss.getVoiceRegState() == ServiceState.STATE_IN_SERVICE)) { + networkType = ss.getDataNetworkType(); + if (networkType == TelephonyManager.NETWORK_TYPE_UNKNOWN) { + networkType = ss.getVoiceNetworkType(); + } + } + return networkType; + } + + private String networkTypeToString(int networkType) { + int classId = com.android.systemui.R.string.config_rat_unknown; + long mask = TelephonyManager.getBitMaskForNetworkType(networkType); + if ((mask & TelephonyManager.NETWORK_CLASS_BITMASK_2G) != 0) { + classId = com.android.systemui.R.string.config_rat_2g; + } else if ((mask & TelephonyManager.NETWORK_CLASS_BITMASK_3G) != 0) { + classId = com.android.systemui.R.string.config_rat_3g; + } else if ((mask & TelephonyManager.NETWORK_CLASS_BITMASK_4G) != 0) { + classId = com.android.systemui.R.string.config_rat_4g; + } + return getContext().getResources().getString(classId); + } + + + private String get5GNetworkClass(SubscriptionInfo sub, int networkType) { + if ( networkType == TelephonyManager.NETWORK_TYPE_NR ) { + return mContext.getResources().getString(R.string.data_connection_5g); + } + + int slotIndex = sub.getSimSlotIndex(); + int subId = sub.getSubscriptionId(); + + if ( mFiveGServiceClient == null ) { + mFiveGServiceClient = FiveGServiceClient.getInstance(mContext); + mFiveGServiceClient.registerCallback(mCallback); + } + FiveGServiceState fiveGServiceState = + mFiveGServiceClient.getCurrentServiceState(slotIndex); + if ( fiveGServiceState.isNrIconTypeValid() && isDataRegisteredOnLte(subId)) { + return mContext.getResources().getString(R.string.data_connection_5g); + } + + return null; + } + + private boolean isDataRegisteredOnLte(int subId) { + TelephonyManager telephonyManager = (TelephonyManager) + mContext.getSystemService(Context.TELEPHONY_SERVICE); + int dataType = telephonyManager.getDataNetworkType(subId); + if ( dataType == TelephonyManager.NETWORK_TYPE_LTE || + dataType == TelephonyManager.NETWORK_TYPE_LTE_CA) { + return true; + }else{ + return false; + } + } + + public void loadCarrierMap() { + mCarrierNameCustomization.loadCarrierMap(getContext()); + } } diff --git a/packages/SystemUI/src/com/android/keyguard/EmergencyButton.java b/packages/SystemUI/src/com/android/keyguard/EmergencyButton.java index c5a06b48e015..27d6bb15f2a7 100644 --- a/packages/SystemUI/src/com/android/keyguard/EmergencyButton.java +++ b/packages/SystemUI/src/com/android/keyguard/EmergencyButton.java @@ -17,6 +17,7 @@ package com.android.keyguard; import android.content.Context; +import com.android.systemui.Dependency; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; @@ -24,6 +25,9 @@ import android.view.ViewConfiguration; import android.widget.Button; import com.android.internal.util.EmergencyAffordanceManager; +import com.android.systemui.R; + +import java.util.List; /** * This class implements a smart emergency button that updates itself based @@ -91,8 +95,8 @@ public class EmergencyButton extends Button { return super.performLongClick(); } - void updateEmergencyCallButton(boolean isInCall, boolean hasTelephonyRadio, boolean simLocked, - boolean isSecure) { + public void updateEmergencyCallButton(boolean isInCall, boolean hasTelephonyRadio, boolean simLocked, + boolean isSecure, boolean isEmergencyCapable) { boolean visible = false; if (hasTelephonyRadio) { // Emergency calling requires a telephony radio. @@ -104,7 +108,12 @@ public class EmergencyButton extends Button { visible = mEnableEmergencyCallWhileSimLocked; } else { // Only show if there is a secure screen (pin/pattern/SIM pin/SIM puk); - visible = isSecure; + visible = isSecure + || mContext.getResources().getBoolean(R.bool.config_showEmergencyButton); + } + + if (mContext.getResources().getBoolean(R.bool.kg_hide_emgcy_btn_when_oos)) { + visible = visible && isEmergencyCapable; } } } @@ -122,4 +131,5 @@ public class EmergencyButton extends Button { setVisibility(View.GONE); } } + } diff --git a/packages/SystemUI/src/com/android/keyguard/EmergencyButtonController.java b/packages/SystemUI/src/com/android/keyguard/EmergencyButtonController.java index f7e8eb492584..2927c4e32567 100644 --- a/packages/SystemUI/src/com/android/keyguard/EmergencyButtonController.java +++ b/packages/SystemUI/src/com/android/keyguard/EmergencyButtonController.java @@ -14,6 +14,13 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.keyguard; import static com.android.systemui.DejankUtils.whitelistIpcs; @@ -28,6 +35,9 @@ import android.os.PowerManager; import android.os.SystemClock; import android.os.UserHandle; import android.telecom.TelecomManager; +import android.telephony.CellInfo; +import android.telephony.ServiceState; +import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.util.Log; @@ -40,6 +50,7 @@ import com.android.internal.widget.LockPatternUtils; import com.android.keyguard.dagger.KeyguardBouncerScope; import com.android.systemui.dagger.qualifiers.Background; import com.android.systemui.dagger.qualifiers.Main; +import com.android.systemui.R; import com.android.systemui.shade.ShadeController; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener; @@ -47,6 +58,7 @@ import com.android.systemui.util.EmergencyDialerConstants; import com.android.systemui.util.ViewController; import java.util.concurrent.Executor; +import java.util.HashMap; import javax.inject.Inject; @@ -63,11 +75,13 @@ public class EmergencyButtonController extends ViewController<EmergencyButton> { private final TelecomManager mTelecomManager; private final MetricsLogger mMetricsLogger; - private EmergencyButtonCallback mEmergencyButtonCallback; private LockPatternUtils mLockPatternUtils; private Executor mMainExecutor; private Executor mBackgroundExecutor; + private EmergencyButtonCallback mEmergencyButtonCallback; + private HashMap<Integer, ServiceState> mServiceStates = new HashMap<>(); + private final KeyguardUpdateMonitorCallback mInfoCallback = new KeyguardUpdateMonitorCallback() { @Override @@ -79,6 +93,12 @@ public class EmergencyButtonController extends ViewController<EmergencyButton> { public void onPhoneStateChanged(int phoneState) { updateEmergencyCallButton(); } + + @Override + public void onServiceStateChanged(int subId, ServiceState state) { + mServiceStates.put(subId, state); + updateEmergencyCallButton(); + } }; private final ConfigurationListener mConfigurationListener = new ConfigurationListener() { @@ -148,7 +168,8 @@ public class EmergencyButtonController extends ViewController<EmergencyButton> { /* hasTelephonyRadio= */ getContext().getPackageManager() .hasSystemFeature(PackageManager.FEATURE_TELEPHONY), /* simLocked= */ mKeyguardUpdateMonitor.isSimPinVoiceSecure(), - /* isSecure= */ isSecure)); + /* isSecure= */ isSecure, + isEmergencyCapable())); }); } } @@ -198,6 +219,21 @@ public class EmergencyButtonController extends ViewController<EmergencyButton> { }); } + private boolean isEmergencyCapable() { + if (!mKeyguardUpdateMonitor.isOOS()){ + return true; + } + for (int subId : mServiceStates.keySet()) { + ServiceState ss = mServiceStates.get(subId); + if (ss != null) { + if (ss.isEmergencyOnly()) { + return true; + } + } + } + return false; + } + /** */ public interface EmergencyButtonCallback { /** */ diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputView.java index c6d147108611..5047277a5e43 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputView.java @@ -65,6 +65,7 @@ public abstract class KeyguardAbsKeyInputView extends KeyguardInputView { return R.string.kg_wrong_password; } + protected abstract void resetPasswordText(boolean animate, boolean announce); protected abstract LockscreenCredential getEnteredCredential(); protected abstract void setPasswordEntryEnabled(boolean enabled); diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputViewController.java index d7e8616d17e7..12fccc59dc90 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardAbsKeyInputViewController.java @@ -170,6 +170,7 @@ public abstract class KeyguardAbsKeyInputViewController<T extends KeyguardAbsKey void onPasswordChecked(int userId, boolean matched, int timeoutMs, boolean isValidPassword) { boolean dismissKeyguard = KeyguardUpdateMonitor.getCurrentUser() == userId; if (matched) { + mLockPatternUtils.sanitizePassword(); getKeyguardSecurityCallback().reportUnlockAttempt(userId, true, 0); if (dismissKeyguard) { mDismissing = true; diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardConstants.java b/packages/SystemUI/src/com/android/keyguard/KeyguardConstants.java index a5b62b6e7c64..a5b62b6e7c64 100644..100755 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardConstants.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardConstants.java diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardPatternViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardPatternViewController.java index 3d255a58cf8e..2239556e4fd3 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardPatternViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardPatternViewController.java @@ -164,6 +164,7 @@ public class KeyguardPatternViewController boolean isValidPattern) { boolean dismissKeyguard = KeyguardUpdateMonitor.getCurrentUser() == userId; if (matched) { + mLockPatternUtils.sanitizePassword(); getKeyguardSecurityCallback().reportUnlockAttempt(userId, true, 0); if (dismissKeyguard) { mLockPatternView.setDisplayMode(LockPatternView.DisplayMode.Correct); diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityModel.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityModel.java index bacd29f661ae..c50d2914ba74 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityModel.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityModel.java @@ -23,6 +23,7 @@ import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import com.android.internal.widget.LockPatternUtils; +import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.qualifiers.Main; @@ -66,9 +67,8 @@ public class KeyguardSecurityModel { return SecurityMode.SimPuk; } - if (SubscriptionManager.isValidSubscriptionId( - mKeyguardUpdateMonitor.getNextSubIdForState( - TelephonyManager.SIM_STATE_PIN_REQUIRED))) { + int subId = mKeyguardUpdateMonitor.getUnlockedSubIdForState(TelephonyManager.SIM_STATE_PIN_REQUIRED); + if (SubscriptionManager.isValidSubscriptionId((subId))){ return SecurityMode.SimPin; } diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java index 9d170150a709..9b5995af1d4c 100644..100755 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinView.java @@ -28,6 +28,7 @@ import com.android.systemui.R; public class KeyguardSimPinView extends KeyguardSimInputView { public static final String TAG = "KeyguardSimPinView"; + public KeyguardSimPinView(Context context) { this(context, null); } diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java index 61280affc29e..0a610ceb45de 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPinViewController.java @@ -61,18 +61,24 @@ public class KeyguardSimPinViewController private int mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; private AlertDialog mRemainingAttemptsDialog; private ImageView mSimImageView; + private int mSlotId; KeyguardUpdateMonitorCallback mUpdateMonitorCallback = new KeyguardUpdateMonitorCallback() { @Override public void onSimStateChanged(int subId, int slotId, int simState) { - if (DEBUG) Log.v(TAG, "onSimStateChanged(subId=" + subId + ",state=" + simState + ")"); - if (simState == TelephonyManager.SIM_STATE_READY) { + if (DEBUG) Log.v(TAG, "onSimStateChanged(subId=" + subId + ",slotId=" + slotId + + ",simState=" + simState + ")"); + + if ((simState == TelephonyManager.SIM_STATE_READY) + || (simState == TelephonyManager.SIM_STATE_LOADED)) { mRemainingAttempts = -1; resetState(); } else { resetState(); } } + + }; protected KeyguardSimPinViewController(KeyguardSimPinView view, @@ -99,7 +105,7 @@ public class KeyguardSimPinViewController @Override void resetState() { super.resetState(); - if (DEBUG) Log.v(TAG, "Resetting state"); + if (DEBUG) Log.v(TAG, "Resetting state mShowDefaultMessage="+mShowDefaultMessage); handleSubInfoChangeIfNeeded(); mMessageAreaController.setMessage(""); if (mShowDefaultMessage) { @@ -118,7 +124,6 @@ public class KeyguardSimPinViewController public void onResume(int reason) { super.onResume(reason); mKeyguardUpdateMonitor.registerCallback(mUpdateMonitorCallback); - mView.resetState(); } @Override @@ -131,6 +136,8 @@ public class KeyguardSimPinViewController mSimUnlockProgressDialog.dismiss(); mSimUnlockProgressDialog = null; } + + mMessageAreaController.setMessage(""); } @Override @@ -241,9 +248,17 @@ public class KeyguardSimPinViewController displayMessage = mView.getResources().getString( R.string.kg_password_wrong_pin_code_pukked); } else if (attemptsRemaining > 0) { - msgId = isDefault ? R.string.kg_password_default_pin_message : - R.string.kg_password_wrong_pin_code; - displayMessage = icuMessageFormat(mView.getResources(), msgId, attemptsRemaining); + int count = TelephonyManager.getDefault().getSimCount(); + if ( count > 1 ) { + msgId = isDefault ? R.plurals.kg_password_default_pin_message_multi_sim : + R.plurals.kg_password_wrong_pin_code_multi_sim; + displayMessage = mView.getContext().getResources() + .getQuantityString(msgId, attemptsRemaining, mSlotId, attemptsRemaining); + }else { + msgId = isDefault ? R.string.kg_password_default_pin_message : + R.string.kg_password_wrong_pin_code; + displayMessage = icuMessageFormat(mView.getResources(), msgId, attemptsRemaining); + } } else { msgId = isDefault ? R.string.kg_sim_pin_instructions : R.string.kg_password_pin_failed; displayMessage = mView.getResources().getString(msgId); @@ -265,6 +280,7 @@ public class KeyguardSimPinViewController return; } + mSlotId = SubscriptionManager.getSlotIndex(mSubId) + 1; // Sending empty PIN here to query the number of remaining PIN attempts new CheckSimPin("", mSubId) { void onSimCheckResponse(final PinResult result) { @@ -341,11 +357,17 @@ public class KeyguardSimPinViewController private void handleSubInfoChangeIfNeeded() { int subId = mKeyguardUpdateMonitor - .getNextSubIdForState(TelephonyManager.SIM_STATE_PIN_REQUIRED); - if (subId != mSubId && SubscriptionManager.isValidSubscriptionId(subId)) { - mSubId = subId; + .getUnlockedSubIdForState(TelephonyManager.SIM_STATE_PIN_REQUIRED); + if (SubscriptionManager.isValidSubscriptionId(subId)) { + if (DEBUG) Log.v(TAG, "handleSubInfoChangeIfNeeded mSubId="+mSubId+" subId="+ subId); mShowDefaultMessage = true; - mRemainingAttempts = -1; + if(subId != mSubId){ + mSubId = subId; + mRemainingAttempts = -1; + } + }else{ + //false by default and keep false except in PIN lock state + mShowDefaultMessage = false; } } } diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java index 5f45fe31a779..b7fb75ae153f 100644..100755 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukView.java @@ -19,11 +19,15 @@ package com.android.keyguard; import static com.android.systemui.util.PluralMessageFormaterKt.icuMessageFormat; import android.content.Context; +import android.telephony.SubscriptionInfo; import android.util.AttributeSet; import android.util.Log; +import com.android.systemui.Dependency; import com.android.systemui.R; +import java.util.HashMap; +import java.util.Map; /** * Displays a PIN pad for entering a PUK (Pin Unlock Kode) provided by a carrier. @@ -31,6 +35,7 @@ import com.android.systemui.R; public class KeyguardSimPukView extends KeyguardSimInputView { private static final boolean DEBUG = KeyguardConstants.DEBUG; public static final String TAG = "KeyguardSimPukView"; + private Map<String, String> mWrongPukCodeMessageMap = new HashMap<>(4); public KeyguardSimPukView(Context context) { this(context, null); @@ -38,6 +43,35 @@ public class KeyguardSimPukView extends KeyguardSimInputView { public KeyguardSimPukView(Context context, AttributeSet attrs) { super(context, attrs); + updateWrongPukMessageMap(context); + } + + void updateWrongPukMessageMap(Context context) { + String[] customizationConfigs = context.getResources(). + getStringArray(R.array.kg_wrong_puk_code_message_list); + if ( customizationConfigs.length == 0 ){ + Log.d(TAG, "There is no customization PUK prompt"); + return; + } + for(String config : customizationConfigs ) { + String[] kv = config.trim().split(":"); + if ( kv.length != 2) { + Log.e(TAG, "invalid key value config " + config); + continue; + } + mWrongPukCodeMessageMap.put(kv[0], kv[1]); + } + } + + private String getMessageTextForWrongPukCode(int subId) { + String message = null; + SubscriptionInfo info = Dependency.get(KeyguardUpdateMonitor.class) + .getSubscriptionInfoForSubId(subId); + if ( info != null ) { + String mccMNC = info.getMccString()+info.getMncString(); + message = mWrongPukCodeMessageMap.get(mccMNC); + } + return message; } @Override @@ -47,11 +81,16 @@ public class KeyguardSimPukView extends KeyguardSimInputView { } String getPukPasswordErrorMessage( - int attemptsRemaining, boolean isDefault, boolean isEsimLocked) { + int attemptsRemaining, boolean isDefault, boolean isEsimLocked, int subId) { String displayMessage; if (attemptsRemaining == 0) { - displayMessage = getContext().getString(R.string.kg_password_wrong_puk_code_dead); + String message = getMessageTextForWrongPukCode(subId); + if ( message == null ) { + displayMessage = getContext().getString(R.string.kg_password_wrong_puk_code_dead); + }else { + displayMessage = message; + } } else if (attemptsRemaining > 0) { int msgId = isDefault ? R.string.kg_password_default_puk_message : R.string.kg_password_wrong_puk_code; diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukViewController.java index 49d786fdddd8..852b1158b5c3 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSimPukViewController.java @@ -186,7 +186,7 @@ public class KeyguardSimPukViewController if (mRemainingAttempts >= 0) { mMessageAreaController.setMessage(mView.getPukPasswordErrorMessage( mRemainingAttempts, true, - KeyguardEsimArea.isEsimLocked(mView.getContext(), mSubId))); + KeyguardEsimArea.isEsimLocked(mView.getContext(), mSubId), mSubId)); return; } @@ -224,12 +224,12 @@ public class KeyguardSimPukViewController else { Log.d(TAG, "onSimCheckResponse " + " empty One result " + result.toString()); - if (result.getAttemptsRemaining() >= 0) { + if (result.getAttemptsRemaining() > 0) { mRemainingAttempts = result.getAttemptsRemaining(); mMessageAreaController.setMessage( mView.getPukPasswordErrorMessage( result.getAttemptsRemaining(), true, - KeyguardEsimArea.isEsimLocked(mView.getContext(), mSubId))); + KeyguardEsimArea.isEsimLocked(mView.getContext(), mSubId), mSubId)); } } } @@ -287,7 +287,7 @@ public class KeyguardSimPukViewController // show message mMessageAreaController.setMessage(mView.getPukPasswordErrorMessage( result.getAttemptsRemaining(), false, - KeyguardEsimArea.isEsimLocked(mView.getContext(), mSubId))); + KeyguardEsimArea.isEsimLocked(mView.getContext(), mSubId), mSubId)); if (result.getAttemptsRemaining() <= 2) { // this is getting critical - show dialog getPukRemainingAttemptsDialog( @@ -298,7 +298,7 @@ public class KeyguardSimPukViewController mView.getPukPasswordErrorMessage( result.getAttemptsRemaining(), false, KeyguardEsimArea.isEsimLocked( - mView.getContext(), mSubId))); + mView.getContext(), mSubId), mSubId)); } } else { mMessageAreaController.setMessage(mView.getResources().getString( @@ -353,7 +353,7 @@ public class KeyguardSimPukViewController private Dialog getPukRemainingAttemptsDialog(int remaining) { String msg = mView.getPukPasswordErrorMessage(remaining, false, - KeyguardEsimArea.isEsimLocked(mView.getContext(), mSubId)); + KeyguardEsimArea.isEsimLocked(mView.getContext(), mSubId), mSubId); if (mRemainingAttemptsDialog == null) { AlertDialog.Builder builder = new AlertDialog.Builder(mView.getContext()); builder.setMessage(msg); diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java index 5d1a8444ae1d..bfca5d35156e 100644..100755 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -178,6 +178,7 @@ import com.android.systemui.statusbar.policy.DevicePostureController; import com.android.systemui.statusbar.policy.DevicePostureController.DevicePostureInt; import com.android.systemui.telephony.TelephonyListenerManager; import com.android.systemui.util.Assert; +import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.util.settings.SecureSettings; import com.google.android.collect.Lists; @@ -188,8 +189,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -625,40 +624,21 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab List<SubscriptionInfo> subscriptionInfos = getSubscriptionInfo(true /* forceReload */); // Hack level over 9000: Because the subscription id is not yet valid when we see the - // first update in handleSimStateChange, we need to force refresh all SIM states + // first update in handleSimStateChange, we need to force refresh all all SIM states // so the subscription id for them is consistent. ArrayList<SubscriptionInfo> changedSubscriptions = new ArrayList<>(); - Set<Integer> activeSubIds = new HashSet<>(); for (int i = 0; i < subscriptionInfos.size(); i++) { SubscriptionInfo info = subscriptionInfos.get(i); - activeSubIds.add(info.getSubscriptionId()); boolean changed = refreshSimState(info.getSubscriptionId(), info.getSimSlotIndex()); if (changed) { changedSubscriptions.add(info); } } - - // It is possible for active subscriptions to become invalid (-1), and these will not be - // present in the subscriptionInfo list - Iterator<Map.Entry<Integer, SimData>> iter = mSimDatas.entrySet().iterator(); - while (iter.hasNext()) { - Map.Entry<Integer, SimData> simData = iter.next(); - if (!activeSubIds.contains(simData.getKey())) { - mLogger.logInvalidSubId(simData.getKey()); - iter.remove(); - - SimData data = simData.getValue(); - for (int j = 0; j < mCallbacks.size(); j++) { - KeyguardUpdateMonitorCallback cb = mCallbacks.get(j).get(); - if (cb != null) { - cb.onSimStateChanged(data.subId, data.slotId, data.simState); - } - } - } - } - for (int i = 0; i < changedSubscriptions.size(); i++) { - SimData data = mSimDatas.get(changedSubscriptions.get(i).getSubscriptionId()); + SimData data = mSimDatas.get(changedSubscriptions.get(i).getSimSlotIndex()); + if (data == null) { + continue; + } for (int j = 0; j < mCallbacks.size(); j++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(j).get(); if (cb != null) { @@ -2138,7 +2118,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab // Mapping SIM_STATE_LOADED and SIM_STATE_IMSI to SIM_STATE_READY is required // because telephony doesn't return to "READY" after // these state transitions. See bug 7197471. - state = TelephonyManager.SIM_STATE_READY; + state = TelephonyManager.SIM_STATE_READY; } return new SimData(state, slotId, subId); } @@ -3703,6 +3683,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mLogger.logSimState(subId, slotId, state); boolean becameAbsent = false; + boolean becameNotReady = false; if (!SubscriptionManager.isValidSubscriptionId(subId)) { mLogger.w("invalid subId in handleSimStateChange()"); /* Only handle No SIM(ABSENT) and Card Error(CARD_IO_ERROR) due to @@ -3721,16 +3702,23 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab } } else if (state == TelephonyManager.SIM_STATE_CARD_IO_ERROR) { updateTelephonyCapable(true); + } else if (state == TelephonyManager.SIM_STATE_NOT_READY) { + becameNotReady = true; + for (SimData data : mSimDatas.values()) { + if (data.slotId == slotId) { + data.simState = TelephonyManager.SIM_STATE_NOT_READY; + } + } } } becameAbsent |= ABSENT_SIM_STATE_LIST.contains(state); - SimData data = mSimDatas.get(subId); + SimData data = mSimDatas.get(slotId); final boolean changed; if (data == null) { data = new SimData(state, slotId, subId); - mSimDatas.put(subId, data); + mSimDatas.put(slotId, data); changed = true; // no data yet; force update } else { changed = (data.simState != state || data.subId != subId || data.slotId != slotId); @@ -3738,7 +3726,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab data.subId = subId; data.slotId = slotId; } - if ((changed || becameAbsent)) { + if ((changed || becameAbsent || becameNotReady)) { for (int i = 0; i < mCallbacks.size(); i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { @@ -3757,6 +3745,12 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab if (!SubscriptionManager.isValidSubscriptionId(subId)) { mLogger.w("invalid subId in handleServiceStateChange()"); + for (int j = 0; j < mCallbacks.size(); j++) { + KeyguardUpdateMonitorCallback cb = mCallbacks.get(j).get(); + if (cb != null) { + cb.onServiceStateChanged(subId, serviceState); + } + } return; } else { updateTelephonyCapable(true); @@ -3764,7 +3758,17 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mServiceStates.put(subId, serviceState); - callbacksRefreshCarrierInfo(); + // The upstream method (callbacksRefreshCarrierInfo) does not subId or + // serviceState as input. Thus onServiceStateChanged cannot be called + // from that new method. For now, re-use the same logic as before here + // instead of a call to callbacksRefreshCarrierInfo. + for (int j = 0; j < mCallbacks.size(); j++) { + KeyguardUpdateMonitorCallback cb = mCallbacks.get(j).get(); + if (cb != null) { + cb.onRefreshCarrierInfo(); + cb.onServiceStateChanged(subId, serviceState); + } + } } /** @@ -4108,18 +4112,20 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab } public int getSimState(int subId) { - if (mSimDatas.containsKey(subId)) { - return mSimDatas.get(subId).simState; + int slotId = SubscriptionManager.getSlotIndex(subId); + if (mSimDatas.containsKey(slotId)) { + return mSimDatas.get(slotId).simState; } else { return TelephonyManager.SIM_STATE_UNKNOWN; } } private int getSlotId(int subId) { - if (!mSimDatas.containsKey(subId)) { - refreshSimState(subId, SubscriptionManager.getSlotIndex(subId)); + int slotId = SubscriptionManager.getSlotIndex(subId); + if (!mSimDatas.containsKey(slotId)) { + refreshSimState(subId, slotId); } - return mSimDatas.get(subId).slotId; + return mSimDatas.get(slotId).slotId; } private final TaskStackChangeListener @@ -4146,15 +4152,16 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab */ private boolean refreshSimState(int subId, int slotId) { int state = mTelephonyManager.getSimState(slotId); - SimData data = mSimDatas.get(subId); + SimData data = mSimDatas.get(slotId); final boolean changed; if (data == null) { data = new SimData(state, slotId, subId); - mSimDatas.put(subId, data); + mSimDatas.put(slotId, data); changed = true; // no data yet; force update } else { - changed = data.simState != state; + changed = (data.simState != state) || (data.slotId != slotId); data.simState = state; + data.slotId = slotId; } return changed; } @@ -4254,6 +4261,28 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab return resultId; } + + /** + * Find the Unlocked SubscriptionId for a SIM in the given state, + * @param state + * @return subid or {@link SubscriptionManager#INVALID_SUBSCRIPTION_ID} if none found + */ + public int getUnlockedSubIdForState(int state) { + List<SubscriptionInfo> list = getSubscriptionInfo(false /* forceReload */); + int resultId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; + for (int i = 0; i < list.size(); i++) { + final SubscriptionInfo info = list.get(i); + final int id = info.getSubscriptionId(); + int slotId = SubscriptionManager.getSlotIndex(id); + if (state == getSimState(id) && (KeyguardViewMediator.getUnlockTrackSimState(slotId) + != TelephonyManager.SIM_STATE_READY)) { + resultId = id; + break; + } + } + return resultId; + } + public SubscriptionInfo getSubscriptionInfoForSubId(int subId) { List<SubscriptionInfo> list = getSubscriptionInfo(false /* forceReload */); for (int i = 0; i < list.size(); i++) { @@ -4337,6 +4366,32 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mHandler.removeCallbacksAndMessages(null); } + public boolean isOOS() { + boolean ret = true; + int phoneCount = mTelephonyManager.getActiveModemCount(); + for (int phoneId = 0; phoneId < phoneCount; phoneId++) { + int[] subId = mSubscriptionManager.getSubscriptionIds(phoneId); + if (subId != null && subId.length >= 1) { + mLogger.v("slot id:" + phoneId + " subId:" + subId[0]); + ServiceState state = mServiceStates.get(subId[0]); + if (state != null) { + if (state.isEmergencyOnly()) { + ret = false; + } else if ((state.getVoiceRegState() != ServiceState.STATE_OUT_OF_SERVICE) + && (state.getVoiceRegState() != ServiceState.STATE_POWER_OFF)) { + ret = false; + } + mLogger.v("is emergency: " + state.isEmergencyOnly() + + "voice state: " + state.getVoiceRegState()); + } else { + mLogger.v("state is NULL"); + } + } + } + + return ret; + } + @SuppressLint("MissingPermission") @Override public void dump(@NonNull PrintWriter pw, @NonNull String[] args) { diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java index 73940055c89f..0ebeda91fa6c 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java @@ -16,6 +16,7 @@ package com.android.keyguard; import android.hardware.biometrics.BiometricSourceType; +import android.telephony.ServiceState; import android.telephony.TelephonyManager; import android.view.WindowManagerPolicyConstants; @@ -132,6 +133,13 @@ public class KeyguardUpdateMonitorCallback { public void onSimStateChanged(int subId, int slotId, int simState) { } /** + * Called when the sevice state changes. + * @param subId + * @param serviceState + */ + public void onServiceStateChanged(int subId, ServiceState state) { } + + /** * Called when a user got unlocked. */ public void onUserUnlocked() { } diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java index ea0f343e80f4..d3196f6c03e1 100644 --- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java +++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java @@ -116,6 +116,10 @@ public class ScreenDecorations implements CoreStartable, Tunable , Dumpable { SystemProperties.getBoolean("debug.disable_screen_decorations", false); private static final boolean DEBUG_SCREENSHOT_ROUNDED_CORNERS = SystemProperties.getBoolean("debug.screenshot_rounded_corners", false); + + private static int mDisableRoundedCorner = + SystemProperties.getInt("vendor.display.disable_rounded_corner", 0); + private static final boolean VERBOSE = false; static final boolean DEBUG_COLOR = DEBUG_SCREENSHOT_ROUNDED_CORNERS; @@ -562,12 +566,8 @@ public class ScreenDecorations implements CoreStartable, Tunable , Dumpable { List<DecorProvider> decorProviders = getProviders(mHwcScreenDecorationSupport != null); removeRedundantOverlayViews(decorProviders); - if (mHwcScreenDecorationSupport != null) { - createHwcOverlay(); - } else { - removeHwcOverlay(); - } - + // Overlays are added in 2 steps: first the standard overlays. Then, if applicable, the + // HWC overlays. This ensures that the HWC overlays are always on top boolean[] hasCreatedOverlay = new boolean[BOUNDS_POSITION_LENGTH]; final boolean shouldOptimizeVisibility = shouldOptimizeVisibility(); Integer bound; @@ -584,6 +584,13 @@ public class ScreenDecorations implements CoreStartable, Tunable , Dumpable { } } + // Adding the HWC overlays second so they are on top by default + if (mHwcScreenDecorationSupport != null) { + createHwcOverlay(); + } else { + removeHwcOverlay(); + } + if (shouldOptimizeVisibility) { mDotViewController.setShowingListener(mPrivacyDotShowingListener); } else { @@ -1132,6 +1139,10 @@ public class ScreenDecorations implements CoreStartable, Tunable , Dumpable { } static boolean shouldDrawCutout(Context context) { + if (mDisableRoundedCorner == 1) { + return false; + } + return DisplayCutout.getFillBuiltInDisplayCutout( context.getResources(), context.getDisplay().getUniqueId()); } diff --git a/packages/SystemUI/src/com/android/systemui/assist/ui/DisplayUtils.java b/packages/SystemUI/src/com/android/systemui/assist/ui/DisplayUtils.java index 9b441ad1d75c..dbf8db7cff34 100644 --- a/packages/SystemUI/src/com/android/systemui/assist/ui/DisplayUtils.java +++ b/packages/SystemUI/src/com/android/systemui/assist/ui/DisplayUtils.java @@ -20,6 +20,7 @@ import android.content.Context; import android.util.DisplayMetrics; import android.view.Display; import android.view.Surface; +import android.os.SystemProperties; import com.android.systemui.R; @@ -110,6 +111,12 @@ public class DisplayUtils { } private static int getCornerRadiusDefault(Context context) { + int radius = 0; + int disableRoundedCorner = SystemProperties.getInt("vendor.display.disable_rounded_corner", + 0); + if (disableRoundedCorner == 1) { + return radius; + } return context.getResources().getDimensionPixelSize(R.dimen.config_rounded_mask_size); } } diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt index 366056af7ab3..8ef27445fa75 100644 --- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt +++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt @@ -340,7 +340,7 @@ object Flags { val NEW_STATUS_BAR_MOBILE_ICONS = releasedFlag(606, "new_status_bar_mobile_icons") // TODO(b/256614210): Tracking Bug - val NEW_STATUS_BAR_WIFI_ICON = releasedFlag(607, "new_status_bar_wifi_icon") + val NEW_STATUS_BAR_WIFI_ICON = unreleasedFlag(607, "new_status_bar_wifi_icon") // TODO(b/256614751): Tracking Bug val NEW_STATUS_BAR_MOBILE_ICONS_BACKEND = diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index cba717038871..b317af0686cb 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -125,6 +125,7 @@ import com.android.keyguard.ViewMediatorCallback; import com.android.keyguard.mediator.ScreenOnCoordinator; import com.android.systemui.CoreStartable; import com.android.systemui.DejankUtils; +import com.android.systemui.Dependency; import com.android.systemui.Dumpable; import com.android.systemui.EventLogTags; import com.android.systemui.R; @@ -410,6 +411,8 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, * Index is the slotId - in case of multiple SIM cards. */ private final SparseIntArray mLastSimStates = new SparseIntArray(); + private static SparseIntArray mUnlockTrackSimStates = new SparseIntArray(); + private static final int STATE_INVALID = -1; /** * Indicates if a SIM card had the SIM PIN enabled during the initialization, before @@ -505,12 +508,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, private boolean mPendingLock; /** - * When starting to go away, flag a need to show the PIN lock so the keyguard can be brought - * back. - */ - private boolean mPendingPinLock = false; - - /** * Whether a power button gesture (such as double tap for camera) has been detected. This is * delivered directly from {@link KeyguardService}, immediately upon the gesture being detected. * This is used in {@link #onStartedWakingUp} to decide whether to execute the pending lock, or @@ -588,19 +585,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, KeyguardUpdateMonitorCallback mUpdateCallback = new KeyguardUpdateMonitorCallback() { @Override - public void onKeyguardVisibilityChanged(boolean visible) { - synchronized (KeyguardViewMediator.this) { - if (!visible && mPendingPinLock) { - Log.i(TAG, "PIN lock requested, starting keyguard"); - - // Bring the keyguard back in order to show the PIN lock - mPendingPinLock = false; - doKeyguardLocked(null); - } - } - } - - @Override public void onUserSwitching(int userId) { if (DEBUG) Log.d(TAG, String.format("onUserSwitching %d", userId)); // Note that the mLockPatternUtils user has already been updated from setCurrentUser. @@ -665,13 +649,33 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, lastSimStateWasLocked = (lastState == TelephonyManager.SIM_STATE_PIN_REQUIRED || lastState == TelephonyManager.SIM_STATE_PUK_REQUIRED); mLastSimStates.append(slotId, simState); + + int trackState = mUnlockTrackSimStates.get(slotId, STATE_INVALID); + //update the mUnlockTrackSimStates + if(simState == TelephonyManager.SIM_STATE_READY){ + if(trackState == TelephonyManager.SIM_STATE_LOADED){ + return; + }else{ + mUnlockTrackSimStates.put(slotId, simState); + } + }else{ + if(simState != TelephonyManager.SIM_STATE_PIN_REQUIRED) { + mUnlockTrackSimStates.put(slotId, simState); + } + } + + //check the SIM_STATE_PIN_REQUIRED + if(trackState == TelephonyManager.SIM_STATE_READY){ + if(simState == TelephonyManager.SIM_STATE_PIN_REQUIRED) { + return; + } + } } switch (simState) { case TelephonyManager.SIM_STATE_NOT_READY: case TelephonyManager.SIM_STATE_ABSENT: case TelephonyManager.SIM_STATE_UNKNOWN: - mPendingPinLock = false; // only force lock screen in case of missing sim if user hasn't // gone through setup wizard synchronized (KeyguardViewMediator.this) { @@ -701,7 +705,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, case TelephonyManager.SIM_STATE_PUK_REQUIRED: synchronized (KeyguardViewMediator.this) { mSimWasLocked.append(slotId, true); - mPendingPinLock = true; if (!mShowing) { if (DEBUG_SIM_STATES) Log.d(TAG, "INTENT_VALUE_ICC_LOCKED and keygaurd isn't " @@ -1313,10 +1316,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, @Override public void onPrimaryBouncerShowingChanged() { synchronized (KeyguardViewMediator.this) { - if (mKeyguardStateController.isPrimaryBouncerShowing() - && !mKeyguardStateController.isKeyguardGoingAway()) { - mPendingPinLock = false; - } adjustStatusBarLocked(mKeyguardStateController.isPrimaryBouncerShowing(), false); } } @@ -2069,6 +2068,10 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, return validatingRemoteAnimationRunner(mUnoccludeAnimationRunner); } + public static int getUnlockTrackSimState(int slotId) { + return mUnlockTrackSimStates.get(slotId); + } + public boolean isHiding() { return mHiding; } @@ -2100,7 +2103,8 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, if (mOccluded != isOccluded) { mOccluded = isOccluded; - mKeyguardViewControllerLazy.get().setOccluded(isOccluded, animate + mKeyguardViewControllerLazy.get().setOccluded(isOccluded, + (Dependency.get(KeyguardUpdateMonitor.class).isSimPinSecure()?false:animate) && mDeviceInteractive); adjustStatusBarLocked(); } @@ -3516,7 +3520,6 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, pw.print(" mPendingReset: "); pw.println(mPendingReset); pw.print(" mPendingLock: "); pw.println(mPendingLock); pw.print(" wakeAndUnlocking: "); pw.println(mWakeAndUnlocking); - pw.print(" mPendingPinLock: "); pw.println(mPendingPinLock); pw.print(" mPowerGestureIntercepted: "); pw.println(mPowerGestureIntercepted); } diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt index 5ad6e5196f66..b64fc33ea252 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBottomAreaViewBinder.kt @@ -33,6 +33,7 @@ import androidx.core.view.updateLayoutParams import androidx.lifecycle.Lifecycle import androidx.lifecycle.repeatOnLifecycle import com.android.app.animation.Interpolators +import com.android.keyguard.EmergencyCarrierArea import com.android.settingslib.Utils import com.android.systemui.R import com.android.systemui.animation.ActivityLaunchAnimator @@ -118,6 +119,8 @@ object KeyguardBottomAreaViewBinder { view.requireViewById(R.id.keyguard_indication_text_bottom) val settingsMenu: LaunchableLinearLayout = view.requireViewById(R.id.keyguard_settings_button) + val emergencyCarrierArea: EmergencyCarrierArea = + view.requireViewById(R.id.keyguard_selector_fade_container) view.clipChildren = false view.clipToPadding = false @@ -170,6 +173,16 @@ object KeyguardBottomAreaViewBinder { } else { View.INVISIBLE } + val showEmergencyButton: Boolean = + view.context.resources.getBoolean(R.bool.config_showEmergencyButton) + emergencyCarrierArea.visibility = + if (!showEmergencyButton) { + View.GONE + } else if (isVisible) { + View.VISIBLE + } else { + View.INVISIBLE + } } } @@ -184,6 +197,7 @@ object KeyguardBottomAreaViewBinder { ambientIndicationArea?.alpha = alpha indicationArea.alpha = alpha + emergencyCarrierArea.alpha = alpha } } diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java index b88eba9081f7..10f322c2c1ff 100644 --- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java +++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseAdapter.java @@ -458,6 +458,11 @@ public abstract class MediaOutputBaseAdapter extends mCornerAnimator.start(); } + private void endAnimateCornerAndVolume() { + mVolumeAnimator.end(); + mCornerAnimator.end(); + } + private void initAnimator() { mCornerAnimator = ValueAnimator.ofFloat(mController.getInactiveRadius(), mController.getActiveRadius()); diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBroadcastDialog.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBroadcastDialog.java index b4578e97eda2..1f1b06a9a961 100644 --- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBroadcastDialog.java +++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBroadcastDialog.java @@ -52,6 +52,8 @@ import com.android.systemui.statusbar.phone.SystemUIDialog; import com.google.zxing.WriterException; +import java.nio.charset.StandardCharsets; + /** * Dialog for media output broadcast. */ @@ -68,7 +70,7 @@ public class MediaOutputBroadcastDialog extends MediaOutputBaseDialog { @VisibleForTesting static final int BROADCAST_CODE_MIN_LENGTH = 4; @VisibleForTesting - static final int BROADCAST_NAME_MAX_LENGTH = 254; + static final int BROADCAST_NAME_MAX_LENGTH = 32; private ViewStub mBroadcastInfoArea; private ImageView mBroadcastQrCodeView; @@ -104,10 +106,11 @@ public class MediaOutputBroadcastDialog extends MediaOutputBaseDialog { if (mAlertDialog == null || mBroadcastErrorMessage == null) { return; } + byte[] code = s.toString().getBytes(StandardCharsets.UTF_8); boolean breakBroadcastCodeRuleTextLengthLessThanMin = - s.length() > 0 && s.length() < BROADCAST_CODE_MIN_LENGTH; + code.length > 0 && code.length < BROADCAST_CODE_MIN_LENGTH; boolean breakBroadcastCodeRuleTextLengthMoreThanMax = - s.length() > BROADCAST_CODE_MAX_LENGTH; + code.length > BROADCAST_CODE_MAX_LENGTH; boolean breakRule = breakBroadcastCodeRuleTextLengthLessThanMin || breakBroadcastCodeRuleTextLengthMoreThanMax; @@ -145,9 +148,10 @@ public class MediaOutputBroadcastDialog extends MediaOutputBaseDialog { if (mAlertDialog == null || mBroadcastErrorMessage == null) { return; } + byte[] name = s.toString().getBytes(StandardCharsets.UTF_8); boolean breakBroadcastNameRuleTextLengthMoreThanMax = - s.length() > BROADCAST_NAME_MAX_LENGTH; - boolean breakRule = breakBroadcastNameRuleTextLengthMoreThanMax || (s.length() == 0); + name.length > BROADCAST_NAME_MAX_LENGTH; + boolean breakRule = breakBroadcastNameRuleTextLengthMoreThanMax || (name.length == 0); if (breakBroadcastNameRuleTextLengthMoreThanMax) { mBroadcastErrorMessage.setText( @@ -256,6 +260,7 @@ public class MediaOutputBroadcastDialog extends MediaOutputBaseDialog { @Override public void start() { super.start(); + refreshUi(); if (!mIsLeBroadcastAssistantCallbackRegistered) { mIsLeBroadcastAssistantCallbackRegistered = true; mMediaOutputController.registerLeBroadcastAssistantServiceCallback(mExecutor, @@ -521,6 +526,7 @@ public class MediaOutputBroadcastDialog extends MediaOutputBaseDialog { public void handleLeBroadcastMetadataChanged() { Log.d(TAG, "handleLeBroadcastMetadataChanged:"); refreshUi(); + connectBroadcastWithActiveDevice(); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java index cc75478ef506..c7bf08566ae9 100644 --- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java +++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java @@ -993,6 +993,10 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback, Log.d(TAG, "getBroadcastMetadata: LE Audio Broadcast is null"); return ""; } + if (broadcast.getLatestBluetoothLeBroadcastMetadata() == null) { + Log.d(TAG, "getBroadcastMetadata: LE Broadcast Metadata is null"); + return ""; + } final LocalBluetoothLeBroadcastMetadata metadata = broadcast.getLocalBluetoothLeBroadcastMetaData(); return metadata != null ? metadata.convertToQrCodeString() : ""; diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java index 30765f7f974d..62bc19034ded 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java @@ -52,6 +52,8 @@ import com.android.systemui.qs.tileimpl.QSTileImpl; import com.android.systemui.settings.UserTracker; import com.android.systemui.util.settings.GlobalSettings; +import com.qti.extphone.ExtTelephonyManager; + import dagger.Lazy; import javax.inject.Inject; @@ -113,6 +115,10 @@ public class AirplaneModeTile extends QSTileImpl<BooleanState> { mActivityStarter.postStartActivityDismissingKeyguard( new Intent(TelephonyManager.ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS), 0); return; + } else if(!airplaneModeEnabled && TelephonyProperties.in_scbm().orElse(false)) { + mActivityStarter.postStartActivityDismissingKeyguard( + new Intent(ExtTelephonyManager.ACTION_SHOW_NOTICE_SCM_BLOCK_OTHERS), 0); + return; } setEnabled(!airplaneModeEnabled); } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java index 54376fe604df..cb6dbff00e3b 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java @@ -24,6 +24,7 @@ import android.content.Intent; import android.media.MediaRouter.RouteInfo; import android.os.Handler; import android.os.Looper; +import android.os.SystemProperties; import android.provider.Settings; import android.service.quicksettings.Tile; import android.util.Log; @@ -81,6 +82,7 @@ public class CastTile extends QSTileImpl<BooleanState> { private final Callback mCallback = new Callback(); private boolean mWifiConnected; private boolean mHotspotConnected; + private static final String WFD_ENABLE = "persist.debug.wfd.enable"; @Inject public CastTile( @@ -297,14 +299,20 @@ public class CastTile extends QSTileImpl<BooleanState> { @Override public void setWifiIndicators(@NonNull WifiIndicators indicators) { // statusIcon.visible has the connected status information - boolean enabledAndConnected = indicators.enabled - && (indicators.qsIcon == null ? false : indicators.qsIcon.visible); - if (enabledAndConnected != mWifiConnected) { - mWifiConnected = enabledAndConnected; - // Hotspot is not connected, so changes here should update - if (!mHotspotConnected) { + if(SystemProperties.getBoolean(WFD_ENABLE, false)) { + if(indicators.enabled != mWifiConnected) { + mWifiConnected = indicators.enabled; refreshState(); } + } else { + boolean enabledAndConnected = indicators.enabled && indicators.qsIcon.visible; + if (enabledAndConnected != mWifiConnected) { + mWifiConnected = enabledAndConnected; + // Hotspot is not connected, so changes here should update + if (!mHotspotConnected) { + refreshState(); + } + } } } }; diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java index 4c3699ced6e5..e18512c95ab8 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java @@ -16,9 +16,12 @@ package com.android.systemui.qs.tiles; +import android.content.Context; import static com.android.systemui.util.PluralMessageFormaterKt.icuMessageFormat; import android.content.Intent; +import android.net.wifi.ScanResult; +import android.net.wifi.WifiManager; import android.os.Handler; import android.os.Looper; import android.os.UserManager; @@ -52,12 +55,17 @@ import javax.inject.Inject; /** Quick settings tile: Hotspot **/ public class HotspotTile extends QSTileImpl<BooleanState> { + private final Icon mWifi4EnabledStatic = ResourceIcon.get(R.drawable.ic_wifi_4_hotspot); + private final Icon mWifi5EnabledStatic = ResourceIcon.get(R.drawable.ic_wifi_5_hotspot); + private final Icon mWifi6EnabledStatic = ResourceIcon.get(R.drawable.ic_wifi_6_hotspot); + public static final String TILE_SPEC = "hotspot"; private final HotspotController mHotspotController; private final DataSaverController mDataSaverController; private final HotspotAndDataSaverCallbacks mCallbacks = new HotspotAndDataSaverCallbacks(); private boolean mListening; + private WifiManager mWifiManager; @Inject public HotspotTile( @@ -79,6 +87,7 @@ public class HotspotTile extends QSTileImpl<BooleanState> { mDataSaverController = dataSaverController; mHotspotController.observe(this, mCallbacks); mDataSaverController.observe(this, mCallbacks); + mWifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/InternetTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/InternetTile.java index ffe5489d656f..04baa94dc54e 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/InternetTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/InternetTile.java @@ -14,6 +14,12 @@ * limitations under the License. */ +/** + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.qs.tiles; import android.annotation.NonNull; @@ -62,6 +68,7 @@ import com.android.systemui.statusbar.connectivity.NetworkController; import com.android.systemui.statusbar.connectivity.SignalCallback; import com.android.systemui.statusbar.connectivity.WifiIcons; import com.android.systemui.statusbar.connectivity.WifiIndicators; +import com.android.systemui.util.CarrierNameCustomization; import java.io.PrintWriter; @@ -87,6 +94,7 @@ public class InternetTile extends QSTileImpl<SignalState> { protected final InternetSignalCallback mSignalCallback = new InternetSignalCallback(); private final InternetDialogFactory mInternetDialogFactory; final Handler mHandler; + private CarrierNameCustomization mCarrierNameCustomization; @Inject public InternetTile( @@ -101,7 +109,8 @@ public class InternetTile extends QSTileImpl<SignalState> { QSLogger qsLogger, NetworkController networkController, AccessPointController accessPointController, - InternetDialogFactory internetDialogFactory + InternetDialogFactory internetDialogFactory, + CarrierNameCustomization carrierNameCustomization ) { super(host, uiEventLogger, backgroundLooper, mainHandler, falsingManager, metricsLogger, statusBarStateController, activityStarter, qsLogger); @@ -111,6 +120,7 @@ public class InternetTile extends QSTileImpl<SignalState> { mAccessPointController = accessPointController; mDataController = mController.getMobileDataController(); mController.observe(getLifecycle(), mSignalCallback); + mCarrierNameCustomization = carrierNameCustomization; } @Override @@ -340,8 +350,14 @@ public class InternetTile extends QSTileImpl<SignalState> { return; } synchronized (mCellularInfo) { - mCellularInfo.mDataSubscriptionName = indicators.qsDescription == null - ? mController.getMobileDataNetworkName() : indicators.qsDescription; + if (mCarrierNameCustomization.isRoamingCustomizationEnabled() + && mCarrierNameCustomization.isRoaming(indicators.subId)) { + mCellularInfo.mDataSubscriptionName = + mCarrierNameCustomization.getRoamingCarrierName(indicators.subId); + } else { + mCellularInfo.mDataSubscriptionName = indicators.qsDescription == null + ? mController.getMobileDataNetworkName() : indicators.qsDescription; + } mCellularInfo.mDataContentDescription = indicators.qsDescription != null ? indicators.typeContentDescriptionHtml : null; mCellularInfo.mMobileSignalIconId = indicators.qsIcon.icon; diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialog.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialog.java index ad658458d330..8bed9c53465c 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialog.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialog.java @@ -13,8 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/* Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ package com.android.systemui.qs.tiles.dialog; +import static android.telephony.AccessNetworkConstants.TRANSPORT_TYPE_WWAN; +import static android.telephony.NetworkRegistrationInfo.DOMAIN_PS; +import static android.telephony.ims.feature.ImsFeature.FEATURE_MMTEL; +import static android.telephony.ims.stub.ImsRegistrationImplBase.REGISTRATION_TECH_CROSS_SIM; + import static com.android.systemui.Prefs.Key.QS_HAS_TURNED_OFF_MOBILE_DATA; import static com.android.systemui.qs.tiles.dialog.InternetDialogController.MAX_WIFI_ENTRY_COUNT; @@ -25,6 +35,9 @@ import android.net.Network; import android.net.NetworkCapabilities; import android.os.Bundle; import android.os.Handler; +import android.os.RemoteException; +import android.telephony.ims.aidl.IImsRegistration; +import android.telephony.NetworkRegistrationInfo; import android.telephony.ServiceState; import android.telephony.SignalStrength; import android.telephony.SubscriptionManager; @@ -69,6 +82,10 @@ import com.android.systemui.statusbar.phone.SystemUIDialog; import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.wifitrackerlib.WifiEntry; +import com.qti.extphone.CiwlanConfig; +import com.qti.extphone.ExtTelephonyManager; +import com.qti.extphone.ServiceCallback; + import java.util.List; import java.util.concurrent.Executor; @@ -131,6 +148,7 @@ public class InternetDialog extends SystemUIDialog implements private TextView mSecondaryMobileSummaryText; private TextView mAirplaneModeSummaryText; private Switch mMobileDataToggle; + private Switch mSecondaryMobileDataToggle; private View mMobileToggleDivider; private Switch mWiFiToggle; private Button mDoneButton; @@ -140,6 +158,7 @@ public class InternetDialog extends SystemUIDialog implements @Nullable private Drawable mBackgroundOff = null; private int mDefaultDataSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; + private int mNddsSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; private boolean mCanConfigMobileData; private boolean mCanChangeWifiState; @@ -164,6 +183,33 @@ public class InternetDialog extends SystemUIDialog implements mInternetDialogSubTitle.setText(getSubtitleText()); }; + private ExtTelephonyManager mExtTelephonyManager; + private boolean mExtTelServiceConnected = false; + private CiwlanConfig mCiwlanConfig = null; + private CiwlanConfig mNddsCiwlanConfig = null; + private ServiceCallback mExtTelServiceCallback = new ServiceCallback() { + @Override + public void onConnected() { + Log.d(TAG, "ExtTelephony service connected"); + mExtTelServiceConnected = true; + // Query the C_IWLAN config + try { + mCiwlanConfig = mExtTelephonyManager.getCiwlanConfig( + SubscriptionManager.getSlotIndex(mDefaultDataSubId)); + mNddsCiwlanConfig = mExtTelephonyManager.getCiwlanConfig( + SubscriptionManager.getSlotIndex(mNddsSubId)); + } catch (RemoteException ex) { + Log.e(TAG, "getCiwlanConfig exception", ex); + } + } + + @Override + public void onDisconnected() { + Log.d(TAG, "ExtTelephony service disconnected"); + mExtTelServiceConnected = false; + } + }; + @Inject public InternetDialog(Context context, InternetDialogFactory internetDialogFactory, InternetDialogController internetDialogController, boolean canConfigMobileData, @@ -184,6 +230,7 @@ public class InternetDialog extends SystemUIDialog implements mInternetDialogController = internetDialogController; mSubscriptionManager = mInternetDialogController.getSubscriptionManager(); mDefaultDataSubId = mInternetDialogController.getDefaultDataSubscriptionId(); + mNddsSubId = getNddsSubId(); mTelephonyManager = mInternetDialogController.getTelephonyManager(); mCanConfigMobileData = canConfigMobileData; mCanConfigWifi = canConfigWifi; @@ -196,6 +243,8 @@ public class InternetDialog extends SystemUIDialog implements if (!aboveStatusBar) { getWindow().setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY); } + + mExtTelephonyManager = ExtTelephonyManager.getInstance(context); } @Override @@ -261,6 +310,9 @@ public class InternetDialog extends SystemUIDialog implements if (DEBUG) { Log.d(TAG, "onStart"); } + if (!mExtTelServiceConnected) { + mExtTelephonyManager.connectService(mExtTelServiceCallback); + } mInternetDialogController.onStart(this, mCanConfigWifi); if (!mCanConfigWifi) { hideWifiViews(); @@ -281,6 +333,9 @@ public class InternetDialog extends SystemUIDialog implements if (DEBUG) { Log.d(TAG, "onStop"); } + if (mExtTelServiceConnected) { + mExtTelephonyManager.disconnectService(mExtTelServiceCallback); + } mHandler.removeCallbacks(mHideProgressBarRunnable); mHandler.removeCallbacks(mHideSearchingRunnable); mMobileNetworkLayout.setOnClickListener(null); @@ -295,6 +350,9 @@ public class InternetDialog extends SystemUIDialog implements mAirplaneModeButton.setOnClickListener(null); mInternetDialogController.onStop(); mInternetDialogFactory.destroyDialog(); + if (mSecondaryMobileDataToggle != null) { + mSecondaryMobileDataToggle.setOnCheckedChangeListener(null); + } } @Override @@ -343,18 +401,23 @@ public class InternetDialog extends SystemUIDialog implements private void setOnClickListener() { mMobileNetworkLayout.setOnClickListener(v -> { - int autoSwitchNonDdsSubId = mInternetDialogController.getActiveAutoSwitchNonDdsSubId(); - if (autoSwitchNonDdsSubId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) { - showTurnOffAutoDataSwitchDialog(autoSwitchNonDdsSubId); + // Do not show auto data switch dialog if Smart DDS Switch feature is available + if (!mInternetDialogController.isSmartDdsSwitchFeatureAvailable()) { + int autoSwitchNonDdsSubId = + mInternetDialogController.getActiveAutoSwitchNonDdsSubId(); + if (autoSwitchNonDdsSubId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) { + showTurnOffAutoDataSwitchDialog(autoSwitchNonDdsSubId); + } } mInternetDialogController.connectCarrierNetwork(); }); mMobileDataToggle.setOnCheckedChangeListener( (buttonView, isChecked) -> { - if (!isChecked && shouldShowMobileDialog()) { - showTurnOffMobileDialog(); - } else if (!shouldShowMobileDialog()) { - if (mInternetDialogController.isMobileDataEnabled() == isChecked) { + if (!isChecked && shouldShowMobileDialog(mDefaultDataSubId)) { + showTurnOffMobileDialog(mDefaultDataSubId); + } else if (!shouldShowMobileDialog(mDefaultDataSubId)) { + if (mInternetDialogController + .isMobileDataEnabled(mDefaultDataSubId) == isChecked) { return; } mInternetDialogController.setMobileDataEnabled(mContext, mDefaultDataSubId, @@ -380,6 +443,18 @@ public class InternetDialog extends SystemUIDialog implements mInternetDialogController.hasEthernet() ? View.VISIBLE : View.GONE); } + /** + * Do not allow the user to disable mobile data of DDS while there is an active + * call on the nDDS. + * Whether device works under DSDA or DSDS mode, if temp DDS switch has happened, + * disabling mobile data won't be allowed. + */ + private boolean shouldDisallowUserToDisableDdsMobileData() { + return mInternetDialogController.isMobileDataEnabled(mDefaultDataSubId) + && !mInternetDialogController.isNonDdsCallStateIdle() + && mInternetDialogController.isTempDdsHappened(); + } + private void setMobileDataLayout(boolean activeNetworkIsCellular, boolean isCarrierNetworkActive) { boolean isNetworkConnected = activeNetworkIsCellular || isCarrierNetworkActive; @@ -398,8 +473,15 @@ public class InternetDialog extends SystemUIDialog implements mSecondaryMobileNetworkLayout.setVisibility(View.GONE); } } else { + if (shouldDisallowUserToDisableDdsMobileData()) { + Log.d(TAG, "Do not allow mobile data switch to be turned off"); + mMobileDataToggle.setEnabled(false); + } else { + mMobileDataToggle.setEnabled(true); + } mMobileNetworkLayout.setVisibility(View.VISIBLE); - mMobileDataToggle.setChecked(mInternetDialogController.isMobileDataEnabled()); + mMobileDataToggle.setChecked( + mInternetDialogController.isMobileDataEnabled(mDefaultDataSubId)); mMobileTitleText.setText(getMobileNetworkTitle(mDefaultDataSubId)); String summary = getMobileNetworkSummary(mDefaultDataSubId); if (!TextUtils.isEmpty(summary)) { @@ -420,16 +502,77 @@ public class InternetDialog extends SystemUIDialog implements mMobileDataToggle.setVisibility(mCanConfigMobileData ? View.VISIBLE : View.INVISIBLE); mMobileToggleDivider.setVisibility( mCanConfigMobileData ? View.VISIBLE : View.INVISIBLE); - + Log.d(TAG, "mNddsSubId: " + mNddsSubId + " isDualDataEnabled: " + isDualDataEnabled()); + boolean nonDdsVisibleForDualData = SubscriptionManager + .isUsableSubscriptionId(mNddsSubId) && isDualDataEnabled(); // Display the info for the non-DDS if it's actively being used int autoSwitchNonDdsSubId = mInternetDialogController.getActiveAutoSwitchNonDdsSubId(); - int nonDdsVisibility = autoSwitchNonDdsSubId - != SubscriptionManager.INVALID_SUBSCRIPTION_ID ? View.VISIBLE : View.GONE; + int nonDdsVisibility = (autoSwitchNonDdsSubId + != SubscriptionManager.INVALID_SUBSCRIPTION_ID || nonDdsVisibleForDualData) + ? View.VISIBLE : View.GONE; int secondaryRes = isNetworkConnected ? R.style.TextAppearance_InternetDialog_Secondary_Active : R.style.TextAppearance_InternetDialog_Secondary; - if (nonDdsVisibility == View.VISIBLE) { + if (nonDdsVisibleForDualData) { + ViewStub stub = mDialogView.findViewById(R.id.secondary_mobile_network_stub); + if (stub != null) { + stub.setLayoutResource(R.layout.qs_diaglog_secondary_generic_mobile_network); + stub.inflate(); + } + mSecondaryMobileNetworkLayout = findViewById(R.id.secondary_mobile_network_layout); + mSecondaryMobileNetworkLayout.setBackground(mBackgroundOn); + mSecondaryMobileDataToggle = + mDialogView.requireViewById(R.id.secondary_generic_mobile_toggle); + mSecondaryMobileDataToggle.setChecked( + mInternetDialogController.isMobileDataEnabled(mNddsSubId)); + TextView mobileTitleText = + mDialogView.requireViewById(R.id.secondary_generic_mobile_title); + mobileTitleText.setText(getMobileNetworkTitle(mNddsSubId)); + + TextView summaryText = + mDialogView.requireViewById(R.id.secondary_generic_mobile_summary); + String secondarySummary = getMobileNetworkSummary(mNddsSubId); + if (!TextUtils.isEmpty(secondarySummary)) { + summaryText.setText( + Html.fromHtml(secondarySummary, Html.FROM_HTML_MODE_LEGACY)); + summaryText.setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE); + summaryText.setVisibility(View.VISIBLE); + } else { + summaryText.setVisibility(View.GONE); + } + + final ImageView signalIcon = + mDialogView.requireViewById(R.id.secondary_generic_signal_icon); + mBackgroundExecutor.execute(() -> { + Drawable drawable = getSignalStrengthDrawable(mNddsSubId); + mHandler.post(() -> { + signalIcon.setImageDrawable(drawable); + }); + }); + + View divider = mDialogView.requireViewById( + R.id.secondary_generic_mobile_toggle_divider); + + mSecondaryMobileDataToggle.setVisibility( + mCanConfigMobileData ? View.VISIBLE : View.INVISIBLE); + divider.setVisibility( + mCanConfigMobileData ? View.VISIBLE : View.INVISIBLE); + mSecondaryMobileDataToggle.setOnCheckedChangeListener( + (buttonView, isChecked) -> { + if (!isChecked && shouldShowMobileDialog(mNddsSubId)) { + showTurnOffMobileDialog(mNddsSubId); + } else if (!shouldShowMobileDialog(mNddsSubId)) { + if (mInternetDialogController.isMobileDataEnabled( + mNddsSubId) == isChecked) { + return; + } + mInternetDialogController.setMobileDataEnabled( + mContext, mNddsSubId, isChecked, false); + } + }); + nonDdsVisibility = View.VISIBLE; + } else if (nonDdsVisibility == View.VISIBLE) { // non DDS is the currently active sub, set primary visual for it ViewStub stub = mDialogView.findViewById(R.id.secondary_mobile_network_stub); if (stub != null) { @@ -640,6 +783,9 @@ public class InternetDialog extends SystemUIDialog implements } String getMobileNetworkSummary(int subId) { + if (subId == mDefaultDataSubId && shouldDisallowUserToDisableDdsMobileData()) { + return mContext.getString(R.string.mobile_data_summary_not_allowed_to_disable_data); + } return mInternetDialogController.getMobileNetworkSummary(subId); } @@ -668,37 +814,68 @@ public class InternetDialog extends SystemUIDialog implements mInternetDialogSubTitle.setText(getSubtitleText()); } - private boolean shouldShowMobileDialog() { - boolean flag = Prefs.getBoolean(mContext, QS_HAS_TURNED_OFF_MOBILE_DATA, - false); - if (mInternetDialogController.isMobileDataEnabled() && !flag) { - return true; + private boolean shouldShowMobileDialog(int subId) { + if (mInternetDialogController.isMobileDataEnabled(subId)) { + if (isCiwlanWarningConditionSatisfied(subId)) { + return true; + } + boolean flag = Prefs.getBoolean(mContext, QS_HAS_TURNED_OFF_MOBILE_DATA, + false); + if (!flag) { + return true; + } } return false; } - private void showTurnOffMobileDialog() { - CharSequence carrierName = getMobileNetworkTitle(mDefaultDataSubId); - boolean isInService = mInternetDialogController.isVoiceStateInService(mDefaultDataSubId); + private boolean isCiwlanWarningConditionSatisfied(int subId) { + TelephonyManager telephonyManager = mTelephonyManager.createForSubscriptionId(subId); + boolean isCallIdle = telephonyManager.getCallState() == TelephonyManager.CALL_STATE_IDLE; + boolean isImsRegisteredOverCiwlan = isImsRegisteredOverCiwlan(subId); + boolean isCiwlanModeSupported = isCiwlanModeSupported(subId); + boolean isInCiwlanOnlyMode = isInCiwlanOnlyMode(telephonyManager, subId); + Log.d(TAG, "isCallIdle = " + isCallIdle + ", isImsRegisteredOverCiwlan = " + + isImsRegisteredOverCiwlan + ", isInCiwlanOnlyMode = " + isInCiwlanOnlyMode + + ", isCiwlanModeSupported = " + isCiwlanModeSupported + " on SUB " + subId); + return !isCallIdle && isImsRegisteredOverCiwlan + && (!isCiwlanModeSupported || isInCiwlanOnlyMode); + } + + private void showTurnOffMobileDialog(int subId) { + CharSequence carrierName = getMobileNetworkTitle(subId); + boolean isInService = mInternetDialogController.isVoiceStateInService(subId); if (TextUtils.isEmpty(carrierName) || !isInService) { carrierName = mContext.getString(R.string.mobile_data_disable_message_default_carrier); } + String mobileDataDisableDialogMessage = isDualDataEnabled() ? + mContext.getString(R.string.mobile_data_disable_message_on_dual_data, carrierName) + : mContext.getString(R.string.mobile_data_disable_message, carrierName); + + // Adjust the dialog message for CIWLAN + if (isCiwlanWarningConditionSatisfied(subId)) { + mobileDataDisableDialogMessage = isCiwlanModeSupported(subId) ? + mContext.getString(R.string.data_disable_ciwlan_call_will_drop_message) : + mContext.getString(R.string.data_disable_ciwlan_call_might_drop_message); + } + + final Switch mobileDataToggle = (subId == mDefaultDataSubId) + ? mMobileDataToggle : mSecondaryMobileDataToggle; mAlertDialog = new Builder(mContext) .setTitle(R.string.mobile_data_disable_title) - .setMessage(mContext.getString(R.string.mobile_data_disable_message, carrierName)) + .setMessage(mobileDataDisableDialogMessage) .setNegativeButton(android.R.string.cancel, (d, w) -> { - mMobileDataToggle.setChecked(true); + mobileDataToggle.setChecked(true); }) .setPositiveButton( com.android.internal.R.string.alert_windows_notification_turn_off_action, (d, w) -> { mInternetDialogController.setMobileDataEnabled(mContext, - mDefaultDataSubId, false, false); - mMobileDataToggle.setChecked(false); + subId, false, false); + mobileDataToggle.setChecked(false); Prefs.putBoolean(mContext, QS_HAS_TURNED_OFF_MOBILE_DATA, true); }) .create(); - mAlertDialog.setOnCancelListener(dialog -> mMobileDataToggle.setChecked(true)); + mAlertDialog.setOnCancelListener(dialog -> mobileDataToggle.setChecked(true)); mAlertDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG); SystemUIDialog.setShowForAllUsers(mAlertDialog, true); SystemUIDialog.registerDismissListener(mAlertDialog); @@ -732,6 +909,64 @@ public class InternetDialog extends SystemUIDialog implements mDialogLaunchAnimator.showFromDialog(mAlertDialog, this, null, false); } + private boolean isImsRegisteredOverCiwlan(int subId) { + IImsRegistration imsRegistrationImpl = mTelephonyManager.getImsRegistration( + mSubscriptionManager.getSlotIndex(subId), FEATURE_MMTEL); + if (imsRegistrationImpl != null) { + try { + return imsRegistrationImpl.getRegistrationTechnology() == + REGISTRATION_TECH_CROSS_SIM; + } catch (RemoteException ex) { + Log.e(TAG, "getRegistrationTechnology failed", ex); + } + } + return false; + } + + private boolean isInCiwlanOnlyMode(TelephonyManager tm, int subId) { + CiwlanConfig ciwlanConfig = + (subId == mDefaultDataSubId) ? mCiwlanConfig : mNddsCiwlanConfig; + if (ciwlanConfig == null) { + Log.d(TAG, "isInCiwlanOnlyMode: C_IWLAN config null on SUB " + subId); + return false; + } + if (isRoaming(tm)) { + return ciwlanConfig.isCiwlanOnlyInRoam(); + } + return ciwlanConfig.isCiwlanOnlyInHome(); + } + + private boolean isCiwlanModeSupported(int subId) { + CiwlanConfig ciwlanConfig = + (subId == mDefaultDataSubId) ? mCiwlanConfig : mNddsCiwlanConfig; + if (ciwlanConfig == null) { + Log.d(TAG, "isCiwlanModeSupported: C_IWLAN config null on SUB " + subId); + return false; + } + return ciwlanConfig.isCiwlanModeSupported(); + } + + private boolean isRoaming(TelephonyManager tm) { + if (tm == null) { + Log.d(TAG, "isRoaming: TelephonyManager null"); + return false; + } + boolean nriRoaming = false; + ServiceState serviceState = tm.getServiceState(); + if (serviceState != null) { + NetworkRegistrationInfo nri = + serviceState.getNetworkRegistrationInfo(DOMAIN_PS, TRANSPORT_TYPE_WWAN); + if (nri != null) { + nriRoaming = nri.isNetworkRoaming(); + } else { + Log.d(TAG, "isRoaming: network registration info null"); + } + } else { + Log.d(TAG, "isRoaming: service state null"); + } + return nriRoaming; + } + @Override public void onRefreshCarrierInfo() { mHandler.post(() -> updateDialog(true /* shouldUpdateMobileNetwork */)); @@ -758,6 +993,8 @@ public class InternetDialog extends SystemUIDialog implements public void onSubscriptionsChanged(int defaultDataSubId) { mDefaultDataSubId = defaultDataSubId; mTelephonyManager = mTelephonyManager.createForSubscriptionId(mDefaultDataSubId); + mNddsSubId = getNddsSubId(); + updateCiwlanConfigs(); mHandler.post(() -> updateDialog(true /* shouldUpdateMobileNetwork */)); } @@ -793,6 +1030,16 @@ public class InternetDialog extends SystemUIDialog implements } @Override + public void onNonDdsCallStateChanged(int callState) { + mHandler.post(() -> updateDialog(true /* shouldUpdateMobileNetwork */)); + } + + @Override + public void onTempDdsSwitchHappened() { + mHandler.post(() -> updateDialog(true /* shouldUpdateMobileNetwork */)); + } + + @Override @WorkerThread public void onAccessPointsChanged(@Nullable List<WifiEntry> wifiEntries, @Nullable WifiEntry connectedEntry, boolean hasMoreWifiEntries) { @@ -819,6 +1066,38 @@ public class InternetDialog extends SystemUIDialog implements } } + private boolean isDualDataEnabled() { + return mInternetDialogController.isDualDataEnabled(); + } + + @Override + public void onDualDataEnabledStateChanged() { + mNddsSubId = getNddsSubId(); + updateCiwlanConfigs(); + mHandler.post(() -> updateDialog(true /* shouldUpdateMobileNetwork */)); + } + + private void updateCiwlanConfigs() { + if (mExtTelephonyManager != null) { + try { + if (SubscriptionManager.isUsableSubscriptionId(mDefaultDataSubId)) { + mCiwlanConfig = mExtTelephonyManager.getCiwlanConfig( + SubscriptionManager.getSlotIndex(mDefaultDataSubId)); + } + if (SubscriptionManager.isUsableSubscriptionId(mNddsSubId)) { + mNddsCiwlanConfig = mExtTelephonyManager.getCiwlanConfig( + SubscriptionManager.getSlotIndex(mNddsSubId)); + } + } catch (RemoteException ex) { + Log.e(TAG, "getCiwlanConfig exception", ex); + } + } + } + + private int getNddsSubId() { + return mInternetDialogController.getNddsSubId(); + } + public enum InternetDialogEvent implements UiEventLogger.UiEventEnum { @UiEvent(doc = "The Internet dialog became visible on the screen.") INTERNET_DIALOG_SHOW(843); diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java index abeb5af352fc..f519e611328a 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/dialog/InternetDialogController.java @@ -14,6 +14,12 @@ * limitations under the License. */ +/** + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.qs.tiles.dialog; import static com.android.settingslib.mobile.MobileMappings.getIconKey; @@ -24,10 +30,12 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.annotation.AnyThread; import android.content.BroadcastReceiver; +import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.res.Resources; +import android.database.ContentObserver; import android.graphics.Color; import android.graphics.PixelFormat; import android.graphics.drawable.ColorDrawable; @@ -36,9 +44,11 @@ import android.graphics.drawable.LayerDrawable; import android.net.ConnectivityManager; import android.net.Network; import android.net.NetworkCapabilities; +import android.net.Uri; import android.net.wifi.WifiManager; import android.os.Bundle; import android.os.Handler; +import android.os.RemoteException; import android.os.UserHandle; import android.provider.Settings; import android.telephony.AccessNetworkConstants; @@ -88,10 +98,14 @@ import com.android.systemui.statusbar.policy.LocationController; import com.android.systemui.toast.SystemUIToast; import com.android.systemui.toast.ToastFactory; import com.android.systemui.util.CarrierConfigTracker; +import com.android.systemui.util.CarrierNameCustomization; import com.android.systemui.util.settings.GlobalSettings; import com.android.wifitrackerlib.MergedCarrierEntry; import com.android.wifitrackerlib.WifiEntry; +import com.qti.extphone.ExtTelephonyManager; +import com.qti.extphone.ServiceCallback; + import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -148,6 +162,10 @@ public class InternetDialogController implements AccessPointController.AccessPoi static final int MAX_WIFI_ENTRY_COUNT = 3; + private static final String DUAL_DATA_PREFERENCE = "dual_data_preference"; + private static final Uri DUAL_DATA_USER_PREFERENCE = Settings + .Global.getUriFor(DUAL_DATA_PREFERENCE); + private final FeatureFlags mFeatureFlags; @VisibleForTesting @@ -187,6 +205,8 @@ public class InternetDialogController implements AccessPointController.AccessPoi private DialogLaunchAnimator mDialogLaunchAnimator; private boolean mHasWifiEntries; private WifiStateWorker mWifiStateWorker; + private int mNonDdsCallState = TelephonyManager.CALL_STATE_IDLE; + private int mActiveDataSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; @VisibleForTesting static final float TOAST_PARAMS_HORIZONTAL_WEIGHT = 1.0f; @@ -198,7 +218,6 @@ public class InternetDialogController implements AccessPointController.AccessPoi protected ActivityStarter mActivityStarter; @VisibleForTesting protected SubscriptionManager.OnSubscriptionsChangedListener mOnSubscriptionsChangedListener; - @VisibleForTesting protected WifiUtils.InternetIconInjector mWifiIconInjector; @VisibleForTesting protected boolean mCanConfigWifi; @@ -210,6 +229,41 @@ public class InternetDialogController implements AccessPointController.AccessPoi protected ConnectedWifiInternetMonitor mConnectedWifiInternetMonitor; @VisibleForTesting protected boolean mCarrierNetworkChangeMode; + private CarrierNameCustomization mCarrierNameCustomization; + + private boolean mIsSmartDdsSwitchFeatureAvailable; + private boolean mIsExtTelServiceConnected = false; + private ExtTelephonyManager mExtTelephonyManager; + private boolean mHasDualDataCapability = false; + private ContentObserver mDualDataContentObserver; + private int mNddsSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; + + private ServiceCallback mExtTelServiceCallback = new ServiceCallback() { + @Override + public void onConnected() { + Log.d(TAG, "ExtTelephony service connected"); + mIsExtTelServiceConnected = true; + try { + mIsSmartDdsSwitchFeatureAvailable = + mExtTelephonyManager.isSmartDdsSwitchFeatureAvailable(); + mHasDualDataCapability = mExtTelephonyManager.getDualDataCapability(); + Log.d(TAG, "isSmartDdsSwitchFeatureAvailable: " + + mIsSmartDdsSwitchFeatureAvailable + + " mHasDualDataCapability: " + mHasDualDataCapability); + } catch (RemoteException ex) { + Log.e(TAG, "isSmartDdsSwitchFeatureAvailable exception " + ex); + } + handleDualDataUserPerferenceListener(); + } + + @Override + public void onDisconnected() { + Log.d(TAG, "ExtTelephony service disconnected"); + mIsExtTelServiceConnected = false; + mHasDualDataCapability = false; + handleDualDataUserPerferenceListener(); + } + }; private final KeyguardUpdateMonitorCallback mKeyguardUpdateCallback = new KeyguardUpdateMonitorCallback() { @@ -242,7 +296,8 @@ public class InternetDialogController implements AccessPointController.AccessPoi LocationController locationController, DialogLaunchAnimator dialogLaunchAnimator, WifiStateWorker wifiStateWorker, - FeatureFlags featureFlags + FeatureFlags featureFlags, + CarrierNameCustomization carrierNameCustomization ) { if (DEBUG) { Log.d(TAG, "Init InternetDialogController"); @@ -277,6 +332,8 @@ public class InternetDialogController implements AccessPointController.AccessPoi mConnectedWifiInternetMonitor = new ConnectedWifiInternetMonitor(); mWifiStateWorker = wifiStateWorker; mFeatureFlags = featureFlags; + mCarrierNameCustomization = carrierNameCustomization; + mExtTelephonyManager = ExtTelephonyManager.getInstance(context); } void onStart(@NonNull InternetDialogCallback callback, boolean canConfigWifi) { @@ -293,6 +350,7 @@ public class InternetDialogController implements AccessPointController.AccessPoi mSubscriptionManager.addOnSubscriptionsChangedListener(mExecutor, mOnSubscriptionsChangedListener); mDefaultDataSubId = getDefaultDataSubscriptionId(); + mActiveDataSubId = mSubscriptionManager.getActiveDataSubscriptionId(); if (DEBUG) { Log.d(TAG, "Init, SubId: " + mDefaultDataSubId); } @@ -303,10 +361,16 @@ public class InternetDialogController implements AccessPointController.AccessPoi new InternetTelephonyCallback(mDefaultDataSubId); mSubIdTelephonyCallbackMap.put(mDefaultDataSubId, telephonyCallback); mTelephonyManager.registerTelephonyCallback(mExecutor, telephonyCallback); + // Listen the connectivity changes mConnectivityManager.registerDefaultNetworkCallback(mConnectivityManagerNetworkCallback); mCanConfigWifi = canConfigWifi; scanWifiAccessPoints(); + if (!mIsExtTelServiceConnected) { + mExtTelephonyManager.connectService(mExtTelServiceCallback); + } else { + notifyDualDataEnabledStateChanged(); + } } void onStop() { @@ -331,6 +395,9 @@ public class InternetDialogController implements AccessPointController.AccessPoi mKeyguardUpdateMonitor.removeCallback(mKeyguardUpdateCallback); mConnectivityManager.unregisterNetworkCallback(mConnectivityManagerNetworkCallback); mConnectedWifiInternetMonitor.unregisterCallback(); + if (mIsExtTelServiceConnected) { + mExtTelephonyManager.disconnectService(mExtTelServiceCallback); + } } @VisibleForTesting @@ -425,7 +492,7 @@ public class InternetDialogController implements AccessPointController.AccessPoi return mContext.getText(SUBTITLE_TEXT_ALL_CARRIER_NETWORK_UNAVAILABLE); } - if (mCanConfigWifi && !isMobileDataEnabled()) { + if (mCanConfigWifi && !isMobileDataEnabled(mDefaultDataSubId)) { if (DEBUG) { Log.d(TAG, "Mobile data off"); } @@ -508,7 +575,7 @@ public class InternetDialogController implements AccessPointController.AccessPoi numLevels += 1; } return getSignalStrengthIcon(subId, mContext, level, numLevels, NO_CELL_DATA_TYPE_ICON, - !isMobileDataEnabled()); + !isMobileDataEnabled(subId)); } Drawable getSignalStrengthIcon(int subId, Context context, int level, int numLevels, @@ -650,6 +717,7 @@ public class InternetDialogController implements AccessPointController.AccessPoi mSubIdTelephonyCallbackMap.put(subId, telephonyCallback); mSubIdTelephonyManagerMap.put(subId, secondaryTm); } + Log.d(TAG, "getActiveAutoSwitchNonDdsSubId: " + subId); return subId; } return SubscriptionManager.INVALID_SUBSCRIPTION_ID; @@ -657,7 +725,12 @@ public class InternetDialogController implements AccessPointController.AccessPoi } CharSequence getMobileNetworkTitle(int subId) { - return getUniqueSubscriptionDisplayName(subId, mContext); + if (mCarrierNameCustomization.isRoamingCustomizationEnabled() + && mCarrierNameCustomization.isRoaming(subId)) { + return mCarrierNameCustomization.getRoamingCarrierName(subId); + } else { + return getUniqueSubscriptionDisplayName(subId, mContext); + } } String getMobileNetworkSummary(int subId) { @@ -696,11 +769,13 @@ public class InternetDialogController implements AccessPointController.AccessPoi } private String getMobileSummary(Context context, String networkTypeDescription, int subId) { - if (!isMobileDataEnabled()) { + if (!isMobileDataEnabled(subId)) { return context.getString(R.string.mobile_data_off_summary); } String summary = networkTypeDescription; + boolean isSmartDdsEnabled = Settings.Global.getInt(context.getContentResolver(), + Settings.Global.SMART_DDS_SWITCH, 0) == 1; boolean isForDds = subId == mDefaultDataSubId; int activeSubId = getActiveAutoSwitchNonDdsSubId(); boolean isOnNonDds = activeSubId != SubscriptionManager.INVALID_SUBSCRIPTION_ID; @@ -709,8 +784,10 @@ public class InternetDialogController implements AccessPointController.AccessPoi if (activeNetworkIsCellular() || isCarrierNetworkActive()) { summary = context.getString(R.string.preference_summary_default_combination, context.getString( - isForDds // if nonDds is active, explains Dds status as poor connection - ? (isOnNonDds ? R.string.mobile_data_poor_connection + // if nonDds is active, explains Dds status as poor connection + isForDds || isSmartDdsEnabled + ? (isOnNonDds && !isSmartDdsEnabled + ? R.string.mobile_data_poor_connection : R.string.mobile_data_connection_active) : R.string.mobile_data_temp_connection_active), networkTypeDescription); @@ -791,7 +868,7 @@ public class InternetDialogController implements AccessPointController.AccessPoi void connectCarrierNetwork() { String errorLogPrefix = "Fail to connect carrier network : "; - if (!isMobileDataEnabled()) { + if (!isMobileDataEnabled(mDefaultDataSubId)) { if (DEBUG) { Log.d(TAG, errorLogPrefix + "settings OFF"); } @@ -891,13 +968,27 @@ public class InternetDialogController implements AccessPointController.AccessPoi } /** + * Return {@code true} if there is an ongoing call on the non-DDS + */ + boolean isNonDdsCallStateIdle() { + return mNonDdsCallState == TelephonyManager.CALL_STATE_IDLE; + } + + /** + * Return {@code true} if temporary DDS switch happened + */ + boolean isTempDdsHappened() { + return mDefaultDataSubId != mActiveDataSubId; + } + + /** * Return {@code true} if mobile data is enabled */ - boolean isMobileDataEnabled() { - if (mTelephonyManager == null || !mTelephonyManager.isDataEnabled()) { + boolean isMobileDataEnabled(int subId) { + if (mTelephonyManager == null) { return false; } - return true; + return mTelephonyManager.createForSubscriptionId(subId).isDataEnabled(); } /** @@ -920,7 +1011,7 @@ public class InternetDialogController implements AccessPointController.AccessPoi return; } - mTelephonyManager.setDataEnabledForReason( + mTelephonyManager.createForSubscriptionId(subId).setDataEnabledForReason( TelephonyManager.DATA_ENABLED_REASON_USER, enabled); if (disableOtherSubscriptions) { final List<SubscriptionInfo> subInfoList = @@ -973,6 +1064,13 @@ public class InternetDialogController implements AccessPointController.AccessPoi && serviceState.getState() == serviceState.STATE_IN_SERVICE; } + /** + * Return {@code true} if Smart DDS Switch feature is available + */ + boolean isSmartDdsSwitchFeatureAvailable() { + return mIsSmartDdsSwitchFeatureAvailable; + } + public boolean isDeviceLocked() { return !mKeyguardStateController.isUnlocked(); } @@ -1102,13 +1200,80 @@ public class InternetDialogController implements AccessPointController.AccessPoi public void onSettingsActivityTriggered(Intent settingsIntent) { } + private void registerTelephonyCallbackOnNddsSub() { + if (SubscriptionManager.isUsableSubscriptionId(mNddsSubId)) { + TelephonyCallback telephonyCallback = createNddsSubTelephonyCallback(mNddsSubId); + if (!mSubIdTelephonyCallbackMap.containsKey(mNddsSubId)) { + TelephonyManager nDdsSubTm = mTelephonyManager.createForSubscriptionId(mNddsSubId); + nDdsSubTm.registerTelephonyCallback(mExecutor, telephonyCallback); + mSubIdTelephonyCallbackMap.put(mNddsSubId, telephonyCallback); + mSubIdTelephonyManagerMap.put(mNddsSubId, nDdsSubTm); + Log.d(TAG, "registerTelephonyCallOnNddsSub on SUB: " + mNddsSubId); + } else { + TelephonyCallback oldTelephonyCallback = mSubIdTelephonyCallbackMap.get(mNddsSubId); + if (!oldTelephonyCallback.getClass().equals(telephonyCallback.getClass())) { + Log.d(TAG, "registerTelephonyCallOnNddsSub refreshing on SUB: " + mNddsSubId); + TelephonyManager nDdsSubTm = mSubIdTelephonyManagerMap.get(mNddsSubId); + nDdsSubTm.unregisterTelephonyCallback(oldTelephonyCallback); + nDdsSubTm.registerTelephonyCallback(mExecutor, telephonyCallback); + } + } + } else { + // Prune stale SUBs + List<Integer> staleSubs = mSubIdTelephonyManagerMap.keySet() + .stream().filter(sub -> sub != mDefaultDataSubId).collect(Collectors.toList()); + for (Integer sub : staleSubs) { + Log.d(TAG, "registerTelephonyCallOnNddsSub pruning on SUB: " + sub); + TelephonyCallback oldTelephonyCallback = mSubIdTelephonyCallbackMap.get(sub); + if (oldTelephonyCallback != null) { + mSubIdTelephonyManagerMap.get(sub) + .unregisterTelephonyCallback(oldTelephonyCallback); + } + mSubIdTelephonyManagerMap.remove(sub); + mSubIdTelephonyCallbackMap.remove(sub); + mSubIdTelephonyDisplayInfoMap.remove(sub); + } + } + } + + private TelephonyCallback createNddsSubTelephonyCallback(int subId) { + return isDualDataEnabled() ? new NonDdsInternetTelephonyCallback(subId) + : new NonDdsCallStateCallback(); + } + + private class NonDdsCallStateCallback extends TelephonyCallback implements + TelephonyCallback.CallStateListener { + + @Override + public void onCallStateChanged(int callState) { + Log.d(TAG, "onCallStateChanged: " + callState); + mNonDdsCallState = callState; + mCallback.onNonDdsCallStateChanged(callState); + } + } + + private class NonDdsInternetTelephonyCallback extends InternetTelephonyCallback + implements TelephonyCallback.CallStateListener { + private NonDdsInternetTelephonyCallback(int subId) { + super(subId); + } + + @Override + public void onCallStateChanged(int callState) { + Log.d(TAG, "onCallStateChanged: " + callState); + mNonDdsCallState = callState; + mCallback.onNonDdsCallStateChanged(callState); + } + } + private class InternetTelephonyCallback extends TelephonyCallback implements TelephonyCallback.DataConnectionStateListener, TelephonyCallback.DisplayInfoListener, TelephonyCallback.ServiceStateListener, TelephonyCallback.SignalStrengthsListener, TelephonyCallback.UserMobileDataStateListener, - TelephonyCallback.CarrierNetworkListener{ + TelephonyCallback.CarrierNetworkListener, + TelephonyCallback.ActiveDataSubscriptionIdListener { private final int mSubId; private InternetTelephonyCallback(int subId) { @@ -1146,6 +1311,12 @@ public class InternetDialogController implements AccessPointController.AccessPoi mCarrierNetworkChangeMode = active; mCallback.onCarrierNetworkChange(active); } + + @Override + public void onActiveDataSubscriptionIdChanged(int subId) { + mActiveDataSubId = subId; + mCallback.onTempDdsSwitchHappened(); + } } private class InternetOnSubscriptionChangedListener @@ -1156,6 +1327,18 @@ public class InternetDialogController implements AccessPointController.AccessPoi @Override public void onSubscriptionsChanged() { + List<SubscriptionInfo> subInfos = mSubscriptionManager.getActiveSubscriptionInfoList(); + int numberOfActiveSubscriptions = subInfos.size(); + /* + * When there is only one subscription, there is no nDDS sub, so call state of nDDS is + * idle by default. Ensure that call state of nDDS is correctly updated when number of + * subscriptions change at runtime. + */ + if (numberOfActiveSubscriptions == 1){ + Log.d(TAG, "Resetting call state of nDDS"); + mNonDdsCallState = TelephonyManager.CALL_STATE_IDLE; + } + updateListener(); } } @@ -1261,12 +1444,14 @@ public class InternetDialogController implements AccessPointController.AccessPoi if (DEBUG) { Log.d(TAG, "DDS: no change"); } + updateNddsSubId(defaultDataSubId); return; } if (DEBUG) { Log.d(TAG, "DDS: defaultDataSubId:" + defaultDataSubId); } if (SubscriptionManager.isUsableSubscriptionId(defaultDataSubId)) { + updateNddsSubId(defaultDataSubId); // clean up old defaultDataSubId TelephonyCallback oldCallback = mSubIdTelephonyCallbackMap.get(mDefaultDataSubId); if (oldCallback != null) { @@ -1289,6 +1474,60 @@ public class InternetDialogController implements AccessPointController.AccessPoi mDefaultDataSubId = defaultDataSubId; } + public int getNddsSubId() { + return mNddsSubId; + } + + private void handleDualDataUserPerferenceListener() { + if (mHasDualDataCapability) { + if (mDualDataContentObserver == null) { + mDualDataContentObserver = new ContentObserver(mHandler) { + @Override + public void onChange(boolean selfChange, Uri uri) { + if (DUAL_DATA_USER_PREFERENCE.equals(uri)) { + notifyDualDataEnabledStateChanged(); + } + } + }; + } + mContext.getContentResolver().registerContentObserver(DUAL_DATA_USER_PREFERENCE, + false, mDualDataContentObserver); + } else { + if (mDualDataContentObserver != null) { + mContext.getContentResolver().unregisterContentObserver(mDualDataContentObserver); + mDualDataContentObserver = null; + } + } + notifyDualDataEnabledStateChanged(); + } + + private void notifyDualDataEnabledStateChanged() { + updateNddsSubId(mDefaultDataSubId); + final boolean isDualDataEnabled = isDualDataEnabled(); + Log.d(TAG, "Ndds sub ID: " + mNddsSubId + " isDualDataEnabled: " + isDualDataEnabled); + mCallback.onDualDataEnabledStateChanged(); + } + + private void updateNddsSubId(int defaultDataSubId) { + // update mNddsSubId + mNddsSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; + List<SubscriptionInfo> subInfos = + mSubscriptionManager.getActiveSubscriptionInfoList(); + if (subInfos != null) { + for (SubscriptionInfo subInfo : subInfos) { + if (subInfo.getSubscriptionId() != defaultDataSubId) { + mNddsSubId = subInfo.getSubscriptionId(); + } + } + } + registerTelephonyCallbackOnNddsSub(); + } + + public boolean isDualDataEnabled() { + return mHasDualDataCapability && Settings.Global.getInt(mContext.getContentResolver(), + DUAL_DATA_PREFERENCE, 0) == 1; + } + public WifiUtils.InternetIconInjector getWifiIconInjector() { return mWifiIconInjector; } @@ -1321,6 +1560,12 @@ public class InternetDialogController implements AccessPointController.AccessPoi void onAccessPointsChanged(@Nullable List<WifiEntry> wifiEntries, @Nullable WifiEntry connectedEntry, boolean hasMoreWifiEntries); + + void onNonDdsCallStateChanged(int callState); + + void onTempDdsSwitchHappened(); + + void onDualDataEnabledStateChanged(); } void makeOverlayToast(int stringId) { diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java index b80a01212ca0..8046589f6d25 100644 --- a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java +++ b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java @@ -210,11 +210,13 @@ public class ScreenMediaRecorder extends MediaProjection.Callback { throws IOException { String videoType = MediaFormat.MIMETYPE_VIDEO_AVC; - // Get max size from the decoder, to ensure recordings will be playable on device - MediaCodec decoder = MediaCodec.createDecoderByType(videoType); - MediaCodecInfo.VideoCapabilities vc = decoder.getCodecInfo() + // Get max size from the encoder, + // implicitly decoder supports this size and + // ensure recordings will be playable on device + MediaCodec encoder = MediaCodec.createEncoderByType(videoType); + MediaCodecInfo.VideoCapabilities vc = encoder.getCodecInfo() .getCapabilitiesForType(videoType).getVideoCapabilities(); - decoder.release(); + encoder.release(); // Check if we can support screen size as-is int width = vc.getSupportedWidths().getUpper(); diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java index 267b147fa09a..335aeda766aa 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java @@ -96,6 +96,8 @@ import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.internal.policy.SystemBarUtils; import com.android.internal.util.LatencyTracker; import com.android.keyguard.ActiveUnlockConfig; +import com.android.keyguard.EmergencyButton; +import com.android.keyguard.EmergencyButtonController; import com.android.keyguard.FaceAuthApiRequestReason; import com.android.keyguard.KeyguardClockSwitch.ClockSize; import com.android.keyguard.KeyguardStatusView; @@ -387,6 +389,10 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump private boolean mAnimateNextPositionUpdate; private final ScreenOffAnimationController mScreenOffAnimationController; private final UnlockedScreenOffAnimationController mUnlockedScreenOffAnimationController; + + private final EmergencyButtonController.Factory mEmergencyButtonControllerFactory; + private EmergencyButtonController mEmergencyButtonController; + private TrackingStartedListener mTrackingStartedListener; private OpenCloseListener mOpenCloseListener; private GestureRecorder mGestureRecorder; @@ -741,6 +747,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump KeyguardLongPressViewModel keyguardLongPressViewModel, KeyguardInteractor keyguardInteractor, ActivityStarter activityStarter, + EmergencyButtonController.Factory emergencyButtonControllerFactory, KeyguardFaceAuthInteractor keyguardFaceAuthInteractor) { mInteractionJankMonitor = interactionJankMonitor; keyguardStateController.addCallback(new KeyguardStateController.Callback() { @@ -829,6 +836,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump mContentResolver = contentResolver; mKeyguardQsUserSwitchComponentFactory = keyguardQsUserSwitchComponentFactory; mKeyguardUserSwitcherComponentFactory = keyguardUserSwitcherComponentFactory; + mEmergencyButtonControllerFactory = emergencyButtonControllerFactory; mFragmentService = fragmentService; mSettingsChangeObserver = new SettingsChangeObserver(handler); mSplitShadeEnabled = @@ -1365,6 +1373,10 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump mKeyguardIndicationController.showTransientIndication(stringResourceId), mVibratorHelper, mActivityStarter); + EmergencyButton emergencyButton = + mKeyguardBottomArea.findViewById(R.id.emergency_call_button); + mEmergencyButtonController = mEmergencyButtonControllerFactory.create(emergencyButton); + mEmergencyButtonController.init(); } @VisibleForTesting diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java index 0c800d456f3c..1657b5ff5754 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java @@ -347,7 +347,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW (long) mLpChanged.preferredMaxDisplayRefreshRate); } - if (state.bouncerShowing && !isDebuggable()) { + if (state.bouncerShowing) { mLpChanged.flags |= LayoutParams.FLAG_SECURE; } else { mLpChanged.flags &= ~LayoutParams.FLAG_SECURE; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java index a532195c5b9f..8f5298c0b668 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java @@ -42,6 +42,7 @@ import android.media.INearbyMediaDevicesProvider; import android.media.MediaRoute2Info; import android.os.Binder; import android.os.Bundle; +import android.os.DeviceIntegrationUtils; import android.os.Handler; import android.os.HandlerExecutor; import android.os.IBinder; @@ -170,6 +171,9 @@ public class CommandQueue extends IStatusBar.Stub implements private static final int MSG_SHOW_MEDIA_OUTPUT_SWITCHER = 72 << MSG_SHIFT; private static final int MSG_TOGGLE_TASKBAR = 73 << MSG_SHIFT; + // Device Integration: new case to handler disable message from VirtualDisplay + private static final int MSG_DISABLE_VD = 100 << MSG_SHIFT; + public static final int FLAG_EXCLUDE_NONE = 0; public static final int FLAG_EXCLUDE_SEARCH_PANEL = 1 << 0; public static final int FLAG_EXCLUDE_RECENTS_PANEL = 1 << 1; @@ -583,13 +587,20 @@ public class CommandQueue extends IStatusBar.Stub implements boolean animate) { synchronized (mLock) { setDisabled(displayId, state1, state2); - mHandler.removeMessages(MSG_DISABLE); + + int msgType = MSG_DISABLE; + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION && displayId != mDisplayTracker.getDefaultDisplayId()){ + msgType = MSG_DISABLE_VD; + } + + mHandler.removeMessages(msgType); final SomeArgs args = SomeArgs.obtain(); args.argi1 = displayId; args.argi2 = state1; args.argi3 = state2; args.argi4 = animate ? 1 : 0; - Message msg = mHandler.obtainMessage(MSG_DISABLE, args); + Message msg = mHandler.obtainMessage(msgType, args); + if (Looper.myLooper() == mHandler.getLooper()) { // If its the right looper execute immediately so hides can be handled quickly. mHandler.handleMessage(msg); @@ -1381,6 +1392,7 @@ public class CommandQueue extends IStatusBar.Stub implements break; } case MSG_DISABLE: + case MSG_DISABLE_VD: SomeArgs args = (SomeArgs) msg.obj; for (int i = 0; i < mCallbacks.size(); i++) { mCallbacks.get(i).disable(args.argi1, args.argi2, args.argi3, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java index fdad101ae0f6..70cda8c2f3f0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarMobileView.java @@ -26,6 +26,7 @@ import android.content.Context; import android.content.res.ColorStateList; import android.graphics.Rect; import android.util.AttributeSet; +import android.util.Log; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; @@ -65,6 +66,7 @@ public class StatusBarMobileView extends BaseStatusBarFrameLayout implements Dar private int mVisibleState = STATE_HIDDEN; private DualToneHandler mDualToneHandler; private boolean mForceHidden; + private ImageView mVolte; /** * Designated constructor @@ -124,6 +126,7 @@ public class StatusBarMobileView extends BaseStatusBarFrameLayout implements Dar mIn = findViewById(R.id.mobile_in); mOut = findViewById(R.id.mobile_out); mInoutContainer = findViewById(R.id.inout_container); + mVolte = findViewById(R.id.mobile_volte); mMobileDrawable = new SignalDrawable(getContext()); mMobile.setImageDrawable(mMobileDrawable); @@ -167,7 +170,12 @@ public class StatusBarMobileView extends BaseStatusBarFrameLayout implements Dar } else { mMobileGroup.setVisibility(View.VISIBLE); } - mMobileDrawable.setLevel(mState.strengthId); + if (mState.strengthId >= 0) { + mMobile.setVisibility(View.VISIBLE); + mMobileDrawable.setLevel(mState.strengthId); + }else { + mMobile.setVisibility(View.GONE); + } if (mState.typeId > 0) { mMobileType.setContentDescription(mState.typeContentDescription); mMobileType.setImageResource(mState.typeId); @@ -182,6 +190,12 @@ public class StatusBarMobileView extends BaseStatusBarFrameLayout implements Dar mOut.setVisibility(mState.activityOut ? View.VISIBLE : View.GONE); mInoutContainer.setVisibility((mState.activityIn || mState.activityOut) ? View.VISIBLE : View.GONE); + if (mState.volteId > 0 ) { + mVolte.setImageResource(mState.volteId); + mVolte.setVisibility(View.VISIBLE); + }else { + mVolte.setVisibility(View.GONE); + } } private boolean updateState(MobileIconState state) { @@ -193,8 +207,11 @@ public class StatusBarMobileView extends BaseStatusBarFrameLayout implements Dar mMobileGroup.setVisibility(newVisibility); needsLayout = true; } - if (mState.strengthId != state.strengthId) { + if (state.strengthId >= 0) { mMobileDrawable.setLevel(state.strengthId); + mMobile.setVisibility(View.VISIBLE); + }else { + mMobile.setVisibility(View.GONE); } if (mState.typeId != state.typeId) { needsLayout |= state.typeId == 0 || mState.typeId == 0; @@ -215,6 +232,15 @@ public class StatusBarMobileView extends BaseStatusBarFrameLayout implements Dar mInoutContainer.setVisibility((state.activityIn || state.activityOut) ? View.VISIBLE : View.GONE); + if (mState.volteId != state.volteId) { + if (state.volteId != 0) { + mVolte.setImageResource(state.volteId); + mVolte.setVisibility(View.VISIBLE); + } else { + mVolte.setVisibility(View.GONE); + } + } + needsLayout |= state.roaming != mState.roaming || state.activityIn != mState.activityIn || state.activityOut != mState.activityOut @@ -233,6 +259,7 @@ public class StatusBarMobileView extends BaseStatusBarFrameLayout implements Dar mIn.setImageTintList(color); mOut.setImageTintList(color); mMobileType.setImageTintList(color); + mVolte.setImageTintList(color); mMobileRoaming.setImageTintList(color); mDotView.setDecorColor(tint); mDotView.setIconColor(tint, false); @@ -254,6 +281,7 @@ public class StatusBarMobileView extends BaseStatusBarFrameLayout implements Dar mIn.setImageTintList(list); mOut.setImageTintList(list); mMobileType.setImageTintList(list); + mVolte.setImageTintList(list); mMobileRoaming.setImageTintList(list); mDotView.setDecorColor(color); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalController.java index c523d22456f6..89e9acef8da4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileSignalController.java @@ -15,26 +15,46 @@ */ package com.android.systemui.statusbar.connectivity; +import static android.telephony.ims.stub.ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN; +import static android.telephony.ims.stub.ImsRegistrationImplBase.REGISTRATION_TECH_NONE; +import static com.android.settingslib.mobile.MobileMappings.toDisplayIconKey; +import static com.android.settingslib.mobile.MobileMappings.toIconKey; import static android.telephony.TelephonyManager.UNKNOWN_CARRIER_ID; +import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; +import android.content.IntentFilter; +import android.content.res.Resources; import android.database.ContentObserver; +import android.net.ConnectivityManager; +import android.net.ConnectivityManager.NetworkCallback; +import android.net.Network; import android.net.NetworkCapabilities; +import android.net.NetworkRequest; +import android.net.TelephonyNetworkSpecifier; import android.os.Handler; import android.os.Looper; import android.provider.Settings.Global; import android.telephony.CellSignalStrength; import android.telephony.CellSignalStrengthCdma; +import android.telephony.CellSignalStrengthNr; +import android.telephony.ims.ImsMmTelManager; +import android.telephony.ims.feature.MmTelFeature; import android.telephony.SignalStrength; import android.telephony.SubscriptionInfo; import android.telephony.SubscriptionManager; +import android.telephony.TelephonyDisplayInfo; import android.telephony.TelephonyManager; +import android.telephony.ims.ImsException; +import android.telephony.ims.ImsStateCallback; +import android.telephony.ims.ImsMmTelManager; import android.text.Html; import android.text.TextUtils; import android.util.Log; import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.telephony.TelephonyIntents; import com.android.settingslib.SignalIcon.MobileIconGroup; import com.android.settingslib.graph.SignalDrawable; import com.android.settingslib.mobile.MobileMappings.Config; @@ -45,6 +65,9 @@ import com.android.settingslib.mobile.TelephonyIcons; import com.android.settingslib.net.SignalStrengthUtil; import com.android.systemui.R; import com.android.systemui.statusbar.pipeline.mobile.util.MobileMappingsProxy; +import com.android.systemui.statusbar.policy.FiveGServiceClient; +import com.android.systemui.statusbar.policy.FiveGServiceClient.FiveGServiceState; +import com.android.systemui.statusbar.policy.FiveGServiceClient.IFiveGStateListener; import com.android.systemui.util.CarrierConfigTracker; import java.io.PrintWriter; @@ -61,6 +84,7 @@ public class MobileSignalController extends SignalController<MobileState, Mobile private static final int STATUS_HISTORY_SIZE = 64; private final TelephonyManager mPhone; private final CarrierConfigTracker mCarrierConfigTracker; + private final ImsMmTelManager mImsMmTelManager; private final SubscriptionDefaults mDefaults; private final MobileMappingsProxy mMobileMappingsProxy; private final String mNetworkNameDefault; @@ -82,6 +106,20 @@ public class MobileSignalController extends SignalController<MobileState, Mobile // Where to copy the next state into. private int mMobileStatusHistoryIndex; + private int mCallState = TelephonyManager.CALL_STATE_IDLE; + + /****************************SideCar****************************/ + @VisibleForTesting + FiveGStateListener mFiveGStateListener; + @VisibleForTesting + FiveGServiceState mFiveGState; + private FiveGServiceClient mClient; + /**********************************************************/ + + private ConnectivityManager mConnectivityManager; + private ConnectivityManager.NetworkCallback mNetworkCallback; + private boolean mIsConnectionFailed = false; + private final MobileStatusTracker.Callback mMobileCallback = new MobileStatusTracker.Callback() { private String mLastStatus; @@ -137,6 +175,8 @@ public class MobileSignalController extends SignalController<MobileState, Mobile mDefaults = defaults; mSubscriptionInfo = info; mMobileMappingsProxy = mobileMappingsProxy; + mFiveGStateListener = new FiveGStateListener(); + mFiveGState = new FiveGServiceState(); mNetworkNameSeparator = getTextIfExists( R.string.status_bar_network_name_separator).toString(); mNetworkNameDefault = getTextIfExists( @@ -151,13 +191,22 @@ public class MobileSignalController extends SignalController<MobileState, Mobile mLastState.networkNameData = mCurrentState.networkNameData = networkName; mLastState.enabled = mCurrentState.enabled = hasMobileData; mLastState.iconGroup = mCurrentState.iconGroup = mDefaultIcons; + mObserver = new ContentObserver(new Handler(receiverLooper)) { @Override public void onChange(boolean selfChange) { updateTelephony(); } }; + mImsMmTelManager = ImsMmTelManager.createForSubscriptionId(info.getSubscriptionId()); mMobileStatusTracker = mobileStatusTrackerFactory.createTracker(mMobileCallback); + mNetworkCallback = new NetworkCallback(NetworkCallback.FLAG_INCLUDE_LOCATION_INFO) { + @Override + public void onCapabilitiesChanged(Network network, NetworkCapabilities nc) { + mIsConnectionFailed = + !nc.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED); + } + }; } void setConfiguration(Config config) { @@ -202,6 +251,31 @@ public class MobileSignalController extends SignalController<MobileState, Mobile mContext.getContentResolver().registerContentObserver(Global.getUriFor( Global.MOBILE_DATA + mSubscriptionInfo.getSubscriptionId()), true, mObserver); + mContext.getContentResolver().registerContentObserver(Global.getUriFor(Global.DATA_ROAMING), + true, mObserver); + mContext.getContentResolver().registerContentObserver(Global.getUriFor( + Global.DATA_ROAMING + mSubscriptionInfo.getSubscriptionId()), + true, mObserver); + mContext.registerReceiver(mVolteSwitchObserver, + new IntentFilter("org.codeaurora.intent.action.ACTION_ENHANCE_4G_SWITCH"), Context.RECEIVER_EXPORTED); + if (mConfig.showVolteIcon || mConfig.showVowifiIcon) { + try { + mImsMmTelManager.registerImsStateCallback(mContext.getMainExecutor(), + mImsStateCallback); + }catch (ImsException exception) { + Log.e(mTag, "failed to call registerImsStateCallback ", exception); + } + } + mConnectivityManager = (ConnectivityManager) + mContext.getSystemService(Context.CONNECTIVITY_SERVICE); + NetworkRequest.Builder builder = new NetworkRequest.Builder(); + builder.addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR); + builder.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET); + TelephonyNetworkSpecifier specifier = new TelephonyNetworkSpecifier.Builder() + .setSubscriptionId(mSubscriptionInfo.getSubscriptionId()).build(); + builder.setNetworkSpecifier(specifier); + final NetworkRequest request = builder.build(); + mConnectivityManager.registerNetworkCallback(request, mNetworkCallback); } /** @@ -210,6 +284,13 @@ public class MobileSignalController extends SignalController<MobileState, Mobile public void unregisterListener() { mMobileStatusTracker.setListening(false); mContext.getContentResolver().unregisterContentObserver(mObserver); + mContext.unregisterReceiver(mVolteSwitchObserver); + if (mConfig.showVolteIcon || mConfig.showVowifiIcon) { + mImsMmTelManager.unregisterImsStateCallback(mImsStateCallback); + } + if (mNetworkCallback != null) { + mConnectivityManager.unregisterNetworkCallback(mNetworkCallback); + } } private void updateInflateSignalStrength() { @@ -233,12 +314,20 @@ public class MobileSignalController extends SignalController<MobileState, Mobile if (mInflateSignalStrengths) { level++; } + boolean dataDisabled = mCurrentState.userSetup && (mCurrentState.iconGroup == TelephonyIcons.DATA_DISABLED || (mCurrentState.iconGroup == TelephonyIcons.NOT_DEFAULT_DATA && mCurrentState.defaultDataOff)); boolean noInternet = mCurrentState.inetCondition == 0; - boolean cutOut = dataDisabled || noInternet; + boolean isDataEnabled = mCurrentState.mobileDataEnabled; + boolean isDataConnected = mCurrentState.dataState == TelephonyManager.DATA_CONNECTED; + boolean isInService = isInService(); + boolean cutOut = !isDataEnabled + || (isDataConnected && mIsConnectionFailed) || !isInService; + if (mConfig.hideNoInternetState) { + cutOut = false; + } return SignalDrawable.getState(level, getNumLevels(), cutOut); } else if (mCurrentState.enabled) { return SignalDrawable.getEmptyState(getNumLevels()); @@ -252,6 +341,51 @@ public class MobileSignalController extends SignalController<MobileState, Mobile return getCurrentIconId(); } + private int getVolteResId() { + int resId = 0; + int voiceNetTye = mCurrentState.getVoiceNetworkType(); + if ( (mCurrentState.voiceCapable || mCurrentState.videoCapable) + && mCurrentState.imsRegistered ) { + resId = R.drawable.ic_volte; + }else if ( (mCurrentState.telephonyDisplayInfo.getNetworkType() == TelephonyManager.NETWORK_TYPE_LTE + || mCurrentState.telephonyDisplayInfo.getNetworkType() == + TelephonyManager.NETWORK_TYPE_LTE_CA) + && voiceNetTye == TelephonyManager.NETWORK_TYPE_UNKNOWN) { + resId = R.drawable.ic_volte_no_voice; + } + return resId; + } + + private void setListeners() { + try { + Log.d(mTag, "setListeners: register CapabilitiesCallback and RegistrationCallback"); + mImsMmTelManager.registerMmTelCapabilityCallback(mContext.getMainExecutor(), + mCapabilityCallback); + } catch (ImsException e) { + Log.e(mTag, "unable to register listeners.", e); + } + queryImsState(); + } + + private void queryImsState() { + TelephonyManager tm = mPhone.createForSubscriptionId(mSubscriptionInfo.getSubscriptionId()); + mCurrentState.voiceCapable = tm.isVolteAvailable(); + mCurrentState.videoCapable = tm.isVideoTelephonyAvailable(); + mCurrentState.imsRegistered = mPhone.isImsRegistered(mSubscriptionInfo.getSubscriptionId()); + if (DEBUG) { + Log.d(mTag, "queryImsState tm=" + tm + " phone=" + mPhone + + " voiceCapable=" + mCurrentState.voiceCapable + + " videoCapable=" + mCurrentState.videoCapable + + " imsResitered=" + mCurrentState.imsRegistered); + } + notifyListenersIfNecessary(); + } + + private void removeListeners() { + Log.d(mTag, "removeListeners: unregister CapabilitiesCallback and RegistrationCallback"); + mImsMmTelManager.unregisterMmTelCapabilityCallback(mCapabilityCallback); + } + @Override public void notifyListeners(SignalCallback callback) { // If the device is on carrier merged WiFi, we should let WifiSignalController to control @@ -277,6 +411,7 @@ public class MobileSignalController extends SignalController<MobileState, Mobile final QsInfo qsInfo = getQsInfo(contentDescription, iconId); final SbInfo sbInfo = getSbInfo(contentDescription, iconId); + int volteIcon = mConfig.showVolteIcon ? getVolteResId() : 0; MobileDataIndicators mobileDataIndicators = new MobileDataIndicators( sbInfo.icon, qsInfo.icon, @@ -284,6 +419,7 @@ public class MobileSignalController extends SignalController<MobileState, Mobile qsInfo.ratTypeIcon, mCurrentState.hasActivityIn(), mCurrentState.hasActivityOut(), + volteIcon, dataContentDescription, dataContentDescriptionHtml, qsInfo.description, @@ -331,6 +467,20 @@ public class MobileSignalController extends SignalController<MobileState, Mobile (showDataIconInStatusBar || mConfig.alwaysShowDataRatIcon) ? dataTypeIcon : 0; boolean showTriangle = mCurrentState.enabled && !mCurrentState.airplaneMode; + if ( mConfig.enableRatIconEnhancement ) { + typeIcon = getEnhancementDataRatIcon(); + }else if ( mConfig.enableDdsRatIconEnhancement ) { + typeIcon = getEnhancementDdsRatIcon(); + } + + MobileIconGroup vowifiIconGroup = getVowifiIconGroup(); + if (mConfig.showVowifiIcon && vowifiIconGroup != null) { + typeIcon = vowifiIconGroup.dataType; + statusIcon = new IconState(true, + ((mCurrentState.enabled && !mCurrentState.airplaneMode) ? statusIcon.icon : -1), + statusIcon.contentDescription); + } + return new SbInfo(showTriangle, typeIcon, statusIcon); } @@ -482,6 +632,27 @@ public class MobileSignalController extends SignalController<MobileState, Mobile mCurrentState.connected = mCurrentState.isInService(); if (mCurrentState.connected) { mCurrentState.level = getSignalLevel(mCurrentState.signalStrength); + if (mConfig.showRsrpSignalLevelforLTE) { + if (DEBUG) { + Log.d(mTag, "updateTelephony CS:" + mCurrentState.getVoiceNetworkType() + + "/" + TelephonyManager.getNetworkTypeName( + mCurrentState.getVoiceNetworkType()) + + ", PS:" + mCurrentState.getDataNetworkType() + + "/"+ TelephonyManager.getNetworkTypeName( + mCurrentState.getDataNetworkType())); + } + int dataType = mCurrentState.getDataNetworkType(); + if (dataType == TelephonyManager.NETWORK_TYPE_LTE || + dataType == TelephonyManager.NETWORK_TYPE_LTE_CA) { + mCurrentState.level = getAlternateLteLevel(mCurrentState.signalStrength); + } else if (dataType == TelephonyManager.NETWORK_TYPE_UNKNOWN) { + int voiceType = mCurrentState.getVoiceNetworkType(); + if (voiceType == TelephonyManager.NETWORK_TYPE_LTE || + voiceType == TelephonyManager.NETWORK_TYPE_LTE_CA) { + mCurrentState.level = getAlternateLteLevel(mCurrentState.signalStrength); + } + } + } } mCurrentState.setCarrierId(mPhone.getSimCarrierId()); @@ -491,6 +662,15 @@ public class MobileSignalController extends SignalController<MobileState, Mobile } else { mCurrentState.iconGroup = mDefaultIcons; } + + //Modem has centralized logic to display 5G icon based on carrier requirements + //For 5G icon display, only query NrIconType reported by modem + if ( mFiveGState.isNrIconTypeValid() ) { + mCurrentState.iconGroup = mFiveGState.getIconGroup(); + }else { + mCurrentState.iconGroup = getNetworkTypeIconGroup(); + } + mCurrentState.dataConnected = mCurrentState.isDataConnected(); mCurrentState.roaming = isRoaming(); @@ -519,6 +699,19 @@ public class MobileSignalController extends SignalController<MobileState, Mobile mCurrentState.networkNameData = mCurrentState.getOperatorAlphaShort(); } + + if ( mConfig.alwaysShowNetworkTypeIcon ) { + if(!mCurrentState.connected) { + mCurrentState.iconGroup = TelephonyIcons.UNKNOWN; + }else if (mFiveGState.isNrIconTypeValid()) { + mCurrentState.iconGroup = mFiveGState.getIconGroup(); + }else { + mCurrentState.iconGroup = getNetworkTypeIconGroup(); + } + } + mCurrentState.mobileDataEnabled = mPhone.isDataEnabled(); + mCurrentState.roamingDataEnabled = mPhone.isDataRoamingEnabled(); + notifyListenersIfNecessary(); } @@ -543,6 +736,76 @@ public class MobileSignalController extends SignalController<MobileState, Mobile return !mPhone.isDataConnectionAllowed(); } + private boolean isDataNetworkTypeAvailable() { + boolean isAvailable = true; + if (mCurrentState.telephonyDisplayInfo.getNetworkType() == TelephonyManager.NETWORK_TYPE_UNKNOWN ) { + isAvailable = false; + }else { + int dataType = getDataNetworkType(); + int voiceType = getVoiceNetworkType(); + if ((dataType == TelephonyManager.NETWORK_TYPE_EVDO_A + || dataType == TelephonyManager.NETWORK_TYPE_EVDO_B + || dataType == TelephonyManager.NETWORK_TYPE_EHRPD + || dataType == TelephonyManager.NETWORK_TYPE_LTE + || dataType == TelephonyManager.NETWORK_TYPE_LTE_CA) + && (voiceType == TelephonyManager.NETWORK_TYPE_GSM + || voiceType == TelephonyManager.NETWORK_TYPE_1xRTT + || voiceType == TelephonyManager.NETWORK_TYPE_CDMA) + && ( !isCallIdle() )) { + isAvailable = false; + } + } + + return isAvailable; + } + + private boolean isCallIdle() { + return mCallState == TelephonyManager.CALL_STATE_IDLE; + } + + private int getVoiceNetworkType() { + // TODO(b/214591923) + //return mServiceState != null ? + // mServiceState.getVoiceNetworkType() : TelephonyManager.NETWORK_TYPE_UNKNOWN; + return TelephonyManager.NETWORK_TYPE_UNKNOWN; + } + + private int getDataNetworkType() { + // TODO(b/214591923) + //return mServiceState != null ? + // mServiceState.getDataNetworkType() : TelephonyManager.NETWORK_TYPE_UNKNOWN; + return TelephonyManager.NETWORK_TYPE_UNKNOWN; + } + + private int getAlternateLteLevel(SignalStrength signalStrength) { + if (signalStrength == null) { + Log.e(mTag, "getAlternateLteLevel signalStrength is null"); + return 0; + } + + int lteRsrp = signalStrength.getLteDbm(); + if ( lteRsrp == SignalStrength.INVALID ) { + int signalStrengthLevel = signalStrength.getLevel(); + if (DEBUG) { + Log.d(mTag, "getAlternateLteLevel lteRsrp:INVALID " + + " signalStrengthLevel = " + signalStrengthLevel); + } + return signalStrengthLevel; + } + + int rsrpLevel = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; + if (lteRsrp > -44) rsrpLevel = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; + else if (lteRsrp >= -97) rsrpLevel = SignalStrength.SIGNAL_STRENGTH_GREAT; + else if (lteRsrp >= -105) rsrpLevel = SignalStrength.SIGNAL_STRENGTH_GOOD; + else if (lteRsrp >= -113) rsrpLevel = SignalStrength.SIGNAL_STRENGTH_MODERATE; + else if (lteRsrp >= -120) rsrpLevel = SignalStrength.SIGNAL_STRENGTH_POOR; + else if (lteRsrp >= -140) rsrpLevel = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; + if (DEBUG) { + Log.d(mTag, "getAlternateLteLevel lteRsrp:" + lteRsrp + " rsrpLevel = " + rsrpLevel); + } + return rsrpLevel; + } + @VisibleForTesting void setActivity(int activity) { mCurrentState.activityIn = activity == TelephonyManager.DATA_ACTIVITY_INOUT @@ -557,12 +820,92 @@ public class MobileSignalController extends SignalController<MobileState, Mobile mMobileStatusHistoryIndex = (mMobileStatusHistoryIndex + 1) % STATUS_HISTORY_SIZE; } + public void registerFiveGStateListener(FiveGServiceClient client) { + int phoneId = mSubscriptionInfo.getSimSlotIndex(); + client.registerListener(phoneId, mFiveGStateListener); + mClient = client; + } + + public void unregisterFiveGStateListener(FiveGServiceClient client) { + int phoneId = mSubscriptionInfo.getSimSlotIndex(); + client.unregisterListener(phoneId, mFiveGStateListener); + } + + private MobileIconGroup getNetworkTypeIconGroup() { + MobileIconGroup iconGroup = mDefaultIcons; + int overrideNetworkType = mCurrentState.telephonyDisplayInfo.getOverrideNetworkType(); + String iconKey = null; + if (overrideNetworkType == TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NONE + || overrideNetworkType == TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NR_NSA_MMWAVE + || overrideNetworkType == TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NR_NSA ){ + int networkType = mCurrentState.telephonyDisplayInfo.getNetworkType(); + if (networkType == TelephonyManager.NETWORK_TYPE_UNKNOWN) { + networkType = mCurrentState.getVoiceNetworkType(); + } + iconKey = toIconKey(networkType); + } else{ + iconKey = toDisplayIconKey(overrideNetworkType); + } + + return mNetworkToIconLookup.getOrDefault(iconKey, mDefaultIcons); + } + + private boolean showDataRatIcon() { + boolean result = false; + if ( mCurrentState.mobileDataEnabled ) { + if(mCurrentState.roamingDataEnabled || !mCurrentState.roaming) { + result = true; + } + } + return result; + } + + private int getEnhancementDataRatIcon() { + return showDataRatIcon() && mCurrentState.connected ? getRatIconGroup().dataType : 0; + } + + private int getEnhancementDdsRatIcon() { + return mCurrentState.dataSim && mCurrentState.connected ? getRatIconGroup().dataType : 0; + } + + private MobileIconGroup getRatIconGroup() { + MobileIconGroup iconGroup = mDefaultIcons; + if ( mFiveGState.isNrIconTypeValid() ) { + iconGroup = mFiveGState.getIconGroup(); + }else { + iconGroup = getNetworkTypeIconGroup(); + } + return iconGroup; + } + + private boolean isVowifiAvailable() { + return mCurrentState.voiceCapable + && mCurrentState.imsRegistrationTech == REGISTRATION_TECH_IWLAN; + } + + private MobileIconGroup getVowifiIconGroup() { + if ( isVowifiAvailable() && !isCallIdle() ) { + return TelephonyIcons.VOWIFI_CALLING; + }else if (isVowifiAvailable()) { + return TelephonyIcons.VOWIFI; + }else { + return null; + } + } + @Override public void dump(PrintWriter pw) { super.dump(pw); pw.println(" mSubscription=" + mSubscriptionInfo + ","); pw.println(" mInflateSignalStrengths=" + mInflateSignalStrengths + ","); pw.println(" isDataDisabled=" + isDataDisabled() + ","); + pw.println(" mConfig.enableRatIconEnhancement=" + mConfig.enableRatIconEnhancement + ","); + pw.println(" mConfig.enableDdsRatIconEnhancement=" + + mConfig.enableDdsRatIconEnhancement + ","); + pw.println(" mConfig.alwaysShowNetworkTypeIcon=" + + mConfig.alwaysShowNetworkTypeIcon + ","); + pw.println(" mConfig.showVowifiIcon=" + mConfig.showVowifiIcon + ","); + pw.println(" mConfig.showVolteIcon=" + mConfig.showVolteIcon + ","); pw.println(" mNetworkToIconLookup=" + mNetworkToIconLookup + ","); pw.println(" mMobileStatusTracker.isListening=" + mMobileStatusTracker.isListening()); pw.println(" MobileStatusHistory"); @@ -579,10 +922,66 @@ public class MobileSignalController extends SignalController<MobileState, Mobile + (mMobileStatusHistoryIndex + STATUS_HISTORY_SIZE - i) + "): " + mMobileStatusHistory[i & (STATUS_HISTORY_SIZE - 1)]); } + pw.println(" mFiveGState=" + mFiveGState + ","); dumpTableData(pw); } + class FiveGStateListener implements IFiveGStateListener{ + + public void onStateChanged(FiveGServiceState state) { + if (DEBUG) { + Log.d(mTag, "onStateChanged: state=" + state); + } + mFiveGState = state; + updateTelephony(); + notifyListeners(); + } + } + + private ImsMmTelManager.CapabilityCallback mCapabilityCallback + = new ImsMmTelManager.CapabilityCallback() { + @Override + public void onCapabilitiesStatusChanged(MmTelFeature.MmTelCapabilities config) { + mCurrentState.voiceCapable = + config.isCapable(MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VOICE); + mCurrentState.videoCapable = + config.isCapable(MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VIDEO); + Log.d(mTag, "onCapabilitiesStatusChanged isVoiceCapable=" + mCurrentState.voiceCapable + + " isVideoCapable=" + mCurrentState.videoCapable); + notifyListenersIfNecessary(); + } + }; + + private final BroadcastReceiver mVolteSwitchObserver = new BroadcastReceiver() { + public void onReceive(Context context, Intent intent) { + Log.d(mTag, "action=" + intent.getAction()); + if ( mConfig.showVolteIcon ) { + notifyListeners(); + } + } + }; + + private final ImsStateCallback mImsStateCallback = new ImsStateCallback() { + @Override + public void onUnavailable(int reason) { + Log.d(mTag, "ImsStateCallback.onUnavailable: reason=" + reason); + removeListeners(); + } + + @Override + public void onAvailable() { + Log.d(mTag, "ImsStateCallback.onAvailable"); + setListeners(); + } + + @Override + public void onError() { + Log.e(mTag, "ImsStateCallback.onError"); + removeListeners(); + } + }; + /** Box for QS icon info */ private static final class QsInfo { final int ratTypeIcon; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileState.kt b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileState.kt index c37b01fff578..564ce84bfcc9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileState.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/MobileState.kt @@ -16,6 +16,8 @@ package com.android.systemui.statusbar.connectivity +import android.telephony.ims.stub.ImsRegistrationImplBase.REGISTRATION_TECH_NONE + import android.annotation.DrawableRes import android.content.Context import android.telephony.ServiceState @@ -46,6 +48,12 @@ internal class MobileState( @JvmField var dataState: Int = TelephonyManager.DATA_DISCONNECTED, // Tracks the on/off state of the defaultDataSubscription @JvmField var defaultDataOff: Boolean = false, + @JvmField var imsRegistered: Boolean = false, + @JvmField var voiceCapable: Boolean = false, + @JvmField var videoCapable: Boolean = false, + @JvmField var mobileDataEnabled: Boolean = false, + @JvmField var roamingDataEnabled: Boolean = false, + @JvmField var imsRegistrationTech: Int = REGISTRATION_TECH_NONE ) : ConnectivityState() { @JvmField var telephonyDisplayInfo = TelephonyDisplayInfo(TelephonyManager.NETWORK_TYPE_UNKNOWN, @@ -95,6 +103,12 @@ internal class MobileState( roaming = o.roaming dataState = o.dataState defaultDataOff = o.defaultDataOff + imsRegistered = o.imsRegistered + imsRegistrationTech = o.imsRegistrationTech + voiceCapable = o.voiceCapable + videoCapable = o.videoCapable + mobileDataEnabled = o.mobileDataEnabled + roamingDataEnabled = o.roamingDataEnabled telephonyDisplayInfo = o.telephonyDisplayInfo serviceState = o.serviceState @@ -149,6 +163,13 @@ internal class MobileState( return networkTypeResIdCache.get(icon, carrierId, context) } + fun getVoiceNetworkType(): Int { + return serviceState?.getVoiceNetworkType() ?: TelephonyManager.NETWORK_TYPE_UNKNOWN; + } + + fun getDataNetworkType(): Int { + return serviceState?.getDataNetworkType() ?: TelephonyManager.NETWORK_TYPE_UNKNOWN; + } fun setFromMobileStatus(mobileStatus: MobileStatus) { activityIn = mobileStatus.activityIn activityOut = mobileStatus.activityOut @@ -176,6 +197,12 @@ internal class MobileState( builder.append("userSetup=$userSetup,") builder.append("dataState=$dataState,") builder.append("defaultDataOff=$defaultDataOff,") + builder.append("imsRegistered=$imsRegistered,") + builder.append("imsRegistrationTech=$imsRegistrationTech,") + builder.append("voiceCapable=$voiceCapable,") + builder.append("videoCapable=$videoCapable,") + builder.append("mobileDataEnabled=$mobileDataEnabled,") + builder.append("roamingDataEnabled=$roamingDataEnabled,") // Computed properties builder.append("showQuickSettingsRatIcon=${showQuickSettingsRatIcon()},") @@ -259,6 +286,12 @@ internal class MobileState( if (roaming != other.roaming) return false if (dataState != other.dataState) return false if (defaultDataOff != other.defaultDataOff) return false + if (imsRegistered != other.imsRegistered) return false + if (imsRegistrationTech != other.imsRegistrationTech) return false + if (voiceCapable != other.voiceCapable) return false + if (videoCapable != other.videoCapable) return false + if (mobileDataEnabled != other.mobileDataEnabled) return false + if (roamingDataEnabled != other.roamingDataEnabled) return false if (telephonyDisplayInfo != other.telephonyDisplayInfo) return false if (serviceState != other.serviceState) return false if (signalStrength != other.signalStrength) return false @@ -281,6 +314,12 @@ internal class MobileState( result = 31 * result + roaming.hashCode() result = 31 * result + dataState result = 31 * result + defaultDataOff.hashCode() + result = 31 * result + imsRegistered.hashCode() + result = 31 * result + imsRegistrationTech.hashCode() + result = 31 * result + voiceCapable.hashCode() + result = 31 * result + videoCapable.hashCode() + result = 31 * result + mobileDataEnabled.hashCode() + result = 31 * result + roamingDataEnabled.hashCode() result = 31 * result + telephonyDisplayInfo.hashCode() result = 31 * result + (serviceState?.hashCode() ?: 0) result = 31 * result + (signalStrength?.hashCode() ?: 0) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/NetworkControllerImpl.java index 2465c21c956f..3e7bfa73da7e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/NetworkControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/NetworkControllerImpl.java @@ -41,6 +41,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.HandlerExecutor; import android.os.Looper; +import android.os.SystemProperties; import android.provider.Settings; import android.telephony.CarrierConfigManager; import android.telephony.CellSignalStrength; @@ -59,6 +60,7 @@ import androidx.annotation.NonNull; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.telephony.TelephonyIntents; import com.android.settingslib.Utils; import com.android.settingslib.mobile.MobileMappings.Config; import com.android.settingslib.mobile.MobileStatusTracker.SubscriptionDefaults; @@ -84,6 +86,7 @@ import com.android.systemui.statusbar.policy.DataSaverController; import com.android.systemui.statusbar.policy.DataSaverControllerImpl; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener; +import com.android.systemui.statusbar.policy.FiveGServiceClient; import com.android.systemui.telephony.TelephonyListenerManager; import com.android.systemui.util.CarrierConfigTracker; @@ -136,7 +139,6 @@ public class NetworkControllerImpl extends BroadcastReceiver private final Object mLock = new Object(); private Config mConfig; private final CarrierConfigTracker mCarrierConfigTracker; - private final DumpManager mDumpManager; private final LogBuffer mLogBuffer; private final MobileSignalControllerFactory mMobileFactory; @@ -206,6 +208,9 @@ public class NetworkControllerImpl extends BroadcastReceiver private InternetDialogFactory mInternetDialogFactory; private Handler mMainHandler; + @VisibleForTesting + FiveGServiceClient mFiveGServiceClient; + private ConfigurationController.ConfigurationListener mConfigurationListener = new ConfigurationController.ConfigurationListener() { @Override @@ -248,7 +253,6 @@ public class NetworkControllerImpl extends BroadcastReceiver MobileSignalControllerFactory mobileFactory, @Main Handler handler, InternetDialogFactory internetDialogFactory, - DumpManager dumpManager, @StatusBarNetworkControllerLog LogBuffer logBuffer) { this(context, connectivityManager, telephonyManager, @@ -271,7 +275,6 @@ public class NetworkControllerImpl extends BroadcastReceiver trackerFactory, mobileFactory, handler, - dumpManager, logBuffer); mReceiverHandler.post(mRegisterListeners); mInternetDialogFactory = internetDialogFactory; @@ -299,7 +302,6 @@ public class NetworkControllerImpl extends BroadcastReceiver WifiStatusTrackerFactory trackerFactory, MobileSignalControllerFactory mobileFactory, @Main Handler handler, - DumpManager dumpManager, LogBuffer logBuffer ) { mContext = context; @@ -321,7 +323,6 @@ public class NetworkControllerImpl extends BroadcastReceiver mHasMobileDataFeature = telephonyManager.isDataCapable(); mDemoModeController = demoModeController; mCarrierConfigTracker = carrierConfigTracker; - mDumpManager = dumpManager; mLogBuffer = logBuffer; // telephony @@ -386,6 +387,8 @@ public class NetworkControllerImpl extends BroadcastReceiver mWifiManager.registerScanResultsCallback(mReceiverHandler::post, scanResultsCallback); } + mFiveGServiceClient = FiveGServiceClient.getInstance(context); + NetworkCallback callback = new NetworkCallback(NetworkCallback.FLAG_INCLUDE_LOCATION_INFO){ private Network mLastNetwork; @@ -468,8 +471,6 @@ public class NetworkControllerImpl extends BroadcastReceiver }; mDemoModeController.addCallback(this); - - mDumpManager.registerDumpable(TAG, this); } private final Runnable mClearForceValidated = () -> { @@ -499,6 +500,7 @@ public class NetworkControllerImpl extends BroadcastReceiver for (int i = 0; i < mMobileSignalControllers.size(); i++) { MobileSignalController mobileSignalController = mMobileSignalControllers.valueAt(i); mobileSignalController.registerListener(); + mobileSignalController.registerFiveGStateListener(mFiveGServiceClient); } if (mSubscriptionListener == null) { mSubscriptionListener = new SubListener(mBgLooper); @@ -508,6 +510,7 @@ public class NetworkControllerImpl extends BroadcastReceiver // broadcasts IntentFilter filter = new IntentFilter(); + filter.addAction(TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED); filter.addAction(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED); filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION); filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED); @@ -552,11 +555,17 @@ public class NetworkControllerImpl extends BroadcastReceiver for (int i = 0; i < mMobileSignalControllers.size(); i++) { MobileSignalController mobileSignalController = mMobileSignalControllers.valueAt(i); mobileSignalController.unregisterListener(); + mobileSignalController.unregisterFiveGStateListener(mFiveGServiceClient); } mSubscriptionManager.removeOnSubscriptionsChangedListener(mSubscriptionListener); mBroadcastDispatcher.unregisterReceiver(this); } + @VisibleForTesting + public FiveGServiceClient getFiveGServiceClient() { + return mFiveGServiceClient; + } + public int getConnectedWifiLevel() { return mWifiSignalController.getState().level; } @@ -1003,6 +1012,7 @@ public class NetworkControllerImpl extends BroadcastReceiver } if (mListening) { controller.registerListener(); + controller.registerFiveGStateListener(mFiveGServiceClient); } } } @@ -1013,6 +1023,7 @@ public class NetworkControllerImpl extends BroadcastReceiver mDefaultSignalController = null; } cachedControllers.get(key).unregisterListener(); + cachedControllers.get(key).unregisterFiveGStateListener(mFiveGServiceClient); } } mCallbackHandler.setSubs(subscriptions); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt index 599beecb0e00..eb974219050e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/SignalCallback.kt @@ -146,6 +146,7 @@ data class MobileDataIndicators( @JvmField val qsType: Int, @JvmField val activityIn: Boolean, @JvmField val activityOut: Boolean, + @JvmField val volteIcon: Int, @JvmField val typeContentDescription: CharSequence?, @JvmField val typeContentDescriptionHtml: CharSequence?, @JvmField val qsDescription: CharSequence?, @@ -161,6 +162,7 @@ data class MobileDataIndicators( .append(",qsType=").append(qsType) .append(",activityIn=").append(activityIn) .append(",activityOut=").append(activityOut) + .append(",volteIcon=").append(volteIcon) .append(",typeContentDescription=").append(typeContentDescription) .append(",typeContentDescriptionHtml=").append(typeContentDescriptionHtml) .append(",description=").append(qsDescription) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiIcons.java index e582a01ea88b..2c50a8c51b72 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiIcons.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiIcons.java @@ -12,6 +12,10 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear */ package com.android.systemui.statusbar.connectivity; @@ -39,6 +43,70 @@ public class WifiIcons { R.drawable.ic_no_internet_wifi_signal_4 }; + static final int[] WIFI_4_FULL_ICONS = { + com.android.internal.R.drawable.ic_wifi_4_signal_0, + com.android.internal.R.drawable.ic_wifi_4_signal_1, + com.android.internal.R.drawable.ic_wifi_4_signal_2, + com.android.internal.R.drawable.ic_wifi_4_signal_3, + com.android.internal.R.drawable.ic_wifi_4_signal_4 + }; + + private static final int[] WIFI_4_NO_INTERNET_ICONS = { + R.drawable.ic_qs_wifi_4_0, + R.drawable.ic_qs_wifi_4_1, + R.drawable.ic_qs_wifi_4_2, + R.drawable.ic_qs_wifi_4_3, + R.drawable.ic_qs_wifi_4_4 + }; + + static final int[] WIFI_5_FULL_ICONS = { + com.android.internal.R.drawable.ic_wifi_5_signal_0, + com.android.internal.R.drawable.ic_wifi_5_signal_1, + com.android.internal.R.drawable.ic_wifi_5_signal_2, + com.android.internal.R.drawable.ic_wifi_5_signal_3, + com.android.internal.R.drawable.ic_wifi_5_signal_4 + }; + + private static final int[] WIFI_5_NO_INTERNET_ICONS = { + R.drawable.ic_qs_wifi_5_0, + R.drawable.ic_qs_wifi_5_1, + R.drawable.ic_qs_wifi_5_2, + R.drawable.ic_qs_wifi_5_3, + R.drawable.ic_qs_wifi_5_4 + }; + + static final int[] WIFI_6_FULL_ICONS = { + com.android.internal.R.drawable.ic_wifi_6_signal_0, + com.android.internal.R.drawable.ic_wifi_6_signal_1, + com.android.internal.R.drawable.ic_wifi_6_signal_2, + com.android.internal.R.drawable.ic_wifi_6_signal_3, + com.android.internal.R.drawable.ic_wifi_6_signal_4 + }; + + private static final int[] WIFI_6_NO_INTERNET_ICONS = { + R.drawable.ic_qs_wifi_6_0, + R.drawable.ic_qs_wifi_6_1, + R.drawable.ic_qs_wifi_6_2, + R.drawable.ic_qs_wifi_6_3, + R.drawable.ic_qs_wifi_6_4 + }; + + static final int[] WIFI_7_FULL_ICONS = { + com.android.internal.R.drawable.ic_wifi_7_signal_0, + com.android.internal.R.drawable.ic_wifi_7_signal_1, + com.android.internal.R.drawable.ic_wifi_7_signal_2, + com.android.internal.R.drawable.ic_wifi_7_signal_3, + com.android.internal.R.drawable.ic_wifi_7_signal_4 + }; + + private static final int[] WIFI_7_NO_INTERNET_ICONS = { + R.drawable.ic_qs_wifi_7_0, + R.drawable.ic_qs_wifi_7_1, + R.drawable.ic_qs_wifi_7_2, + R.drawable.ic_qs_wifi_7_3, + R.drawable.ic_qs_wifi_7_4 + }; + public static final int[][] QS_WIFI_SIGNAL_STRENGTH = { WIFI_NO_INTERNET_ICONS, WIFI_FULL_ICONS @@ -46,6 +114,34 @@ public class WifiIcons { static final int[][] WIFI_SIGNAL_STRENGTH = QS_WIFI_SIGNAL_STRENGTH; + public static final int[][] QS_WIFI_4_SIGNAL_STRENGTH = { + WIFI_4_NO_INTERNET_ICONS, + WIFI_4_FULL_ICONS + }; + + static final int[][] WIFI_4_SIGNAL_STRENGTH = QS_WIFI_4_SIGNAL_STRENGTH; + + public static final int[][] QS_WIFI_5_SIGNAL_STRENGTH = { + WIFI_5_NO_INTERNET_ICONS, + WIFI_5_FULL_ICONS + }; + + static final int[][] WIFI_5_SIGNAL_STRENGTH = QS_WIFI_5_SIGNAL_STRENGTH; + + public static final int[][] QS_WIFI_6_SIGNAL_STRENGTH = { + WIFI_6_NO_INTERNET_ICONS, + WIFI_6_FULL_ICONS + }; + + static final int[][] WIFI_6_SIGNAL_STRENGTH = QS_WIFI_6_SIGNAL_STRENGTH; + + public static final int[][] QS_WIFI_7_SIGNAL_STRENGTH = { + WIFI_7_NO_INTERNET_ICONS, + WIFI_7_FULL_ICONS + }; + + static final int[][] WIFI_7_SIGNAL_STRENGTH = QS_WIFI_7_SIGNAL_STRENGTH; + public static final int QS_WIFI_DISABLED = com.android.internal.R.drawable.ic_wifi_signal_0; public static final int QS_WIFI_NO_NETWORK = com.android.internal.R.drawable.ic_wifi_signal_0; public static final int WIFI_NO_NETWORK = QS_WIFI_NO_NETWORK; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiSignalController.java index f84b96c94a91..7b940be8a121 100644..100755 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiSignalController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiSignalController.java @@ -12,7 +12,12 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear */ + package com.android.systemui.statusbar.connectivity; import static android.net.NetworkCapabilities.TRANSPORT_CELLULAR; @@ -26,9 +31,11 @@ import android.content.Intent; import android.net.wifi.WifiManager; import android.os.Handler; import android.text.Html; +import android.net.wifi.ScanResult; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.Preconditions; +import com.android.settingslib.AccessibilityContentDescriptions; import com.android.settingslib.SignalIcon.IconGroup; import com.android.settingslib.SignalIcon.MobileIconGroup; import com.android.settingslib.graph.SignalDrawable; @@ -50,6 +57,12 @@ public class WifiSignalController extends SignalController<WifiState, IconGroup> private final Handler mBgHandler; + private final IconGroup mDefaultWifiIconGroup; + private final IconGroup mWifi4IconGroup; + private final IconGroup mWifi5IconGroup; + private final IconGroup mWifi6IconGroup; + private final IconGroup mWifi7IconGroup; + public WifiSignalController( Context context, boolean hasMobileDataFeature, @@ -73,7 +86,68 @@ public class WifiSignalController extends SignalController<WifiState, IconGroup> wifiManager.registerTrafficStateCallback(context.getMainExecutor(), new WifiTrafficStateCallback()); } - mCurrentState.iconGroup = mLastState.iconGroup = mUnmergedWifiIconGroup; + + mDefaultWifiIconGroup = new IconGroup( + "Wi-Fi Icons", + WifiIcons.WIFI_SIGNAL_STRENGTH, + WifiIcons.QS_WIFI_SIGNAL_STRENGTH, + AccessibilityContentDescriptions.WIFI_CONNECTION_STRENGTH, + WifiIcons.WIFI_NO_NETWORK, + WifiIcons.QS_WIFI_NO_NETWORK, + WifiIcons.WIFI_NO_NETWORK, + WifiIcons.QS_WIFI_NO_NETWORK, + AccessibilityContentDescriptions.WIFI_NO_CONNECTION + ); + + mWifi4IconGroup = new IconGroup( + "Wi-Fi 4 Icons", + WifiIcons.WIFI_4_SIGNAL_STRENGTH, + WifiIcons.QS_WIFI_4_SIGNAL_STRENGTH, + AccessibilityContentDescriptions.WIFI_CONNECTION_STRENGTH, + WifiIcons.WIFI_NO_NETWORK, + WifiIcons.QS_WIFI_NO_NETWORK, + WifiIcons.WIFI_NO_NETWORK, + WifiIcons.QS_WIFI_NO_NETWORK, + AccessibilityContentDescriptions.WIFI_NO_CONNECTION + ); + + mWifi5IconGroup = new IconGroup( + "Wi-Fi 5 Icons", + WifiIcons.WIFI_5_SIGNAL_STRENGTH, + WifiIcons.QS_WIFI_5_SIGNAL_STRENGTH, + AccessibilityContentDescriptions.WIFI_CONNECTION_STRENGTH, + WifiIcons.WIFI_NO_NETWORK, + WifiIcons.QS_WIFI_NO_NETWORK, + WifiIcons.WIFI_NO_NETWORK, + WifiIcons.QS_WIFI_NO_NETWORK, + AccessibilityContentDescriptions.WIFI_NO_CONNECTION + ); + + mWifi6IconGroup = new IconGroup( + "Wi-Fi 6 Icons", + WifiIcons.WIFI_6_SIGNAL_STRENGTH, + WifiIcons.QS_WIFI_6_SIGNAL_STRENGTH, + AccessibilityContentDescriptions.WIFI_CONNECTION_STRENGTH, + WifiIcons.WIFI_NO_NETWORK, + WifiIcons.QS_WIFI_NO_NETWORK, + WifiIcons.WIFI_NO_NETWORK, + WifiIcons.QS_WIFI_NO_NETWORK, + AccessibilityContentDescriptions.WIFI_NO_CONNECTION + ); + + mWifi7IconGroup = new IconGroup( + "Wi-Fi 7 Icons", + WifiIcons.WIFI_7_SIGNAL_STRENGTH, + WifiIcons.QS_WIFI_7_SIGNAL_STRENGTH, + AccessibilityContentDescriptions.WIFI_CONNECTION_STRENGTH, + WifiIcons.WIFI_NO_NETWORK, + WifiIcons.QS_WIFI_NO_NETWORK, + WifiIcons.WIFI_NO_NETWORK, + WifiIcons.QS_WIFI_NO_NETWORK, + AccessibilityContentDescriptions.WIFI_NO_CONNECTION + ); + + mCurrentState.iconGroup = mLastState.iconGroup = mDefaultWifiIconGroup; } @Override @@ -144,6 +218,8 @@ public class WifiSignalController extends SignalController<WifiState, IconGroup> new IconState(sbVisible, getCurrentIconIdForCarrierWifi(), contentDescription); int typeIcon = sbVisible ? icons.dataType : 0; int qsTypeIcon = 0; + // TODO(b/178561525) Populate volteIcon value as necessary + int volteIcon = 0; IconState qsIcon = null; if (sbVisible) { qsTypeIcon = icons.dataType; @@ -154,8 +230,8 @@ public class WifiSignalController extends SignalController<WifiState, IconGroup> mNetworkController.getNetworkNameForCarrierWiFi(mCurrentState.subId); MobileDataIndicators mobileDataIndicators = new MobileDataIndicators( statusIcon, qsIcon, typeIcon, qsTypeIcon, - mCurrentState.activityIn, mCurrentState.activityOut, dataContentDescription, - dataContentDescriptionHtml, description, + mCurrentState.activityIn, mCurrentState.activityOut, volteIcon, + dataContentDescription, dataContentDescriptionHtml, description, mCurrentState.subId, /* roaming= */ false, /* showTriangle= */ true ); callback.setMobileDataIndicators(mobileDataIndicators); @@ -183,6 +259,21 @@ public class WifiSignalController extends SignalController<WifiState, IconGroup> return getCurrentIconIdForCarrierWifi(); } + + private void updateIconGroup() { + if (mCurrentState.wifiStandard == ScanResult.WIFI_STANDARD_11N) { + mCurrentState.iconGroup = mWifi4IconGroup; + } else if (mCurrentState.wifiStandard == ScanResult.WIFI_STANDARD_11AC) { + mCurrentState.iconGroup = mWifi5IconGroup; + } else if (mCurrentState.wifiStandard == ScanResult.WIFI_STANDARD_11AX) { + mCurrentState.iconGroup = mWifi6IconGroup; + } else if (mCurrentState.wifiStandard == ScanResult.WIFI_STANDARD_11BE) { + mCurrentState.iconGroup = mWifi7IconGroup; + } else { + mCurrentState.iconGroup = mDefaultWifiIconGroup; + } + + } /** * Fetches wifi initial state replacing the initial sticky broadcast. */ @@ -235,9 +326,8 @@ public class WifiSignalController extends SignalController<WifiState, IconGroup> mCurrentState.statusLabel = mWifiTracker.statusLabel; mCurrentState.isCarrierMerged = mWifiTracker.isCarrierMerged; mCurrentState.subId = mWifiTracker.subId; - mCurrentState.iconGroup = - mCurrentState.isCarrierMerged ? mCarrierMergedWifiIconGroup - : mUnmergedWifiIconGroup; + mCurrentState.wifiStandard = mWifiTracker.wifiStandard; + updateIconGroup(); } boolean isCarrierMergedWifi(int subId) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiState.kt b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiState.kt index 63a63de83d71..f86daf18ef86 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiState.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/connectivity/WifiState.kt @@ -32,7 +32,9 @@ internal class WifiState( * *not* for typical wifi connections. See b/225902574. */ @JvmField var isDefaultConnectionValidated: Boolean = false, - @JvmField var subId: Int = 0 + @JvmField var subId: Int = 0, + @JvmField var wifiStandard: Int = 0, + @JvmField var isReady: Boolean = false ) : ConnectivityState() { public override fun copyFrom(s: ConnectivityState) { @@ -45,11 +47,15 @@ internal class WifiState( isCarrierMerged = state.isCarrierMerged isDefaultConnectionValidated = state.isDefaultConnectionValidated subId = state.subId + wifiStandard = state.wifiStandard + isReady = state.isReady } override fun toString(builder: StringBuilder) { super.toString(builder) builder.append(",ssid=").append(ssid) + .append(",wifiStandard=").append(wifiStandard) + .append(",isReady=").append(isReady) .append(",isTransient=").append(isTransient) .append(",isDefault=").append(isDefault) .append(",statusLabel=").append(statusLabel) @@ -92,6 +98,8 @@ internal class WifiState( other as WifiState if (ssid != other.ssid) return false + if (wifiStandard != other.wifiStandard) return false + if (isReady != other.isReady) return false if (isTransient != other.isTransient) return false if (isDefault != other.isDefault) return false if (statusLabel != other.statusLabel) return false diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/events/PrivacyDotViewController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/events/PrivacyDotViewController.kt index eddb6835318d..d7410dd847d5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/events/PrivacyDotViewController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/events/PrivacyDotViewController.kt @@ -505,12 +505,7 @@ open class PrivacyDotViewController @Inject constructor( } if (state.designatedCorner != currentViewState.designatedCorner) { - currentViewState.designatedCorner?.contentDescription = null - state.designatedCorner?.contentDescription = state.contentDescription - updateDesignatedCorner(state.designatedCorner, state.shouldShowDot()) - } else if (state.contentDescription != currentViewState.contentDescription) { - state.designatedCorner?.contentDescription = state.contentDescription } updateDotView(state) @@ -536,9 +531,7 @@ open class PrivacyDotViewController @Inject constructor( contentDescr: String? ): Animator? { synchronized(lock) { - nextViewState = nextViewState.copy( - systemPrivacyEventIsActive = true, - contentDescription = contentDescr) + nextViewState = nextViewState.copy(systemPrivacyEventIsActive = true) } return null diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventChipAnimationController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventChipAnimationController.kt index 776956a20140..3599c7dc5584 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventChipAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventChipAnimationController.kt @@ -40,7 +40,8 @@ import javax.inject.Inject import kotlin.math.roundToInt /** - * Controls the view for system event animations. + * //TODO: this _probably_ doesn't control a window anymore + * Controls the window for system event animations. */ class SystemEventChipAnimationController @Inject constructor( private val context: Context, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventCoordinator.kt index 26fd2307c59d..a4507d4e80e9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventCoordinator.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemEventCoordinator.kt @@ -17,10 +17,8 @@ package com.android.systemui.statusbar.events import android.annotation.IntRange -import android.content.Context import android.provider.DeviceConfig import android.provider.DeviceConfig.NAMESPACE_PRIVACY -import com.android.systemui.R import com.android.systemui.dagger.SysUISingleton import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags @@ -40,7 +38,6 @@ class SystemEventCoordinator @Inject constructor( private val systemClock: SystemClock, private val batteryController: BatteryController, private val privacyController: PrivacyItemController, - private val context: Context, private val featureFlags: FeatureFlags ) { private lateinit var scheduler: SystemStatusAnimationScheduler @@ -72,11 +69,6 @@ class SystemEventCoordinator @Inject constructor( fun notifyPrivacyItemsChanged(showAnimation: Boolean = true) { val event = PrivacyEvent(showAnimation) event.privacyItems = privacyStateListener.currentPrivacyItems - event.contentDescription = run { - val items = PrivacyChipBuilder(context, event.privacyItems).joinTypes() - context.getString( - R.string.ongoing_privacy_chip_content_multiple_apps, items) - } scheduler.onStatusEvent(event) } @@ -145,4 +137,4 @@ class SystemEventCoordinator @Inject constructor( private const val DEBOUNCE_TIME = 3000L private const val CHIP_ANIMATION_ENABLED = "privacy_chip_animation_enabled" -private const val TAG = "SystemEventCoordinator"
\ No newline at end of file +private const val TAG = "SystemEventCoordinator" diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt index 2a18f1f51ace..ba8350c899cf 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/events/SystemStatusAnimationScheduler.kt @@ -49,7 +49,7 @@ interface SystemStatusAnimationCallback { fun onSystemEventAnimationFinish(hasPersistentDot: Boolean): Animator? { return null } // Best method name, change my mind - @JvmDefault + @JvmDefault fun onSystemStatusAnimationTransitionToPersistentDot(contentDescription: String?): Animator? { return null } @@ -111,4 +111,4 @@ internal const val APPEAR_ANIMATION_DURATION = 500L internal const val DISPLAY_LENGTH = 3000L internal const val DISAPPEAR_ANIMATION_DURATION = 500L -internal const val MIN_UPTIME: Long = 5 * 1000
\ No newline at end of file +internal const val MIN_UPTIME: Long = 5 * 1000 diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationMediaTemplateViewWrapper.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationMediaTemplateViewWrapper.java index c75cd782c3e2..7459fe69ae3a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationMediaTemplateViewWrapper.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/NotificationMediaTemplateViewWrapper.java @@ -27,6 +27,7 @@ import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow */ public class NotificationMediaTemplateViewWrapper extends NotificationTemplateViewWrapper { + private static final long PROGRESS_UPDATE_INTERVAL = 1000; // 1s private View mActions; protected NotificationMediaTemplateViewWrapper(Context ctx, View view, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java index ae38105e9110..0f3f7434e603 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -3353,6 +3353,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { @Override public void onScreenTurnedOff() { Trace.beginSection("CentralSurfaces#onScreenTurnedOff"); + mDozeServiceHost.updateDozing(); mFalsingCollector.onScreenOff(); mScrimController.onScreenTurnedOff(); if (mCloseQsBeforeScreenOff) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java index 7312db6595e5..715953f48b12 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeServiceHost.java @@ -213,6 +213,8 @@ public final class DozeServiceHost implements DozeHost { updateDozing(); mDozeLog.traceDozing(mStatusBarStateController.isDozing()); mCentralSurfaces.updateIsKeyguard(); + }else{ + mDozingRequested = true; } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java index 46a2457670b0..46a2457670b0 100644..100755 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java index e6b76ad0e00c..f56b6cf03413 100644..100755 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java @@ -30,6 +30,8 @@ import android.content.IntentFilter; import android.content.SharedPreferences; import android.content.res.Resources; import android.media.AudioManager; +import android.net.wifi.ScanResult; +import android.net.wifi.WifiManager; import android.os.Handler; import android.os.Looper; import android.os.RemoteException; @@ -285,11 +287,6 @@ public class PhoneStatusBarPolicy mIconController.setIcon(mSlotCast, R.drawable.stat_sys_cast, null); mIconController.setIconVisibility(mSlotCast, false); - // hotspot - mIconController.setIcon(mSlotHotspot, R.drawable.stat_sys_hotspot, - mResources.getString(R.string.accessibility_status_bar_hotspot)); - mIconController.setIconVisibility(mSlotHotspot, mHotspot.isHotspotEnabled()); - // managed profile updateManagedProfile(); @@ -572,6 +569,11 @@ public class PhoneStatusBarPolicy public void onHotspotChanged(boolean enabled, int numDevices) { mIconController.setIconVisibility(mSlotHotspot, enabled); } + @Override + public void onHotspotChanged(boolean enabled, int numDevices, int standard) { + updateHotspotIcon(standard); + mIconController.setIconVisibility(mSlotHotspot, enabled); + } }; private final CastController.Callback mCastCallback = new CastController.Callback() { @@ -800,4 +802,20 @@ public class PhoneStatusBarPolicy if (DEBUG) Log.d(TAG, "screenrecord: hiding icon"); mHandler.post(() -> mIconController.setIconVisibility(mSlotScreenRecord, false)); } + + private void updateHotspotIcon(int standard) { + if (standard == ScanResult.WIFI_STANDARD_11AX) { + mIconController.setIcon(mSlotHotspot, R.drawable.stat_sys_wifi_6_hotspot, + mResources.getString(R.string.accessibility_status_bar_hotspot)); + } else if (standard == ScanResult.WIFI_STANDARD_11AC) { + mIconController.setIcon(mSlotHotspot, R.drawable.stat_sys_wifi_5_hotspot, + mResources.getString(R.string.accessibility_status_bar_hotspot)); + } else if (standard == ScanResult.WIFI_STANDARD_11N) { + mIconController.setIcon(mSlotHotspot, R.drawable.stat_sys_wifi_4_hotspot, + mResources.getString(R.string.accessibility_status_bar_hotspot)); + } else { + mIconController.setIcon(mSlotHotspot, R.drawable.stat_sys_hotspot, + mResources.getString(R.string.accessibility_status_bar_hotspot)); + } + } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java index d731f8886536..35b3a0d61233 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarSignalPolicy.java @@ -270,6 +270,7 @@ public class StatusBarSignalPolicy implements SignalCallback, state.roaming = indicators.roaming; state.activityIn = indicators.activityIn && mActivityEnabled; state.activityOut = indicators.activityOut && mActivityEnabled; + state.volteId = indicators.volteIcon; if (DEBUG) { Log.d(TAG, "MobileIconStates: " @@ -569,6 +570,7 @@ public class StatusBarSignalPolicy implements SignalCallback, public boolean roaming; public boolean needsLeadingPadding; public CharSequence typeContentDescription; + public int volteId; private MobileIconState(int subId) { super(); @@ -590,7 +592,8 @@ public class StatusBarSignalPolicy implements SignalCallback, && showTriangle == that.showTriangle && roaming == that.roaming && needsLeadingPadding == that.needsLeadingPadding - && Objects.equals(typeContentDescription, that.typeContentDescription); + && Objects.equals(typeContentDescription, that.typeContentDescription) + && volteId == that.volteId; } @Override @@ -616,6 +619,7 @@ public class StatusBarSignalPolicy implements SignalCallback, other.roaming = roaming; other.needsLeadingPadding = needsLeadingPadding; other.typeContentDescription = typeContentDescription; + other.volteId = volteId; } private static List<MobileIconState> copyStates(List<MobileIconState> inStates) { @@ -632,7 +636,8 @@ public class StatusBarSignalPolicy implements SignalCallback, @Override public String toString() { return "MobileIconState(subId=" + subId + ", strengthId=" + strengthId + ", showTriangle=" + showTriangle + ", roaming=" + roaming - + ", typeId=" + typeId + ", visible=" + visible + ")"; + + ", typeId=" + typeId + ", volteId=" + volteId + + ", visible=" + visible + ")"; } } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/MobileInputLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/MobileInputLogger.kt index b3a1c4075d87..4df984fcb347 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/MobileInputLogger.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/MobileInputLogger.kt @@ -133,6 +133,18 @@ constructor( ) } + fun logOnNrIconTypeChanged(nrIconType: Int, subId: Int) { + buffer.log( + TAG, + LogLevel.INFO, + { + int1 = subId + str1 = nrIconType.toString() + }, + { "onNrIconTypeChanged: subId=$int1 nrIconType=$str1" }, + ) + } + fun logActionCarrierConfigChanged() { buffer.log(TAG, LogLevel.INFO, {}, { "Intent received: ACTION_CARRIER_CONFIG_CHANGED" }) } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/MobileIconCustomizationMode.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/MobileIconCustomizationMode.kt new file mode 100644 index 000000000000..53955fc8a99c --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/MobileIconCustomizationMode.kt @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + +package com.android.systemui.statusbar.pipeline.mobile.data.model + +import android.telephony.CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN +import android.telephony.ims.stub.ImsRegistrationImplBase +import android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN +import com.android.systemui.statusbar.policy.FiveGServiceClient.FiveGServiceState + +data class MobileIconCustomizationMode( + val alwaysUseRsrpLevelForLte: Boolean = false, + val lteRsrpLevel: Int = SIGNAL_STRENGTH_NONE_OR_UNKNOWN, + val dataNetworkType: Int = NETWORK_TYPE_UNKNOWN, + val voiceNetworkType: Int = NETWORK_TYPE_UNKNOWN, + val fiveGServiceState: FiveGServiceState = FiveGServiceState(), + val isRatCustomization: Boolean = false, + val alwaysShowNetworkTypeIcon: Boolean = false, + val ddsRatIconEnhancementEnabled: Boolean = false, + val nonDdsRatIconEnhancementEnabled: Boolean = false, + val mobileDataEnabled: Boolean = false, + val dataRoamingEnabled: Boolean = false, + val isDefaultDataSub: Boolean = false, + val isRoaming: Boolean = false, + val originNetworkType: Int = NETWORK_TYPE_UNKNOWN, + val voiceCapable: Boolean = false, + val videoCapable: Boolean = false, + val imsRegistered: Boolean = false, + val imsRegistrationTech: Int = ImsRegistrationImplBase.REGISTRATION_TECH_NONE, +)
\ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/ResolvedNetworkType.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/ResolvedNetworkType.kt index cf7a313a4cb1..eabd31e24813 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/ResolvedNetworkType.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/model/ResolvedNetworkType.kt @@ -32,6 +32,7 @@ import com.android.systemui.statusbar.pipeline.mobile.util.MobileMappingsProxy */ sealed interface ResolvedNetworkType : Diffable<ResolvedNetworkType> { val lookupKey: String + val networkType: Int override fun logDiffs(prevVal: ResolvedNetworkType, row: TableRowLogger) { if (prevVal != this) { @@ -43,20 +44,24 @@ sealed interface ResolvedNetworkType : Diffable<ResolvedNetworkType> { override val lookupKey: String = MobileMappings.toIconKey(NETWORK_TYPE_UNKNOWN) override fun toString(): String = "Unknown" + override val networkType: Int = 0 } data class DefaultNetworkType( override val lookupKey: String, + override val networkType: Int = 0, ) : ResolvedNetworkType data class OverrideNetworkType( override val lookupKey: String, + override val networkType: Int = 0, ) : ResolvedNetworkType /** Represents the carrier merged network. See [CarrierMergedConnectionRepository]. */ object CarrierMergedNetworkType : ResolvedNetworkType { // Effectively unused since [iconGroupOverride] is used instead. override val lookupKey: String = "cwf" + override val networkType: Int = 0 val iconGroupOverride: SignalIcon.MobileIconGroup = TelephonyIcons.CARRIER_MERGED_WIFI diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileConnectionRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileConnectionRepository.kt index 3a11635f75c3..d4b0ac5dac41 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileConnectionRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/MobileConnectionRepository.kt @@ -14,6 +14,12 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.statusbar.pipeline.mobile.data.repository import android.telephony.SubscriptionInfo @@ -118,6 +124,18 @@ interface MobileConnectionRepository { /** The service provider name for this network connection, or the default name */ val networkName: StateFlow<NetworkNameModel> + val lteRsrpLevel: StateFlow<Int> + val voiceNetworkType: StateFlow<Int> + val dataNetworkType: StateFlow<Int> + val nrIconType: StateFlow<Int> + val dataRoamingEnabled: StateFlow<Boolean> + val originNetworkType: StateFlow<Int> + val voiceCapable: StateFlow<Boolean> + val videoCapable: StateFlow<Boolean> + val imsRegistered: StateFlow<Boolean> + val imsRegistrationTech: StateFlow<Int> + val isConnectionFailed: StateFlow<Boolean> + companion object { /** The default number of levels to use for [numberOfLevels]. */ const val DEFAULT_NUM_LEVELS = 4 diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionRepository.kt index 6b86432b8171..c5d9457474d7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/demo/DemoMobileConnectionRepository.kt @@ -14,9 +14,16 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.statusbar.pipeline.mobile.data.repository.demo import android.telephony.CellSignalStrength +import android.telephony.ims.stub.ImsRegistrationImplBase.REGISTRATION_TECH_NONE import android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID import android.telephony.TelephonyManager import com.android.systemui.log.table.TableLogBuffer @@ -38,6 +45,7 @@ import com.android.systemui.statusbar.pipeline.mobile.data.repository.prod.FullM import com.android.systemui.statusbar.pipeline.shared.data.model.DataActivityModel import com.android.systemui.statusbar.pipeline.shared.data.model.toMobileDataActivityModel import com.android.systemui.statusbar.pipeline.wifi.data.repository.demo.model.FakeWifiEventModel +import com.qti.extphone.NrIconType import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharingStarted @@ -186,6 +194,18 @@ class DemoMobileConnectionRepository( override val networkName = MutableStateFlow(NetworkNameModel.IntentDerived("demo network")) + override val lteRsrpLevel = MutableStateFlow(CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN) + override val voiceNetworkType = MutableStateFlow(TelephonyManager.NETWORK_TYPE_UNKNOWN) + override val dataNetworkType = MutableStateFlow(TelephonyManager.NETWORK_TYPE_UNKNOWN) + override val nrIconType = MutableStateFlow(NrIconType.TYPE_NONE) + override val dataRoamingEnabled = MutableStateFlow(true) + override val originNetworkType = MutableStateFlow(TelephonyManager.NETWORK_TYPE_UNKNOWN) + override val voiceCapable = MutableStateFlow(false) + override val videoCapable = MutableStateFlow(false) + override val imsRegistered = MutableStateFlow(false) + override val imsRegistrationTech = MutableStateFlow(REGISTRATION_TECH_NONE) + override val isConnectionFailed = MutableStateFlow(false) + /** * Process a new demo mobile event. Note that [resolvedNetworkType] must be passed in separately * from the event, due to the requirement to reverse the mobile mappings lookup in the top-level diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/CarrierMergedConnectionRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/CarrierMergedConnectionRepository.kt index a609917351d9..0b7544bb50ad 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/CarrierMergedConnectionRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/CarrierMergedConnectionRepository.kt @@ -14,9 +14,16 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.statusbar.pipeline.mobile.data.repository.prod import android.telephony.CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN +import android.telephony.ims.stub.ImsRegistrationImplBase.REGISTRATION_TECH_NONE import android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID import android.telephony.TelephonyManager import android.util.Log @@ -30,6 +37,7 @@ import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConn import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionRepository.Companion.DEFAULT_NUM_LEVELS import com.android.systemui.statusbar.pipeline.wifi.data.repository.WifiRepository import com.android.systemui.statusbar.pipeline.wifi.shared.model.WifiNetworkModel +import com.qti.extphone.NrIconType import javax.inject.Inject import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.flow.Flow @@ -167,6 +175,18 @@ class CarrierMergedConnectionRepository( override val dataEnabled: StateFlow<Boolean> = wifiRepository.isWifiEnabled + override val lteRsrpLevel = MutableStateFlow(SIGNAL_STRENGTH_NONE_OR_UNKNOWN) + override val voiceNetworkType = MutableStateFlow(TelephonyManager.NETWORK_TYPE_UNKNOWN) + override val dataNetworkType = MutableStateFlow(TelephonyManager.NETWORK_TYPE_UNKNOWN) + override val nrIconType = MutableStateFlow(NrIconType.TYPE_NONE) + override val dataRoamingEnabled = MutableStateFlow(true).asStateFlow() + override val originNetworkType = MutableStateFlow(TelephonyManager.NETWORK_TYPE_UNKNOWN) + override val voiceCapable = MutableStateFlow(false) + override val videoCapable = MutableStateFlow(false) + override val imsRegistered = MutableStateFlow(false) + override val imsRegistrationTech = MutableStateFlow(REGISTRATION_TECH_NONE) + override val isConnectionFailed = MutableStateFlow(false) + companion object { // Carrier merged is never roaming private const val ROAMING = false diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepository.kt index 8869dfe02697..e9f4f3c1f6a7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepository.kt @@ -14,6 +14,12 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.statusbar.pipeline.mobile.data.repository.prod import androidx.annotation.VisibleForTesting @@ -287,6 +293,155 @@ class FullMobileConnectionRepository( ) .stateIn(scope, SharingStarted.WhileSubscribed(), activeRepo.value.networkName.value) + override val lteRsrpLevel = + activeRepo + .flatMapLatest { it.lteRsrpLevel } + .logDiffsForTable( + tableLogBuffer, + columnPrefix = "", + columnName = "lteRsrpLevel", + initialValue = activeRepo.value.lteRsrpLevel.value, + ) + .stateIn(scope, SharingStarted.WhileSubscribed(), activeRepo.value.lteRsrpLevel.value) + + override val voiceNetworkType = + activeRepo + .flatMapLatest { it.voiceNetworkType } + .logDiffsForTable( + tableLogBuffer, + columnPrefix = "", + columnName = "voiceNetworkType", + initialValue = activeRepo.value.voiceNetworkType.value, + ) + .stateIn( + scope, + SharingStarted.WhileSubscribed(), + activeRepo.value.voiceNetworkType.value + ) + + override val dataNetworkType = + activeRepo + .flatMapLatest { it.dataNetworkType } + .logDiffsForTable( + tableLogBuffer, + columnPrefix = "", + columnName = "dataNetworkType", + initialValue = activeRepo.value.dataNetworkType.value, + ) + .stateIn( + scope, + SharingStarted.WhileSubscribed(), + activeRepo.value.dataNetworkType.value + ) + + override val nrIconType = + activeRepo.flatMapLatest { it.nrIconType } + .logDiffsForTable( + tableLogBuffer, + columnPrefix = "", + columnName = "nrIconType", + initialValue = activeRepo.value.nrIconType.value, + ) + .stateIn( + scope, + SharingStarted.WhileSubscribed(), + activeRepo.value.nrIconType.value + ) + + override val dataRoamingEnabled = + activeRepo + .flatMapLatest { it.dataRoamingEnabled } + .stateIn( + scope, + SharingStarted.WhileSubscribed(), + activeRepo.value.dataRoamingEnabled.value + ) + + override val originNetworkType = + activeRepo.flatMapLatest { it.originNetworkType } + .logDiffsForTable( + tableLogBuffer, + columnPrefix = "", + columnName = "originNetworkType", + initialValue = activeRepo.value.originNetworkType.value, + ) + .stateIn( + scope, + SharingStarted.WhileSubscribed(), + activeRepo.value.originNetworkType.value + ) + + override val voiceCapable = + activeRepo.flatMapLatest { it.voiceCapable } + .logDiffsForTable( + tableLogBuffer, + columnPrefix = "", + columnName = "voiceCapable", + initialValue = activeRepo.value.voiceCapable.value, + ) + .stateIn( + scope, + SharingStarted.WhileSubscribed(), + activeRepo.value.voiceCapable.value + ) + + override val videoCapable = + activeRepo.flatMapLatest { it.videoCapable } + .logDiffsForTable( + tableLogBuffer, + columnPrefix = "", + columnName = "videoCapable", + initialValue = activeRepo.value.videoCapable.value, + ) + .stateIn( + scope, + SharingStarted.WhileSubscribed(), + activeRepo.value.videoCapable.value + ) + + override val imsRegistered = + activeRepo.flatMapLatest { it.imsRegistered } + .logDiffsForTable( + tableLogBuffer, + columnPrefix = "", + columnName = "imsRegistered", + initialValue = activeRepo.value.imsRegistered.value, + ) + .stateIn( + scope, + SharingStarted.WhileSubscribed(), + activeRepo.value.imsRegistered.value + ) + + override val imsRegistrationTech = + activeRepo.flatMapLatest { it.imsRegistrationTech } + .logDiffsForTable( + tableLogBuffer, + columnPrefix = "", + columnName = "imsRegistrationTech", + initialValue = activeRepo.value.imsRegistrationTech.value, + ) + .stateIn( + scope, + SharingStarted.WhileSubscribed(), + activeRepo.value.imsRegistrationTech.value + ) + + override val isConnectionFailed = + activeRepo.flatMapLatest { it.isConnectionFailed } + .logDiffsForTable( + tableLogBuffer, + columnPrefix = "", + columnName = "isConnectionFailed", + initialValue = activeRepo.value.isConnectionFailed.value, + ) + .stateIn( + scope, + SharingStarted.WhileSubscribed(), + activeRepo.value.isConnectionFailed.value + ) + + class Factory @Inject constructor( diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt index b475183d98c6..13b3065b4027 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryImpl.kt @@ -14,14 +14,45 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + + package com.android.systemui.statusbar.pipeline.mobile.data.repository.prod +import android.content.Context import android.content.Intent import android.content.IntentFilter +import android.database.ContentObserver +import android.net.ConnectivityManager +import android.net.ConnectivityManager.NetworkCallback +import android.net.Network +import android.net.NetworkCapabilities +import android.net.NetworkRequest +import android.net.TelephonyNetworkSpecifier +import android.provider.Settings.Global +import android.telephony.CellSignalStrength.SIGNAL_STRENGTH_GREAT +import android.telephony.CellSignalStrength.SIGNAL_STRENGTH_GOOD +import android.telephony.CellSignalStrength.SIGNAL_STRENGTH_MODERATE +import android.telephony.CellSignalStrength.SIGNAL_STRENGTH_POOR import android.telephony.CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN import android.telephony.CellSignalStrengthCdma +import android.telephony.CellSignalStrengthLte +import android.telephony.ims.ImsException +import android.telephony.ims.ImsMmTelManager +import android.telephony.ims.ImsReasonInfo +import android.telephony.ims.ImsRegistrationAttributes +import android.telephony.ims.ImsStateCallback +import android.telephony.ims.feature.MmTelFeature.MmTelCapabilities +import android.telephony.ims.RegistrationManager +import android.telephony.ims.stub.ImsRegistrationImplBase.REGISTRATION_TECH_NONE import android.telephony.ServiceState import android.telephony.SignalStrength +import android.telephony.SubscriptionInfo +import android.telephony.SubscriptionManager import android.telephony.SubscriptionManager.INVALID_SUBSCRIPTION_ID import android.telephony.TelephonyCallback import android.telephony.TelephonyDisplayInfo @@ -32,11 +63,14 @@ import android.telephony.TelephonyManager.ERI_ON import android.telephony.TelephonyManager.EXTRA_SUBSCRIPTION_ID import android.telephony.TelephonyManager.NETWORK_TYPE_UNKNOWN import android.telephony.TelephonyManager.UNKNOWN_CARRIER_ID +import android.util.Log import com.android.settingslib.Utils import com.android.systemui.broadcast.BroadcastDispatcher +import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Background import com.android.systemui.log.table.TableLogBuffer +import com.android.systemui.log.table.logDiffsForTable import com.android.systemui.statusbar.pipeline.mobile.data.MobileInputLogger import com.android.systemui.statusbar.pipeline.mobile.data.model.DataConnectionState.Disconnected import com.android.systemui.statusbar.pipeline.mobile.data.model.NetworkNameModel @@ -52,6 +86,10 @@ import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConn import com.android.systemui.statusbar.pipeline.mobile.util.MobileMappingsProxy import com.android.systemui.statusbar.pipeline.shared.data.model.DataActivityModel import com.android.systemui.statusbar.pipeline.shared.data.model.toMobileDataActivityModel +import com.android.systemui.statusbar.policy.FiveGServiceClient +import com.android.systemui.statusbar.policy.FiveGServiceClient.FiveGServiceState +import com.android.systemui.statusbar.policy.FiveGServiceClient.IFiveGStateListener +import com.qti.extphone.NrIconType import javax.inject.Inject import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope @@ -62,10 +100,12 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.callbackFlow +import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.mapLatest import kotlinx.coroutines.flow.mapNotNull +import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.onStart import kotlinx.coroutines.flow.scan import kotlinx.coroutines.flow.stateIn @@ -77,6 +117,7 @@ import kotlinx.coroutines.flow.stateIn @Suppress("EXPERIMENTAL_IS_NOT_ENABLED") @OptIn(ExperimentalCoroutinesApi::class) class MobileConnectionRepositoryImpl( + private val context: Context, override val subId: Int, defaultNetworkName: NetworkNameModel, networkNameSeparator: String, @@ -88,6 +129,8 @@ class MobileConnectionRepositoryImpl( logger: MobileInputLogger, override val tableLogBuffer: TableLogBuffer, scope: CoroutineScope, + private val fiveGServiceClient: FiveGServiceClient, + private val connectivityManager: ConnectivityManager ) : MobileConnectionRepository { init { if (telephonyManager.subscriptionId != subId) { @@ -97,7 +140,10 @@ class MobileConnectionRepositoryImpl( ) } } - + private val tag: String = MobileConnectionRepositoryImpl::class.java.simpleName + private val imsMmTelManager: ImsMmTelManager = ImsMmTelManager.createForSubscriptionId(subId) + private var registrationCallback: RegistrationManager.RegistrationCallback? = null + private var capabilityCallback: ImsMmTelManager.CapabilityCallback? = null /** * This flow defines the single shared connection to system_server via TelephonyCallback. Any * new callback should be added to this listener and funneled through callbackEvents via a data @@ -127,7 +173,8 @@ class MobileConnectionRepositoryImpl( TelephonyCallback.DataActivityListener, TelephonyCallback.CarrierNetworkListener, TelephonyCallback.DisplayInfoListener, - TelephonyCallback.DataEnabledListener { + TelephonyCallback.DataEnabledListener, + FiveGServiceClient.IFiveGStateListener { override fun onServiceStateChanged(serviceState: ServiceState) { logger.logOnServiceStateChanged(serviceState, subId) trySend(CallbackEvent.OnServiceStateChanged(serviceState)) @@ -167,9 +214,46 @@ class MobileConnectionRepositoryImpl( logger.logOnDataEnabledChanged(enabled, subId) trySend(CallbackEvent.OnDataEnabledChanged(enabled)) } + + override fun onStateChanged(serviceState: FiveGServiceState) { + logger.logOnNrIconTypeChanged(serviceState.nrIconType, subId) + trySend(CallbackEvent.OnNrIconTypeChanged(serviceState.nrIconType)) + } + } + + val imsStateCallback = + object : ImsStateCallback() { + override fun onAvailable() { + registerCapabilityAndRegistrationCallback() + } + + override fun onUnavailable(reason: Int) { + unregisterCapabilityAndRegistrationCallback() + } + + override fun onError() { + unregisterCapabilityAndRegistrationCallback() + } } + telephonyManager.registerTelephonyCallback(bgDispatcher.asExecutor(), callback) - awaitClose { telephonyManager.unregisterTelephonyCallback(callback) } + val slotIndex = getSlotIndex(subId) + fiveGServiceClient.registerListener(slotIndex, callback) + try { + imsMmTelManager.registerImsStateCallback(context.mainExecutor, imsStateCallback) + } catch (exception: ImsException) { + Log.e(tag, "failed to call registerImsStateCallback ", exception) + } + awaitClose { + telephonyManager.unregisterTelephonyCallback(callback) + fiveGServiceClient.unregisterListener(slotIndex, callback) + try { + imsMmTelManager.unregisterImsStateCallback(imsStateCallback) + } catch (exception: Exception) { + Log.e(tag, "failed to call unregister ims callback ", exception) + } + unregisterCapabilityAndRegistrationCallback() + } } .scan(initial = initial) { state, event -> state.applyEvent(event) } .stateIn(scope = scope, started = SharingStarted.WhileSubscribed(), initial) @@ -256,11 +340,13 @@ class MobileConnectionRepositoryImpl( OverrideNetworkType( mobileMappingsProxy.toIconKeyOverride( it.telephonyDisplayInfo.overrideNetworkType - ) + ), + it.telephonyDisplayInfo.overrideNetworkType ) } else if (it.telephonyDisplayInfo.networkType != NETWORK_TYPE_UNKNOWN) { DefaultNetworkType( - mobileMappingsProxy.toIconKey(it.telephonyDisplayInfo.networkType) + mobileMappingsProxy.toIconKey(it.telephonyDisplayInfo.networkType), + it.telephonyDisplayInfo.networkType ) } else { UnknownNetworkType @@ -331,16 +417,205 @@ class MobileConnectionRepositoryImpl( .stateIn(scope, SharingStarted.WhileSubscribed(), initial) } + override val lteRsrpLevel: StateFlow<Int> = + callbackEvents + .mapNotNull { it.onSignalStrengthChanged } + .map { + it.signalStrength.getCellSignalStrengths(CellSignalStrengthLte::class.java).let { + strengths -> + if (strengths.isNotEmpty()) { + when (strengths[0].rsrp) { + SignalStrength.INVALID -> it.signalStrength.level + in -120 until -113 -> SIGNAL_STRENGTH_POOR + in -113 until -105 -> SIGNAL_STRENGTH_MODERATE + in -105 until -97 -> SIGNAL_STRENGTH_GOOD + in -97 until -43 -> SIGNAL_STRENGTH_GREAT + else -> SIGNAL_STRENGTH_NONE_OR_UNKNOWN + } + } else { + it.signalStrength.level + } + } + } + .stateIn(scope, SharingStarted.WhileSubscribed(), SIGNAL_STRENGTH_NONE_OR_UNKNOWN) + + override val voiceNetworkType: StateFlow<Int> = + callbackEvents + .mapNotNull { it.onServiceStateChanged } + .map { it.serviceState.voiceNetworkType } + .stateIn(scope, SharingStarted.WhileSubscribed(), NETWORK_TYPE_UNKNOWN) + + override val dataNetworkType: StateFlow<Int> = + callbackEvents + .mapNotNull { it.onServiceStateChanged } + .map { it.serviceState.dataNetworkType } + .stateIn(scope, SharingStarted.WhileSubscribed(), NETWORK_TYPE_UNKNOWN) + + override val nrIconType: StateFlow<Int> = + callbackEvents + .mapNotNull {it.onNrIconTypeChanged } + .map { it.nrIconType} + .stateIn(scope, SharingStarted.WhileSubscribed(), NrIconType.TYPE_NONE) + + private val dataRoamingSettingChangedEvent: Flow<Unit> = conflatedCallbackFlow { + val observer = + object : ContentObserver(null) { + override fun onChange(selfChange: Boolean) { + trySend(Unit) + } + } + context.contentResolver.registerContentObserver( + Global.getUriFor("${Global.DATA_ROAMING}$subId"), + true, + observer) + + awaitClose { context.contentResolver.unregisterContentObserver(observer) } + } + + override val dataRoamingEnabled: StateFlow<Boolean> = run { + val initial = telephonyManager.isDataRoamingEnabled + dataRoamingSettingChangedEvent + .mapLatest { telephonyManager.isDataRoamingEnabled } + .distinctUntilChanged() + .logDiffsForTable( + tableLogBuffer, + columnPrefix = "", + columnName = "dataRoamingEnabled", + initialValue = initial, + ) + .stateIn(scope, SharingStarted.WhileSubscribed(), initial) + } + + override val originNetworkType: StateFlow<Int> = + callbackEvents + .mapNotNull { it.onDisplayInfoChanged } + .map { it.telephonyDisplayInfo.networkType } + .stateIn(scope, SharingStarted.WhileSubscribed(), NETWORK_TYPE_UNKNOWN) + + private fun registerCapabilityAndRegistrationCallback() { + if (registrationCallback == null) { + registrationCallback = + object : RegistrationManager.RegistrationCallback() { + override fun onRegistered(attributes: ImsRegistrationAttributes) { + imsRegistered.value = true + imsRegistrationTech.value = attributes.getRegistrationTechnology() + } + + override fun onUnregistered(info: ImsReasonInfo) { + imsRegistered.value = false + imsRegistrationTech.value = REGISTRATION_TECH_NONE + } + } + } + + if (capabilityCallback == null) { + capabilityCallback = + object : ImsMmTelManager.CapabilityCallback() { + override fun onCapabilitiesStatusChanged(config: MmTelCapabilities) { + voiceCapable.value = config.isCapable( + MmTelCapabilities.CAPABILITY_TYPE_VOICE) + videoCapable.value = config.isCapable( + MmTelCapabilities.CAPABILITY_TYPE_VIDEO) + } + } + } + + try { + imsMmTelManager.registerImsRegistrationCallback( + context.mainExecutor, registrationCallback) + imsMmTelManager.registerMmTelCapabilityCallback( + context.mainExecutor, capabilityCallback) + } catch (e: ImsException) { + Log.e(tag, "failed to call register ims callback ", e) + } + } + + private fun unregisterCapabilityAndRegistrationCallback() { + try { + capabilityCallback?.let { + imsMmTelManager.unregisterMmTelCapabilityCallback(it) + } + registrationCallback?.let { + imsMmTelManager.unregisterImsRegistrationCallback(it) + } + } catch (exception: Exception) { + Log.e(tag, " failed to call unregister ims callback ", exception) + + } + capabilityCallback = null + registrationCallback = null + imsRegistered.value = false + imsRegistrationTech.value = REGISTRATION_TECH_NONE + voiceCapable.value = false + videoCapable.value = false + } + + override val voiceCapable: MutableStateFlow<Boolean> = + MutableStateFlow<Boolean>(false) + + override val videoCapable: MutableStateFlow<Boolean> = + MutableStateFlow<Boolean>(false) + + override val imsRegistered: MutableStateFlow<Boolean> = + MutableStateFlow<Boolean>(false) + + override val imsRegistrationTech: MutableStateFlow<Int> = + MutableStateFlow<Int>(REGISTRATION_TECH_NONE) + + override val isConnectionFailed: StateFlow<Boolean> = conflatedCallbackFlow { + val callback = + object : NetworkCallback(FLAG_INCLUDE_LOCATION_INFO) { + override fun onCapabilitiesChanged( + network: Network, + caps: NetworkCapabilities + ) { + trySend(!caps.hasCapability(NetworkCapabilities.NET_CAPABILITY_VALIDATED)); + } + } + connectivityManager.registerNetworkCallback(createNetworkRequest(subId), callback) + + awaitClose { connectivityManager.unregisterNetworkCallback(callback) } + } + .distinctUntilChanged() + .stateIn(scope, SharingStarted.WhileSubscribed(), false) + + private fun createNetworkRequest(specfier: Int): NetworkRequest { + return NetworkRequest.Builder() + .addTransportType(NetworkCapabilities.TRANSPORT_CELLULAR) + .addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET) + .setNetworkSpecifier(TelephonyNetworkSpecifier.Builder() + .setSubscriptionId(specfier).build()) + .build() + } + + private fun getSlotIndex(subId: Int): Int { + var subscriptionManager: SubscriptionManager = + context.getSystemService(SubscriptionManager::class.java) + var list: List<SubscriptionInfo> = subscriptionManager.completeActiveSubscriptionInfoList + var slotIndex: Int = 0 + for (subscriptionInfo in list.iterator()) { + if (subscriptionInfo.subscriptionId == subId) { + slotIndex = subscriptionInfo.simSlotIndex + break + } + } + Log.d(tag, "getSlotIndex subId: $subId slotIndex: $slotIndex list.size: ${list.size}") + return slotIndex + } + class Factory @Inject constructor( private val broadcastDispatcher: BroadcastDispatcher, + private val context: Context, private val telephonyManager: TelephonyManager, private val logger: MobileInputLogger, private val carrierConfigRepository: CarrierConfigRepository, private val mobileMappingsProxy: MobileMappingsProxy, @Background private val bgDispatcher: CoroutineDispatcher, @Application private val scope: CoroutineScope, + private val fiveGServiceClient: FiveGServiceClient, + private val connectivityManager: ConnectivityManager ) { fun build( subId: Int, @@ -349,6 +624,7 @@ class MobileConnectionRepositoryImpl( networkNameSeparator: String, ): MobileConnectionRepository { return MobileConnectionRepositoryImpl( + context, subId, defaultNetworkName, networkNameSeparator, @@ -360,6 +636,8 @@ class MobileConnectionRepositoryImpl( logger, mobileLogger, scope, + fiveGServiceClient, + connectivityManager ) } } @@ -380,6 +658,7 @@ sealed interface CallbackEvent { data class OnDisplayInfoChanged(val telephonyDisplayInfo: TelephonyDisplayInfo) : CallbackEvent data class OnServiceStateChanged(val serviceState: ServiceState) : CallbackEvent data class OnSignalStrengthChanged(val signalStrength: SignalStrength) : CallbackEvent + data class OnNrIconTypeChanged(val nrIconType: Int) : CallbackEvent } /** @@ -394,6 +673,7 @@ data class TelephonyCallbackState( val onDisplayInfoChanged: CallbackEvent.OnDisplayInfoChanged? = null, val onServiceStateChanged: CallbackEvent.OnServiceStateChanged? = null, val onSignalStrengthChanged: CallbackEvent.OnSignalStrengthChanged? = null, + val onNrIconTypeChanged: CallbackEvent.OnNrIconTypeChanged? = null, ) { fun applyEvent(event: CallbackEvent): TelephonyCallbackState { return when (event) { @@ -407,6 +687,7 @@ data class TelephonyCallbackState( copy(onServiceStateChanged = event) } is CallbackEvent.OnSignalStrengthChanged -> copy(onSignalStrengthChanged = event) + is CallbackEvent.OnNrIconTypeChanged -> copy(onNrIconTypeChanged = event) } } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt index d42e30c9b1b9..faebb9d764c9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractor.kt @@ -14,24 +14,38 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.statusbar.pipeline.mobile.domain.interactor import android.content.Context import android.telephony.CarrierConfigManager +import android.telephony.ims.stub.ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN +import android.telephony.TelephonyDisplayInfo +import android.telephony.TelephonyManager import com.android.settingslib.SignalIcon.MobileIconGroup import com.android.settingslib.mobile.MobileIconCarrierIdOverrides import com.android.settingslib.mobile.MobileIconCarrierIdOverridesImpl +import com.android.settingslib.mobile.MobileMappings import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.log.table.TableLogBuffer import com.android.systemui.log.table.logDiffsForTable import com.android.systemui.statusbar.pipeline.mobile.data.model.DataConnectionState.Connected +import com.android.systemui.statusbar.pipeline.mobile.data.model.MobileIconCustomizationMode import com.android.systemui.statusbar.pipeline.mobile.data.model.NetworkNameModel import com.android.systemui.statusbar.pipeline.mobile.data.model.ResolvedNetworkType +import com.android.systemui.statusbar.pipeline.mobile.data.model.ResolvedNetworkType.DefaultNetworkType +import com.android.systemui.statusbar.pipeline.mobile.data.model.ResolvedNetworkType.OverrideNetworkType import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionRepository import com.android.systemui.statusbar.pipeline.mobile.domain.model.NetworkTypeIconModel import com.android.systemui.statusbar.pipeline.mobile.domain.model.NetworkTypeIconModel.DefaultIcon import com.android.systemui.statusbar.pipeline.mobile.domain.model.NetworkTypeIconModel.OverriddenIcon import com.android.systemui.statusbar.pipeline.shared.data.model.DataActivityModel +import com.android.systemui.statusbar.policy.FiveGServiceClient.FiveGServiceState import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.Flow @@ -40,6 +54,7 @@ import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.mapLatest import kotlinx.coroutines.flow.stateIn interface MobileIconInteractor { @@ -63,6 +78,9 @@ interface MobileIconInteractor { /** Only true if mobile is the default transport but is not validated, otherwise false */ val isDefaultConnectionFailed: StateFlow<Boolean> + /** Only true if mobile is the cellular transport but is not validated, otherwise false */ + val isConnectionFailed: StateFlow<Boolean> + /** True if we consider this connection to be in service, i.e. can make calls */ val isInService: StateFlow<Boolean> @@ -113,6 +131,22 @@ interface MobileIconInteractor { /** True when in carrier network change mode */ val carrierNetworkChangeActive: StateFlow<Boolean> + + /** True if the rsrp level should be preferred over the primary level for LTE. */ + val alwaysUseRsrpLevelForLte: StateFlow<Boolean> + + /** True if the no internet icon should be hidden. */ + val hideNoInternetState: StateFlow<Boolean> + + val networkTypeIconCustomization: StateFlow<MobileIconCustomizationMode> + + val imsInfo: StateFlow<MobileIconCustomizationMode> + + val showVolteIcon: StateFlow<Boolean> + + val showVowifiIcon: StateFlow<Boolean> + + val voWifiAvailable: StateFlow<Boolean> } /** Interactor for a single mobile connection. This connection _should_ have one subscription ID */ @@ -129,7 +163,13 @@ class MobileIconInteractorImpl( override val isDefaultConnectionFailed: StateFlow<Boolean>, override val isForceHidden: Flow<Boolean>, connectionRepository: MobileConnectionRepository, + override val alwaysUseRsrpLevelForLte: StateFlow<Boolean>, + override val hideNoInternetState: StateFlow<Boolean>, + networkTypeIconCustomizationFlow: StateFlow<MobileIconCustomizationMode>, + override val showVolteIcon: StateFlow<Boolean>, + override val showVowifiIcon: StateFlow<Boolean>, private val context: Context, + private val defaultDataSubId: StateFlow<Int>, val carrierIdOverrides: MobileIconCarrierIdOverrides = MobileIconCarrierIdOverridesImpl() ) : MobileIconInteractor { override val tableLogBuffer: TableLogBuffer = connectionRepository.tableLogBuffer @@ -168,18 +208,136 @@ class MobileIconInteractorImpl( connectionRepository.networkName.value ) + private val signalStrengthCustomization: StateFlow<MobileIconCustomizationMode> = + combine( + alwaysUseRsrpLevelForLte, + connectionRepository.lteRsrpLevel, + connectionRepository.voiceNetworkType, + connectionRepository.dataNetworkType, + ) { alwaysUseRsrpLevelForLte, lteRsrpLevel, voiceNetworkType, dataNetworkType -> + MobileIconCustomizationMode( + alwaysUseRsrpLevelForLte = alwaysUseRsrpLevelForLte, + lteRsrpLevel = lteRsrpLevel, + voiceNetworkType = voiceNetworkType, + dataNetworkType = dataNetworkType, + ) + } + .stateIn(scope, SharingStarted.WhileSubscribed(), MobileIconCustomizationMode()) + + override val isRoaming: StateFlow<Boolean> = + combine( + connectionRepository.carrierNetworkChangeActive, + connectionRepository.isGsm, + connectionRepository.isRoaming, + connectionRepository.cdmaRoaming, + ) { carrierNetworkChangeActive, isGsm, isRoaming, cdmaRoaming -> + if (carrierNetworkChangeActive) { + false + } else if (isGsm) { + isRoaming + } else { + cdmaRoaming + } + } + .stateIn(scope, SharingStarted.WhileSubscribed(), false) + + private val isDefaultDataSub = defaultDataSubId + .mapLatest { connectionRepository.subId == it } + .stateIn( + scope, + SharingStarted.WhileSubscribed(), + connectionRepository.subId == defaultDataSubId.value + ) + + override val networkTypeIconCustomization: StateFlow<MobileIconCustomizationMode> = + combine( + networkTypeIconCustomizationFlow, + isDataEnabled, + connectionRepository.dataRoamingEnabled, + isRoaming, + isDefaultDataSub, + ){ state, mobileDataEnabled, dataRoamingEnabled, isRoaming, isDefaultDataSub -> + MobileIconCustomizationMode( + isRatCustomization = state.isRatCustomization, + alwaysShowNetworkTypeIcon = state.alwaysShowNetworkTypeIcon, + ddsRatIconEnhancementEnabled = state.ddsRatIconEnhancementEnabled, + nonDdsRatIconEnhancementEnabled = state.nonDdsRatIconEnhancementEnabled, + mobileDataEnabled = mobileDataEnabled, + dataRoamingEnabled = dataRoamingEnabled, + isDefaultDataSub = isDefaultDataSub, + isRoaming = isRoaming + ) + }.stateIn(scope, SharingStarted.WhileSubscribed(), MobileIconCustomizationMode()) + + private val mobileIconCustomization: StateFlow<MobileIconCustomizationMode> = + combine( + signalStrengthCustomization, + connectionRepository.nrIconType, + networkTypeIconCustomization, + ) { signalStrengthCustomization, nrIconType, networkTypeIconCustomization -> + MobileIconCustomizationMode( + dataNetworkType = signalStrengthCustomization.dataNetworkType, + voiceNetworkType = signalStrengthCustomization.voiceNetworkType, + fiveGServiceState = FiveGServiceState(nrIconType), + isRatCustomization = networkTypeIconCustomization.isRatCustomization, + alwaysShowNetworkTypeIcon = + networkTypeIconCustomization.alwaysShowNetworkTypeIcon, + ddsRatIconEnhancementEnabled = + networkTypeIconCustomization.ddsRatIconEnhancementEnabled, + nonDdsRatIconEnhancementEnabled = + networkTypeIconCustomization.nonDdsRatIconEnhancementEnabled, + mobileDataEnabled = networkTypeIconCustomization.mobileDataEnabled, + dataRoamingEnabled = networkTypeIconCustomization.dataRoamingEnabled, + isDefaultDataSub = networkTypeIconCustomization.isDefaultDataSub, + isRoaming = networkTypeIconCustomization.isRoaming + ) + } + .stateIn(scope, SharingStarted.WhileSubscribed(), MobileIconCustomizationMode()) + + override val imsInfo: StateFlow<MobileIconCustomizationMode> = + combine( + connectionRepository.voiceNetworkType, + connectionRepository.originNetworkType, + connectionRepository.voiceCapable, + connectionRepository.videoCapable, + connectionRepository.imsRegistered, + ) { voiceNetworkType, originNetworkType, voiceCapable, videoCapable, imsRegistered-> + MobileIconCustomizationMode( + voiceNetworkType = voiceNetworkType, + originNetworkType = originNetworkType, + voiceCapable = voiceCapable, + videoCapable = videoCapable, + imsRegistered = imsRegistered, + ) + } + .stateIn(scope, SharingStarted.WhileSubscribed(), MobileIconCustomizationMode()) + + override val voWifiAvailable: StateFlow<Boolean> = + combine( + connectionRepository.imsRegistrationTech, + connectionRepository.voiceCapable, + showVowifiIcon, + ) { imsRegistrationTech, voiceCapable, showVowifiIcon -> + voiceCapable + && imsRegistrationTech == REGISTRATION_TECH_IWLAN + && showVowifiIcon + } + .stateIn(scope, SharingStarted.WhileSubscribed(), false) + /** What the mobile icon would be before carrierId overrides */ private val defaultNetworkType: StateFlow<MobileIconGroup> = combine( connectionRepository.resolvedNetworkType, defaultMobileIconMapping, defaultMobileIconGroup, - ) { resolvedNetworkType, mapping, defaultGroup -> + mobileIconCustomization, + ) { resolvedNetworkType, mapping, defaultGroup, mobileIconCustomization -> when (resolvedNetworkType) { is ResolvedNetworkType.CarrierMergedNetworkType -> resolvedNetworkType.iconGroupOverride else -> { - mapping[resolvedNetworkType.lookupKey] ?: defaultGroup + getMobileIconGroup(resolvedNetworkType, mobileIconCustomization, mapping) + ?: defaultGroup } } } @@ -221,31 +379,22 @@ class MobileIconInteractorImpl( override val isEmergencyOnly = connectionRepository.isEmergencyOnly - override val isRoaming: StateFlow<Boolean> = - combine( - connectionRepository.carrierNetworkChangeActive, - connectionRepository.isGsm, - connectionRepository.isRoaming, - connectionRepository.cdmaRoaming, - ) { carrierNetworkChangeActive, isGsm, isRoaming, cdmaRoaming -> - if (carrierNetworkChangeActive) { - false - } else if (isGsm) { - isRoaming - } else { - cdmaRoaming - } - } - .stateIn(scope, SharingStarted.WhileSubscribed(), false) - override val level: StateFlow<Int> = combine( connectionRepository.isGsm, connectionRepository.primaryLevel, connectionRepository.cdmaLevel, alwaysUseCdmaLevel, - ) { isGsm, primaryLevel, cdmaLevel, alwaysUseCdmaLevel -> + signalStrengthCustomization + ) { isGsm, primaryLevel, cdmaLevel, alwaysUseCdmaLevel, signalStrengthCustomization -> when { + signalStrengthCustomization.alwaysUseRsrpLevelForLte -> { + if (isLteCamped(signalStrengthCustomization)) { + signalStrengthCustomization.lteRsrpLevel + } else { + primaryLevel + } + } // GSM connections should never use the CDMA level isGsm -> primaryLevel alwaysUseCdmaLevel -> cdmaLevel @@ -267,4 +416,48 @@ class MobileIconInteractorImpl( .stateIn(scope, SharingStarted.WhileSubscribed(), false) override val isInService = connectionRepository.isInService + + override val isConnectionFailed: StateFlow<Boolean> = connectionRepository.isConnectionFailed + + private fun isLteCamped(mobileIconCustmization: MobileIconCustomizationMode): Boolean { + return (mobileIconCustmization.dataNetworkType == TelephonyManager.NETWORK_TYPE_LTE + || mobileIconCustmization.dataNetworkType == TelephonyManager.NETWORK_TYPE_LTE_CA + || mobileIconCustmization.voiceNetworkType == TelephonyManager.NETWORK_TYPE_LTE + || mobileIconCustmization.voiceNetworkType == TelephonyManager.NETWORK_TYPE_LTE_CA) + } + + private fun getMobileIconGroup(resolvedNetworkType: ResolvedNetworkType, + customizationInfo: MobileIconCustomizationMode, + mapping: Map<String, MobileIconGroup>): MobileIconGroup ?{ + return if (customizationInfo.fiveGServiceState.isNrIconTypeValid) { + customizationInfo.fiveGServiceState.iconGroup + } else { + when (resolvedNetworkType) { + is DefaultNetworkType -> + mapping[resolvedNetworkType.lookupKey] + is OverrideNetworkType -> + mapping[getLookupKey(resolvedNetworkType, customizationInfo)] + else -> + mapping[MobileMappings.toIconKey(customizationInfo.voiceNetworkType)] + } + } + } + + private fun getLookupKey(resolvedNetworkType: ResolvedNetworkType, + customizationInfo: MobileIconCustomizationMode): String { + return if (isNsa(resolvedNetworkType.networkType)) { + if (customizationInfo.dataNetworkType == TelephonyManager.NETWORK_TYPE_UNKNOWN) { + MobileMappings.toIconKey(customizationInfo.voiceNetworkType) + }else { + MobileMappings.toIconKey(customizationInfo.dataNetworkType) + } + }else { + resolvedNetworkType.lookupKey + } + } + + private fun isNsa(networkType: Int): Boolean { + return networkType == TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NR_NSA_MMWAVE + || networkType == TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NR_NSA + } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractor.kt index e90f40c74cc5..6d21eea3910c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractor.kt @@ -14,6 +14,12 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.statusbar.pipeline.mobile.domain.interactor import android.content.Context @@ -31,6 +37,7 @@ import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConn import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionsRepository import com.android.systemui.statusbar.pipeline.mobile.data.repository.UserSetupRepository import com.android.systemui.statusbar.pipeline.shared.data.model.ConnectivitySlot +import com.android.systemui.statusbar.pipeline.mobile.data.model.MobileIconCustomizationMode import com.android.systemui.statusbar.pipeline.shared.data.repository.ConnectivityRepository import com.android.systemui.util.CarrierConfigTracker import javax.inject.Inject @@ -96,6 +103,18 @@ interface MobileIconsInteractor { * subId. Will throw if the ID is invalid */ fun createMobileConnectionInteractorForSubId(subId: Int): MobileIconInteractor + + /** True if the LTE rsrp should be preferred over the primary level. */ + val alwaysUseRsrpLevelForLte: StateFlow<Boolean> + + /** True if the no internet icon should be hidden. */ + val hideNoInternetState: StateFlow<Boolean> + + val networkTypeIconCustomization: StateFlow<MobileIconCustomizationMode> + + val showVolteIcon: StateFlow<Boolean> + + val showVowifiIcon: StateFlow<Boolean> } @Suppress("EXPERIMENTAL_IS_NOT_ENABLED") @@ -291,6 +310,42 @@ constructor( .map { it.contains(ConnectivitySlot.MOBILE) } .stateIn(scope, SharingStarted.WhileSubscribed(), false) + override val alwaysUseRsrpLevelForLte: StateFlow<Boolean> = + mobileConnectionsRepo.defaultDataSubRatConfig + .mapLatest { it.showRsrpSignalLevelforLTE } + .stateIn(scope, SharingStarted.WhileSubscribed(), false) + + override val hideNoInternetState: StateFlow<Boolean> = + mobileConnectionsRepo.defaultDataSubRatConfig + .mapLatest { it.hideNoInternetState } + .stateIn(scope, SharingStarted.WhileSubscribed(), false) + + override val networkTypeIconCustomization: StateFlow<MobileIconCustomizationMode> = + mobileConnectionsRepo.defaultDataSubRatConfig + .mapLatest { defaultConfig -> + val enabled = defaultConfig.alwaysShowNetworkTypeIcon + || defaultConfig.enableDdsRatIconEnhancement + || defaultConfig.enableRatIconEnhancement + val state = MobileIconCustomizationMode( + isRatCustomization = enabled, + alwaysShowNetworkTypeIcon = defaultConfig.alwaysShowNetworkTypeIcon, + ddsRatIconEnhancementEnabled = defaultConfig.enableDdsRatIconEnhancement, + nonDdsRatIconEnhancementEnabled = defaultConfig.enableRatIconEnhancement, + ) + state + } + .stateIn(scope, SharingStarted.WhileSubscribed(), MobileIconCustomizationMode()) + + override val showVolteIcon: StateFlow<Boolean> = + mobileConnectionsRepo.defaultDataSubRatConfig + .mapLatest { it.showVolteIcon } + .stateIn(scope, SharingStarted.WhileSubscribed(), false) + + override val showVowifiIcon: StateFlow<Boolean> = + mobileConnectionsRepo.defaultDataSubRatConfig + .mapLatest { it.showVowifiIcon } + .stateIn(scope, SharingStarted.WhileSubscribed(), false) + /** Vends out new [MobileIconInteractor] for a particular subId */ override fun createMobileConnectionInteractorForSubId(subId: Int): MobileIconInteractor = MobileIconInteractorImpl( @@ -304,7 +359,13 @@ constructor( isDefaultConnectionFailed, isForceHidden, mobileConnectionsRepo.getRepoForSubId(subId), + alwaysUseRsrpLevelForLte, + hideNoInternetState, + networkTypeIconCustomization, + showVolteIcon, + showVowifiIcon, context, + mobileConnectionsRepo.defaultDataSubId, ) companion object { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/MobileUiAdapter.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/MobileUiAdapter.kt index a05ab849088d..571aa567c2ee 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/MobileUiAdapter.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/MobileUiAdapter.kt @@ -14,8 +14,15 @@ * limitations under the License. */ +/** + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.statusbar.pipeline.mobile.ui +import android.telephony.TelephonyManager import com.android.systemui.CoreStartable import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application @@ -47,9 +54,11 @@ constructor( private val logger: MobileViewLogger, @Application private val scope: CoroutineScope, private val statusBarPipelineFlags: StatusBarPipelineFlags, + private val telephonyManager: TelephonyManager, ) : CoreStartable { private var isCollecting: Boolean = false private var lastValue: List<Int>? = null + private var isMultiSimEnabled: Boolean = telephonyManager.isMultiSimEnabled() override fun start() { // Only notify the icon controller if we want to *render* the new icons. @@ -61,6 +70,12 @@ constructor( isCollecting = true mobileIconsViewModel.subscriptionIdsFlow.collectLatest { logger.logUiAdapterSubIdsSentToIconController(it) + if (isMultiSimConfigChanged()) { + isMultiSimEnabled = telephonyManager.isMultiSimEnabled() + if (lastValue != null && lastValue!!.size != it.size) { + iconController.setNewMobileIconSubIds(emptyList()) + } + } lastValue = it iconController.setNewMobileIconSubIds(it) } @@ -72,4 +87,8 @@ constructor( pw.println("isCollecting=$isCollecting") pw.println("Last values sent to icon controller: $lastValue") } + + private fun isMultiSimConfigChanged(): Boolean { + return isMultiSimEnabled != telephonyManager.isMultiSimEnabled() + } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinder.kt index a2a247a279fb..cbfc362b87ae 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinder.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/binder/MobileIconBinder.kt @@ -14,6 +14,12 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.statusbar.pipeline.mobile.ui.binder import android.content.res.ColorStateList @@ -62,6 +68,7 @@ object MobileIconBinder { val roamingView = view.requireViewById<ImageView>(R.id.mobile_roaming) val roamingSpace = view.requireViewById<Space>(R.id.mobile_roaming_space) val dotView = view.requireViewById<StatusBarIconView>(R.id.status_bar_dot) + val volteView = view.requireViewById<ImageView>(R.id.mobile_volte) view.isVisible = true iconView.isVisible = true @@ -159,11 +166,25 @@ object MobileIconBinder { activityIn.imageTintList = tintList activityOut.imageTintList = tintList dotView.setDecorColor(tint) + volteView.imageTintList = tintList } } launch { decorTint.collect { tint -> dotView.setDecorColor(tint) } } + launch { + viewModel.volteId.distinctUntilChanged().collect { volteId -> + if (volteId != 0) { + volteView.visibility = VISIBLE + volteView.setImageResource(volteId) + } else { + volteView.visibility = GONE + } + } + } + + launch { viewModel.showSignalStrengthIcon.collect { iconView.isVisible = it } } + try { awaitCancellation() } finally { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModel.kt index 35f4f9aa4622..5bf608b059d9 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/mobile/ui/viewmodel/MobileIconViewModel.kt @@ -14,14 +14,24 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.statusbar.pipeline.mobile.ui.viewmodel +import android.telephony.TelephonyManager import com.android.settingslib.AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH import com.android.settingslib.graph.SignalDrawable +import com.android.settingslib.mobile.TelephonyIcons import com.android.systemui.common.shared.model.ContentDescription import com.android.systemui.common.shared.model.Icon import com.android.systemui.log.table.logDiffsForTable +import com.android.systemui.R import com.android.systemui.statusbar.pipeline.airplane.domain.interactor.AirplaneModeInteractor +import com.android.systemui.statusbar.pipeline.mobile.data.model.MobileIconCustomizationMode import com.android.systemui.statusbar.pipeline.mobile.domain.interactor.MobileIconInteractor import com.android.systemui.statusbar.pipeline.mobile.domain.interactor.MobileIconsInteractor import com.android.systemui.statusbar.pipeline.mobile.ui.model.SignalIconModel @@ -51,6 +61,8 @@ interface MobileIconViewModelCommon { val activityInVisible: Flow<Boolean> val activityOutVisible: Flow<Boolean> val activityContainerVisible: Flow<Boolean> + val volteId: Flow<Int> + val showSignalStrengthIcon: Flow<Boolean> } /** @@ -79,11 +91,18 @@ constructor( /** Whether or not to show the error state of [SignalDrawable] */ private val showExclamationMark: StateFlow<Boolean> = combine( - iconInteractor.isDefaultDataEnabled, - iconInteractor.isDefaultConnectionFailed, + iconInteractor.isDataEnabled, + iconInteractor.isDataConnected, + iconInteractor.isConnectionFailed, iconInteractor.isInService, - ) { isDefaultDataEnabled, isDefaultConnectionFailed, isInService -> - !isDefaultDataEnabled || isDefaultConnectionFailed || !isInService + iconInteractor.hideNoInternetState, + ) { isDataEnabled, isDataConnected, isConnectionFailed, + isInService, hideNoInternetState -> + if (hideNoInternetState) { + false + } else { + !isDataEnabled || (isDataConnected && isConnectionFailed) || !isInService + } } .stateIn(scope, SharingStarted.WhileSubscribed(), true) @@ -103,8 +122,9 @@ constructor( combine( airplaneModeInteractor.isAirplaneMode, iconInteractor.isForceHidden, - ) { isAirplaneMode, isForceHidden -> - !isAirplaneMode && !isForceHidden + iconInteractor.voWifiAvailable, + ) { isAirplaneMode, isForceHidden, voWifiAvailable -> + (!isAirplaneMode && !isForceHidden) || voWifiAvailable } } .distinctUntilChanged() @@ -177,16 +197,33 @@ constructor( combine( iconInteractor.networkTypeIconGroup, showNetworkTypeIcon, - ) { networkTypeIconGroup, shouldShow -> + iconInteractor.networkTypeIconCustomization, + iconInteractor.voWifiAvailable, + iconInteractor.isInService, + ) { networkTypeIconGroup, shouldShow, networkTypeIconCustomization, voWifiAvailable, + isInService -> val desc = if (networkTypeIconGroup.contentDescription != 0) ContentDescription.Resource(networkTypeIconGroup.contentDescription) else null val icon = - if (networkTypeIconGroup.iconId != 0) - Icon.Resource(networkTypeIconGroup.iconId, desc) - else null + if (voWifiAvailable) { + Icon.Resource(TelephonyIcons.VOWIFI.dataType, desc) + } else { + if (networkTypeIconGroup.iconId != 0) + Icon.Resource(networkTypeIconGroup.iconId, desc) + else null + } return@combine when { + voWifiAvailable -> icon + networkTypeIconCustomization.isRatCustomization -> { + if (shouldShowNetworkTypeIcon(networkTypeIconCustomization) + && isInService) { + icon + } else { + null + } + } !shouldShow -> null else -> icon } @@ -204,6 +241,40 @@ constructor( ) .stateIn(scope, SharingStarted.WhileSubscribed(), false) + + override val volteId = + combine ( + iconInteractor.imsInfo, + iconInteractor.showVolteIcon, + ) { imsInfo, showVolteIcon -> + if (!showVolteIcon) { + return@combine 0 + } + val voiceNetworkType = imsInfo.voiceNetworkType + val netWorkType = imsInfo.originNetworkType + if ((imsInfo.voiceCapable || imsInfo.videoCapable) && imsInfo.imsRegistered) { + return@combine R.drawable.ic_volte + } else if ((netWorkType == TelephonyManager.NETWORK_TYPE_LTE + || netWorkType == TelephonyManager.NETWORK_TYPE_LTE_CA) + && voiceNetworkType == TelephonyManager.NETWORK_TYPE_UNKNOWN) { + return@combine R.drawable.ic_volte_no_voice + } else { + return@combine 0 + } + } + .distinctUntilChanged() + .stateIn(scope, SharingStarted.WhileSubscribed(), 0) + + override val showSignalStrengthIcon = + combine( + airplaneModeInteractor.isAirplaneMode, + iconInteractor.isForceHidden, + ) { isAirplaneMode, isForceHidden -> + !isAirplaneMode && !isForceHidden + } + .distinctUntilChanged() + .stateIn(scope, SharingStarted.WhileSubscribed(), false) + private val activity: Flow<DataActivityModel?> = if (!constants.shouldShowActivityConfig) { flowOf(null) @@ -246,4 +317,11 @@ constructor( initialValue = false, ) .stateIn(scope, SharingStarted.WhileSubscribed(), false) + + private fun shouldShowNetworkTypeIcon(mode: MobileIconCustomizationMode): Boolean { + return (mode.alwaysShowNetworkTypeIcon + || mode.ddsRatIconEnhancementEnabled && mode.isDefaultDataSub + || mode.nonDdsRatIconEnhancementEnabled + && mode.mobileDataEnabled && (mode.dataRoamingEnabled || !mode.isRoaming)) + } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java index f7b601b9d284..060f55c87b33 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java @@ -167,7 +167,8 @@ public class CastControllerImpl implements CastController { int statusCode = route.getStatusCode(); if (statusCode == RouteInfo.STATUS_CONNECTING) { device.state = CastDevice.STATE_CONNECTING; - } else if (route.isSelected() || statusCode == RouteInfo.STATUS_CONNECTED) { + } else if (route.isSelected() && statusCode != RouteInfo.STATUS_NOT_AVAILABLE + || statusCode == RouteInfo.STATUS_CONNECTED) { device.state = CastDevice.STATE_CONNECTED; } else { device.state = CastDevice.STATE_DISCONNECTED; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/FiveGServiceClient.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/FiveGServiceClient.java new file mode 100644 index 000000000000..11e0949da463 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/FiveGServiceClient.java @@ -0,0 +1,387 @@ +/* + * Copyright (c) 2018, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package com.android.systemui.statusbar.policy; + +import android.content.ComponentName; +import android.content.Context; +import android.content.ServiceConnection; +import android.net.Uri; +import android.os.Handler; +import android.os.IBinder; +import android.os.Message; +import android.os.DeadObjectException; +import android.os.RemoteException; +import android.util.Log; +import android.util.SparseArray; + +import com.google.android.collect.Lists; +import com.android.internal.annotations.VisibleForTesting; + +import java.lang.Exception; +import java.util.ArrayList; +import java.util.concurrent.CopyOnWriteArrayList; +import java.lang.ref.WeakReference; +import javax.inject.Inject; + +import com.android.keyguard.KeyguardUpdateMonitorCallback; +import com.android.settingslib.mobile.TelephonyIcons; +import com.android.settingslib.SignalIcon.MobileIconGroup; +import com.android.systemui.R; +import com.android.systemui.dagger.SysUISingleton; + +import com.qti.extphone.Client; +import com.qti.extphone.ExtTelephonyManager; +import com.qti.extphone.IExtPhoneCallback; +import com.qti.extphone.ExtPhoneCallbackListener; +import com.qti.extphone.NrIconType; +import com.qti.extphone.Status; +import com.qti.extphone.ServiceCallback; +import com.qti.extphone.Token; + +@SysUISingleton +public class FiveGServiceClient { + private static final String TAG = "FiveGServiceClient"; + private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG)||true; + private static final int MESSAGE_REBIND = 1024; + private static final int MESSAGE_REINIT = MESSAGE_REBIND+1; + private static final int MESSAGE_NOTIFIY_MONITOR_CALLBACK = MESSAGE_REBIND+2; + private static final int MAX_RETRY = 4; + private static final int DELAY_MILLISECOND = 3000; + private static final int DELAY_INCREMENT = 2000; + + private static FiveGServiceClient sInstance; + private final ArrayList<WeakReference<KeyguardUpdateMonitorCallback>> + mKeyguardUpdateMonitorCallbacks = Lists.newArrayList(); + @VisibleForTesting + final SparseArray<CopyOnWriteArrayList<IFiveGStateListener>> mStatesListeners = + new SparseArray<>(); + private final SparseArray<FiveGServiceState> mCurrentServiceStates = new SparseArray<>(); + private final SparseArray<FiveGServiceState> mLastServiceStates = new SparseArray<>(); + + private Context mContext; + private boolean mServiceConnected; + private String mPackageName; + private Client mClient; + private int mInitRetryTimes = 0; + private ExtTelephonyManager mExtTelephonyManager; + private boolean mIsConnectInProgress = false; + + public static class FiveGServiceState{ + private static final String COL_NR_ICON_TYPE = "NrIconType"; + private int mNrIconType; + private MobileIconGroup mIconGroup; + + public FiveGServiceState(){ + mNrIconType = NrIconType.INVALID; + mIconGroup = TelephonyIcons.UNKNOWN; + } + + @VisibleForTesting + public FiveGServiceState(int nrIconType){ + mNrIconType = nrIconType; + mIconGroup = getNrIconGroup(nrIconType, 0); + } + + public boolean isNrIconTypeValid() { + return mNrIconType != NrIconType.INVALID && mNrIconType != NrIconType.TYPE_NONE; + } + + @VisibleForTesting + public MobileIconGroup getIconGroup() { + return mIconGroup; + } + + @VisibleForTesting + public int getNrIconType() { + return mNrIconType; + } + + public void copyFrom(FiveGServiceState state) { + this.mIconGroup = state.mIconGroup; + this.mNrIconType = state.mNrIconType; + } + + public boolean equals(FiveGServiceState state) { + return this.mIconGroup == state.mIconGroup + && this.mNrIconType == state.mNrIconType; + } + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("mNrIconType=").append(mNrIconType).append(", "). + append("mIconGroup=").append(mIconGroup); + + return builder.toString(); + } + } + + @Inject + public FiveGServiceClient(Context context) { + mContext = context; + mPackageName = mContext.getPackageName(); + if (mExtTelephonyManager == null) { + mExtTelephonyManager = ExtTelephonyManager.getInstance(mContext); + } + } + + public static FiveGServiceClient getInstance(Context context) { + if ( sInstance == null ) { + sInstance = new FiveGServiceClient(context); + } + + return sInstance; + } + + public void registerCallback(KeyguardUpdateMonitorCallback callback) { + mKeyguardUpdateMonitorCallbacks.add( + new WeakReference<KeyguardUpdateMonitorCallback>(callback)); + } + + public void registerListener(int phoneId, IFiveGStateListener listener) { + Log.d(TAG, "registerListener phoneId=" + phoneId + " listener: " + listener); + resetState(phoneId); + CopyOnWriteArrayList<IFiveGStateListener> statesListenersForPhone = + mStatesListeners.get(phoneId); + if (statesListenersForPhone == null) { + statesListenersForPhone = new CopyOnWriteArrayList<>(); + mStatesListeners.put(phoneId, statesListenersForPhone); + } + statesListenersForPhone.add(listener); + + if ( !isServiceConnected() ) { + connectService(); + }else{ + initFiveGServiceState(phoneId); + } + } + + private void resetState(int phoneId) { + Log.d(TAG, "resetState phoneId=" + phoneId); + FiveGServiceState currentState = getCurrentServiceState(phoneId); + currentState.mNrIconType = NrIconType.INVALID; + currentState.mIconGroup = TelephonyIcons.UNKNOWN; + + FiveGServiceState lastState = getLastServiceState(phoneId); + lastState.mNrIconType = NrIconType.INVALID; + lastState.mIconGroup = TelephonyIcons.UNKNOWN; + } + + public void unregisterListener(int phoneId, IFiveGStateListener fiveGStateListener) { + Log.d(TAG, "unregisterListener phoneId=" + phoneId + " listener: " + fiveGStateListener); + CopyOnWriteArrayList<IFiveGStateListener> statesListenersForPhone = + mStatesListeners.get(phoneId); + if (statesListenersForPhone != null) { + statesListenersForPhone.remove(fiveGStateListener); + if (statesListenersForPhone.size() == 0) { + mStatesListeners.remove(phoneId); + mCurrentServiceStates.remove(phoneId); + mLastServiceStates.remove(phoneId); + } + } + } + + public boolean isServiceConnected() { + return mServiceConnected; + } + + private void connectService() { + if (!isServiceConnected() && !mIsConnectInProgress) { + mIsConnectInProgress = true; + Log.d(TAG, "Connect to ExtTelephony bound service..."); + mExtTelephonyManager.connectService(mServiceCallback); + } + } + + private ServiceCallback mServiceCallback = new ServiceCallback() { + @Override + public void onConnected() { + Log.d(TAG, "ExtTelephony Service connected"); + int[] events = new int[] { + ExtPhoneCallbackListener.EVENT_ON_NR_ICON_TYPE}; + mServiceConnected = true; + mIsConnectInProgress = false; + mClient = mExtTelephonyManager.registerCallbackWithEvents( + mPackageName, mExtPhoneCallbackListener, events); + initFiveGServiceState(); + Log.d(TAG, "Client = " + mClient); + } + @Override + public void onDisconnected() { + Log.d(TAG, "ExtTelephony Service disconnected..."); + if (mServiceConnected) { + mExtTelephonyManager.unregisterCallback(mExtPhoneCallbackListener); + } + mServiceConnected = false; + mClient = null; + mIsConnectInProgress = false; + mHandler.sendEmptyMessageDelayed(MESSAGE_REBIND, + DELAY_MILLISECOND + DELAY_INCREMENT); + } + }; + + @VisibleForTesting + public FiveGServiceState getCurrentServiceState(int phoneId) { + return getServiceState(phoneId, mCurrentServiceStates); + } + + private FiveGServiceState getLastServiceState(int phoneId) { + return getServiceState(phoneId, mLastServiceStates); + } + + private static FiveGServiceState getServiceState(int key, + SparseArray<FiveGServiceState> array) { + FiveGServiceState state = array.get(key); + if ( state == null ) { + state = new FiveGServiceState(); + array.put(key, state); + } + return state; + } + + private void notifyListenersIfNecessary(int phoneId) { + FiveGServiceState currentState = getCurrentServiceState(phoneId); + FiveGServiceState lastState = getLastServiceState(phoneId); + if ( !currentState.equals(lastState) ) { + + if ( DEBUG ) { + Log.d(TAG, "phoneId(" + phoneId + ") Change in state from " + lastState + " \n"+ + "\tto " + currentState); + + } + + lastState.copyFrom(currentState); + CopyOnWriteArrayList<IFiveGStateListener> statesListenersForPhone = + mStatesListeners.get(phoneId); + if (statesListenersForPhone != null) { + for (IFiveGStateListener listener: statesListenersForPhone) { + if (listener != null) { + listener.onStateChanged(currentState); + } + } + } + mHandler.sendEmptyMessage(MESSAGE_NOTIFIY_MONITOR_CALLBACK); + } + } + + private void initFiveGServiceState() { + Log.d(TAG, "initFiveGServiceState size=" + mStatesListeners.size()); + for( int i=0; i < mStatesListeners.size(); ++i ) { + int phoneId = mStatesListeners.keyAt(i); + initFiveGServiceState(phoneId); + } + } + + private void initFiveGServiceState(int phoneId) { + Log.d(TAG, "mServiceConnected=" + mServiceConnected + " mClient=" + mClient); + if ( mServiceConnected && mClient != null) { + Log.d(TAG, "query 5G service state for phoneId " + phoneId); + try { + Token token = mExtTelephonyManager.queryNrIconType(phoneId, mClient); + Log.d(TAG, "queryNrIconType result:" + token); + } catch (Exception e) { + Log.d(TAG, "initFiveGServiceState: Exception = " + e); + if ( mInitRetryTimes < MAX_RETRY && !mHandler.hasMessages(MESSAGE_REINIT) ) { + mHandler.sendEmptyMessageDelayed(MESSAGE_REINIT, + DELAY_MILLISECOND + mInitRetryTimes*DELAY_INCREMENT); + mInitRetryTimes +=1; + } + } + } + } + + @VisibleForTesting + void update5GIcon(FiveGServiceState state,int phoneId) { + state.mIconGroup = getNrIconGroup(state.mNrIconType, phoneId); + } + + private static MobileIconGroup getNrIconGroup(int nrIconType , int phoneId) { + MobileIconGroup iconGroup = TelephonyIcons.UNKNOWN; + switch (nrIconType){ + case NrIconType.TYPE_5G_BASIC: + iconGroup = TelephonyIcons.FIVE_G_BASIC; + break; + case NrIconType.TYPE_5G_UWB: + iconGroup = TelephonyIcons.FIVE_G_UWB; + break; + } + return iconGroup; + } + + private void notifyMonitorCallback() { + for (int i = 0; i < mKeyguardUpdateMonitorCallbacks.size(); i++) { + KeyguardUpdateMonitorCallback cb = mKeyguardUpdateMonitorCallbacks.get(i).get(); + if (cb != null) { + cb.onRefreshCarrierInfo(); + } + } + } + + private Handler mHandler = new Handler() { + public void handleMessage(Message msg) { + int what = msg.what; + switch ( msg.what ) { + case MESSAGE_REBIND: + connectService(); + break; + + case MESSAGE_REINIT: + initFiveGServiceState(); + break; + + case MESSAGE_NOTIFIY_MONITOR_CALLBACK: + notifyMonitorCallback(); + break; + } + + } + }; + + + @VisibleForTesting + protected ExtPhoneCallbackListener mExtPhoneCallbackListener = new ExtPhoneCallbackListener() { + @Override + public void onNrIconType(int slotId, Token token, Status status, NrIconType + nrIconType) throws RemoteException { + Log.d(TAG, + "onNrIconType: slotId = " + slotId + " token = " + token + " " + "status" + + status + " NrIconType = " + nrIconType); + if (status.get() == Status.SUCCESS) { + FiveGServiceState state = getCurrentServiceState(slotId); + state.mNrIconType = nrIconType.get(); + update5GIcon(state, slotId); + notifyListenersIfNecessary(slotId); + } + } + }; + + public interface IFiveGStateListener { + public void onStateChanged(FiveGServiceState state); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotController.java index 8231f8b3a09b..e44e6d2d050a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotController.java @@ -30,6 +30,10 @@ public interface HotspotController extends CallbackController<Callback>, Dumpabl interface Callback { void onHotspotChanged(boolean enabled, int numDevices); + default void onHotspotChanged(boolean enabled, int numDevices, + int standard) { + onHotspotChanged(enabled, numDevices); + } default void onHotspotAvailabilityChanged(boolean available) {} } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java index a4821e0e9299..98357711be73 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HotspotControllerImpl.java @@ -22,6 +22,7 @@ import android.content.Context; import android.net.ConnectivityManager; import android.net.TetheringManager; import android.net.TetheringManager.TetheringRequest; +import android.net.wifi.ScanResult; import android.net.wifi.WifiClient; import android.net.wifi.WifiManager; import android.os.Handler; @@ -173,7 +174,8 @@ public class HotspotControllerImpl implements HotspotController, WifiManager.Sof // on the Main Handler. In order to always update the callback on added, we // make this call when adding callbacks after the first. mMainHandler.post(() -> - callback.onHotspotChanged(isHotspotEnabled(), mNumConnectedDevices)); + callback.onHotspotChanged(isHotspotEnabled(), mNumConnectedDevices, + getHotspotWifiStandard())); } } } @@ -196,6 +198,10 @@ public class HotspotControllerImpl implements HotspotController, WifiManager.Sof return mHotspotState == WifiManager.WIFI_AP_STATE_ENABLED; } + public int getHotspotWifiStandard() { + return ScanResult.WIFI_STANDARD_LEGACY; + } + @Override public boolean isHotspotTransient() { return mWaitingForTerminalState || (mHotspotState == WifiManager.WIFI_AP_STATE_ENABLING); @@ -242,7 +248,8 @@ public class HotspotControllerImpl implements HotspotController, WifiManager.Sof list = new ArrayList<>(mCallbacks); } for (Callback callback : list) { - callback.onHotspotChanged(isHotspotEnabled(), mNumConnectedDevices); + callback.onHotspotChanged(isHotspotEnabled(), mNumConnectedDevices, + getHotspotWifiStandard()); } } diff --git a/packages/SystemUI/src/com/android/systemui/util/CarrierNameCustomization.java b/packages/SystemUI/src/com/android/systemui/util/CarrierNameCustomization.java new file mode 100644 index 000000000000..3d80735f09eb --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/util/CarrierNameCustomization.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ +package com.android.systemui.util; + +import android.content.Context; +import android.telephony.SubscriptionInfo; +import android.telephony.TelephonyManager; +import android.text.TextUtils; +import android.util.Log; + +import com.android.systemui.dagger.SysUISingleton; +import com.android.systemui.R; + +import java.util.HashMap; +import javax.inject.Inject; + +@SysUISingleton +public class CarrierNameCustomization { + private final String TAG = "CarrierNameCustomization"; + private final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); + + /** + * The map for carriers: + * The key is MCCMNC. + * The value of the key is unique carrier name. + * Carrier can have several MCCMNC, but it only has one unique carrier name. + */ + private HashMap<String, String> mCarrierMap; + private boolean mRoamingCustomizationCarrierNameEnabled; + private String mConnector; + private TelephonyManager mTelephonyManager; + + @Inject + public CarrierNameCustomization(Context context) { + mCarrierMap = new HashMap<String, String>(); + + mRoamingCustomizationCarrierNameEnabled = context.getResources().getBoolean( + R.bool.config_show_roaming_customization_carrier_name); + mConnector = context.getResources().getString(R.string.connector); + + mTelephonyManager = context.getSystemService(TelephonyManager.class); + + if (mRoamingCustomizationCarrierNameEnabled) { + loadCarrierMap(context); + } + } + + /** + * Returns true if the roaming customization is enabled + * @return + */ + public boolean isRoamingCustomizationEnabled() { + return mRoamingCustomizationCarrierNameEnabled; + } + + /** + * Returns true if the current network for the subscription is considered roaming. + * It is considered roaming if the carrier of the sim card and network are not the same. + * @param subId the subscription ID. + */ + public boolean isRoaming(int subId) { + String simOperatorName = + mCarrierMap.getOrDefault(mTelephonyManager.getSimOperator(subId), ""); + String networkOperatorName = + mCarrierMap.getOrDefault(mTelephonyManager.getNetworkOperator(subId), ""); + if (DEBUG) { + Log.d(TAG, "isRoaming subId=" + subId + + " simOperator=" + mTelephonyManager.getSimOperator(subId) + + " networkOperator=" + mTelephonyManager.getNetworkOperator(subId)); + } + boolean roaming = false; + if (!TextUtils.isEmpty(simOperatorName) && !TextUtils.isEmpty(networkOperatorName) + && !simOperatorName.equals(networkOperatorName)) { + roaming = true; + } + + return roaming; + } + + /** + * Returns the roaming customization carrier name. + * @param subId the subscription ID. + */ + public String getRoamingCarrierName(int subId) { + String simOperatorName = + mCarrierMap.getOrDefault(mTelephonyManager.getSimOperator(subId), ""); + String networkOperatorName = + mCarrierMap.getOrDefault(mTelephonyManager.getNetworkOperator(subId), ""); + StringBuilder combinedCarrierName = new StringBuilder(); + combinedCarrierName.append(simOperatorName) + .append(mConnector) + .append(networkOperatorName); + return combinedCarrierName.toString(); + } + + public void loadCarrierMap(Context context) { + String customizationConfigs[] = + context.getResources().getStringArray(R.array.customization_carrier_name_list); + for(String config : customizationConfigs ) { + String[] kv = config.trim().split(":"); + if (kv.length != 2) { + Log.e(TAG, "invalid key value config " + config); + continue; + } + mCarrierMap.put(kv[0], kv[1]); + } + } +}
\ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/util/sensors/AsyncSensorManager.java b/packages/SystemUI/src/com/android/systemui/util/sensors/AsyncSensorManager.java index 9b06a37e681f..7b258ebb3193 100644..100755 --- a/packages/SystemUI/src/com/android/systemui/util/sensors/AsyncSensorManager.java +++ b/packages/SystemUI/src/com/android/systemui/util/sensors/AsyncSensorManager.java @@ -86,7 +86,14 @@ public class AsyncSensorManager extends SensorManager protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor, int delayUs, Handler handler, int maxReportLatencyUs, int reservedFlags) { + if ( sensor == null ) { + Log.e(TAG, "sensor cannot be null \n" + Log.getStackTraceString(new Throwable())); + return false; + } mExecutor.execute(() -> { + if ( sensor == null ) { + Log.e(TAG, "sensor cannot be null"); + } if (!mInner.registerListener(listener, sensor, delayUs, maxReportLatencyUs, handler)) { Log.e(TAG, "Registering " + listener + " for " + sensor + " failed."); } @@ -135,6 +142,9 @@ public class AsyncSensorManager extends SensorManager throw new IllegalArgumentException("sensor cannot be null"); } mExecutor.execute(() -> { + if ( sensor == null ) { + Log.e(TAG, "sensor cannot be null"); + } if (!mInner.requestTriggerSensor(listener, sensor)) { Log.e(TAG, "Requesting " + listener + " for " + sensor + " failed."); } diff --git a/packages/SystemUI/tests/AndroidManifest.xml b/packages/SystemUI/tests/AndroidManifest.xml index 080be6d8cf25..d96c2d375945 100644 --- a/packages/SystemUI/tests/AndroidManifest.xml +++ b/packages/SystemUI/tests/AndroidManifest.xml @@ -52,6 +52,7 @@ <uses-permission android:name="android.permission.NETWORK_SETTINGS" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.REGISTER_WINDOW_MANAGER_LISTENERS" /> + <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" /> <application android:debuggable="true" android:largeHeap="true" android:testOnly="true" android:enableOnBackInvokedCallback="true" > diff --git a/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextManagerTest.java b/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextManagerTest.java index e7d420bcb32b..e68261711293 100644 --- a/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextManagerTest.java @@ -14,6 +14,12 @@ * limitations under the License. */ +/** + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.keyguard; @@ -62,6 +68,7 @@ import com.android.systemui.keyguard.WakefulnessLifecycle; import com.android.systemui.statusbar.pipeline.wifi.data.repository.FakeWifiRepository; import com.android.systemui.statusbar.pipeline.wifi.shared.model.WifiNetworkModel; import com.android.systemui.telephony.TelephonyListenerManager; +import com.android.systemui.util.CarrierNameCustomization; import com.android.systemui.util.concurrency.FakeExecutor; import com.android.systemui.util.time.FakeSystemClock; @@ -117,6 +124,8 @@ public class CarrierTextManagerTest extends SysuiTestCase { private SubscriptionManager mSubscriptionManager; private CarrierTextManager.CarrierTextCallbackInfo mCarrierTextCallbackInfo; + @Mock + private CarrierNameCustomization mCarrierNameCustomization; private CarrierTextManager mCarrierTextManager; private CarrierTextManagerLogger mLogger = @@ -157,7 +166,7 @@ public class CarrierTextManagerTest extends SysuiTestCase { mCarrierTextManager = new CarrierTextManager.Builder( mContext, mContext.getResources(), mWifiRepository, mTelephonyManager, mTelephonyListenerManager, mWakefulnessLifecycle, mMainExecutor, - mBgExecutor, mKeyguardUpdateMonitor, mLogger) + mBgExecutor, mKeyguardUpdateMonitor, mLogger, mCarrierNameCustomization) .setShowAirplaneMode(true) .setShowMissingSim(true) .build(); @@ -216,7 +225,8 @@ public class CarrierTextManagerTest extends SysuiTestCase { mMainExecutor, mBgExecutor, mKeyguardUpdateMonitor, - mLogger + mLogger, + mCarrierNameCustomization ) .setShowAirplaneMode(true) .setShowMissingSim(true) diff --git a/packages/SystemUI/tests/src/com/android/keyguard/EmergencyButtonControllerTest.kt b/packages/SystemUI/tests/src/com/android/keyguard/EmergencyButtonControllerTest.kt index 30fed0b0316f..9d58b330867a 100644 --- a/packages/SystemUI/tests/src/com/android/keyguard/EmergencyButtonControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/keyguard/EmergencyButtonControllerTest.kt @@ -98,7 +98,8 @@ class EmergencyButtonControllerTest : SysuiTestCase() { /* isInCall= */ any(), /* hasTelephonyRadio= */ any(), /* simLocked= */ any(), - /* isSecure= */ any() + /* isSecure= */ any(), + /* isEmergencyCapable= */ any() ) mainExecutor.runAllReady() verify(emergencyButton) @@ -106,7 +107,8 @@ class EmergencyButtonControllerTest : SysuiTestCase() { /* isInCall= */ eq(true), /* hasTelephonyRadio= */ eq(true), /* simLocked= */ any(), - /* isSecure= */ eq(true) + /* isSecure= */ any(), + /* isEmergencyCapable= */ any() ) } } diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java index 3cb4c0c51252..7b2c16ff63e2 100644 --- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java +++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java @@ -1435,28 +1435,6 @@ public class KeyguardUpdateMonitorTest extends SysuiTestCase { } @Test - public void testActiveSubscriptionBecomesInactive() { - List<SubscriptionInfo> list = new ArrayList<>(); - list.add(TEST_SUBSCRIPTION); - when(mSubscriptionManager.getCompleteActiveSubscriptionInfoList()).thenReturn(list); - mKeyguardUpdateMonitor.mPhoneStateListener.onActiveDataSubscriptionIdChanged( - TEST_SUBSCRIPTION.getSubscriptionId()); - mTestableLooper.processAllMessages(); - assertThat(mKeyguardUpdateMonitor.mSimDatas.get(TEST_SUBSCRIPTION.getSubscriptionId())) - .isNotNull(); - - when(mSubscriptionManager.getCompleteActiveSubscriptionInfoList()).thenReturn(null); - mKeyguardUpdateMonitor.mPhoneStateListener.onActiveDataSubscriptionIdChanged( - SubscriptionManager.INVALID_SUBSCRIPTION_ID); - mTestableLooper.processAllMessages(); - - assertThat(mKeyguardUpdateMonitor.mSimDatas.get(TEST_SUBSCRIPTION.getSubscriptionId())) - .isNull(); - assertThat(mKeyguardUpdateMonitor.mSimDatas.get( - SubscriptionManager.INVALID_SUBSCRIPTION_ID)).isNull(); - } - - @Test public void testIsUserUnlocked() { // mUserManager will report the user as unlocked on @Before assertThat(mKeyguardUpdateMonitor.isUserUnlocked(KeyguardUpdateMonitor.getCurrentUser())) diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java index cfe3b0d2a803..c3bbd148975d 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java @@ -33,7 +33,6 @@ import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.ArgumentMatchers.anyString; -import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.clearInvocations; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.mock; @@ -49,6 +48,7 @@ import android.os.PowerManager.WakeLock; import android.telephony.TelephonyManager; import android.testing.AndroidTestingRunner; import android.testing.TestableLooper; +import android.testing.TestableLooper.RunWithLooper; import android.view.IRemoteAnimationFinishedCallback; import android.view.RemoteAnimationTarget; import android.view.View; @@ -99,6 +99,8 @@ import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.statusbar.policy.UserSwitcherController; +import com.android.systemui.unfold.FoldAodAnimationController; +import com.android.systemui.unfold.UnfoldLightRevealOverlayAnimation; import com.android.systemui.util.DeviceConfigProxy; import com.android.systemui.util.DeviceConfigProxyFake; import com.android.systemui.util.concurrency.FakeExecutor; @@ -117,7 +119,7 @@ import kotlinx.coroutines.CoroutineDispatcher; import kotlinx.coroutines.flow.Flow; @RunWith(AndroidTestingRunner.class) -@TestableLooper.RunWithLooper +@RunWithLooper @SmallTest public class KeyguardViewMediatorTest extends SysuiTestCase { private KeyguardViewMediator mViewMediator; @@ -153,6 +155,8 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { private @Mock DreamOverlayStateController mDreamOverlayStateController; private @Mock ActivityLaunchAnimator mActivityLaunchAnimator; private @Mock ScrimController mScrimController; + private @Mock FoldAodAnimationController mFoldAodAnimationController; + private @Mock UnfoldLightRevealOverlayAnimation mUnfoldAnimation; private @Mock SysuiColorExtractor mColorExtractor; private @Mock AuthController mAuthController; private @Mock ShadeExpansionStateManager mShadeExpansionStateManager; @@ -278,54 +282,18 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { assertFalse(mViewMediator.isAnimatingScreenOff()); } - @Test - @TestableLooper.RunWithLooper(setAsMainLooper = true) - public void restoreBouncerWhenSimLockedAndKeyguardIsGoingAway() { - // When showing and provisioned - mViewMediator.onSystemReady(); - when(mUpdateMonitor.isDeviceProvisioned()).thenReturn(true); - mViewMediator.setShowingLocked(true); - - // and a SIM becomes locked and requires a PIN - mViewMediator.mUpdateCallback.onSimStateChanged( - 1 /* subId */, - 0 /* slotId */, - TelephonyManager.SIM_STATE_PIN_REQUIRED); - - // and the keyguard goes away - mViewMediator.setShowingLocked(false); - when(mKeyguardStateController.isShowing()).thenReturn(false); - mViewMediator.mUpdateCallback.onKeyguardVisibilityChanged(false); - + private void onUnfoldOverlayReady() { + ArgumentCaptor<Runnable> overlayReadyCaptor = ArgumentCaptor.forClass(Runnable.class); + verify(mUnfoldAnimation).onScreenTurningOn(overlayReadyCaptor.capture()); + overlayReadyCaptor.getValue().run(); TestableLooper.get(this).processAllMessages(); - - // then make sure it comes back - verify(mStatusBarKeyguardViewManager, atLeast(1)).show(null); } - @Test - @TestableLooper.RunWithLooper(setAsMainLooper = true) - public void restoreBouncerWhenSimLockedAndKeyguardIsGoingAway_initiallyNotShowing() { - // When showing and provisioned - mViewMediator.onSystemReady(); - when(mUpdateMonitor.isDeviceProvisioned()).thenReturn(true); - mViewMediator.setShowingLocked(false); - - // and a SIM becomes locked and requires a PIN - mViewMediator.mUpdateCallback.onSimStateChanged( - 1 /* subId */, - 0 /* slotId */, - TelephonyManager.SIM_STATE_PIN_REQUIRED); - - // and the keyguard goes away - mViewMediator.setShowingLocked(false); - when(mKeyguardStateController.isShowing()).thenReturn(false); - mViewMediator.mUpdateCallback.onKeyguardVisibilityChanged(false); - + private void onFoldAodReady() { + ArgumentCaptor<Runnable> ready = ArgumentCaptor.forClass(Runnable.class); + verify(mFoldAodAnimationController).onScreenTurningOn(ready.capture()); + ready.getValue().run(); TestableLooper.get(this).processAllMessages(); - - // then make sure it comes back - verify(mStatusBarKeyguardViewManager, atLeast(1)).show(null); } @Test diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/InternetTileTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/InternetTileTest.java index 7957c6a7cfb6..13d5dd349451 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/InternetTileTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/InternetTileTest.java @@ -14,6 +14,12 @@ * limitations under the License. */ +/** + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.qs.tiles; import static com.google.common.truth.Truth.assertThat; @@ -43,6 +49,7 @@ import com.android.systemui.statusbar.connectivity.AccessPointController; import com.android.systemui.statusbar.connectivity.IconState; import com.android.systemui.statusbar.connectivity.NetworkController; import com.android.systemui.statusbar.connectivity.WifiIndicators; +import com.android.systemui.util.CarrierNameCustomization; import org.junit.After; import org.junit.Before; @@ -66,6 +73,8 @@ public class InternetTileTest extends SysuiTestCase { private InternetDialogFactory mInternetDialogFactory; @Mock private QsEventLogger mUiEventLogger; + @Mock + private CarrierNameCustomization mCarrierNameCustomization; private TestableLooper mTestableLooper; private InternetTile mTile; @@ -89,7 +98,8 @@ public class InternetTileTest extends SysuiTestCase { mock(QSLogger.class), mNetworkController, mAccessPointController, - mInternetDialogFactory + mInternetDialogFactory, + mCarrierNameCustomization ); mTile.initialize(); diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogControllerTest.java index 66143923132b..8e1e89300387 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogControllerTest.java @@ -1,3 +1,9 @@ +/** + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.qs.tiles.dialog; import static android.provider.Settings.Global.AIRPLANE_MODE_ON; @@ -72,6 +78,7 @@ import com.android.systemui.statusbar.policy.LocationController; import com.android.systemui.toast.SystemUIToast; import com.android.systemui.toast.ToastFactory; import com.android.systemui.util.CarrierConfigTracker; +import com.android.systemui.util.CarrierNameCustomization; import com.android.systemui.util.concurrency.FakeExecutor; import com.android.systemui.util.settings.GlobalSettings; import com.android.systemui.util.time.FakeSystemClock; @@ -173,6 +180,8 @@ public class InternetDialogControllerTest extends SysuiTestCase { private WifiStateWorker mWifiStateWorker; @Mock private SignalStrength mSignalStrength; + @Mock + private CarrierNameCustomization mCarrierNameCustomization; private FakeFeatureFlags mFlags = new FakeFeatureFlags(); @@ -218,7 +227,8 @@ public class InternetDialogControllerTest extends SysuiTestCase { mConnectivityManager, mHandler, mExecutor, mBroadcastDispatcher, mock(KeyguardUpdateMonitor.class), mGlobalSettings, mKeyguardStateController, mWindowManager, mToastFactory, mWorkerHandler, mCarrierConfigTracker, - mLocationController, mDialogLaunchAnimator, mWifiStateWorker, mFlags); + mLocationController, mDialogLaunchAnimator, mWifiStateWorker, mFlags, + mCarrierNameCustomization); mSubscriptionManager.addOnSubscriptionsChangedListener(mExecutor, mInternetDialogController.mOnSubscriptionsChangedListener); mInternetDialogController.onStart(mInternetDialogCallback, true); @@ -838,7 +848,7 @@ public class InternetDialogControllerTest extends SysuiTestCase { mSubIdTelephonyDisplayInfoMap.put(SUB_ID2, info2); doReturn(SUB_ID2).when(spyController).getActiveAutoSwitchNonDdsSubId(); - doReturn(true).when(spyController).isMobileDataEnabled(); + doReturn(true).when(spyController).isMobileDataEnabled(SUB_ID); doReturn(true).when(spyController).activeNetworkIsCellular(); String dds = spyController.getMobileNetworkSummary(SUB_ID); String nonDds = spyController.getMobileNetworkSummary(SUB_ID2); @@ -852,7 +862,7 @@ public class InternetDialogControllerTest extends SysuiTestCase { @Test public void getMobileNetworkSummary_flagOff() { InternetDialogController spyController = spy(mInternetDialogController); - doReturn(true).when(spyController).isMobileDataEnabled(); + doReturn(true).when(spyController).isMobileDataEnabled(SUB_ID); doReturn(true).when(spyController).activeNetworkIsCellular(); String dds = spyController.getMobileNetworkSummary(SUB_ID); @@ -954,7 +964,7 @@ public class InternetDialogControllerTest extends SysuiTestCase { TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_NONE); mSubIdTelephonyDisplayInfoMap.put(SUB_ID, info); - doReturn(true).when(spyController).isMobileDataEnabled(); + doReturn(true).when(spyController).isMobileDataEnabled(SUB_ID); doReturn(true).when(spyController).activeNetworkIsCellular(); spyController.mCarrierNetworkChangeMode = true; String dds = spyController.getMobileNetworkSummary(SUB_ID); diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogTest.java index b59005aa8dda..89db100e69f6 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDialogTest.java @@ -1,3 +1,8 @@ +/** + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ package com.android.systemui.qs.tiles.dialog; import static com.android.systemui.qs.tiles.dialog.InternetDialogController.MAX_WIFI_ENTRY_COUNT; @@ -321,7 +326,7 @@ public class InternetDialogTest extends SysuiTestCase { public void updateDialog_mobileDataIsEnabled_checkMobileDataSwitch() { doReturn(true).when(mInternetDialogController).hasActiveSubId(); when(mInternetDialogController.isCarrierNetworkActive()).thenReturn(true); - when(mInternetDialogController.isMobileDataEnabled()).thenReturn(true); + when(mInternetDialogController.isMobileDataEnabled(anyInt())).thenReturn(true); mMobileToggleSwitch.setChecked(false); mInternetDialog.updateDialog(true); @@ -333,7 +338,7 @@ public class InternetDialogTest extends SysuiTestCase { public void updateDialog_mobileDataIsNotChanged_checkMobileDataSwitch() { doReturn(true).when(mInternetDialogController).hasActiveSubId(); when(mInternetDialogController.isCarrierNetworkActive()).thenReturn(true); - when(mInternetDialogController.isMobileDataEnabled()).thenReturn(false); + when(mInternetDialogController.isMobileDataEnabled(anyInt())).thenReturn(false); mMobileToggleSwitch.setChecked(false); mInternetDialog.updateDialog(true); diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java index fe89a143e880..4e9ec90199a2 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerBaseTest.java @@ -65,6 +65,7 @@ import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.UiEventLogger; import com.android.internal.logging.testing.UiEventLoggerFake; import com.android.internal.util.LatencyTracker; +import com.android.keyguard.EmergencyButtonController; import com.android.keyguard.KeyguardClockSwitch; import com.android.keyguard.KeyguardClockSwitchController; import com.android.keyguard.KeyguardSliceViewController; @@ -263,6 +264,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { @Mock protected KeyguardIndicationController mKeyguardIndicationController; @Mock protected FragmentService mFragmentService; @Mock protected FragmentHostManager mFragmentHostManager; + @Mock protected EmergencyButtonController.Factory mEmergencyButtonControllerFactory; @Mock protected NotificationRemoteInputManager mNotificationRemoteInputManager; @Mock protected RecordingController mRecordingController; @Mock protected LockscreenGestureLogger mLockscreenGestureLogger; @@ -611,6 +613,7 @@ public class NotificationPanelViewControllerBaseTest extends SysuiTestCase { mKeyuardLongPressViewModel, mKeyguardInteractor, mActivityStarter, + mEmergencyButtonControllerFactory, mKeyguardFaceAuthInteractor); mNotificationPanelViewController.initDependencies( mCentralSurfaces, diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java index 987e09c8776c..3f52797108d9 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationPanelViewControllerTest.java @@ -56,6 +56,7 @@ import androidx.constraintlayout.widget.ConstraintSet; import androidx.test.filters.SmallTest; import com.android.keyguard.FaceAuthApiRequestReason; +import com.android.keyguard.EmergencyButtonController; import com.android.systemui.DejankUtils; import com.android.systemui.R; import com.android.systemui.plugins.statusbar.StatusBarStateController; diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/carrier/ShadeCarrierGroupControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/carrier/ShadeCarrierGroupControllerTest.java index 31bfa3fdf8cb..c821cf1a43eb 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/carrier/ShadeCarrierGroupControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/carrier/ShadeCarrierGroupControllerTest.java @@ -250,7 +250,7 @@ public class ShadeCarrierGroupControllerTest extends LeakCheckedTest { MobileDataIndicators indicators = new MobileDataIndicators( mock(IconState.class), mock(IconState.class), - 0, 0, true, true, "", "", "", 0, true, true); + 0, 0, true, true, 0, "", "", "", 0, true, true); mSignalCallback.setMobileDataIndicators(indicators); } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/CallbackHandlerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/CallbackHandlerTest.java index 2d29c80a15ac..7d8ff11e4dad 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/CallbackHandlerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/CallbackHandlerTest.java @@ -119,7 +119,7 @@ public class CallbackHandlerTest extends SysuiTestCase { int subId = 5; boolean roaming = true; MobileDataIndicators indicators = new MobileDataIndicators( - status, qs, type, qsType, in, out, typeDescription, + status, qs, type, qsType, in, out, 0, typeDescription, typeDescriptionHtml, description, subId, roaming, true); mHandler.setMobileDataIndicators(indicators); waitForCallbacks(); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerBaseTest.java index 2e5afa4a8b50..5c77be0cda12 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerBaseTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerBaseTest.java @@ -257,7 +257,6 @@ public class NetworkControllerBaseTest extends SysuiTestCase { mWifiStatusTrackerFactory, mMobileFactory, mMainHandler, - mock(DumpManager.class), mock(LogBuffer.class) ); setupNetworkController(); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerDataTest.java index d5689dcb3173..b87385667fbd 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerDataTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerDataTest.java @@ -47,7 +47,6 @@ import android.testing.TestableLooper.RunWithLooper; import com.android.settingslib.SignalIcon.MobileIconGroup; import com.android.settingslib.mobile.TelephonyIcons; import com.android.settingslib.net.DataUsageController; -import com.android.systemui.dump.DumpManager; import com.android.systemui.log.LogBuffer; import com.android.systemui.statusbar.pipeline.StatusBarPipelineFlags; import com.android.systemui.statusbar.policy.DeviceProvisionedController; @@ -162,7 +161,6 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest { mWifiStatusTrackerFactory, mMobileFactory, new Handler(TestableLooper.get(this).getLooper()), - mock(DumpManager.class), mock(LogBuffer.class)); setupNetworkController(); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerSignalTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerSignalTest.java index 35b9814cd81d..bb28709c95a9 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerSignalTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/connectivity/NetworkControllerSignalTest.java @@ -42,7 +42,6 @@ import com.android.settingslib.graph.SignalDrawable; import com.android.settingslib.mobile.TelephonyIcons; import com.android.settingslib.net.DataUsageController; import com.android.systemui.R; -import com.android.systemui.dump.DumpManager; import com.android.systemui.log.LogBuffer; import com.android.systemui.statusbar.pipeline.StatusBarPipelineFlags; import com.android.systemui.statusbar.policy.DeviceProvisionedController; @@ -90,7 +89,6 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest { mWifiStatusTrackerFactory, mMobileFactory, mMainHandler, - mock(DumpManager.class), mock(LogBuffer.class) ); TestableLooper.get(this).processAllMessages(); @@ -128,7 +126,6 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest { mWifiStatusTrackerFactory, mMobileFactory, mMainHandler, - mock(DumpManager.class), mock(LogBuffer.class)); TestableLooper.get(this).processAllMessages(); @@ -164,7 +161,6 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest { mWifiStatusTrackerFactory, mMobileFactory, mMainHandler, - mock(DumpManager.class), mock(LogBuffer.class)); setupNetworkController(); @@ -203,7 +199,6 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest { mWifiStatusTrackerFactory, mMobileFactory, mMainHandler, - mock(DumpManager.class), mock(LogBuffer.class)); mNetworkController.registerListeners(); @@ -290,7 +285,6 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest { mWifiStatusTrackerFactory, mMobileFactory, mMainHandler, - mock(DumpManager.class), mock(LogBuffer.class)); setupNetworkController(); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/FakeMobileConnectionRepository.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/FakeMobileConnectionRepository.kt index 6306a36d9730..ede9d612b385 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/FakeMobileConnectionRepository.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/FakeMobileConnectionRepository.kt @@ -14,8 +14,15 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.statusbar.pipeline.mobile.data.repository +import android.telephony.ims.stub.ImsRegistrationImplBase.REGISTRATION_TECH_NONE import android.telephony.TelephonyManager.UNKNOWN_CARRIER_ID import com.android.systemui.log.table.TableLogBuffer import com.android.systemui.statusbar.pipeline.mobile.data.model.DataConnectionState @@ -23,6 +30,7 @@ import com.android.systemui.statusbar.pipeline.mobile.data.model.NetworkNameMode import com.android.systemui.statusbar.pipeline.mobile.data.model.ResolvedNetworkType import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionRepository.Companion.DEFAULT_NUM_LEVELS import com.android.systemui.statusbar.pipeline.shared.data.model.DataActivityModel +import com.qti.extphone.NrIconType import kotlinx.coroutines.flow.MutableStateFlow // TODO(b/261632894): remove this in favor of the real impl or DemoMobileConnectionRepository @@ -55,6 +63,18 @@ class FakeMobileConnectionRepository( override val networkName = MutableStateFlow<NetworkNameModel>(NetworkNameModel.Default("default")) + override val lteRsrpLevel = MutableStateFlow(0) + override val voiceNetworkType = MutableStateFlow(0) + override val dataNetworkType = MutableStateFlow(0) + override val nrIconType = MutableStateFlow(NrIconType.TYPE_NONE) + override val dataRoamingEnabled = MutableStateFlow(true) + override val originNetworkType = MutableStateFlow(0) + override val voiceCapable = MutableStateFlow(false) + override val videoCapable = MutableStateFlow(false) + override val imsRegistered = MutableStateFlow(false) + override val imsRegistrationTech = MutableStateFlow(REGISTRATION_TECH_NONE) + override val isConnectionFailed = MutableStateFlow(false) + fun setDataEnabled(enabled: Boolean) { _dataEnabled.value = enabled } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt index b701fbd66937..2f6f64f3095d 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/FullMobileConnectionRepositoryTest.kt @@ -33,6 +33,7 @@ import com.android.systemui.statusbar.pipeline.mobile.data.repository.prod.FullM import com.android.systemui.statusbar.pipeline.mobile.data.repository.prod.MobileTelephonyHelpers.getTelephonyCallbackForType import com.android.systemui.statusbar.pipeline.wifi.data.repository.FakeWifiRepository import com.android.systemui.statusbar.pipeline.wifi.shared.model.WifiNetworkModel +import com.android.systemui.statusbar.policy.FiveGServiceClient import com.android.systemui.util.mockito.any import com.android.systemui.util.mockito.eq import com.android.systemui.util.mockito.mock @@ -615,6 +616,7 @@ class FullMobileConnectionRepositoryTest : SysuiTestCase() { val realRepo = MobileConnectionRepositoryImpl( + mContext, SUB_ID, defaultNetworkName = NetworkNameModel.Default("default"), networkNameSeparator = SEP, @@ -626,6 +628,8 @@ class FullMobileConnectionRepositoryTest : SysuiTestCase() { logger = mock(), tableLogBuffer, testScope.backgroundScope, + FiveGServiceClient(mContext), + connectivityManager = mock(), ) whenever( mobileFactory.build( diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt index d1df6e3c2072..1660d328baf2 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionRepositoryTest.kt @@ -17,6 +17,7 @@ package com.android.systemui.statusbar.pipeline.mobile.data.repository.prod import android.content.Intent +import android.net.ConnectivityManager import android.telephony.CarrierConfigManager.KEY_INFLATE_SIGNAL_STRENGTH_BOOL import android.telephony.NetworkRegistrationInfo import android.telephony.ServiceState @@ -72,10 +73,14 @@ import com.android.systemui.statusbar.pipeline.mobile.data.repository.prod.Mobil import com.android.systemui.statusbar.pipeline.mobile.util.FakeMobileMappingsProxy import com.android.systemui.statusbar.pipeline.shared.data.model.DataActivityModel import com.android.systemui.statusbar.pipeline.shared.data.model.toMobileDataActivityModel +import com.android.systemui.statusbar.policy.FiveGServiceClient +import com.android.systemui.statusbar.policy.FiveGServiceClient.FiveGServiceState import com.android.systemui.util.mockito.any +import com.android.systemui.util.mockito.argumentCaptor import com.android.systemui.util.mockito.mock import com.android.systemui.util.mockito.whenever import com.google.common.truth.Truth.assertThat +import com.qti.extphone.NrIconType import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach @@ -85,6 +90,7 @@ import kotlinx.coroutines.test.runTest import org.junit.Before import org.junit.Test import org.mockito.Mock +import org.mockito.Mockito import org.mockito.MockitoAnnotations @Suppress("EXPERIMENTAL_IS_NOT_ENABLED") @@ -97,6 +103,7 @@ class MobileConnectionRepositoryTest : SysuiTestCase() { @Mock private lateinit var telephonyManager: TelephonyManager @Mock private lateinit var logger: MobileInputLogger @Mock private lateinit var tableLogger: TableLogBuffer + @Mock private lateinit var connectivityManager: ConnectivityManager private val mobileMappings = FakeMobileMappingsProxy() private val systemUiCarrierConfig = @@ -104,6 +111,7 @@ class MobileConnectionRepositoryTest : SysuiTestCase() { SUB_1_ID, createTestConfig(), ) + private val fiveGServiceClient = FiveGServiceClient(mContext) private val testDispatcher = UnconfinedTestDispatcher() private val testScope = TestScope(testDispatcher) @@ -117,6 +125,7 @@ class MobileConnectionRepositoryTest : SysuiTestCase() { underTest = MobileConnectionRepositoryImpl( + mContext, SUB_1_ID, DEFAULT_NAME, SEP, @@ -128,6 +137,8 @@ class MobileConnectionRepositoryTest : SysuiTestCase() { logger, tableLogger, testScope.backgroundScope, + fiveGServiceClient, + connectivityManager, ) } @@ -850,6 +861,13 @@ class MobileConnectionRepositoryTest : SysuiTestCase() { putExtra(EXTRA_PLMN, plmn) } + private fun getFiveGStateCallback(): FiveGServiceClient.IFiveGStateListener { + val callbackCaptor = argumentCaptor<FiveGServiceClient.IFiveGStateListener>() + Mockito.verify(fiveGServiceClient) + .registerListener(any(), callbackCaptor.capture()) + return callbackCaptor.value!! + } + companion object { private const val SUB_1_ID = 1 diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionTelephonySmokeTests.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionTelephonySmokeTests.kt index 4f15aed00230..33325024c7c6 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionTelephonySmokeTests.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionTelephonySmokeTests.kt @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.pipeline.mobile.data.repository.prod +import android.net.ConnectivityManager import android.telephony.ServiceState import android.telephony.TelephonyCallback import android.telephony.TelephonyCallback.CarrierNetworkListener @@ -43,6 +44,8 @@ import com.android.systemui.statusbar.pipeline.mobile.data.repository.prod.Mobil import com.android.systemui.statusbar.pipeline.mobile.data.repository.prod.MobileTelephonyHelpers.signalStrength import com.android.systemui.statusbar.pipeline.mobile.util.FakeMobileMappingsProxy import com.android.systemui.statusbar.pipeline.shared.data.model.DataActivityModel +import com.android.systemui.statusbar.policy.FiveGServiceClient +import com.android.systemui.statusbar.policy.FiveGServiceClient.FiveGServiceState import com.android.systemui.util.mockito.mock import com.android.systemui.util.mockito.whenever import com.google.common.truth.Truth.assertThat @@ -97,6 +100,7 @@ class MobileConnectionTelephonySmokeTests : SysuiTestCase() { @Mock private lateinit var telephonyManager: TelephonyManager @Mock private lateinit var logger: MobileInputLogger @Mock private lateinit var tableLogger: TableLogBuffer + @Mock private lateinit var connectivityManager: ConnectivityManager private val mobileMappings = FakeMobileMappingsProxy() private val systemUiCarrierConfig = @@ -104,6 +108,7 @@ class MobileConnectionTelephonySmokeTests : SysuiTestCase() { SUB_1_ID, SystemUiCarrierConfigTest.createTestConfig(), ) + private val fiveGServiceClient = FiveGServiceClient(mContext) private val testDispatcher = UnconfinedTestDispatcher() private val testScope = TestScope(testDispatcher) @@ -117,6 +122,7 @@ class MobileConnectionTelephonySmokeTests : SysuiTestCase() { underTest = MobileConnectionRepositoryImpl( + mContext, SUB_1_ID, DEFAULT_NAME, SEP, @@ -128,6 +134,8 @@ class MobileConnectionTelephonySmokeTests : SysuiTestCase() { logger, tableLogger, testScope.backgroundScope, + fiveGServiceClient, + connectivityManager, ) } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryTest.kt index 9aea70f9cdb2..00ff760e88b0 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/data/repository/prod/MobileConnectionsRepositoryTest.kt @@ -57,6 +57,7 @@ import com.android.systemui.statusbar.pipeline.shared.data.repository.Connectivi import com.android.systemui.statusbar.pipeline.wifi.data.repository.WifiRepository import com.android.systemui.statusbar.pipeline.wifi.data.repository.prod.WifiRepositoryImpl import com.android.systemui.util.concurrency.FakeExecutor +import com.android.systemui.statusbar.policy.FiveGServiceClient import com.android.systemui.util.mockito.any import com.android.systemui.util.mockito.argumentCaptor import com.android.systemui.util.mockito.eq @@ -112,6 +113,8 @@ class MobileConnectionsRepositoryTest : SysuiTestCase() { private val dispatcher = StandardTestDispatcher() private val testScope = TestScope(dispatcher) + private val fiveGServiceClient = FiveGServiceClient(mContext) + @Before fun setUp() { MockitoAnnotations.initMocks(this) @@ -176,12 +179,15 @@ class MobileConnectionsRepositoryTest : SysuiTestCase() { connectionFactory = MobileConnectionRepositoryImpl.Factory( fakeBroadcastDispatcher, + context, telephonyManager = telephonyManager, bgDispatcher = dispatcher, logger = logger, mobileMappingsProxy = mobileMappings, scope = testScope.backgroundScope, carrierConfigRepository = carrierConfigRepository, + fiveGServiceClient = fiveGServiceClient, + connectivityManager = connectivityManager, ) carrierMergedFactory = CarrierMergedConnectionRepository.Factory( diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconInteractor.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconInteractor.kt index c4e419366759..1889d0dc060e 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconInteractor.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconInteractor.kt @@ -14,11 +14,18 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.statusbar.pipeline.mobile.domain.interactor import android.telephony.CellSignalStrength import com.android.settingslib.mobile.TelephonyIcons import com.android.systemui.log.table.TableLogBuffer +import com.android.systemui.statusbar.pipeline.mobile.data.model.MobileIconCustomizationMode import com.android.systemui.statusbar.pipeline.mobile.data.model.NetworkNameModel import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionRepository.Companion.DEFAULT_NUM_LEVELS import com.android.systemui.statusbar.pipeline.mobile.domain.model.NetworkTypeIconModel @@ -77,6 +84,30 @@ class FakeMobileIconInteractor( override val isForceHidden = MutableStateFlow(false) + private val _alwaysUseRsrpLevelForLte = MutableStateFlow(false) + override val alwaysUseRsrpLevelForLte = _alwaysUseRsrpLevelForLte + + private val _hideNoInternetState = MutableStateFlow(false) + override val hideNoInternetState = _hideNoInternetState + + private val _networkTypeIconCustomization = MutableStateFlow(MobileIconCustomizationMode()) + override val networkTypeIconCustomization = _networkTypeIconCustomization + + private val _showVolteIcon = MutableStateFlow(false) + override val showVolteIcon = _showVolteIcon + + private val _imsInfo = MutableStateFlow(MobileIconCustomizationMode()) + override val imsInfo = _imsInfo + + private val _showVowifiIcon = MutableStateFlow(false) + override val showVowifiIcon = _showVowifiIcon + + private val _voWifiAvailable = MutableStateFlow(false) + override val voWifiAvailable = _voWifiAvailable + + private val _isConnectionFailed = MutableStateFlow(false) + override val isConnectionFailed = _isConnectionFailed + fun setIsEmergencyOnly(emergency: Boolean) { _isEmergencyOnly.value = emergency } @@ -100,4 +131,12 @@ class FakeMobileIconInteractor( fun setNumberOfLevels(num: Int) { _numberOfLevels.value = num } + + fun setAlwaysUseRsrpLevelForLte(alwaysUseRsrpLevelForLte: Boolean) { + _alwaysUseRsrpLevelForLte.value = alwaysUseRsrpLevelForLte + } + + fun setHideNoInternetState(hideNoInternetState: Boolean) { + _hideNoInternetState.value = hideNoInternetState + } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconsInteractor.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconsInteractor.kt index b2bbcfd3d6ef..ef112090a45e 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconsInteractor.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/FakeMobileIconsInteractor.kt @@ -14,6 +14,12 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.statusbar.pipeline.mobile.domain.interactor import android.telephony.TelephonyDisplayInfo.OVERRIDE_NETWORK_TYPE_LTE_ADVANCED_PRO @@ -23,6 +29,7 @@ import android.telephony.TelephonyManager.NETWORK_TYPE_UMTS import com.android.settingslib.SignalIcon.MobileIconGroup import com.android.settingslib.mobile.TelephonyIcons import com.android.systemui.log.table.TableLogBuffer +import com.android.systemui.statusbar.pipeline.mobile.data.model.MobileIconCustomizationMode import com.android.systemui.statusbar.pipeline.mobile.data.model.SubscriptionModel import com.android.systemui.statusbar.pipeline.mobile.util.MobileMappingsProxy import kotlinx.coroutines.flow.MutableStateFlow @@ -75,6 +82,20 @@ class FakeMobileIconsInteractor( override val isForceHidden = MutableStateFlow(false) + private val _alwaysUseRsrpLevelForLte = MutableStateFlow(false) + override val alwaysUseRsrpLevelForLte = _alwaysUseRsrpLevelForLte + + private val _hideNoInternetState = MutableStateFlow(false) + override val hideNoInternetState = _hideNoInternetState + + private val _networkTypeIconCustomization = MutableStateFlow(MobileIconCustomizationMode()) + override val networkTypeIconCustomization = _networkTypeIconCustomization + + private val _showVolteIcon = MutableStateFlow(false) + override val showVolteIcon = _showVolteIcon + + private val _showVowifiIcon = MutableStateFlow(false) + override val showVowifiIcon = _showVowifiIcon /** Always returns a new fake interactor */ override fun createMobileConnectionInteractorForSubId(subId: Int): MobileIconInteractor { return FakeMobileIconInteractor(tableLogBuffer).also { interactorCache[subId] = it } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt index c2768654809b..2aa920a1c724 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconInteractorTest.kt @@ -14,6 +14,12 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.systemui.statusbar.pipeline.mobile.domain.interactor import android.telephony.CellSignalStrength @@ -39,8 +45,11 @@ import com.android.systemui.util.mockito.mock import com.android.systemui.util.mockito.whenever import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach +import kotlinx.coroutines.runBlocking import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.UnconfinedTestDispatcher import kotlinx.coroutines.test.runTest @@ -473,6 +482,36 @@ class MobileIconInteractorTest : SysuiTestCase() { job.cancel() } + @Test + fun alwaysUseRsrpLevelForLte_matchesParent() = + runBlocking(IMMEDIATE) { + var latest: Boolean? = null + val job = underTest.alwaysUseRsrpLevelForLte.onEach { latest = it }.launchIn(this) + + mobileIconsInteractor.alwaysUseRsrpLevelForLte.value = true + assertThat(latest).isTrue() + + mobileIconsInteractor.alwaysUseRsrpLevelForLte.value = false + assertThat(latest).isFalse() + + job.cancel() + } + + @Test + fun hideNoInternetState_matchesParent() = + runBlocking(IMMEDIATE) { + var latest: Boolean? = null + val job = underTest.hideNoInternetState.onEach { latest = it }.launchIn(this) + + mobileIconsInteractor.hideNoInternetState.value = true + assertThat(latest).isTrue() + + mobileIconsInteractor.hideNoInternetState.value = false + assertThat(latest).isFalse() + + job.cancel() + } + private fun createInteractor( overrides: MobileIconCarrierIdOverrides = MobileIconCarrierIdOverridesImpl() ) = @@ -487,7 +526,13 @@ class MobileIconInteractorTest : SysuiTestCase() { mobileIconsInteractor.isDefaultConnectionFailed, mobileIconsInteractor.isForceHidden, connectionRepository, + mobileIconsInteractor.alwaysUseRsrpLevelForLte, + mobileIconsInteractor.hideNoInternetState, + mobileIconsInteractor.networkTypeIconCustomization, + mobileIconsInteractor.showVolteIcon, + mobileIconsInteractor.showVowifiIcon, context, + MutableStateFlow(0), overrides, ) @@ -499,5 +544,7 @@ class MobileIconInteractorTest : SysuiTestCase() { private val DEFAULT_NAME = NetworkNameModel.Default("test default name") private val DERIVED_NAME = NetworkNameModel.IntentDerived("test derived name") + + private val IMMEDIATE = Dispatchers.Main.immediate } } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractorTest.kt index 1fb76b048d47..cd5d3eb3d0f0 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/mobile/domain/interactor/MobileIconsInteractorTest.kt @@ -757,6 +757,70 @@ class MobileIconsInteractorTest : SysuiTestCase() { return Pair(sub1, sub2) } + @Test + fun alwaysUseRsrpLevelForLte_configHasTrue() = + testScope.runTest { + var latest: Boolean? = null + val job = underTest.alwaysUseRsrpLevelForLte.onEach { latest = it }.launchIn(this) + + val config = MobileMappings.Config() + config.showRsrpSignalLevelforLTE = true + connectionsRepository.defaultDataSubRatConfig.value = config + yield() + + assertThat(latest).isTrue() + + job.cancel() + } + + @Test + fun alwaysUseRsrpLevelForLte_configHasFalse() = + testScope.runTest { + var latest: Boolean? = null + val job = underTest.alwaysUseRsrpLevelForLte.onEach { latest = it }.launchIn(this) + + val config = MobileMappings.Config() + config.showRsrpSignalLevelforLTE = false + connectionsRepository.defaultDataSubRatConfig.value = config + yield() + + assertThat(latest).isFalse() + + job.cancel() + } + + @Test + fun hideNoInternetState_configHasTrue() = + testScope.runTest { + var latest: Boolean? = null + val job = underTest.hideNoInternetState.onEach { latest = it }.launchIn(this) + + val config = MobileMappings.Config() + config.hideNoInternetState = true + connectionsRepository.defaultDataSubRatConfig.value = config + yield() + + assertThat(latest).isTrue() + + job.cancel() + } + + @Test + fun hideNoInternetState_configHasFalse() = + testScope.runTest { + var latest: Boolean? = null + val job = underTest.hideNoInternetState.onEach { latest = it }.launchIn(this) + + val config = MobileMappings.Config() + config.hideNoInternetState = false + connectionsRepository.defaultDataSubRatConfig.value = config + yield() + + assertThat(latest).isTrue() + + job.cancel() + } + companion object { private const val SUB_1_ID = 1 diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/FiveGServiceClientTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/FiveGServiceClientTest.java new file mode 100644 index 000000000000..9b35d34571c6 --- /dev/null +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/FiveGServiceClientTest.java @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2018, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package com.android.systemui.statusbar.policy; + + import android.os.RemoteException; + import android.util.Log; + import android.test.suitebuilder.annotation.SmallTest; + import android.testing.AndroidTestingRunner; + import android.testing.TestableLooper.RunWithLooper; + + import com.qti.extphone.ExtPhoneCallbackListener; + import com.qti.extphone.NrIconType; + import com.qti.extphone.Status; + import com.qti.extphone.Token; + import org.junit.Before; + import org.junit.Test; + import org.junit.runner.RunWith; + + import static junit.framework.Assert.assertEquals; + + import com.android.settingslib.mobile.TelephonyIcons; + import com.android.systemui.statusbar.connectivity.NetworkControllerBaseTest; + import com.android.systemui.statusbar.policy.FiveGServiceClient; + import com.android.systemui.statusbar.policy.FiveGServiceClient.FiveGServiceState; + + @SmallTest + @RunWith(AndroidTestingRunner.class) + @RunWithLooper + public class FiveGServiceClientTest extends NetworkControllerBaseTest { + private final static String TAG = "FiveGServiceClientTest"; + private FiveGServiceClient mFiveGServiceClient; + protected ExtPhoneCallbackListener mCallback; + + Token mToken; + Status mSuccessStatus; + Status mFailStatus; + private int mPhoneId; + + @Before + public void setupCallback() { + mPhoneId = 0; + mToken = new Token(0); + mSuccessStatus = new Status(Status.SUCCESS); + mFailStatus = new Status(Status.FAILURE); + mFiveGServiceClient = mNetworkController.getFiveGServiceClient(); + mCallback = mFiveGServiceClient.mExtPhoneCallbackListener; + + } + + @Test + public void testNrIconType() { + //Success status case + NrIconType nrIconType = new NrIconType(NrIconType.TYPE_5G_BASIC); + updateNrIconType(mPhoneId, mToken, mSuccessStatus, nrIconType); + FiveGServiceState fiveGState = mFiveGServiceClient.getCurrentServiceState(mPhoneId); + assertEquals(fiveGState.getNrIconType(), NrIconType.TYPE_5G_BASIC); + + //Failure status case + nrIconType = new NrIconType(NrIconType.TYPE_NONE); + updateNrIconType(mPhoneId, mToken, mSuccessStatus, nrIconType); + fiveGState = mFiveGServiceClient.getCurrentServiceState(mPhoneId); + assertEquals(fiveGState.getNrIconType(), NrIconType.TYPE_5G_BASIC); + } + + @Test + public void test5GBasicIcon() { + /** + * Verify that 5G Basic icon is shown when + * NrIconType is TYPE_5G_BASIC + */ + NrIconType nrIconType = new NrIconType(NrIconType.TYPE_5G_BASIC); + updateNrIconType(mPhoneId, mToken, mSuccessStatus, nrIconType); + verifyIcon(TelephonyIcons.ICON_5G_BASIC); + + /** + * Verify that 5G Basic icon is not shown when + * NrIconType is TYPE_NONE + */ + nrIconType = new NrIconType(NrIconType.TYPE_NONE); + updateNrIconType(mPhoneId, mToken, mSuccessStatus, nrIconType); + verifyIcon(0); + } + + @Test + public void test5GUWBIcon() { + /** + * Verify that 5G UWB icon is shown when + * NrIconType is TYPE_5G_UWB + */ + NrIconType nrIconType = new NrIconType(NrIconType.TYPE_5G_UWB); + updateNrIconType(mPhoneId, mToken, mSuccessStatus, nrIconType); + verifyIcon(TelephonyIcons.ICON_5G_UWB); + + /** + * Verify that 5G UWB icon is not shown when + * NrIconType is TYPE_NONE + */ + nrIconType = new NrIconType(NrIconType.TYPE_NONE); + updateNrIconType(mPhoneId, mToken, mSuccessStatus, nrIconType); + verifyIcon(0); + } + + public void updateNrIconType(int phoneId, Token token, Status status, NrIconType nrIconType) { + Log.d(TAG, "Sending NrIconType"); + try { + mCallback.onNrIconType(phoneId, token, status, nrIconType); + } catch ( RemoteException e) { + e.printStackTrace(); + } + } + + private void verifyIcon(int resIcon) { + FiveGServiceState fiveGState = mFiveGServiceClient.getCurrentServiceState(mPhoneId); + int dataType = fiveGState.getIconGroup().dataType; + assertEquals(dataType, resIcon); + } + + } diff --git a/services/Android.bp b/services/Android.bp index b0a0e5e44a8c..0d7feb1ee873 100644 --- a/services/Android.bp +++ b/services/Android.bp @@ -96,6 +96,7 @@ filegroup { ":services.appwidget-sources", ":services.autofill-sources", ":services.backup-sources", + ":services.bluetooth-sources", // TODO(b/214988855) : Remove once apex/service-bluetooth jar is ready ":services.companion-sources", ":services.contentcapture-sources", ":services.contentsuggestions-sources", diff --git a/services/accessibility/java/com/android/server/accessibility/AccessibilityWindowManager.java b/services/accessibility/java/com/android/server/accessibility/AccessibilityWindowManager.java index 78f07e4f2692..801c93623f85 100644 --- a/services/accessibility/java/com/android/server/accessibility/AccessibilityWindowManager.java +++ b/services/accessibility/java/com/android/server/accessibility/AccessibilityWindowManager.java @@ -916,6 +916,8 @@ public class AccessibilityWindowManager { case WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG: case WindowManager.LayoutParams.TYPE_SYSTEM_ERROR: case WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY: + case WindowManager.LayoutParams.TYPE_SYSTEM_DRAGDROP_OVERLAY: + case WindowManager.LayoutParams.TYPE_SYSTEM_BLACKSCREEN_OVERLAY: case WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY: case WindowManager.LayoutParams.TYPE_SCREENSHOT: { return AccessibilityWindowInfo.TYPE_SYSTEM; diff --git a/services/core/Android.bp b/services/core/Android.bp index f8d19ec9903d..ad7faf3e2fcd 100644 --- a/services/core/Android.bp +++ b/services/core/Android.bp @@ -98,13 +98,16 @@ genrule { java_library_static { name: "services.core.unboosted", - defaults: ["platform_service_defaults"], + defaults: [ + "platform_service_defaults", + ], srcs: [ ":android.hardware.biometrics.face-V3-java-source", ":android.hardware.tv.hdmi.connection-V1-java-source", ":android.hardware.tv.hdmi.earc-V1-java-source", ":statslog-art-java-gen", ":statslog-contexthub-java-gen", + ":services.bluetooth-sources", // TODO(b/214988855) : Remove once apex is ready ":services.core-sources", ":services.core.protologsrc", ":dumpstate_aidl", @@ -186,6 +189,9 @@ java_library_static { "com.android.sysprop.watchdog", "ImmutabilityAnnotation", "securebox", + "vendor.qti.hardware.servicetracker-V1.0-java", + "vendor.qti.hardware.servicetracker-V1.2-java", + "vendor.qti.hardware.servicetrackeraidl-V1-java", ], javac_shard_size: 50, javacflags: [ diff --git a/services/core/java/com/android/server/ActivityTriggerService.java b/services/core/java/com/android/server/ActivityTriggerService.java new file mode 100644 index 000000000000..323ad096dc5c --- /dev/null +++ b/services/core/java/com/android/server/ActivityTriggerService.java @@ -0,0 +1,106 @@ +/* +* Copyright (c) 2019, The Linux Foundation. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials provided +* with the distribution. +* * Neither the name of The Linux Foundation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +package com.android.server; + +import android.content.pm.ApplicationInfo; +import android.util.Slog; +import android.content.Context; +import com.android.server.am.HostingRecord; +import java.lang.Runnable; +import android.os.HandlerThread; +import android.os.Handler; + +public class ActivityTriggerService extends SystemService { + private static String TAG = "ActivityTriggerService"; + public static final int PROC_ADDED_NOTIFICATION = 1; + public static final int PROC_REMOVED_NOTIFICATION = 0; + private EventHandlerThread eventHandler = new EventHandlerThread("EventHandlerThread"); + + public ActivityTriggerService(Context context) { + super(context); + } + + @Override + public void onStart() { + Slog.i(TAG, "Starting ActivityTriggerService"); + eventHandler.start(); + publishLocalService(ActivityTriggerService.class, this); + } + + /*make non-blocking call to add a new event to the handler's queue. + the event handler is the one responsible for running each event.*/ + public void updateRecord(HostingRecord hr, ApplicationInfo info, int pid, int event) { + if(hr != null) { + eventHandler.getHandler().post(new LocalRunnable(info.packageName, info.longVersionCode, info.processName, pid, event)); + } + } + + public class EventHandlerThread extends HandlerThread { + private Handler handler; + public EventHandlerThread(String name) { + super(name); //no priority specified + } + + @Override + protected void onLooperPrepared() { + //attach a handler to the thread + handler = new Handler(); + } + //get the handler that queues and runs Runnables + public Handler getHandler() { + return handler; + } + } + + static class LocalRunnable implements Runnable { + private String packageName; + private long lvCode; + private String procName; + private int pid; + private int event; + + LocalRunnable(String packageName, long lvCode, String procName, int pid, int event) { + this.packageName = packageName; + this.lvCode = lvCode; + this.procName = procName; + this.pid = pid; + this.event = event; + } + @Override + public void run() { + notifyAction_native(packageName, lvCode, procName, pid, event); + } + } + + //Native methods + static native void notifyAction_native(String pkgName, long vCode, String procName, int pid, int event); + +} + diff --git a/services/core/java/com/android/server/NetPluginDelegate.java b/services/core/java/com/android/server/NetPluginDelegate.java new file mode 100644 index 000000000000..e167937745d8 --- /dev/null +++ b/services/core/java/com/android/server/NetPluginDelegate.java @@ -0,0 +1,161 @@ +/*
+ *Copyright (c) 2018, The Linux Foundation. All rights reserved.
+ *
+ *Redistribution and use in source and binary forms, with or without
+ *modification, are permitted provided that the following conditions are
+ *met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of The Linux Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ *THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ *WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ *ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ *BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ *CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ *SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ *WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ *OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ *IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package com.android.server;
+
+import dalvik.system.PathClassLoader;
+
+import java.io.File;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+
+import android.os.Environment;
+import android.util.Slog;
+import android.util.Log;
+import android.os.Handler;
+import android.net.NetworkSpecifier;
+
+public class NetPluginDelegate {
+
+ private static final String TAG = "NetPluginDelegate";
+ private static final boolean LOGV = true;
+
+ private static Class tcpBufferRelay = null;
+ private static Object tcpBufferManagerObj = null;
+ private static boolean extJarAvail = true;
+
+ private static Class vendorPropRelay = null;
+ private static Object vendorPropManagerObj = null;
+ private static boolean vendorPropJarAvail = true;
+
+ /*
+ * Returns applicable TCP buffer size based on the network specifier.
+ */
+ public static String get5GTcpBuffers(String currentTcpBuffer, NetworkSpecifier sepcifier) {
+ String tcpBuffer = currentTcpBuffer;
+ if (LOGV) Slog.v(TAG, "get5GTcpBuffers");
+ if (!extJarAvail || !loadConnExtJar())
+ return currentTcpBuffer;
+ try {
+ Object ret = tcpBufferRelay.getMethod("get5GTcpBuffers",
+ String.class, NetworkSpecifier.class).invoke(
+ tcpBufferManagerObj, currentTcpBuffer, sepcifier);
+
+ if(ret !=null && (ret instanceof String)){
+ tcpBuffer = (String) ret;
+ }
+ } catch (InvocationTargetException | SecurityException | NoSuchMethodException e) {
+ if (LOGV) {
+ Log.w(TAG, "Failed to invoke get5GTcpBuffers()");
+ e.printStackTrace();
+ }
+ extJarAvail = false;
+ } catch (Exception e) {
+ if (LOGV) {
+ Log.w(TAG, "Error calling get5GTcpBuffers Method on extension jar");
+ e.printStackTrace();
+ }
+ extJarAvail = false;
+ }
+ return tcpBuffer;
+ }
+
+ /*
+ * Provides the api to register a handler with the lib. This is used to send
+ * EVENT_UPDATE_TCP_BUFFER_FOR_5G message to the handler queue to take action on it.
+ */
+ public static void registerHandler(Handler mHandler) {
+ if (LOGV) Slog.v(TAG, "registerHandler");
+ if (!extJarAvail || !loadConnExtJar()) return;
+ try {
+ tcpBufferRelay.getMethod("registerHandler", Handler.class).invoke(
+ tcpBufferManagerObj, mHandler);
+ } catch (InvocationTargetException | SecurityException | NoSuchMethodException e) {
+ if (LOGV) {
+ Log.w(TAG, "Failed to call registerHandler");
+ e.printStackTrace();
+ }
+ extJarAvail = false;
+ } catch (Exception e) {
+ if (LOGV) {
+ Log.w(TAG, "Error calling registerHandler Method on extension jar");
+ e.printStackTrace();
+ }
+ extJarAvail = false;
+ }
+ }
+
+ /*
+ * Dynamically loads the lib.
+ * Checks whether the required lib is avalaiblable if not disables further attempts
+ * to load it.
+ */
+ private static synchronized boolean loadConnExtJar() {
+ final String realProvider = "com.qualcomm.qti.net.connextension.TCPBufferManager";
+ final String realProviderPath = Environment.getSystemExtDirectory().getAbsolutePath()
+ + "/framework/ConnectivityExt.jar";
+
+ if (tcpBufferRelay != null && tcpBufferManagerObj != null) {
+ return true;
+ }
+
+ extJarAvail = new File(realProviderPath).exists();
+ if (!extJarAvail) {
+ Log.w(TAG, "ConnectivityExt jar file not present");
+ return false;
+ }
+
+ if (tcpBufferRelay == null && tcpBufferManagerObj == null) {
+ if (LOGV) Slog.v(TAG, "loading ConnectivityExt jar");
+ try {
+ PathClassLoader classLoader = new PathClassLoader(realProviderPath,
+ ClassLoader.getSystemClassLoader());
+
+ tcpBufferRelay = classLoader.loadClass(realProvider);
+ tcpBufferManagerObj = tcpBufferRelay.newInstance();
+ if (LOGV) Slog.v(TAG, "ConnectivityExt jar loaded");
+ } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
+ if (LOGV) {
+ Log.w(TAG, "Failed to find, instantiate or access ConnectivityExt jar ");
+ e.printStackTrace();
+ }
+ extJarAvail = false;
+ return false;
+ } catch (Exception e) {
+ if (LOGV) {
+ Log.w(TAG, "unable to load ConnectivityExt jar");
+ e.printStackTrace();
+ }
+ extJarAvail = false;
+ return false;
+ }
+ }
+ return true;
+ }
+}
diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java index 73dbb86ae7cc..465ef0e20a27 100644 --- a/services/core/java/com/android/server/StorageManagerService.java +++ b/services/core/java/com/android/server/StorageManagerService.java @@ -157,6 +157,7 @@ import com.android.server.storage.StorageSessionController; import com.android.server.storage.StorageSessionController.ExternalStorageServiceException; import com.android.server.wm.ActivityTaskManagerInternal; import com.android.server.wm.ActivityTaskManagerInternal.ScreenObserver; +import com.android.internal.widget.ILockSettings; import libcore.io.IoUtils; import libcore.util.EmptyArray; diff --git a/services/core/java/com/android/server/SystemConfig.java b/services/core/java/com/android/server/SystemConfig.java index 7fae31c0bb4b..2600c09e681e 100644 --- a/services/core/java/com/android/server/SystemConfig.java +++ b/services/core/java/com/android/server/SystemConfig.java @@ -104,6 +104,9 @@ public class SystemConfig { // property for runtime configuration differentiation in vendor private static final String VENDOR_SKU_PROPERTY = "ro.boot.product.vendor.sku"; + // property for runtime configuration differentiation based on baseband type + private static final String NO_RIL_PROPERTY = "ro.radio.noril"; + private static final ArrayMap<String, ArraySet<String>> EMPTY_PERMISSIONS = new ArrayMap<>(); @@ -602,6 +605,17 @@ public class SystemConfig { vendorPermissionFlag); } + boolean noRilSupport = SystemProperties.getBoolean(NO_RIL_PROPERTY, false); + if (noRilSupport) { + String noRilDir = "noRil"; + readPermissions(parser, Environment.buildPath( + Environment.getVendorDirectory(), "etc", "sysconfig", noRilDir), + vendorPermissionFlag); + readPermissions(parser, Environment.buildPath( + Environment.getVendorDirectory(), "etc", "permissions", noRilDir), + vendorPermissionFlag); + } + // Allow ODM to customize system configs as much as Vendor, because /odm is another // vendor partition other than /vendor. int odmPermissionFlag = vendorPermissionFlag; diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java index a641e85ad44d..6d610e367937 100644 --- a/services/core/java/com/android/server/TelephonyRegistry.java +++ b/services/core/java/com/android/server/TelephonyRegistry.java @@ -2634,6 +2634,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { } handleRemoveListLocked(); } + broadcastRadioPowerStateChanged(state, phoneId, subId); } @Override @@ -3513,6 +3514,12 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { */ public static final String ACTION_SIGNAL_STRENGTH_CHANGED = "android.intent.action.SIG_STR"; + /** + * Broadcast Action: The radio power state has changed. + */ + private static final String ACTION_RADIO_POWER_STATE_CHANGED = + "org.codeaurora.intent.action.RADIO_POWER_STATE"; + private void broadcastServiceStateChanged(ServiceState state, int phoneId, int subId) { try { mBatteryStats.notePhoneState(state.getState()); @@ -3635,6 +3642,19 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub { .setDeferralPolicy(BroadcastOptions.DEFERRAL_POLICY_UNTIL_ACTIVE); } + private void broadcastRadioPowerStateChanged(int state, int phoneId, int subId) { + Intent intent = new Intent(ACTION_RADIO_POWER_STATE_CHANGED); + intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); + // Pass the subscription along with the intent. + intent.putExtra(PHONE_CONSTANTS_SUBSCRIPTION_KEY, subId); + intent.putExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, subId); + intent.putExtra(PHONE_CONSTANTS_SLOT_KEY, phoneId); + intent.putExtra(SubscriptionManager.EXTRA_SLOT_INDEX, phoneId); + intent.putExtra(PHONE_CONSTANTS_STATE_KEY, state); + mContext.sendBroadcastAsUser(intent, UserHandle.ALL, + Manifest.permission.READ_PRIVILEGED_PHONE_STATE); + } + private void broadcastSignalStrengthChanged(SignalStrength signalStrength, int phoneId, int subId) { final long ident = Binder.clearCallingIdentity(); diff --git a/services/core/java/com/android/server/Watchdog.java b/services/core/java/com/android/server/Watchdog.java index 62651dd80cd9..a3a26d47678e 100644 --- a/services/core/java/com/android/server/Watchdog.java +++ b/services/core/java/com/android/server/Watchdog.java @@ -58,6 +58,7 @@ import com.android.internal.util.FrameworkStatsLog; import com.android.server.am.ActivityManagerService; import com.android.server.am.StackTracesDumpHelper; import com.android.server.am.TraceErrorLogger; +import com.android.server.am.trace.SmartTraceUtils; import com.android.server.criticalevents.CriticalEventLog; import com.android.server.wm.SurfaceAnimationThread; @@ -66,7 +67,9 @@ import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; +import java.io.FileReader; import java.io.IOException; +import java.io.BufferedReader; import java.io.PrintWriter; import java.io.StringWriter; import java.util.ArrayList; @@ -78,6 +81,8 @@ import java.util.Optional; import java.util.UUID; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; +import java.util.Date; +import java.text.SimpleDateFormat; /** * This class calls its monitor every minute. Killing this process if they don't return @@ -118,6 +123,7 @@ public class Watchdog implements Dumpable { "/system/bin/keystore2", "/system/bin/mediadrmserver", "/system/bin/mediaserver", + "/system/bin/mediaserver64", "/system/bin/netd", "/system/bin/sdcard", "/system/bin/surfaceflinger", @@ -196,6 +202,7 @@ public class Watchdog implements Dumpable { // We start with DEFAULT_TIMEOUT. This will then be update with the timeout values from Settings // once the settings provider is initialized. private volatile long mWatchdogTimeoutMillis = DEFAULT_TIMEOUT; + SimpleDateFormat mTraceDateFormat = new SimpleDateFormat("dd_MM_HH_mm_ss.SSS"); private final List<Integer> mInterestingJavaPids = new ArrayList<>(); private final TraceErrorLogger mTraceErrorLogger; @@ -720,7 +727,7 @@ public class Watchdog implements Dumpable { } } - static ArrayList<Integer> getInterestingNativePids() { + public static ArrayList<Integer> getInterestingNativePids() { HashSet<Integer> pids = new HashSet<>(); addInterestingAidlPids(pids); addInterestingHidlPids(pids); @@ -737,7 +744,6 @@ public class Watchdog implements Dumpable { private void run() { boolean waitedHalf = false; - while (true) { List<HandlerChecker> blockedCheckers = Collections.emptyList(); String subject = ""; @@ -821,11 +827,17 @@ public class Watchdog implements Dumpable { // // Then, if we reached the full timeout, kill this process so that the system will // restart. If we reached half of the timeout, just log some information and continue. + long dueTime = 0; + if(SmartTraceUtils.isPerfettoDumpEnabled()){ + SmartTraceUtils.traceStart(); + //delay 30s to make sure perfetto trace dumped completely + dueTime = SystemClock.uptimeMillis() + 30000; + } logWatchog(doWaitedHalfDump, subject, pids); - if (doWaitedHalfDump) { // We have waited for only half of the timeout, we continue to wait for the duration // of the full timeout before killing the process. + continue; } @@ -862,6 +874,13 @@ public class Watchdog implements Dumpable { Slog.w(TAG, "*** WATCHDOG KILLING SYSTEM PROCESS: " + subject); WatchdogDiagnostics.diagnoseCheckers(blockedCheckers); Slog.w(TAG, "*** GOODBYE!"); + if(SmartTraceUtils.isPerfettoDumpEnabled() && dueTime > SystemClock.uptimeMillis()){ + long timeDelta = dueTime - SystemClock.uptimeMillis(); + // wait until perfetto log to be dumped completely + Slog.i(TAG,"Sleep "+ timeDelta + +" ms to make sure perfetto log to be dumped completely"); + SystemClock.sleep(timeDelta); + } if (!Build.IS_USER && isCrashLoopFound() && !WatchdogProperties.should_ignore_fatal_count().orElse(false)) { breakCrashLoop(); @@ -875,6 +894,8 @@ public class Watchdog implements Dumpable { } private void logWatchog(boolean halfWatchdog, String subject, ArrayList<Integer> pids) { + File initialStack = null; + ArrayList<Integer> nativePids = getInterestingNativePids(); // Get critical event log before logging the half watchdog so that it doesn't // occur in the log. String criticalEvents = @@ -890,6 +911,15 @@ public class Watchdog implements Dumpable { if (halfWatchdog) { dropboxTag = "pre_watchdog"; CriticalEventLog.getInstance().logHalfWatchdog(subject); + // We've waited half the deadlock-detection interval. Pull a stack + // trace and wait another half. + initialStack = StackTracesDumpHelper.dumpStackTraces(pids, null, null, + CompletableFuture.completedFuture(nativePids), null, subject, + criticalEvents, Runnable::run,/* latencyTracker= */null); + if (initialStack != null){ + SmartTraceUtils.dumpStackTraces(Process.myPid(), pids, + nativePids, initialStack); + } FrameworkStatsLog.write(FrameworkStatsLog.SYSTEM_SERVER_PRE_WATCHDOG_OCCURRED); } else { dropboxTag = "watchdog"; @@ -906,17 +936,72 @@ public class Watchdog implements Dumpable { report.append(ResourcePressureUtil.currentPsiState()); ProcessCpuTracker processCpuTracker = new ProcessCpuTracker(false); StringWriter tracesFileException = new StringWriter(); - final File stack = StackTracesDumpHelper.dumpStackTraces( + final File finalStack = StackTracesDumpHelper.dumpStackTraces( pids, processCpuTracker, new SparseBooleanArray(), CompletableFuture.completedFuture(getInterestingNativePids()), tracesFileException, subject, criticalEvents, Runnable::run, /* latencyTracker= */null); + if (finalStack != null){ + SmartTraceUtils.dumpStackTraces(Process.myPid(), pids, nativePids, finalStack); + } + //Collect Binder State logs to get status of all the transactions + if (Build.IS_DEBUGGABLE) { + binderStateRead(); + } + // Give some extra time to make sure the stack traces get written. // The system's been hanging for a whlie, another second or two won't hurt much. SystemClock.sleep(5000); processCpuTracker.update(); report.append(processCpuTracker.printCurrentState(anrTime)); report.append(tracesFileException.getBuffer()); + File watchdogTraces; + String newTracesPath = "traces_SystemServer_WDT" + + mTraceDateFormat.format(new Date()) + "_pid" + + String.valueOf(Process.myPid()); + File tracesDir = new File(StackTracesDumpHelper.ANR_TRACE_DIR); + watchdogTraces = new File(tracesDir, newTracesPath); + try { + if (watchdogTraces.createNewFile()) { + FileUtils.setPermissions(watchdogTraces.getAbsolutePath(), + 0600, -1, -1); // -rw------- permissions + + // Append both traces from the first and second half + // to a new file, making it easier to debug Watchdog timeouts + // dumpStackTraces() can return a null instance, so check the same + if (initialStack != null) { + // check the last-modified time of this file. + // we are interested in this only it was written to in the + // last 5 minutes or so + final long age = System.currentTimeMillis() + - initialStack.lastModified(); + final long FIVE_MINUTES_IN_MILLIS = 1000 * 60 * 5; + if (age < FIVE_MINUTES_IN_MILLIS) { + Slog.e(TAG, "First set of traces taken from " + + initialStack.getAbsolutePath()); + appendFile(watchdogTraces, initialStack); + } else { + Slog.e(TAG, "First set of traces were collected more than " + + "5 minutes ago, ignoring ..."); + } + } else { + Slog.e(TAG, "First set of traces are empty!"); + } + if (finalStack != null) { + Slog.e(TAG, "Second set of traces taken from " + + finalStack.getAbsolutePath()); + appendFile(watchdogTraces, finalStack); + } else { + Slog.e(TAG, "Second set of traces are empty!"); + } + } else { + Slog.w(TAG, "Unable to create Watchdog dump file: createNewFile failed"); + } + } catch (Exception e) { + // catch any exception that happens here; + // why kill the system when it is going to die anyways? + Slog.e(TAG, "Exception creating Watchdog dump file:", e); + } if (!halfWatchdog) { // Trigger the kernel to dump all blocked threads, and backtraces on all CPUs to the // kernel log @@ -934,7 +1019,7 @@ public class Watchdog implements Dumpable { if (mActivity != null) { mActivity.addErrorToDropBox( dropboxTag, null, "system_server", null, null, null, - null, report.toString(), stack, null, null, null, + null, report.toString(), finalStack, null, null, null, errorId); } } @@ -943,6 +1028,23 @@ public class Watchdog implements Dumpable { try { dropboxThread.join(2000); // wait up to 2 seconds for it to return. } catch (InterruptedException ignored) { } + // At times, when user space watchdog traces don't give an indication on + // which component held a lock, because of which other threads are blocked, + // (thereby causing Watchdog), trigger kernel panic + boolean crashOnWatchdog = SystemProperties + .getBoolean("persist.sys.crashOnWatchdog", false); + if (crashOnWatchdog) { + // Trigger the kernel to dump all blocked threads, and backtraces + // on all CPUs to the kernel log + Slog.e(TAG, "Triggering SysRq for system_server watchdog,s"); + doSysRq('w'); + doSysRq('l'); + + // wait until the above blocked threads be dumped into kernel log + SystemClock.sleep(3000); + + doSysRq('c'); + } } private void doSysRq(char c) { @@ -1063,4 +1165,59 @@ public class Watchdog implements Dumpable { pw.print("WatchdogTimeoutMillis="); pw.println(mWatchdogTimeoutMillis); } + + private void appendFile (File writeTo, File copyFrom) { + try { + BufferedReader in = new BufferedReader(new FileReader(copyFrom)); + FileWriter out = new FileWriter(writeTo, true); + String line = null; + + // Write line-by-line from "copyFrom" to "writeTo" + while ((line = in.readLine()) != null) { + out.write(line); + out.write('\n'); + } + in.close(); + out.close(); + } catch (IOException e) { + Slog.e(TAG, "Exception while writing watchdog traces to new file!"); + e.printStackTrace(); + } + } + + private void binderStateRead() { + try { + boolean binderfsNodePresent = false; + BufferedReader in = null; + Slog.i(TAG,"Collecting Binder Transaction Status Information"); + try { + in = new BufferedReader(new FileReader("/dev/binderfs/binder_logs/state")); + Slog.i(TAG, "Collecting Binder state file from binderfs"); + binderfsNodePresent = true; + } catch(IOException e) { + Slog.i(TAG, "Binderfs node not found, Trying to collect it from debugfs", e); + } + try { + if (binderfsNodePresent == false) { + in = new BufferedReader(new FileReader("/sys/kernel/debug/binder/state")); + Slog.i(TAG, "Collecting Binder state file from debugfs"); + } + } catch(IOException e) { + Slog.i(TAG, "Debugfs node not found", e); + } + FileWriter out = new FileWriter("/data/anr/BinderTraces_pid" + + String.valueOf(Process.myPid()) + ".txt"); + String line = null; + + // Write line-by-line + while ((line = in.readLine()) != null) { + out.write(line); + out.write('\n'); + } + in.close(); + out.close(); + } catch (IOException e) { + Slog.w(TAG, "Failed to collect state file", e); + } + } } diff --git a/services/core/java/com/android/server/WiredAccessoryManager.java b/services/core/java/com/android/server/WiredAccessoryManager.java index b271d7ece733..5c76da59e96d 100644 --- a/services/core/java/com/android/server/WiredAccessoryManager.java +++ b/services/core/java/com/android/server/WiredAccessoryManager.java @@ -70,8 +70,22 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { private static final String NAME_H2W = "h2w"; private static final String NAME_USB_AUDIO = "usb_audio"; private static final String NAME_HDMI_AUDIO = "hdmi_audio"; - private static final String NAME_HDMI = "hdmi"; + private static final String NAME_DP_AUDIO = "soc:qcom,msm-ext-disp"; + // within a device, a single stream supports DP + private static final String[] DP_AUDIO_CONNS = { + NAME_DP_AUDIO + "/3/1", + NAME_DP_AUDIO + "/2/1", + NAME_DP_AUDIO + "/1/1", + NAME_DP_AUDIO + "/0/1", + NAME_DP_AUDIO + "/3/0", + NAME_DP_AUDIO + "/2/0", + NAME_DP_AUDIO + "/1/0", + NAME_DP_AUDIO + "/0/0" + }; + private static final String NAME_HDMI = "hdmi"; + private static final String INTF_DP = "DP"; + private static final String INTF_HDMI = "HDMI"; private static final int MSG_NEW_DEVICE_STATE = 1; private static final int MSG_SYSTEM_READY = 2; @@ -81,7 +95,8 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { private final AudioManager mAudioManager; private int mHeadsetState; - + private int mDpCount; + private String mDetectedIntf = INTF_DP; private int mSwitchValues; private final WiredAccessoryObserver mObserver; @@ -123,7 +138,7 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { } - if (ExtconUEventObserver.extconExists()) { + if (ExtconUEventObserver.extconExists() && mExtconObserver.uEventCount() > 0 && false) { if (mUseDevInputEventForAudioJack) { Log.w(TAG, "Both input event and extcon are used for audio jack," + " please just choose one."); @@ -172,7 +187,7 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { break; } - updateLocked(NAME_H2W, + updateLocked(NAME_H2W, "", (mHeadsetState & ~(BIT_HEADSET | BIT_HEADSET_NO_MIC | BIT_LINEOUT)) | headset); } } @@ -193,25 +208,33 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { * results in support for the last one plugged in. Similarly, unplugging either is seen as * unplugging all. * + * For Display port allow upto two connections. + * Block display port request if HDMI already connected and vice versa. + * * @param newName One of the NAME_xxx variables defined above. * @param newState 0 or one of the BIT_xxx variables defined above. */ - private void updateLocked(String newName, int newState) { + private void updateLocked(String newName, String address, int newState) { // Retain only relevant bits int headsetState = newState & SUPPORTED_HEADSETS; + int newDpState = newState & BIT_HDMI_AUDIO; int usb_headset_anlg = headsetState & BIT_USB_HEADSET_ANLG; int usb_headset_dgtl = headsetState & BIT_USB_HEADSET_DGTL; int h2w_headset = headsetState & (BIT_HEADSET | BIT_HEADSET_NO_MIC | BIT_LINEOUT); boolean h2wStateChange = true; boolean usbStateChange = true; + boolean dpBitState = (mHeadsetState & BIT_HDMI_AUDIO) > 0 ? true: false; + boolean dpCountState = (mDpCount == 0) ? false: true; + if (LOG) { Slog.v(TAG, "newName=" + newName + " newState=" + newState + " headsetState=" + headsetState - + " prev headsetState=" + mHeadsetState); + + " prev headsetState=" + mHeadsetState + + " num of active dp conns= " + mDpCount); } - if (mHeadsetState == headsetState) { + if (mHeadsetState == headsetState && !newName.startsWith(NAME_DP_AUDIO)) { Log.e(TAG, "No state change."); return; } @@ -234,11 +257,45 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { return; } + if (newName.startsWith(NAME_DP_AUDIO)) { + if ((newDpState > 0) && (mDpCount < DP_AUDIO_CONNS.length) + && (dpBitState == dpCountState)) { + // Allow DP0 if no HDMI previously connected. + // Allow second request only if DP connected previously. + mDpCount++; + } else if ((newDpState == 0) && (mDpCount > 0)){ + mDpCount--; + } else { + Log.e(TAG, "No state change for DP."); + return; + } + } + mWakeLock.acquire(); Log.i(TAG, "MSG_NEW_DEVICE_STATE"); - Message msg = mHandler.obtainMessage(MSG_NEW_DEVICE_STATE, headsetState, - mHeadsetState, ""); + + Message msg; + // send a combined name, address string separated by | + if (newName.startsWith(NAME_DP_AUDIO)) { + int pseudoHeadsetState = mHeadsetState; + if (dpBitState && (newDpState != 0)) { + // One DP already connected, so allow request to connect second. + pseudoHeadsetState = mHeadsetState & (~BIT_HDMI_AUDIO); + } + msg = mHandler.obtainMessage(MSG_NEW_DEVICE_STATE, headsetState, + pseudoHeadsetState, + NAME_DP_AUDIO+"/"+address); + + if ((headsetState == 0) && (mDpCount != 0)) { + // Atleast one DP is connected, so keep mHeadsetState's DP bit set. + headsetState = headsetState | BIT_HDMI_AUDIO; + } + } else { + msg = mHandler.obtainMessage(MSG_NEW_DEVICE_STATE, headsetState, + mHeadsetState, + newName+"/"+address); + } mHandler.sendMessage(msg); mHeadsetState = headsetState; @@ -261,12 +318,13 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { }; private void setDevicesState( - int headsetState, int prevHeadsetState, String headsetName) { + int headsetState, int prevHeadsetState, String headsetNameAddr) { synchronized (mLock) { int allHeadsets = SUPPORTED_HEADSETS; for (int curHeadset = 1; allHeadsets != 0; curHeadset <<= 1) { if ((curHeadset & allHeadsets) != 0) { - setDeviceStateLocked(curHeadset, headsetState, prevHeadsetState, headsetName); + setDeviceStateLocked(curHeadset, headsetState, prevHeadsetState, + headsetNameAddr); allHeadsets &= ~curHeadset; } } @@ -274,7 +332,7 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { } private void setDeviceStateLocked(int headset, - int headsetState, int prevHeadsetState, String headsetName) { + int headsetState, int prevHeadsetState, String headsetNameAddr) { if ((headsetState & headset) != (prevHeadsetState & headset)) { int outDevice = 0; int inDevice = 0; @@ -305,15 +363,23 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { } if (LOG) { - Slog.v(TAG, "headsetName: " + headsetName + - (state == 1 ? " connected" : " disconnected")); + Slog.v(TAG, "headset: " + headsetNameAddr + + (state == 1 ? " connected" : " disconnected")); } + String[] hs = headsetNameAddr.split("/"); if (outDevice != 0) { - mAudioManager.setWiredDeviceConnectionState(outDevice, state, "", headsetName); + if (LOG) { + Slog.v(TAG, "Output device address " + (hs.length > 1 ? hs[1] : "") + + " name " + hs[0]); + } + mAudioManager.setWiredDeviceConnectionState(outDevice, state, + (hs.length > 1 ? hs[1] : ""), hs[0]); } if (inDevice != 0) { - mAudioManager.setWiredDeviceConnectionState(inDevice, state, "", headsetName); + + mAudioManager.setWiredDeviceConnectionState(inDevice, state, + (hs.length > 1 ? hs[1] : ""), hs[0]); } } } @@ -333,6 +399,7 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { class WiredAccessoryObserver extends UEventObserver { private final List<UEventInfo> mUEventInfo; + private List<String> mDevPath = new ArrayList<String>(); public WiredAccessoryObserver() { mUEventInfo = makeObservedUEventList(); @@ -342,17 +409,21 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { synchronized (mLock) { if (LOG) Slog.v(TAG, "init()"); char[] buffer = new char[1024]; - for (int i = 0; i < mUEventInfo.size(); ++i) { UEventInfo uei = mUEventInfo.get(i); try { int curState; - FileReader file = new FileReader(uei.getSwitchStatePath()); + String switchStatePath = uei.getSwitchStatePath(); + FileReader file = new FileReader(switchStatePath); int len = file.read(buffer, 0, 1024); file.close(); curState = Integer.parseInt((new String(buffer, 0, len)).trim()); if (curState > 0) { + int index = switchStatePath.lastIndexOf("."); + if(switchStatePath.substring(index + 1, index + 2).equals("1")) { + mDetectedIntf = INTF_HDMI; + } updateStateLocked(uei.getDevPath(), uei.getDevName(), curState); } } catch (FileNotFoundException e) { @@ -370,7 +441,13 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { // observe three UEVENTs for (int i = 0; i < mUEventInfo.size(); ++i) { UEventInfo uei = mUEventInfo.get(i); + String devPath = uei.getDevPath(); + + if (mDevPath.contains(devPath)) + continue; + startObserving("DEVPATH=" + uei.getDevPath()); + mDevPath.add(devPath); } } @@ -416,30 +493,119 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { } } + for (String conn : DP_AUDIO_CONNS) { + // Monitor DisplayPort + if (LOG) { + Slog.v(TAG, "Monitor DP conn " + conn); + } + uei = new UEventInfo(conn, BIT_HDMI_AUDIO, 0, 0); + if (uei.checkSwitchExists()) { + retVal.add(uei); + } else { + Slog.w(TAG, "Conn " + conn + " does not have DP audio support"); + } + } return retVal; } @Override public void onUEvent(UEventObserver.UEvent event) { - if (LOG) Slog.v(TAG, "Headset UEVENT: " + event.toString()); + String devPath = event.get("DEVPATH"); + String name = event.get("NAME"); + int state = 0; + + if (name == null) + name = event.get("SWITCH_NAME"); try { - String devPath = event.get("DEVPATH"); - String name = event.get("SWITCH_NAME"); - int state = Integer.parseInt(event.get("SWITCH_STATE")); - synchronized (mLock) { - updateStateLocked(devPath, name, state); + if (name.startsWith(NAME_DP_AUDIO)) { + String state_str = event.get("STATE"); + int offset = 0; + int length = state_str.length(); + + //parse DP=1\nHDMI=1\0 + while (offset < length) { + int equals = state_str.indexOf('=', offset); + + if (equals > offset) { + String intf_name = state_str.substring(offset, + equals); + + if (intf_name.equals("DP") || intf_name.equals("HDMI")) { + state = Integer.parseInt( + state_str.substring(equals + 1, + equals + 2)); + if (state == 1) { + mDetectedIntf = intf_name; + break; + } + } + } + + offset = equals + 3; + } + } else { + state = Integer.parseInt(event.get("SWITCH_STATE")); } } catch (NumberFormatException e) { - Slog.e(TAG, "Could not parse switch state from event " + event); + Slog.i(TAG, "couldn't get state from event, checking node"); + + for (int i = 0; i < mUEventInfo.size(); ++i) { + UEventInfo uei = mUEventInfo.get(i); + + if (name.equals(uei.getDevName())) { + char[] buffer = new char[1024]; + int len = 0; + + try { + FileReader file = new FileReader( + uei.getSwitchStatePath()); + len = file.read(buffer, 0, 1024); + file.close(); + } catch (FileNotFoundException e1) { + Slog.e(TAG, "file not found"); + break; + } catch (Exception e11) { + Slog.e(TAG, "" , e11); + } + + try { + state = Integer.parseInt( + (new String(buffer, 0, len)).trim()); + } catch (NumberFormatException e2) { + Slog.e(TAG, "could not convert to number"); + break; + } + break; + } + } + } + + synchronized (mLock) { + updateStateLocked(devPath, name, state); } } private void updateStateLocked(String devPath, String name, int state) { for (int i = 0; i < mUEventInfo.size(); ++i) { UEventInfo uei = mUEventInfo.get(i); + if (LOG) { + Slog.v(TAG, "uei.getDevPath=" + uei.getDevPath()); + Slog.v(TAG, "uevent.getDevPath=" + devPath); + } + if (devPath.equals(uei.getDevPath())) { - updateLocked(name, uei.computeNewHeadsetState(mHeadsetState, state)); + if (state == 1 && mDpCount > 0) { + uei.setStreamIndex(mDpCount); + } + + if (state == 1) { + int newControllerIdx = (mDetectedIntf.equals(INTF_DP)) ? 0 : 1; + uei.setCableIndex(newControllerIdx); + } + updateLocked(name, uei.getDevAddress(), + uei.computeNewHeadsetState(mHeadsetState, + state)); return; } } @@ -447,27 +613,162 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { private final class UEventInfo { private final String mDevName; + private String mDevAddress; private final int mState1Bits; private final int mState2Bits; private final int mStateNbits; + private int mDevIndex; + private int mCableIndex; - public UEventInfo(String devName, int state1Bits, int state2Bits, int stateNbits) { + public UEventInfo(String devName, int state1Bits, + int state2Bits, int stateNbits) { mDevName = devName; + mDevAddress = "controller=0;stream=0"; mState1Bits = state1Bits; mState2Bits = state2Bits; mStateNbits = stateNbits; + mDevIndex = -1; + mCableIndex = -1; + + if (mDevName.startsWith(NAME_DP_AUDIO)) { + int idx = mDevName.indexOf("/"); + if (idx != -1) { + int idx2 = mDevName.indexOf("/", idx+1); + assert(idx2 != -1); + int dev = Integer.parseInt(mDevName.substring(idx+1, idx2)); + int cable = Integer.parseInt(mDevName.substring(idx2+1)); + if (LOG) { + Slog.v(TAG, "UEvent dev address " + mDevAddress); + } + checkDevIndex(dev); + checkCableIndex(cable); + } + } + } + + private void checkDevIndex(int dev_index) { + int index = 0; + char[] buffer = new char[1024]; + while (true) { + String devPath = String.format(Locale.US, + "/sys/devices/platform/soc/%s/extcon/extcon%d/name", + NAME_DP_AUDIO, dev_index); + if (LOG) { + Slog.v(TAG, "checkDevIndex " + devPath); + } + File f = new File(devPath); + if (!f.exists()) { + Slog.e(TAG, "file " + devPath + " not found"); + break; + } + try { + FileReader file = new FileReader(f); + int len = file.read(buffer, 0, 1024); + file.close(); + + String devName = (new String(buffer, 0, len)).trim(); + if (devName.startsWith(NAME_DP_AUDIO) && index == dev_index) { + Slog.e(TAG, "set dev_index " + dev_index); + mDevIndex = dev_index; + break; + } else { + index++; + } + } catch (Exception e) { + Slog.e(TAG, "checkDevIndex exception " , e); + break; + } + } + } + + private void checkCableIndex(int cable_index) { + if (mDevIndex == -1) { + return; + } + int index = 0; + char[] buffer = new char[1024]; + while (true) + { + String cablePath = String.format(Locale.US, + "/sys/devices/platform/soc/%s/extcon/extcon%d/cable.%d/name", + NAME_DP_AUDIO, mDevIndex, index); + if (LOG) { + Slog.v(TAG, "checkCableIndex " + cablePath); + } + File f = new File(cablePath); + if (!f.exists()) { + Slog.e(TAG, "file " + cablePath + " not found"); + break; + } + try { + FileReader file = new FileReader(f); + int len = file.read(buffer, 0, 1024); + file.close(); + + String cableName = (new String(buffer, 0, len)).trim(); + if (cableName.equals("HDMI") && index == cable_index) { + mCableIndex = index; + Slog.w(TAG, "checkCableIndex set cable " + cable_index); + break; + } else if (cableName.equals("DP") && index == cable_index) { + mCableIndex = index; + Slog.w(TAG, "checkCableIndex set cable " + cable_index); + break; + } else { + Slog.w(TAG, "checkCableIndex no name match, skip "); + index++; + } + } catch (Exception e) { + Slog.e(TAG, "checkCableIndex exception", e); + break; + } + } + } + + public void setStreamIndex(int streamIndex) { + int index1 = mDevAddress.indexOf("="); + int index2 = mDevAddress.indexOf("=", index1 + 1); + + String allExceptStreamIdx = mDevAddress.substring(0, index2 + 1); + mDevAddress = allExceptStreamIdx + String.valueOf(streamIndex); + } + + public void setCableIndex(int cableIndex) { + int index = mDevAddress.indexOf("="); + String changeControllerIdx = mDevAddress.substring(0, index + 1) + cableIndex + + mDevAddress.substring(index + 2); + mDevAddress = changeControllerIdx; } public String getDevName() { return mDevName; } + public String getDevAddress() { return mDevAddress; } + public String getDevPath() { - return String.format(Locale.US, "/devices/virtual/switch/%s", mDevName); + if (mDevName.startsWith(NAME_DP_AUDIO)) { + return String.format(Locale.US, + "/devices/platform/soc/%s/extcon/extcon%d", + NAME_DP_AUDIO, + mDevIndex); + } else { + return String.format(Locale.US, + "/devices/virtual/switch/%s", + mDevName); + } } public String getSwitchStatePath() { - return String.format(Locale.US, "/sys/class/switch/%s/state", mDevName); + if (mDevName.startsWith(NAME_DP_AUDIO)) { + return String.format(Locale.US, + "/sys/devices/platform/soc/%s/extcon/extcon%d/cable.%d/state", + NAME_DP_AUDIO, mDevIndex, mCableIndex); + } else { + return String.format(Locale.US, + "/sys/class/switch/%s/state", + mDevName); + } } public boolean checkSwitchExists() { @@ -522,6 +823,10 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { } + public int uEventCount() { + return mExtconInfos.size(); + } + @Override public Pair<Integer, Integer> parseState(ExtconInfo extconInfo, String status) { if (LOG) Slog.v(TAG, "status " + status); @@ -550,7 +855,7 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks { synchronized (mLock) { int mask = maskAndState.first; int state = maskAndState.second; - updateLocked(name, mHeadsetState & ~(mask & ~state) | (mask & state)); + updateLocked(name, "", mHeadsetState & ~(mask & ~state) | (mask & state)); return; } } diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java index b45bcb405557..6af252edee91 100644 --- a/services/core/java/com/android/server/accounts/AccountManagerService.java +++ b/services/core/java/com/android/server/accounts/AccountManagerService.java @@ -1517,6 +1517,7 @@ public class AccountManagerService @Override public String getPassword(Account account) { + android.util.SeempLog.record(14); int callingUid = Binder.getCallingUid(); if (Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, "getPassword: " + account @@ -1597,6 +1598,7 @@ public class AccountManagerService @Override public String getUserData(Account account, String key) { + android.util.SeempLog.record(15); final int callingUid = Binder.getCallingUid(); if (Log.isLoggable(TAG, Log.VERBOSE)) { String msg = String.format("getUserData( account: %s, key: %s, callerUid: %s, pid: %s", @@ -2702,6 +2704,7 @@ public class AccountManagerService @Override public void setPassword(Account account, String password) { + android.util.SeempLog.record(18); final int callingUid = Binder.getCallingUid(); if (Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, "setAuthToken: " + account @@ -2770,6 +2773,7 @@ public class AccountManagerService @Override public void clearPassword(Account account) { + android.util.SeempLog.record(19); final int callingUid = Binder.getCallingUid(); if (Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, "clearPassword: " + account @@ -2796,6 +2800,7 @@ public class AccountManagerService @Override public void setUserData(Account account, String key, String value) { + android.util.SeempLog.record(20); final int callingUid = Binder.getCallingUid(); if (Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, "setUserData: " + account @@ -3306,6 +3311,7 @@ public class AccountManagerService public void addAccount(final IAccountManagerResponse response, final String accountType, final String authTokenType, final String[] requiredFeatures, final boolean expectActivityLaunch, final Bundle optionsIn) { + android.util.SeempLog.record(16); Bundle.setDefusable(optionsIn, true); if (Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, "addAccount: accountType " + accountType @@ -4061,6 +4067,7 @@ public class AccountManagerService @Override public void editProperties(IAccountManagerResponse response, final String accountType, final boolean expectActivityLaunch) { + android.util.SeempLog.record(21); final int callingUid = Binder.getCallingUid(); if (Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, "editProperties: accountType " + accountType diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index a7107161777c..6908a84c5841 100644 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -205,6 +205,7 @@ import android.stats.devicepolicy.DevicePolicyEnums; import android.text.TextUtils; import android.util.ArrayMap; import android.util.ArraySet; +import android.util.BoostFramework; import android.util.EventLog; import android.util.Pair; import android.util.PrintWriterPrinter; @@ -235,6 +236,7 @@ import com.android.server.am.LowMemDetector.MemFactor; import com.android.server.am.ServiceRecord.ShortFgsInfo; import com.android.server.pm.KnownPackages; import com.android.server.uri.NeededUriGrants; +import com.android.server.wm.ActivityRecord; import com.android.server.wm.ActivityServiceConnectionsHolder; import java.io.FileDescriptor; @@ -253,6 +255,10 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Predicate; +import vendor.qti.hardware.servicetracker.V1_0.IServicetracker; +import vendor.qti.hardware.servicetracker.V1_0.ServiceData; +import vendor.qti.hardware.servicetracker.V1_0.ClientData; + public final class ActiveServices { private static final String TAG = TAG_WITH_CLASS_NAME ? "ActiveServices" : TAG_AM; private static final String TAG_MU = TAG + POSTFIX_MU; @@ -266,6 +272,10 @@ public final class ActiveServices { private static final boolean LOG_SERVICE_START_STOP = DEBUG_SERVICE; + private static final String AIDL_SERVICE = + "vendor.qti.hardware.servicetrackeraidl.IServicetracker/default"; + + private static boolean mIsAIDLSupported = true; // Foreground service types that always get immediate notification display, // expressed in the same bitmask format that ServiceRecord.foregroundServiceType // uses. @@ -304,6 +314,12 @@ public final class ActiveServices { // at the same time. final int mMaxStartingBackground; + //mPerf Object + public static BoostFramework mPerf = new BoostFramework(); + + // Flag to reschedule the services during app launch. Disable by default. + private static boolean SERVICE_RESCHEDULE = false; + /** * Master service bookkeeping, keyed by user number. */ @@ -399,6 +415,12 @@ public final class ActiveServices { /** Amount of time to allow a last ANR message to exist before freeing the memory. */ static final int LAST_ANR_LIFETIME_DURATION_MSECS = 2 * 60 * 60 * 1000; // Two hours + private vendor.qti.hardware.servicetracker.V1_0.IServicetracker mServicetracker; + private vendor.qti.hardware.servicetrackeraidl.IServicetracker mServicetracker_aidl; + + private final boolean isLowRamDevice = + SystemProperties.getBoolean("ro.config.low_ram", false); + String mLastAnrDump; AppWidgetManagerInternal mAppWidgetManagerInternal; @@ -656,7 +678,20 @@ public final class ActiveServices { ? maxBg : ActivityManager.isLowRamDeviceStatic() ? 1 : 8; final IBinder b = ServiceManager.getService(Context.PLATFORM_COMPAT_SERVICE); + + if(mPerf != null) + SERVICE_RESCHEDULE = Boolean.parseBoolean(mPerf.perfGetProp("ro.vendor.qti.am.reschedule_service", "false")); + this.mFGSLogger = new ForegroundServiceTypeLoggerModule(); + try { + if (ServiceManager.isDeclared(AIDL_SERVICE)){ + if (DEBUG_SERVICE) Slog.w(TAG, "AIDL is supported"); + mIsAIDLSupported = true; + } + } catch (Exception e) { + if (DEBUG_SERVICE) Slog.w(TAG, "AIDL not Supported"); + mIsAIDLSupported = false; + } } void systemServicesReady() { @@ -687,6 +722,47 @@ public final class ActiveServices { } } + private boolean getServicetrackerInstance() { + if (mServicetracker == null ) { + try { + mServicetracker = IServicetracker.getService(false); + } catch (java.util.NoSuchElementException e) { + // Service doesn't exist or cannot be opened logged below + } catch (RemoteException e) { + if (DEBUG_SERVICE) Slog.e(TAG, "Failed to get servicetracker interface", e); + return false; + } + if (mServicetracker == null) { + if (DEBUG_SERVICE) Slog.w(TAG, "servicetracker HIDL not available"); + return false; + } + } + return true; + } + + private boolean getAIDLServicetrackerInstance() { + + if (!mIsAIDLSupported) return false; + + if (mServicetracker_aidl == null ) { + try { + IBinder mBinder = ServiceManager.getService(AIDL_SERVICE); + mServicetracker_aidl = + vendor.qti.hardware.servicetrackeraidl.IServicetracker.Stub.asInterface(mBinder); + } catch (java.util.NoSuchElementException e) { + // Service doesn't exist or cannot be opened logged below + } catch (Exception e) { + if (DEBUG_SERVICE) Slog.e(TAG, "Failed to get servicetracker AIDL interface", e); + return false; + } + if (mServicetracker_aidl == null) { + if (DEBUG_SERVICE) Slog.w(TAG, "servicetracker AIDL not available"); + return false; + } + } + return true; + } + ServiceRecord getServiceByNameLocked(ComponentName name, int callingUser) { // TODO: Deal with global services if (DEBUG_MU) @@ -3506,6 +3582,80 @@ public final class ActiveServices { return false; } + private void getServiceTrackerAidlData(vendor.qti.hardware.servicetrackeraidl.ServiceData sData, + vendor.qti.hardware.servicetrackeraidl.ClientData cData, ServiceRecord r, + ConnectionRecord connrec, ProcessRecord callerApp, boolean unbind) { + if (unbind){ + sData.packageName = connrec.binding.service.packageName; + sData.processName = connrec.binding.service.shortInstanceName; + sData.lastActivity = connrec.binding.service.lastActivity; + if (connrec.binding.service.app != null) { + sData.pid = connrec.binding.service.app.getPid(); + sData.serviceB = connrec.binding.service.app.mState.isServiceB(); + } else { + sData.pid = -1; + sData.serviceB = false; + } + if (cData != null) { + cData.processName = connrec.binding.client.processName; + cData.pid = connrec.binding.client.getPid(); + } + return; + } + + sData.packageName = r.packageName; + sData.processName = r.shortInstanceName; + sData.lastActivity = r.lastActivity; + if (r.app != null) { + sData.pid = r.app.getPid(); + sData.serviceB = r.app.mState.isServiceB(); + } else { + sData.pid = -1; + sData.serviceB = false; + } + if (cData != null) { + cData.processName = callerApp.processName; + cData.pid = callerApp.getPid(); + } + } + + private void getServiceTrackerHidlData(vendor.qti.hardware.servicetracker.V1_0.ServiceData sData, + vendor.qti.hardware.servicetracker.V1_0.ClientData cData, + ServiceRecord r, ConnectionRecord connrec, ProcessRecord callerApp, boolean unbind) { + if (unbind) { + sData.packageName = connrec.binding.service.packageName; + sData.processName = connrec.binding.service.shortInstanceName; + sData.lastActivity = connrec.binding.service.lastActivity; + if (connrec.binding.service.app != null) { + sData.pid = connrec.binding.service.app.getPid(); + sData.serviceB = connrec.binding.service.app.mState.isServiceB(); + } else { + sData.pid = -1; + sData.serviceB = false; + } + if (cData != null) { + cData.processName = connrec.binding.client.processName; + cData.pid = connrec.binding.client.getPid(); + } + return; + } + + sData.packageName = r.packageName; + sData.processName = r.shortInstanceName; + sData.lastActivity = r.lastActivity; + if (r.app != null) { + sData.pid = r.app.getPid(); + sData.serviceB = r.app.mState.isServiceB(); + } else { + sData.pid = -1; + sData.serviceB = false; + } + if (cData != null) { + cData.processName = callerApp.processName; + cData.pid = callerApp.getPid(); + } + } + int bindServiceLocked(IApplicationThread caller, IBinder token, Intent service, String resolvedType, final IServiceConnection connection, long flags, String instanceName, boolean isSdkSandboxService, int sdkSandboxClientAppUid, @@ -3731,6 +3881,30 @@ public final class ActiveServices { } clist.add(c); + if (!isLowRamDevice) { + try { + if (getAIDLServicetrackerInstance()) { + vendor.qti.hardware.servicetrackeraidl.ServiceData sData = + new vendor.qti.hardware.servicetrackeraidl.ServiceData(); + vendor.qti.hardware.servicetrackeraidl.ClientData cData = + new vendor.qti.hardware.servicetrackeraidl.ClientData(); + getServiceTrackerAidlData(sData, cData, s, null, callerApp, false); + mServicetracker_aidl.bindService(sData, cData); + } else if (getServicetrackerInstance()) { + vendor.qti.hardware.servicetracker.V1_0.ServiceData sData = + new vendor.qti.hardware.servicetracker.V1_0.ServiceData(); + vendor.qti.hardware.servicetracker.V1_0.ClientData cData = + new vendor.qti.hardware.servicetracker.V1_0.ClientData(); + getServiceTrackerHidlData(sData, cData, s, null, callerApp, false); + mServicetracker.bindService(sData, cData); + } + } catch (RemoteException e) { + Slog.e(TAG, "Failed to send bind details to servicetracker HAL", e); + mServicetracker = null; + mServicetracker_aidl = null; + } + } + boolean needOomAdj = false; if (c.hasFlag(Context.BIND_AUTO_CREATE)) { s.lastActivity = SystemClock.uptimeMillis(); @@ -3967,6 +4141,29 @@ public final class ActiveServices { while (clist.size() > 0) { ConnectionRecord r = clist.get(0); + if (!isLowRamDevice) { + try { + if (getAIDLServicetrackerInstance()) { + vendor.qti.hardware.servicetrackeraidl.ServiceData sData = + new vendor.qti.hardware.servicetrackeraidl.ServiceData(); + vendor.qti.hardware.servicetrackeraidl.ClientData cData = + new vendor.qti.hardware.servicetrackeraidl.ClientData(); + getServiceTrackerAidlData(sData, cData, null, r, null, true); + mServicetracker_aidl.unbindService(sData, cData); + } else if (getServicetrackerInstance()) { + vendor.qti.hardware.servicetracker.V1_0.ServiceData sData = + new vendor.qti.hardware.servicetracker.V1_0.ServiceData(); + vendor.qti.hardware.servicetracker.V1_0.ClientData cData = + new vendor.qti.hardware.servicetracker.V1_0.ClientData(); + getServiceTrackerHidlData(sData, cData, null, r, null, true); + mServicetracker.unbindService(sData, cData); + } + } catch (RemoteException e) { + Slog.e(TAG, "Failed to send unbind details to servicetracker AIDL/HAL", e); + mServicetracker = null; + mServicetracker_aidl = null; + } + } removeConnectionLocked(r, null, null, true); if (clist.size() > 0 && clist.get(0) == r) { // In case it didn't get removed above, do it now. @@ -4625,6 +4822,14 @@ public final class ActiveServices { r.pendingStarts.add(0, si); long dur = SystemClock.uptimeMillis() - si.deliveredTime; dur *= 2; + if (SERVICE_RESCHEDULE && DEBUG_DELAYED_SERVICE) { + Slog.w(TAG,"Can add more delay !!!" + +" si.deliveredTime "+si.deliveredTime + +" dur "+dur + +" si.deliveryCount "+si.deliveryCount + +" si.doneExecutingCount "+si.doneExecutingCount + +" allowCancel "+allowCancel); + } if (minDuration < dur) minDuration = dur; if (resetTime < dur) resetTime = dur; } else { @@ -4648,6 +4853,13 @@ public final class ActiveServices { } r.totalRestartCount++; + if (SERVICE_RESCHEDULE && DEBUG_DELAYED_SERVICE) { + Slog.w(TAG,"r.name "+r.name+" N "+N+" minDuration "+minDuration + +" resetTime "+resetTime+" now "+now + +" r.restartDelay "+r.restartDelay + +" r.restartTime+resetTime "+(r.restartTime+resetTime) + +" allowCancel "+allowCancel); + } if (r.restartDelay == 0) { r.restartCount++; r.restartDelay = minDuration; @@ -4673,6 +4885,14 @@ public final class ActiveServices { if (isServiceRestartBackoffEnabledLocked(r.packageName)) { r.nextRestartTime = r.mEarliestRestartTime = now + r.restartDelay; + if (SERVICE_RESCHEDULE && DEBUG_DELAYED_SERVICE) { + Slog.w(TAG,"r.name "+r.name+" N "+N+" minDuration "+minDuration + +" resetTime "+resetTime+" now "+now + +" r.restartDelay "+r.restartDelay + +" r.restartTime+resetTime "+(r.restartTime+resetTime) + +" r.nextRestartTime "+r.nextRestartTime + +" allowCancel "+allowCancel); + } if (inRestarting) { // Take it out of the list temporarily for easier maintenance of the list. @@ -4776,6 +4996,15 @@ public final class ActiveServices { r.nextRestartTime = now + r.restartDelay; Slog.w(TAG, scheduling + " restart of crashed service " + r.shortInstanceName + " in " + r.restartDelay + "ms for " + reason); + + if (SERVICE_RESCHEDULE && DEBUG_DELAYED_SERVICE) { + for (int i=mRestartingServices.size()-1; i>=0; i--) { + ServiceRecord r2 = mRestartingServices.get(i); + Slog.w(TAG,"Restarting list - i "+i+" r2.nextRestartTime " + +r2.nextRestartTime+" r2.name "+r2.name); + } + } + EventLog.writeEvent(EventLogTags.AM_SCHEDULE_SERVICE_RESTART, r.userId, r.shortInstanceName, r.restartDelay); } @@ -4949,8 +5178,35 @@ public final class ActiveServices { return; } try { - bringUpServiceLocked(r, r.intent.getIntent().getFlags(), r.createdFromFg, true, false, - false, true); + if(SERVICE_RESCHEDULE) { + boolean shouldDelay = false; + boolean isVisible = false; + ActivityRecord top_rc = mAm.mTaskSupervisor.getTopResumedActivity(); + ProcessRecord pRec = mAm.getProcessRecordLocked(r.serviceInfo.applicationInfo.processName,r.serviceInfo.applicationInfo.uid); + + boolean isPersistent + = !((r.serviceInfo.applicationInfo.flags&ApplicationInfo.FLAG_PERSISTENT) == 0); + if (pRec != null) + isVisible = ((pRec.mProfile.getCurRawAdj()) == ProcessList.VISIBLE_APP_ADJ); + if(top_rc != null) { + if(top_rc.launching && !r.shortInstanceName.contains(top_rc.packageName) + && !isPersistent && r.isForeground == false && !isVisible) { + shouldDelay = true; + } + } + if(!shouldDelay) { + bringUpServiceLocked(r, r.intent.getIntent().getFlags(), r.createdFromFg, true, false, false, true); + } else { + if (DEBUG_DELAYED_SERVICE) { + Slog.v(TAG, "Reschedule service restart due to app launch" + +" r.shortInstanceName "+r.shortInstanceName+" r.app = "+r.app); + } + r.resetRestartCounter(); + scheduleServiceRestartLocked(r, true); + } + } else { + bringUpServiceLocked(r, r.intent.getIntent().getFlags(), r.createdFromFg, true, false, false, true); + } } catch (TransactionTooLargeException e) { // Ignore, it's been logged and nothing upstack cares. } finally { @@ -5341,6 +5597,26 @@ public final class ActiveServices { app.mState.getReportedProcState()); r.postNotification(false); created = true; + + if (!isLowRamDevice) { + try { + if (getAIDLServicetrackerInstance()) { + vendor.qti.hardware.servicetrackeraidl.ServiceData sData = + new vendor.qti.hardware.servicetrackeraidl.ServiceData(); + getServiceTrackerAidlData(sData, null, r, null, null, false); + mServicetracker_aidl.startService(sData); + } else if (getServicetrackerInstance()) { + vendor.qti.hardware.servicetracker.V1_0.ServiceData sData = + new vendor.qti.hardware.servicetracker.V1_0.ServiceData(); + getServiceTrackerHidlData(sData, null, r, null, null, false); + mServicetracker.startService(sData); + } + } catch (RemoteException e) { + Slog.e(TAG, "Failed to send start details to servicetracker HAL", e); + mServicetracker = null; + mServicetracker_aidl = null; + } + } } catch (DeadObjectException e) { Slog.w(TAG, "Application dead when creating service " + r); mAm.appDiedLocked(app, "Died when creating service"); @@ -5355,7 +5631,12 @@ public final class ActiveServices { // Cleanup. if (newService) { psr.stopService(r); - r.setProcess(null, null, 0, null); + r.app = null; + if (SERVICE_RESCHEDULE && DEBUG_DELAYED_SERVICE) { + Slog.w(TAG, " Failed to create Service !!!! ." + +"This will introduce huge delay... " + +r.shortInstanceName + " in " + r.restartDelay + "ms"); + } } // Retry. @@ -5539,7 +5820,25 @@ public final class ActiveServices { private void bringDownServiceLocked(ServiceRecord r, boolean enqueueOomAdj) { //Slog.i(TAG, "Bring down service:"); //r.dump(" "); - + if (!isLowRamDevice) { + try { + if (getAIDLServicetrackerInstance()) { + vendor.qti.hardware.servicetrackeraidl.ServiceData sData = + new vendor.qti.hardware.servicetrackeraidl.ServiceData(); + getServiceTrackerAidlData(sData, null, r, null, null, false); + mServicetracker_aidl.destroyService(sData); + } else if (getServicetrackerInstance()) { + vendor.qti.hardware.servicetracker.V1_0.ServiceData sData = + new vendor.qti.hardware.servicetracker.V1_0.ServiceData(); + getServiceTrackerHidlData(sData, null, r, null, null, false); + mServicetracker.destroyService(sData); + } + } catch (RemoteException e) { + Slog.e(TAG, "Failed to send destroy details to servicetracker HAL", e); + mServicetracker = null; + mServicetracker_aidl = null; + } + } if (r.isShortFgs()) { // FGS can be stopped without the app calling stopService() or stopSelf(), // due to force-app-standby, or from Task Manager. @@ -6426,6 +6725,18 @@ public final class ActiveServices { } } + try { + if (!isLowRamDevice && getAIDLServicetrackerInstance()) { + mServicetracker_aidl.killProcess(app.getPid()); + } else if (!isLowRamDevice && getServicetrackerInstance()) { + mServicetracker.killProcess(app.getPid()); + } + } catch (RemoteException e) { + Slog.e(TAG, "Failed to send kill process details to servicetracker AIDL/HAL", e); + mServicetracker = null; + mServicetracker_aidl = null; + } + // Clean up any connections this application has to other services. for (int i = psr.numberOfConnections() - 1; i >= 0; i--) { ConnectionRecord r = psr.getConnectionAt(i); diff --git a/services/core/java/com/android/server/am/ActivityManagerConstants.java b/services/core/java/com/android/server/am/ActivityManagerConstants.java index 8c31209aeeb4..51f2da1b88fa 100644 --- a/services/core/java/com/android/server/am/ActivityManagerConstants.java +++ b/services/core/java/com/android/server/am/ActivityManagerConstants.java @@ -33,15 +33,18 @@ import android.database.ContentObserver; import android.net.Uri; import android.os.Build; import android.os.Handler; +import android.os.Process; +import android.os.SystemClock; +import android.os.SystemProperties; import android.os.Message; import android.os.PowerExemptionManager; -import android.os.SystemClock; import android.provider.DeviceConfig; import android.provider.DeviceConfig.OnPropertiesChangedListener; import android.provider.DeviceConfig.Properties; import android.provider.Settings; import android.text.TextUtils; import android.util.ArraySet; +import android.util.BoostFramework; import android.util.KeyValueListParser; import android.util.Slog; @@ -153,7 +156,7 @@ final class ActivityManagerConstants extends ContentObserver { static final String KEY_TIERED_CACHED_ADJ_DECAY_TIME = "tiered_cached_adj_decay_time"; static final String KEY_USE_MODERN_TRIM = "use_modern_trim"; - private static final int DEFAULT_MAX_CACHED_PROCESSES = 1024; + private static int DEFAULT_MAX_CACHED_PROCESSES = 1024; private static final boolean DEFAULT_PRIORITIZE_ALARM_BROADCASTS = true; private static final long DEFAULT_FGSERVICE_MIN_SHOWN_TIME = 2*1000; private static final long DEFAULT_FGSERVICE_MIN_REPORT_TIME = 3*1000; @@ -831,6 +834,15 @@ final class ActivityManagerConstants extends ContentObserver { // process limit. This will be initialized in the constructor. public int CUR_MAX_CACHED_PROCESSES; + public static BoostFramework mPerf = new BoostFramework(); + + static boolean USE_TRIM_SETTINGS = true; + static int EMPTY_APP_PERCENT = 50; + static int TRIM_EMPTY_PERCENT = 100; + static int TRIM_CACHE_PERCENT = 100; + static long TRIM_ENABLE_MEMORY = 1073741824; + public static boolean allowTrim() { return Process.getTotalMemory() < TRIM_ENABLE_MEMORY ; } + // The maximum number of empty app processes we will let sit around. This will be // initialized in the constructor. public int CUR_MAX_EMPTY_PROCESSES; @@ -1320,6 +1332,28 @@ final class ActivityManagerConstants extends ContentObserver { } + private void updatePerfConfigConstants() { + if (mPerf != null) { + // Maximum number of cached processes we will allow. + DEFAULT_MAX_CACHED_PROCESSES = MAX_CACHED_PROCESSES = CUR_MAX_CACHED_PROCESSES = Integer.valueOf( + mPerf.perfGetProp("ro.vendor.qti.sys.fw.bg_apps_limit", "32")); + + //Trim Settings + USE_TRIM_SETTINGS = Boolean.parseBoolean(mPerf.perfGetProp("ro.vendor.qti.sys.fw.use_trim_settings", "true")); + EMPTY_APP_PERCENT = Integer.valueOf(mPerf.perfGetProp("ro.vendor.qti.sys.fw.empty_app_percent", "50")); + TRIM_EMPTY_PERCENT = Integer.valueOf(mPerf.perfGetProp("ro.vendor.qti.sys.fw.trim_empty_percent", "100")); + TRIM_CACHE_PERCENT = Integer.valueOf(mPerf.perfGetProp("ro.vendor.qti.sys.fw.trim_cache_percent", "100")); + TRIM_ENABLE_MEMORY = Long.valueOf(mPerf.perfGetProp("ro.vendor.qti.sys.fw.trim_enable_memory", "1073741824")); + + // The maximum number of empty app processes we will let sit around. + CUR_MAX_EMPTY_PROCESSES = computeEmptyProcessLimit(CUR_MAX_CACHED_PROCESSES); + + final int rawEmptyProcesses = computeEmptyProcessLimit(MAX_CACHED_PROCESSES); + CUR_TRIM_EMPTY_PROCESSES = computeTrimEmptyApps(rawEmptyProcesses); + CUR_TRIM_CACHED_PROCESSES = computeTrimCachedApps(rawEmptyProcesses, MAX_CACHED_PROCESSES); + } + } + public void start(ContentResolver resolver) { mResolver = resolver; mResolver.registerContentObserver(ACTIVITY_MANAGER_CONSTANTS_URI, false, this); @@ -1331,6 +1365,8 @@ final class ActivityManagerConstants extends ContentObserver { false, this); } updateConstants(); + updatePerfConfigConstants(); + if (mSystemServerAutomaticHeapDumpEnabled) { updateEnableAutomaticSystemServerHeapDumps(); } @@ -1365,7 +1401,27 @@ final class ActivityManagerConstants extends ContentObserver { } public static int computeEmptyProcessLimit(int totalProcessLimit) { - return totalProcessLimit/2; + if(USE_TRIM_SETTINGS && allowTrim()) { + return totalProcessLimit*EMPTY_APP_PERCENT/100; + } else { + return totalProcessLimit/2; + } + } + + public static int computeTrimEmptyApps(int rawMaxEmptyProcesses) { + if (USE_TRIM_SETTINGS && allowTrim()) { + return rawMaxEmptyProcesses*TRIM_EMPTY_PERCENT/100; + } else { + return rawMaxEmptyProcesses/2; + } + } + + public static int computeTrimCachedApps(int rawMaxEmptyProcesses, int totalProcessLimit) { + if (USE_TRIM_SETTINGS && allowTrim()) { + return totalProcessLimit*TRIM_CACHE_PERCENT/100; + } else { + return (totalProcessLimit-rawMaxEmptyProcesses)/3; + } } @Override @@ -1883,9 +1939,12 @@ final class ActivityManagerConstants extends ContentObserver { } CUR_MAX_EMPTY_PROCESSES = computeEmptyProcessLimit(CUR_MAX_CACHED_PROCESSES); + // Note the trim levels do NOT depend on the override process limit, we want + // to consider the same level the point where we do trimming regardless of any + // additional enforced limit. final int rawMaxEmptyProcesses = computeEmptyProcessLimit( Integer.min(CUR_MAX_CACHED_PROCESSES, MAX_CACHED_PROCESSES)); - CUR_TRIM_EMPTY_PROCESSES = rawMaxEmptyProcesses / 2; + CUR_TRIM_EMPTY_PROCESSES = computeTrimEmptyApps(rawMaxEmptyProcesses); CUR_TRIM_CACHED_PROCESSES = (Integer.min(CUR_MAX_CACHED_PROCESSES, MAX_CACHED_PROCESSES) - rawMaxEmptyProcesses) / 3; } diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 7d2ec4cae642..c77d513f99c1 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -390,6 +390,8 @@ import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.WindowManager; +import android.util.BoostFramework; + import android.view.autofill.AutofillManagerInternal; import com.android.internal.annotations.CompositeRWLock; @@ -402,6 +404,7 @@ import com.android.internal.app.ProcessMap; import com.android.internal.app.SystemUserHomeActivity; import com.android.internal.app.procstats.ProcessState; import com.android.internal.app.procstats.ProcessStats; +import com.android.internal.app.ActivityTrigger; import com.android.internal.content.InstallLocationUtils; import com.android.internal.messages.nano.SystemMessageProto.SystemMessage; import com.android.internal.notification.SystemNotificationChannels; @@ -477,11 +480,13 @@ import com.android.server.utils.TimingsTraceAndSlog; import com.android.server.vr.VrManagerInternal; import com.android.server.wm.ActivityMetricsLaunchObserver; import com.android.server.wm.ActivityServiceConnectionsHolder; +import com.android.server.wm.ActivityTaskSupervisor; import com.android.server.wm.ActivityTaskManagerInternal; import com.android.server.wm.ActivityTaskManagerService; import com.android.server.wm.WindowManagerInternal; import com.android.server.wm.WindowManagerService; import com.android.server.wm.WindowProcessController; +import com.android.server.ActivityTriggerService; import dalvik.annotation.optimization.NeverCompile; import dalvik.system.VMRuntime; @@ -614,6 +619,12 @@ public class ActivityManagerService extends IActivityManager.Stub private static final int MAX_BUGREPORT_TITLE_SIZE = 100; private static final int MAX_BUGREPORT_DESCRIPTION_SIZE = 150; + /* Freq Aggr boost objects */ + public static BoostFramework mPerfServiceStartHint = null; + /* UX perf event object */ + public static BoostFramework mUxPerf = new BoostFramework(); + public static boolean mForceStopKill = false; + OomAdjuster mOomAdjuster; static final String EXTRA_TITLE = "android.intent.extra.TITLE"; @@ -655,6 +666,9 @@ public class ActivityManagerService extends IActivityManager.Stub private Installer mInstaller; + /** Run all ActivityStacks through this */ + ActivityTaskSupervisor mTaskSupervisor; + final InstrumentationReporter mInstrumentationReporter = new InstrumentationReporter(); @CompositeRWLock({"this", "mProcLock"}) @@ -1016,6 +1030,10 @@ public class ActivityManagerService extends IActivityManager.Stub sActiveProcessInfoSelfLocked.remove(pid); } } + ActivityTriggerService atService = LocalServices.getService(ActivityTriggerService.class); + if(atService != null) { + atService.updateRecord(app.getHostingRecord(), app.info, app.getPid(), ActivityTriggerService.PROC_ADDED_NOTIFICATION); + } mAtmInternal.onProcessMapped(pid, app.getWindowProcessController()); } @@ -1034,6 +1052,10 @@ public class ActivityManagerService extends IActivityManager.Stub synchronized (sActiveProcessInfoSelfLocked) { sActiveProcessInfoSelfLocked.remove(pid); } + ActivityTriggerService atService = LocalServices.getService(ActivityTriggerService.class); + if(atService != null) { + atService.updateRecord(app.getHostingRecord(), app.info, app.getPid(), ActivityTriggerService.PROC_REMOVED_NOTIFICATION); + } mAtmInternal.onProcessUnMapped(pid); } return removed; @@ -2543,6 +2565,7 @@ public class ActivityManagerService extends IActivityManager.Stub mActivityTaskManager.initialize(mIntentFirewall, mPendingIntentController, DisplayThread.get().getLooper()); mAtmInternal = LocalServices.getService(ActivityTaskManagerInternal.class); + mTaskSupervisor = mActivityTaskManager.mTaskSupervisor; mHiddenApiBlacklist = new HiddenApiSettings(mHandler, mContext); @@ -2558,7 +2581,7 @@ public class ActivityManagerService extends IActivityManager.Stub Process.THREAD_GROUP_SYSTEM); Process.setThreadGroupAndCpuset( mOomAdjuster.mCachedAppOptimizer.mCachedAppOptimizerThread.getThreadId(), - Process.THREAD_GROUP_SYSTEM); + mOomAdjuster.mCachedAppOptimizer.mCompactionPriority); } catch (Exception e) { Slog.w(TAG, "Setting background thread cpuset failed"); } @@ -3264,6 +3287,46 @@ public class ActivityManagerService extends IActivityManager.Stub return mActivityTaskManager.startActivityFromRecents(taskId, bOptions); } + public int startActivityAsUserEmpty(Bundle options) { + ArrayList<String> pApps = options.getStringArrayList("start_empty_apps"); + if (pApps != null && pApps.size() > 0) { + Iterator<String> apps_itr = pApps.iterator(); + while (apps_itr.hasNext()) { + ProcessRecord empty_app = null; + String app_str = apps_itr.next(); + if (app_str == null) + continue; + synchronized (this) { + Intent intent_l = null; + try { + intent_l = mContext.getPackageManager().getLaunchIntentForPackage(app_str); + if (intent_l == null) + continue; + ActivityInfo aInfo = mTaskSupervisor.resolveActivity(intent_l, null, + 0, null, 0, 0, Binder.getCallingPid()); + if (aInfo == null) + continue; + empty_app = startProcessLocked( + app_str, + aInfo.applicationInfo, + false /* knownToBeDead */, + 0 /* intentFlags */, + sNullHostingRecord /* hostingRecord */, + ZYGOTE_POLICY_FLAG_EMPTY /* zygotePolicyFlags */, + false /* allowWhileBooting */, + false /* isolated */); + if (empty_app != null) + updateOomAdjLocked(empty_app, OOM_ADJ_REASON_SYSTEM_INIT); + } catch (Exception e) { + if (DEBUG_PROCESSES) + Slog.w(TAG, "Exception raised trying to start app as empty " + e); + } + } + } + } + return 1; + } + /** * This is the internal entry point for handling Activity.finish(). * @@ -3447,6 +3510,15 @@ public class ActivityManagerService extends IActivityManager.Stub mAppProfiler.setAllowLowerMemLevelLocked(false); doLowMem = false; } + + if (mUxPerf != null && !mForceStopKill && !app.mErrorState.isNotResponding() && !app.mErrorState.isCrashing()) { + if (mUxPerf.board_first_api_lvl < BoostFramework.VENDOR_T_API_LEVEL && + mUxPerf.board_api_lvl < BoostFramework.VENDOR_T_API_LEVEL) { + mUxPerf.perfUXEngine_events(BoostFramework.UXE_EVENT_KILL, 0, app.processName, 0); + } + mUxPerf.perfEvent(BoostFramework.VENDOR_HINT_KILL, app.processName, 2, 0, pid); + } + EventLogTags.writeAmProcDied(app.userId, pid, app.processName, setAdj, setProcState); if (DEBUG_CLEANUP) Slog.v(TAG_CLEANUP, "Dying app: " + app + ", pid: " + pid + ", thread: " + thread.asBinder()); @@ -4276,6 +4348,7 @@ public class ActivityManagerService extends IActivityManager.Stub // A specific subset of the work done in forceStopPackageLocked(), because we are // intentionally not rendering the app nonfunctional; we're just halting its current // execution. + mForceStopKill = true; final int appId = UserHandle.getAppId(uid); synchronized (this) { synchronized (mProcLock) { @@ -4337,6 +4410,7 @@ public class ActivityManagerService extends IActivityManager.Stub mAppErrors.resetProcessCrashTime(packageName == null, appId, userId); } + mForceStopKill = true; synchronized (mProcLock) { // Notify first that the package is stopped, so its process won't be restarted @@ -4594,6 +4668,19 @@ public class ActivityManagerService extends IActivityManager.Stub EventLogTags.writeAmProcBound(app.userId, pid, app.processName); + if (mUxPerf != null && app.getHostingRecord() != null && app.getHostingRecord().isTopApp()) { + if (mUxPerf.getPerfHalVersion() >= BoostFramework.PERF_HAL_V23) { + int pkgType = mUxPerf.perfGetFeedback( + BoostFramework.VENDOR_FEEDBACK_WORKLOAD_TYPE, app.processName); + mUxPerf.perfHintAcqRel(-1, + BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, app.processName, + pid, BoostFramework.Launch.TYPE_ATTACH_APPLICATION, 1, pkgType); + } else { + mUxPerf.perfHint(BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, app.processName, + pid, BoostFramework.Launch.TYPE_ATTACH_APPLICATION); + } + } + synchronized (mProcLock) { app.mState.setCurAdj(ProcessList.INVALID_ADJ); app.mState.setSetAdj(ProcessList.INVALID_ADJ); @@ -5084,6 +5171,7 @@ public class ActivityManagerService extends IActivityManager.Stub String data, Bundle extras, boolean ordered, boolean sticky, int sendingUser) { synchronized (mProcLock) { + mOomAdjuster.mCachedAppOptimizer.compactAllSystem(); mAppProfiler.requestPssAllProcsLPr( SystemClock.uptimeMillis(), true, false); } @@ -6663,7 +6751,7 @@ public class ActivityManagerService extends IActivityManager.Stub } mAnrHelper.appNotResponding(app, null, app.info, null, null, false, - timeoutRecord, isContinuousAnr); + null, timeoutRecord, isContinuousAnr); } } @@ -13098,6 +13186,28 @@ public class ActivityManagerService extends IActivityManager.Stub } app.setPid(0); } + + // Call Preferred App + if (app != null) { + ArrayList<ApplicationExitInfo> results = new ArrayList<ApplicationExitInfo>(); + mProcessList.mAppExitInfoTracker.getExitInfo( + app.processName, app.uid, app.getPid(), 0, results); + if (results != null) { + boolean recentAppClose = false; + for (int i=0; i<results.size();i++) { + ApplicationExitInfo appExitInfo = results.get(i); + if ((appExitInfo.getReason() == ApplicationExitInfo.REASON_USER_REQUESTED + || appExitInfo.getReason() == ApplicationExitInfo.REASON_USER_STOPPED) + && appExitInfo.getDescription() == "remove task") { + recentAppClose = true; + break; + } + } + if (recentAppClose) { + mTaskSupervisor.startPreferredApps(); + } + } + } return false; } @@ -17554,6 +17664,11 @@ public class ActivityManagerService extends IActivityManager.Stub } @Override + public int startActivityAsUserEmpty(Bundle options) { + return ActivityManagerService.this.startActivityAsUserEmpty(options); + } + + @Override public void killForegroundAppsForUser(@UserIdInt int userId) { final ArrayList<ProcessRecord> procs = new ArrayList<>(); synchronized (mProcLock) { @@ -18951,7 +19066,7 @@ public class ActivityManagerService extends IActivityManager.Stub } } mAnrHelper.appNotResponding(proc, activityShortComponentName, aInfo, - parentShortComponentName, parentProcess, aboveSystem, timeoutRecord, + parentShortComponentName, parentProcess, aboveSystem, null, timeoutRecord, /*isContinuousAnr*/ true); } diff --git a/services/core/java/com/android/server/am/AnrHelper.java b/services/core/java/com/android/server/am/AnrHelper.java index 7d984434284c..c43f0bca58dc 100644 --- a/services/core/java/com/android/server/am/AnrHelper.java +++ b/services/core/java/com/android/server/am/AnrHelper.java @@ -21,6 +21,8 @@ import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NA import android.content.pm.ApplicationInfo; import android.os.SystemClock; +import android.os.Message; +import android.os.Handler; import android.os.Trace; import android.util.ArraySet; import android.util.Slog; @@ -28,6 +30,7 @@ import android.util.Slog; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.os.TimeoutRecord; +import com.android.server.FgThread; import com.android.server.wm.WindowProcessController; import java.io.File; @@ -111,67 +114,115 @@ class AnrHelper { void appNotResponding(ProcessRecord anrProcess, TimeoutRecord timeoutRecord) { appNotResponding(anrProcess, null /* activityShortComponentName */, null /* aInfo */, null /* parentShortComponentName */, null /* parentProcess */, - false /* aboveSystem */, timeoutRecord, /*isContinuousAnr*/ false); + false /* aboveSystem */, null/*auxiliaryTaskExecutor*/, timeoutRecord, /*isContinuousAnr*/ false); } void appNotResponding(ProcessRecord anrProcess, String activityShortComponentName, - ApplicationInfo aInfo, String parentShortComponentName, - WindowProcessController parentProcess, boolean aboveSystem, - TimeoutRecord timeoutRecord, boolean isContinuousAnr) { + ApplicationInfo aInfo, String parentShortComponentName, + WindowProcessController parentProcess, boolean aboveSystem, + ExecutorService auxiliaryTaskExecutor, TimeoutRecord timeoutRecord, boolean isContinuousAnr) { + if (auxiliaryTaskExecutor == null){ + auxiliaryTaskExecutor = mAuxiliaryTaskExecutor; + } + + Future<File> firstPidDumpPromise = mEarlyDumpExecutor.submit(() -> { + // the class AnrLatencyTracker is not generally thread safe but the values + // recorded/touched by the Temporary dump thread(s) are all volatile/atomic. + File tracesFile = StackTracesDumpHelper.dumpStackTracesTempFile(anrProcess.mPid, + timeoutRecord.mLatencyTracker); + mTempDumpedPids.remove(anrProcess.mPid); + return tracesFile; + }); + + appNotResponding(new AnrRecord(anrProcess, activityShortComponentName, aInfo, + parentShortComponentName, parentProcess, aboveSystem, timeoutRecord, + isContinuousAnr, firstPidDumpPromise)); + } + + void deferAppNotResponding(ProcessRecord anrProcess, String activityShortComponentName, + ApplicationInfo aInfo, String parentShortComponentName, + WindowProcessController parentProcess, boolean aboveSystem, + ExecutorService auxiliaryTaskExecutor, TimeoutRecord timeoutRecord, long delayInMillis, + boolean isContinuousAnr) { + if (auxiliaryTaskExecutor == null){ + auxiliaryTaskExecutor = mAuxiliaryTaskExecutor; + } + + Future<File> firstPidDumpPromise = mEarlyDumpExecutor.submit(() -> { + // the class AnrLatencyTracker is not generally thread safe but the values + // recorded/touched by the Temporary dump thread(s) are all volatile/atomic. + File tracesFile = StackTracesDumpHelper.dumpStackTracesTempFile(anrProcess.mPid, + timeoutRecord.mLatencyTracker); + mTempDumpedPids.remove(anrProcess.mPid); + return tracesFile; + }); + AnrRecord anrRecord = new AnrRecord(anrProcess, activityShortComponentName, aInfo, + parentShortComponentName, parentProcess, aboveSystem, timeoutRecord, + isContinuousAnr, firstPidDumpPromise); + Message msg = Message.obtain(); + msg.what = APP_NOT_RESPONDING_DEFER_MSG; + msg.obj = anrRecord; + mFgHandler.sendMessageDelayed(msg, delayInMillis); + } + + private void appNotResponding(AnrRecord anrRecord) { try { - timeoutRecord.mLatencyTracker.appNotRespondingStarted(); - final int incomingPid = anrProcess.mPid; - timeoutRecord.mLatencyTracker.waitingOnAnrRecordLockStarted(); + anrRecord.mTimeoutRecord.mLatencyTracker.appNotRespondingStarted(); + final int incomingPid = anrRecord.mPid; + anrRecord.mTimeoutRecord.mLatencyTracker.waitingOnAnrRecordLockStarted(); synchronized (mAnrRecords) { - timeoutRecord.mLatencyTracker.waitingOnAnrRecordLockEnded(); if (incomingPid == 0) { - // Extreme corner case such as zygote is no response - // to return pid for the process. + // Extreme corner case such as zygote is no response to return pid for the process. + ProcessRecord anrProcess = anrRecord.mApp; Slog.i(TAG, "Skip zero pid ANR, process=" + anrProcess.processName); return; } if (mProcessingPid == incomingPid) { Slog.i(TAG, - "Skip duplicated ANR, pid=" + incomingPid + " " - + timeoutRecord.mReason); + "Skip duplicated ANR, pid=" + incomingPid); return; } if (!mTempDumpedPids.add(incomingPid)) { Slog.i(TAG, "Skip ANR being predumped, pid=" + incomingPid + " " - + timeoutRecord.mReason); + + anrRecord.mTimeoutRecord.mReason); return; } for (int i = mAnrRecords.size() - 1; i >= 0; i--) { if (mAnrRecords.get(i).mPid == incomingPid) { Slog.i(TAG, - "Skip queued ANR, pid=" + incomingPid + " " - + timeoutRecord.mReason); + "Skip queued ANR, pid=" + incomingPid); + return; + } + if (mProcessingPid == incomingPid) { + Slog.i(TAG, + "Skip duplicated ANR, pid=" + incomingPid + " " + + anrRecord.mTimeoutRecord.mReason); return; } + anrRecord.mTimeoutRecord.mLatencyTracker. + anrRecordPlacingOnQueueWithSize(mAnrRecords.size()); } + // We dump the main process as soon as we can on a different thread, // this is done as the main process's dump can go stale in a few hundred // milliseconds and the average full ANR dump takes a few seconds. - timeoutRecord.mLatencyTracker.earlyDumpRequestSubmittedWithSize( + anrRecord.mTimeoutRecord.mLatencyTracker.earlyDumpRequestSubmittedWithSize( mTempDumpedPids.size()); Future<File> firstPidDumpPromise = mEarlyDumpExecutor.submit(() -> { // the class AnrLatencyTracker is not generally thread safe but the values // recorded/touched by the Temporary dump thread(s) are all volatile/atomic. File tracesFile = StackTracesDumpHelper.dumpStackTracesTempFile(incomingPid, - timeoutRecord.mLatencyTracker); + anrRecord.mTimeoutRecord.mLatencyTracker); mTempDumpedPids.remove(incomingPid); return tracesFile; }); - timeoutRecord.mLatencyTracker.anrRecordPlacingOnQueueWithSize(mAnrRecords.size()); - mAnrRecords.add(new AnrRecord(anrProcess, activityShortComponentName, aInfo, - parentShortComponentName, parentProcess, aboveSystem, timeoutRecord, - isContinuousAnr, firstPidDumpPromise)); + mAnrRecords.add(anrRecord); } startAnrConsumerIfNeeded(); } finally { - timeoutRecord.mLatencyTracker.appNotRespondingEnded(); + anrRecord.mTimeoutRecord.mLatencyTracker.appNotRespondingEnded(); } } @@ -305,4 +356,18 @@ class AnrHelper { } } } + + static final int APP_NOT_RESPONDING_DEFER_MSG = 4; + static final int APP_NOT_RESPONDING_DEFER_TIMEOUT_MILLIS = 10 * 1000; + private Handler mFgHandler = new Handler(FgThread.getHandler().getLooper()) { + @Override + public void handleMessage(Message msg) { + switch (msg.what) { + case APP_NOT_RESPONDING_DEFER_MSG: + AnrRecord record = (AnrRecord)msg.obj; + appNotResponding((AnrRecord)msg.obj); + break; + } + } + }; } diff --git a/services/core/java/com/android/server/am/AppProfiler.java b/services/core/java/com/android/server/am/AppProfiler.java index 16f222697646..71f76003f946 100644 --- a/services/core/java/com/android/server/am/AppProfiler.java +++ b/services/core/java/com/android/server/am/AppProfiler.java @@ -1143,6 +1143,11 @@ public class AppProfiler { } @GuardedBy("mService") + boolean allowLowerMemLevelLocked() { + return mAllowLowerMemLevel; + } + + @GuardedBy("mService") void setMemFactorOverrideLocked(@MemFactor int factor) { mMemFactorOverride = factor; } diff --git a/services/core/java/com/android/server/am/CachedAppOptimizer.java b/services/core/java/com/android/server/am/CachedAppOptimizer.java index e588a9e51cd9..ade223cc2513 100644 --- a/services/core/java/com/android/server/am/CachedAppOptimizer.java +++ b/services/core/java/com/android/server/am/CachedAppOptimizer.java @@ -61,6 +61,7 @@ import android.os.PowerManagerInternal; import android.os.Process; import android.os.RemoteException; import android.os.SystemClock; +import android.os.SystemProperties; import android.os.Trace; import android.provider.DeviceConfig; import android.provider.DeviceConfig.OnPropertiesChangedListener; @@ -71,6 +72,7 @@ import android.util.EventLog; import android.util.IntArray; import android.util.Pair; import android.util.Slog; +import android.util.BoostFramework; import android.util.SparseArray; import com.android.internal.annotations.GuardedBy; @@ -98,6 +100,8 @@ public final class CachedAppOptimizer { // Flags stored in the DeviceConfig API. @VisibleForTesting static final String KEY_USE_COMPACTION = "use_compaction"; + @VisibleForTesting static final String KEY_DEBUG_COMPACTION = "debug_compaction"; + @VisibleForTesting static final String KEY_COMPACTION_PRIORITY = "compaction_priority"; @VisibleForTesting static final String KEY_USE_FREEZER = "use_freezer"; @VisibleForTesting static final String KEY_COMPACT_THROTTLE_1 = "compact_throttle_1"; @VisibleForTesting static final String KEY_COMPACT_THROTTLE_2 = "compact_throttle_2"; @@ -362,7 +366,9 @@ public final class CachedAppOptimizer { public void onPropertiesChanged(Properties properties) { synchronized (mPhenotypeFlagLock) { for (String name : properties.getKeyset()) { - if (KEY_USE_COMPACTION.equals(name)) { + if (KEY_USE_COMPACTION.equals(name) || + KEY_COMPACTION_PRIORITY.equals(name) || + KEY_DEBUG_COMPACTION.equals(name)) { updateUseCompaction(); } else if (KEY_COMPACT_THROTTLE_1.equals(name) || KEY_COMPACT_THROTTLE_2.equals(name) @@ -455,9 +461,11 @@ public final class CachedAppOptimizer { DEFAULT_COMPACT_THROTTLE_MAX_OOM_ADJ; @GuardedBy("mPhenotypeFlagLock") private volatile boolean mUseCompaction = DEFAULT_USE_COMPACTION; + private volatile boolean mDebugCompaction = DEBUG_COMPACTION; private volatile boolean mUseFreezer = false; // set to DEFAULT in init() @GuardedBy("this") private int mFreezerDisableCount = 1; // Freezer is initially disabled, until enabled + public volatile int mCompactionPriority = Process.THREAD_GROUP_BACKGROUND; private final Random mRandom = new Random(); @GuardedBy("mPhenotypeFlagLock") @VisibleForTesting volatile float mCompactStatsdSampleRate = DEFAULT_STATSD_SAMPLE_RATE; @@ -633,6 +641,7 @@ public final class CachedAppOptimizer { private final ProcessDependencies mProcessDependencies; private final ProcLocksReader mProcLocksReader; + public static BoostFramework mPerf = new BoostFramework(); public CachedAppOptimizer(ActivityManagerService am) { this(am, null, new DefaultProcessDependencies()); @@ -644,7 +653,7 @@ public final class CachedAppOptimizer { mAm = am; mProcLock = am.mProcLock; mCachedAppOptimizerThread = new ServiceThread("CachedAppOptimizerThread", - Process.THREAD_GROUP_SYSTEM, true); + mCompactionPriority, true); mProcStateThrottle = new HashSet<>(); mProcessDependencies = processDependencies; mTestCallback = callback; @@ -678,6 +687,88 @@ public final class CachedAppOptimizer { updateMinOomAdjThrottle(); updateMaxOomAdjThrottle(); } + setAppCompactProperties(); + } + + private void setAppCompactProperties() { + boolean useCompaction = + Boolean.valueOf(mPerf.perfGetProp("vendor.appcompact.enable_app_compact", + "false")); + boolean debugCompaction = + Boolean.valueOf(mPerf.perfGetProp("vendor.appcompact.debug_app_compact", + "false")); + int threadPriority = + Integer.valueOf(mPerf.perfGetProp("vendor.appcompact.thread_priority", + String.valueOf(Process.THREAD_GROUP_BACKGROUND))); + // Let the user change the group back to THREAD_GROUP_SYSYTEM + // For any other value, set it to THREAD_GROUP_BACKGROUND + if (threadPriority != Process.THREAD_GROUP_SYSTEM) + threadPriority = Process.THREAD_GROUP_BACKGROUND; + + int someCompactionType = + Integer.valueOf(mPerf.perfGetProp("vendor.appcompact.some_compact_type", + String.valueOf(COMPACT_ACTION_ANON_FLAG))); + int fullCompactionType = + Integer.valueOf(mPerf.perfGetProp("vendor.appcompact.full_compact_type", + String.valueOf(COMPACT_ACTION_ANON_FLAG))); + int compactThrottleSomeSome = + Integer.valueOf(mPerf.perfGetProp("vendor.appcompact.compact_throttle_somesome", + String.valueOf(DEFAULT_COMPACT_THROTTLE_1))); + int compactThrottleSomeFull = + Integer.valueOf(mPerf.perfGetProp("vendor.appcompact.compact_throttle_somefull", + String.valueOf(DEFAULT_COMPACT_THROTTLE_2))); + int compactThrottleFullSome = + Integer.valueOf(mPerf.perfGetProp("vendor.appcompact.compact_throttle_fullsome", + String.valueOf(DEFAULT_COMPACT_THROTTLE_3))); + int compactThrottleFullFull = + Integer.valueOf(mPerf.perfGetProp("vendor.appcompact.compact_throttle_fullfull", + String.valueOf(DEFAULT_COMPACT_THROTTLE_4))); + int compactThrottleBfgs = + Integer.valueOf(mPerf.perfGetProp("vendor.appcompact.compact_throttle_bfgs", + String.valueOf(DEFAULT_COMPACT_THROTTLE_5))); + int compactThrottlePersistent = + Integer.valueOf(mPerf.perfGetProp("vendor.appcompact.compact_throttle_persistent", + String.valueOf(DEFAULT_COMPACT_THROTTLE_6))); + int fullRssThrottleKB = + Integer.valueOf(mPerf.perfGetProp("vendor.appcompact.rss_throttle_kb", + String.valueOf(DEFAULT_COMPACT_FULL_RSS_THROTTLE_KB))); + int deltaRssThrottleKB = + Integer.valueOf(mPerf.perfGetProp("vendor.appcompact.delta_rss_throttle_kb", + String.valueOf(DEFAULT_COMPACT_FULL_DELTA_RSS_THROTTLE_KB))); + + DeviceConfig.setProperty( + DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, KEY_COMPACT_THROTTLE_1, + String.valueOf(compactThrottleSomeSome), true); + DeviceConfig.setProperty( + DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, KEY_COMPACT_THROTTLE_2, + String.valueOf(compactThrottleSomeFull), true); + DeviceConfig.setProperty( + DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, KEY_COMPACT_THROTTLE_3, + String.valueOf(compactThrottleFullSome), true); + DeviceConfig.setProperty( + DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, KEY_COMPACT_THROTTLE_4, + String.valueOf(compactThrottleFullFull), true); + DeviceConfig.setProperty( + DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, KEY_COMPACT_THROTTLE_5, + String.valueOf(compactThrottleBfgs), true); + DeviceConfig.setProperty( + DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, KEY_COMPACT_THROTTLE_6, + String.valueOf(compactThrottlePersistent), true); + DeviceConfig.setProperty( + DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, KEY_COMPACT_FULL_RSS_THROTTLE_KB, + String.valueOf(fullRssThrottleKB), true); + DeviceConfig.setProperty( + DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, KEY_COMPACT_FULL_DELTA_RSS_THROTTLE_KB, + String.valueOf(deltaRssThrottleKB), true); + DeviceConfig.setProperty( + DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, KEY_USE_COMPACTION, + String.valueOf(useCompaction), true); + DeviceConfig.setProperty( + DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, KEY_DEBUG_COMPACTION, + String.valueOf(debugCompaction), true); + DeviceConfig.setProperty( + DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, KEY_COMPACTION_PRIORITY, + String.valueOf(threadPriority), true); } /** @@ -712,6 +803,8 @@ public final class CachedAppOptimizer { pw.println("CachedAppOptimizer settings"); synchronized (mPhenotypeFlagLock) { pw.println(" " + KEY_USE_COMPACTION + "=" + mUseCompaction); + pw.println(" " + KEY_DEBUG_COMPACTION + "=" + mDebugCompaction); + pw.println(" " + KEY_COMPACTION_PRIORITY + "=" + mCompactionPriority); pw.println(" " + KEY_COMPACT_THROTTLE_1 + "=" + mCompactThrottleSomeSome); pw.println(" " + KEY_COMPACT_THROTTLE_2 + "=" + mCompactThrottleSomeFull); pw.println(" " + KEY_COMPACT_THROTTLE_3 + "=" + mCompactThrottleFullSome); @@ -837,7 +930,7 @@ public final class CachedAppOptimizer { if (!app.mOptRecord.hasPendingCompact()) { final String processName = (app.processName != null ? app.processName : ""); - if (DEBUG_COMPACTION) { + if (mDebugCompaction) { Slog.d(TAG_AM, "compactApp " + app.mOptRecord.getReqCompactSource().name() + " " + app.mOptRecord.getReqCompactProfile().name() + " " + processName); @@ -850,7 +943,7 @@ public final class CachedAppOptimizer { return true; } - if (DEBUG_COMPACTION) { + if (mDebugCompaction) { Slog.d(TAG_AM, " compactApp Skipped for " + app.processName + " pendingCompact= " + app.mOptRecord.hasPendingCompact() + ". Requested compact profile: " @@ -890,7 +983,7 @@ public final class CachedAppOptimizer { void compactAllSystem() { if (useCompaction()) { - if (DEBUG_COMPACTION) { + if (mDebugCompaction) { Slog.d(TAG_AM, "compactAllSystem"); } Trace.instantForTrack( @@ -939,19 +1032,31 @@ public final class CachedAppOptimizer { */ @GuardedBy("mPhenotypeFlagLock") private void updateUseCompaction() { + // If this property is null there must have been some unexpected reset + String useCompaction = DeviceConfig.getProperty(DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, KEY_USE_COMPACTION); + if (useCompaction == null) { + setAppCompactProperties(); + } + mUseCompaction = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, KEY_USE_COMPACTION, DEFAULT_USE_COMPACTION); + mDebugCompaction = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, + KEY_DEBUG_COMPACTION, DEBUG_COMPACTION); + + mCompactionPriority = DeviceConfig.getInt(DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, + KEY_COMPACTION_PRIORITY, Process.THREAD_GROUP_BACKGROUND); + if (mUseCompaction && mCompactionHandler == null) { if (!mCachedAppOptimizerThread.isAlive()) { mCachedAppOptimizerThread.start(); } mCompactionHandler = new MemCompactionHandler(); - - Process.setThreadGroupAndCpuset(mCachedAppOptimizerThread.getThreadId(), - Process.THREAD_GROUP_SYSTEM); } + + Process.setThreadGroupAndCpuset(mCachedAppOptimizerThread.getThreadId(), + mCompactionPriority); } /** @@ -1132,7 +1237,8 @@ public final class CachedAppOptimizer { } Process.setThreadGroupAndCpuset(mCachedAppOptimizerThread.getThreadId(), - Process.THREAD_GROUP_SYSTEM); + mCompactionPriority); + } else { Slog.d(TAG_AM, "Freezer disabled"); enableFreezer(false); @@ -1628,7 +1734,7 @@ public final class CachedAppOptimizer { } else { mTotalCompactionsCancelled.put(cancelReason, 1); } - if (DEBUG_COMPACTION) { + if (mDebugCompaction) { Slog.d(TAG_AM, "Cancelled pending or running compactions for process: " + app.processName != null ? app.processName : "" + @@ -1671,7 +1777,7 @@ public final class CachedAppOptimizer { profile = CompactProfile.SOME; ++mTotalCompactionDowngrades; - if (DEBUG_COMPACTION) { + if (mDebugCompaction) { Slog.d(TAG_AM, "Downgraded compaction to "+ profile +" due to low swap." + " Swap Free% " + swapFreePercent); @@ -1769,11 +1875,14 @@ public final class CachedAppOptimizer { private boolean shouldOomAdjThrottleCompaction(ProcessRecord proc) { final String name = proc.processName; + final ProcessCachedOptimizerRecord opt = proc.mOptRecord; + CompactSource compactSource = opt.getReqCompactSource(); // don't compact if the process has returned to perceptible // and this is only a cached/home/prev compaction - if (proc.mState.getSetAdj() <= ProcessList.PERCEPTIBLE_APP_ADJ) { - if (DEBUG_COMPACTION) { + if (compactSource == CompactSource.APP + && proc.mState.getSetAdj() <= ProcessList.PERCEPTIBLE_APP_ADJ) { + if (mDebugCompaction) { Slog.d(TAG_AM, "Skipping compaction as process " + name + " is " + "now perceptible."); @@ -1805,7 +1914,7 @@ public final class CachedAppOptimizer { && (start - lastCompactTime < mCompactThrottleSomeSome)) || (lastCompactProfile == CompactProfile.FULL && (start - lastCompactTime < mCompactThrottleSomeFull))) { - if (DEBUG_COMPACTION) { + if (mDebugCompaction) { Slog.d(TAG_AM, "Skipping some compaction for " + name + ": too soon. throttle=" + mCompactThrottleSomeSome @@ -1819,7 +1928,7 @@ public final class CachedAppOptimizer { && (start - lastCompactTime < mCompactThrottleFullSome)) || (lastCompactProfile == CompactProfile.FULL && (start - lastCompactTime < mCompactThrottleFullFull))) { - if (DEBUG_COMPACTION) { + if (mDebugCompaction) { Slog.d(TAG_AM, "Skipping full compaction for " + name + ": too soon. throttle=" + mCompactThrottleFullSome @@ -1837,7 +1946,7 @@ public final class CachedAppOptimizer { private boolean shouldThrottleMiscCompaction(ProcessRecord proc, int procState) { if (mProcStateThrottle.contains(procState)) { - if (DEBUG_COMPACTION) { + if (mDebugCompaction) { final String name = proc.processName; Slog.d(TAG_AM, "Skipping full compaction for process " + name + "; proc state is " @@ -1856,7 +1965,7 @@ public final class CachedAppOptimizer { if (rssBefore[RSS_TOTAL_INDEX] == 0 && rssBefore[RSS_FILE_INDEX] == 0 && rssBefore[RSS_ANON_INDEX] == 0 && rssBefore[RSS_SWAP_INDEX] == 0) { - if (DEBUG_COMPACTION) { + if (mDebugCompaction) { Slog.d(TAG_AM, "Skipping compaction for" + "process " + pid + " with no memory usage. Dead?"); @@ -1866,7 +1975,7 @@ public final class CachedAppOptimizer { if (profile == CompactProfile.FULL) { if (mFullAnonRssThrottleKb > 0L && anonRssBefore < mFullAnonRssThrottleKb) { - if (DEBUG_COMPACTION) { + if (mDebugCompaction) { Slog.d(TAG_AM, "Skipping full compaction for process " + name + "; anon RSS is too small: " + anonRssBefore + "KB."); @@ -1880,7 +1989,7 @@ public final class CachedAppOptimizer { + Math.abs(rssBefore[RSS_ANON_INDEX] - lastRss[RSS_ANON_INDEX]) + Math.abs(rssBefore[RSS_SWAP_INDEX] - lastRss[RSS_SWAP_INDEX]); if (absDelta <= mFullDeltaRssThrottleKb) { - if (DEBUG_COMPACTION) { + if (mDebugCompaction) { Slog.d(TAG_AM, "Skipping full compaction for process " + name + "; abs delta is too small: " + absDelta + "KB."); @@ -1912,7 +2021,7 @@ public final class CachedAppOptimizer { int oomAdjReason; synchronized (mProcLock) { if (mPendingCompactionProcesses.isEmpty()) { - if (DEBUG_COMPACTION) { + if (mDebugCompaction) { Slog.d(TAG_AM, "No processes pending compaction, bail out"); } return; @@ -1939,7 +2048,7 @@ public final class CachedAppOptimizer { long[] rssBefore; if (pid == 0) { // not a real process, either one being launched or one being killed - if (DEBUG_COMPACTION) { + if (mDebugCompaction) { Slog.d(TAG_AM, "Compaction failed, pid is 0"); } ++perSourceStats.mProcCompactionsNoPidThrottled; @@ -1972,7 +2081,7 @@ public final class CachedAppOptimizer { } } else { rssBefore = mProcessDependencies.getRss(pid); - if (DEBUG_COMPACTION) { + if (mDebugCompaction) { Slog.d(TAG_AM, "Forcing compaction for " + name); } } diff --git a/services/core/java/com/android/server/am/OomAdjuster.java b/services/core/java/com/android/server/am/OomAdjuster.java index f21ad2204d74..16399efba82b 100644 --- a/services/core/java/com/android/server/am/OomAdjuster.java +++ b/services/core/java/com/android/server/am/OomAdjuster.java @@ -76,6 +76,7 @@ import static android.os.Process.THREAD_GROUP_TOP_APP; import static android.os.Process.THREAD_PRIORITY_DISPLAY; import static android.os.Process.THREAD_PRIORITY_TOP_APP_BOOST; import static android.os.Process.setProcessGroup; +import static android.os.Process.setCgroupProcsProcessGroup; import static android.os.Process.setThreadPriority; import static android.os.Process.setThreadScheduler; @@ -148,9 +149,11 @@ import android.os.PowerManagerInternal; import android.os.Process; import android.os.RemoteException; import android.os.SystemClock; +import android.os.SystemProperties; import android.os.Trace; import android.util.ArrayMap; import android.util.ArraySet; +import android.util.BoostFramework; import android.util.Slog; import android.util.proto.ProtoOutputStream; @@ -375,6 +378,28 @@ public class OomAdjuster { private final ProcessList mProcessList; private final ActivityManagerGlobalLock mProcLock; + // Min aging threshold in milliseconds to consider a B-service + int mMinBServiceAgingTime = 5000; + // Threshold for B-services when in memory pressure + int mBServiceAppThreshold = 5; + // Enable B-service aging propagation on memory pressure. + boolean mEnableBServicePropagation = false; + // Process in same process Group keep in same cgroup + boolean mEnableProcessGroupCgroupFollow = false; + boolean mProcessGroupCgroupFollowDex2oatOnly = false; + // Enable hooks for background apps transition + boolean mEnableBgt = false; + + public static BoostFramework mPerf = new BoostFramework(); + + //Per Task Boost of top-app renderThread + public static BoostFramework mPerfBoost = new BoostFramework(); + public static int mPerfHandle = -1; + public static int mCurAppPid = -1; + public static int mCurRenderTid = -1; + public static int mCurRenderThreadTid = -1; + public static boolean mIsTopAppRenderThreadBoostEnabled = false; + private final int mNumSlots; private final ArrayList<ProcessRecord> mTmpProcessList = new ArrayList<ProcessRecord>(); private final ArrayList<UidRecord> mTmpBecameIdle = new ArrayList<UidRecord>(); @@ -433,19 +458,34 @@ public class OomAdjuster { mCachedAppOptimizer = new CachedAppOptimizer(mService); mCacheOomRanker = new CacheOomRanker(service); + if(mPerf != null) { + mMinBServiceAgingTime = Integer.valueOf(mPerf.perfGetProp("ro.vendor.qti.sys.fw.bservice_age", "5000")); + mBServiceAppThreshold = Integer.valueOf(mPerf.perfGetProp("ro.vendor.qti.sys.fw.bservice_limit", "5")); + mEnableBServicePropagation = Boolean.parseBoolean(mPerf.perfGetProp("ro.vendor.qti.sys.fw.bservice_enable", "false")); + mEnableProcessGroupCgroupFollow = Boolean.parseBoolean(mPerf.perfGetProp("ro.vendor.qti.cgroup_follow.enable", "false")); + mProcessGroupCgroupFollowDex2oatOnly = Boolean.parseBoolean(mPerf.perfGetProp("ro.vendor.qti.cgroup_follow.dex2oat_only", "false")); + mIsTopAppRenderThreadBoostEnabled = Boolean.parseBoolean(mPerf.perfGetProp("vendor.perf.topAppRenderThreadBoost.enable", "false")); + mEnableBgt = Boolean.parseBoolean(mPerf.perfGetProp("vendor.perf.bgt.enable","false")); + } + mProcessGroupHandler = new Handler(adjusterThread.getLooper(), msg -> { final int pid = msg.arg1; final int group = msg.arg2; + final ProcessRecord app = (ProcessRecord)msg.obj; if (pid == ActivityManagerService.MY_PID) { // Skip setting the process group for system_server, keep it as default. return true; } if (Trace.isTagEnabled(Trace.TRACE_TAG_ACTIVITY_MANAGER)) { Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "setProcessGroup " - + msg.obj + " to " + group); + + app.processName + " to " + group); } try { - setProcessGroup(pid, group); + if (mEnableProcessGroupCgroupFollow) { + setCgroupProcsProcessGroup(app.info.uid, pid, group, mProcessGroupCgroupFollowDex2oatOnly); + } else { + setProcessGroup(pid, group); + } } catch (Exception e) { if (DEBUG_ALL) { Slog.w(TAG, "Failed setting process group of " + pid + " to " + group, e); @@ -1284,6 +1324,9 @@ public class OomAdjuster { int numCachedExtraGroup = 0; int numEmpty = 0; int numTrimming = 0; + ProcessRecord selectedAppRecord = null; + long serviceLastActivity = 0; + int numBServices = 0; boolean proactiveKillsEnabled = mConstants.PROACTIVE_KILLS_ENABLED; double lowSwapThresholdPercent = mConstants.LOW_SWAP_THRESHOLD_PERCENT; @@ -1292,6 +1335,34 @@ public class OomAdjuster { for (int i = numLru - 1; i >= 0; i--) { ProcessRecord app = lruList.get(i); + if (mEnableBServicePropagation && app.mState.isServiceB() + && (app.mState.getCurAdj() == ProcessList.SERVICE_B_ADJ)) { + numBServices++; + for (int s = app.mServices.numberOfRunningServices() - 1; s >= 0; s--) { + ServiceRecord sr = app.mServices.getRunningServiceAt(s); + if (DEBUG_OOM_ADJ) Slog.d(TAG,"app.processName = " + app.processName + + " serviceb = " + app.mState.isServiceB() + " s = " + s + " sr.lastActivity = " + + sr.lastActivity + " packageName = " + sr.packageName + + " processName = " + sr.processName); + if (SystemClock.uptimeMillis() - sr.lastActivity + < mMinBServiceAgingTime) { + if (DEBUG_OOM_ADJ) { + Slog.d(TAG,"Not aged enough!!!"); + } + continue; + } + if (serviceLastActivity == 0) { + serviceLastActivity = sr.lastActivity; + selectedAppRecord = app; + } else if (sr.lastActivity < serviceLastActivity) { + serviceLastActivity = sr.lastActivity; + selectedAppRecord = app; + } + } + } + if (DEBUG_OOM_ADJ && selectedAppRecord != null) Slog.d(TAG, + "Identified app.processName = " + selectedAppRecord.processName + + " app.pid = " + selectedAppRecord.getPid()); final ProcessStateRecord state = app.mState; if (!app.isKilledByAm() && app.getThread() != null && !app.isPendingFinishAttach()) { // We don't need to apply the update for the process which didn't get computed @@ -1402,6 +1473,15 @@ public class OomAdjuster { mLastFreeSwapPercent = freeSwapPercent; + if ((numBServices > mBServiceAppThreshold) && (true == mService.mAppProfiler.allowLowerMemLevelLocked()) + && (selectedAppRecord != null)) { + ProcessList.setOomAdj(selectedAppRecord.getPid(), selectedAppRecord.info.uid, + ProcessList.CACHED_APP_MAX_ADJ); + selectedAppRecord.mState.setSetAdj(selectedAppRecord.mState.getCurAdj()); + if (DEBUG_OOM_ADJ) Slog.d(TAG,"app.processName = " + selectedAppRecord.processName + + " app.pid = " + selectedAppRecord.getPid() + " is moved to higher adj"); + } + return mService.mAppProfiler.updateLowMemStateLSP(numCached, numEmpty, numTrimming, now); } @@ -1833,6 +1913,40 @@ public class OomAdjuster { foregroundActivities = true; hasVisibleActivities = true; procState = PROCESS_STATE_TOP; + + if(mIsTopAppRenderThreadBoostEnabled) { + if(mCurRenderThreadTid != app.getRenderThreadTid() && app.getRenderThreadTid() > 0) { + mCurRenderThreadTid = app.getRenderThreadTid(); + if (mPerfBoost != null) { + Slog.d(TAG, "TOP-APP: pid:" + app.getPid() + ", processName: " + + app.processName + ", renderThreadTid: " + app.getRenderThreadTid()); + if (mPerfHandle >= 0) { + mPerfBoost.perfLockRelease(); + mPerfHandle = -1; + } + mPerfHandle = mPerfBoost.perfHint(BoostFramework.VENDOR_HINT_BOOST_RENDERTHREAD, + app.processName, app.getRenderThreadTid(), 1); + Slog.d(TAG, "VENDOR_HINT_BOOST_RENDERTHREAD perfHint was called. mPerfHandle: " + + mPerfHandle); + } + } + } + + if (mCurAppPid != app.getPid() && app.getPid() > 0) { + mCurAppPid = app.getPid(); + if (mPerfBoost != null) { + mPerfBoost.perfHint(BoostFramework.VENDOR_HINT_PASS_PID, app.processName, + mCurAppPid, BoostFramework.PassPid.APP_PID); + } + } + if (mCurRenderTid != app.getRenderThreadTid() && app.getRenderThreadTid() > 0) { + mCurRenderTid = app.getRenderThreadTid(); + if (mPerfBoost != null) { + mPerfBoost.perfHint(BoostFramework.VENDOR_HINT_PASS_PID, app.processName, + mCurRenderTid, BoostFramework.PassPid.RENDER_TID); + } + } + if (DEBUG_OOM_ADJ_REASON || logUid == appUid) { reportOomAdjMessageLocked(TAG_OOM_ADJ, "Making top: " + app); } @@ -2977,7 +3091,32 @@ public class OomAdjuster { } if (state.getCurAdj() != state.getSetAdj()) { - ProcessList.setOomAdj(app.getPid(), app.uid, state.getCurAdj()); + // Hooks for background apps transition + if (mEnableBgt) { + if ((state.getSetAdj() >= ProcessList.CACHED_APP_MIN_ADJ && + state.getSetAdj() <= ProcessList.CACHED_APP_MAX_ADJ) && + state.getCurAdj() == ProcessList.FOREGROUND_APP_ADJ && + state.hasForegroundActivities()) { + Slog.d(TAG,"App adj change from cached state to fg state : " + + app.getPid() + " " + app.processName); + if (mPerf != null) { + int fgAppPerfLockArgs[] = {BoostFramework.MPCTLV3_GPU_IS_APP_FG, app.getPid()}; + mPerf.perfLockAcquire(10, fgAppPerfLockArgs); + } + } + if(state.getSetAdj() == ProcessList.PREVIOUS_APP_ADJ && + (state.getCurAdj() >= ProcessList.CACHED_APP_MIN_ADJ && + state.getCurAdj() <= ProcessList.CACHED_APP_MAX_ADJ) && + app.hasActivities()) { + Slog.d(TAG,"App adj change from previous state to cached state : " + + app.getPid() + " " + app.processName); + if (mPerf != null) { + int bgAppPerfLockArgs[] = {BoostFramework.MPCTLV3_GPU_IS_APP_BG, app.getPid()}; + mPerf.perfLockAcquire(10, bgAppPerfLockArgs); + } + } + } + ProcessList.setOomAdj(app.getPid(), app.uid, app.mState.getCurAdj()); if (DEBUG_SWITCH || DEBUG_OOM_ADJ || mService.mCurOomAdjUid == app.info.uid) { String msg = "Set " + app.getPid() + " " + app.processName + " adj " + state.getCurAdj() + ": " + state.getAdjType(); @@ -3022,7 +3161,7 @@ public class OomAdjuster { break; } mProcessGroupHandler.sendMessage(mProcessGroupHandler.obtainMessage( - 0 /* unused */, app.getPid(), processGroup, app.processName)); + 0 /* unused */, app.getPid(), processGroup, app)); try { final int renderThreadTid = app.getRenderThreadTid(); if (curSchedGroup == SCHED_GROUP_TOP_APP) { diff --git a/services/core/java/com/android/server/am/ProcessErrorStateRecord.java b/services/core/java/com/android/server/am/ProcessErrorStateRecord.java index e4983846f1da..7bf52effb282 100644 --- a/services/core/java/com/android/server/am/ProcessErrorStateRecord.java +++ b/services/core/java/com/android/server/am/ProcessErrorStateRecord.java @@ -40,6 +40,7 @@ import android.os.Message; import android.os.Process; import android.os.ServiceManager; import android.os.SystemClock; +import android.os.SystemProperties; import android.os.incremental.IIncrementalService; import android.os.incremental.IncrementalManager; import android.os.incremental.IncrementalMetrics; @@ -56,9 +57,11 @@ import com.android.internal.os.ProcessCpuTracker; import com.android.internal.os.TimeoutRecord; import com.android.internal.os.anr.AnrLatencyTracker; import com.android.internal.util.FrameworkStatsLog; +import com.android.server.am.trace.SmartTraceUtils; import com.android.server.ResourcePressureUtil; import com.android.server.criticalevents.CriticalEventLog; import com.android.server.stats.pull.ProcfsMemoryUtil.MemorySnapshot; +import com.android.server.Watchdog; import com.android.server.wm.WindowProcessController; import java.io.File; @@ -105,6 +108,8 @@ class ProcessErrorStateRecord { @CompositeRWLock({"mService", "mProcLock"}) private boolean mNotResponding; + @CompositeRWLock({"mService", "mProcLock"}) + private boolean mDefered; /** * The report about crash of the app, generated & stored when an app gets into a crash. * Will be "null" when all is OK. @@ -193,6 +198,16 @@ class ProcessErrorStateRecord { } @GuardedBy(anyOf = {"mService", "mProcLock"}) + boolean isDefered() { + return mDefered; + } + + @GuardedBy({"mService", "mProcLock"}) + void setDefered(boolean defer) { + mDefered = defer; + } + + @GuardedBy(anyOf = {"mService", "mProcLock"}) Runnable getCrashHandler() { return mCrashHandler; } @@ -460,10 +475,16 @@ class ProcessErrorStateRecord { // We push the native pids collection task to the helper thread through // the Anr auxiliary task executor, and wait on it later after dumping the first pids + boolean smTraceEnabled = isSmartTraceEnabled(isSilentAnr); + boolean isDefered; + synchronized (mProcLock) { + isDefered = isDefered(); + } Future<ArrayList<Integer>> nativePidsFuture = auxiliaryTaskExecutor.submit( () -> { latencyTracker.nativePidCollectionStarted(); + ArrayList<Integer> nativePids = null; // don't dump native PIDs for background ANRs unless // it is the process of interest String[] nativeProcs = null; @@ -477,18 +498,16 @@ class ProcessErrorStateRecord { break; } } + int[] pids = nativeProcs == null ? null : Process.getPidsForCommands(nativeProcs); + if(pids != null){ + nativePids = new ArrayList<>(pids.length); + for (int i : pids) { + nativePids.add(i); + } + } } else { - nativeProcs = NATIVE_STACKS_OF_INTEREST; - } - - int[] pids = nativeProcs == null - ? null : Process.getPidsForCommands(nativeProcs); - ArrayList<Integer> nativePids = null; - - if (pids != null) { - nativePids = new ArrayList<>(pids.length); - for (int i : pids) { - nativePids.add(i); + if (!smTraceEnabled || SmartTraceUtils.isDumpPredefinedPidsEnabled()) { + nativePids = Watchdog.getInstance().getInterestingNativePids(); } } latencyTracker.nativePidCollectionEnded(); @@ -506,6 +525,25 @@ class ProcessErrorStateRecord { criticalEventLog, memoryHeaders, auxiliaryTaskExecutor, firstPidFilePromise, latencyTracker); + long dueTime = SystemClock.uptimeMillis() + + AnrHelper.APP_NOT_RESPONDING_DEFER_TIMEOUT_MILLIS; + if (smTraceEnabled && tracesFile != null){ + long time = SystemClock.uptimeMillis(); + try { + SmartTraceUtils.dumpStackTraces(pid, firstPids, nativePidsFuture.get(), tracesFile); + Slog.i(TAG, mApp.processName + " hit anr, dumpStackTraces cost " + +(SystemClock.uptimeMillis() - time) +" ms"); + } catch (ExecutionException e) { + Slog.w(TAG, "Failed to get native pids", e.getCause()); + } catch (InterruptedException e) { + Slog.w(TAG, "Failed to get native pids", e); + } + } + + if (isPerfettoDumpEnabled(isSilentAnr) && !isDefered){ + SmartTraceUtils.traceStart(); + } + if (isMonitorCpuUsage()) { // Wait for the first call to finish try { @@ -523,8 +561,37 @@ class ProcessErrorStateRecord { report.append(tracesFileException.getBuffer()); info.append(processCpuTracker.printCurrentState(anrTime)); + if(shouldDeferAppNotResponding(isSilentAnr)) { + if(!isDefered){ + Slog.e(TAG, info.toString()); + long now = SystemClock.uptimeMillis(); + long delay = 0; + if (dueTime < now){ + delay = 2000; + }else { + delay = dueTime - now; + } + Slog.i(TAG, "Defer to handle " + mApp.processName + + " ANR, delay "+delay+" ms "); + mApp.mService.mAnrHelper.deferAppNotResponding(mApp, activityShortComponentName, + aInfo, parentShortComponentName, parentProcess, + aboveSystem, auxiliaryTaskExecutor, timeoutRecord, delay, isContinuousAnr); + synchronized (mProcLock) { + setDefered(true); + setNotResponding(false); + setNotRespondingReport(null); + } + return; + }else { + synchronized (mProcLock) { + setDefered(false); + } + Slog.d(TAG, mApp.processName +" has been defered, handle anr right now "); + } + }else { + Slog.e(TAG, info.toString()); + } - Slog.e(TAG, info.toString()); if (tracesFile == null) { // There is no trace file, so dump (only) the alleged culprit's threads to the log Process.sendSignal(pid, Process.SIGNAL_QUIT); @@ -672,6 +739,21 @@ class ProcessErrorStateRecord { mApp.getWindowProcessController().stopFreezingActivities(); } + private boolean isSmartTraceEnabled(boolean isSilentAnr) { + return SmartTraceUtils.isSmartTraceEnabled() && + (!isSilentAnr || (isSilentAnr && SmartTraceUtils.isSmartTraceEnabledOnBgApp())); + } + + private boolean isPerfettoDumpEnabled(boolean isSilentAnr) { + return SmartTraceUtils.isPerfettoDumpEnabled() && + (!isSilentAnr || (isSilentAnr && SmartTraceUtils.isPerfettoDumpEnabledOnBgApp())); + } + + private boolean shouldDeferAppNotResponding(boolean isSilentAnr) { + return (isSmartTraceEnabled(isSilentAnr) || + isPerfettoDumpEnabled(isSilentAnr)); + } + @GuardedBy({"mService", "mProcLock"}) void startAppProblemLSP() { // If this app is not running under the current user, then we can't give it a report button diff --git a/services/core/java/com/android/server/am/ProcessList.java b/services/core/java/com/android/server/am/ProcessList.java index c5776d822c8f..b17a99aaf8b3 100644 --- a/services/core/java/com/android/server/am/ProcessList.java +++ b/services/core/java/com/android/server/am/ProcessList.java @@ -73,6 +73,7 @@ import android.app.ApplicationExitInfo.SubReason; import android.app.IApplicationThread; import android.app.IProcessObserver; import android.app.UidObserver; +import android.app.CrossDeviceManager; import android.compat.annotation.ChangeId; import android.compat.annotation.EnabledAfter; import android.content.BroadcastReceiver; @@ -113,6 +114,7 @@ import android.system.OsConstants; import android.text.TextUtils; import android.util.ArrayMap; import android.util.ArraySet; +import android.util.BoostFramework; import android.util.DebugUtils; import android.util.EventLog; import android.util.LongSparseArray; @@ -541,6 +543,11 @@ public final class ProcessList { ActivityManagerGlobalLock mProcLock; + /** + * BoostFramework Object + */ + public static BoostFramework mPerfServiceStartHint = new BoostFramework(); + private static final String PROPERTY_APPLY_SDK_SANDBOX_NEXT_RESTRICTIONS = "apply_sdk_sandbox_next_restrictions"; private static final boolean DEFAULT_APPLY_SDK_SANDBOX_NEXT_RESTRICTIONS = false; @@ -2454,6 +2461,16 @@ public final class ProcessList { storageManagerInternal.prepareStorageDirs(userId, pkgDataInfoMap.keySet(), app.processName); } + if (mPerfServiceStartHint != null) { + if ((hostingRecord.getType() != null) + && (hostingRecord.getType().equals(HostingRecord.HOSTING_TYPE_NEXT_ACTIVITY) + || hostingRecord.getType().equals(HostingRecord.HOSTING_TYPE_NEXT_TOP_ACTIVITY))) { + //TODO: not acting on pre-activity + if (startResult != null) { + mPerfServiceStartHint.perfHint(BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, app.processName, startResult.pid, BoostFramework.Launch.TYPE_START_PROC); + } + } + } checkSlow(startTime, "startProcess: returned from zygote!"); return startResult; } finally { diff --git a/services/core/java/com/android/server/am/ProcessRecord.java b/services/core/java/com/android/server/am/ProcessRecord.java index f532122c10d9..3cc7768232c6 100644 --- a/services/core/java/com/android/server/am/ProcessRecord.java +++ b/services/core/java/com/android/server/am/ProcessRecord.java @@ -40,6 +40,7 @@ import android.content.pm.VersionedPackage; import android.content.res.CompatibilityInfo; import android.os.Binder; import android.os.Bundle; +import android.os.DeviceIntegrationUtils; import android.os.IBinder; import android.os.Process; import android.os.RemoteException; @@ -55,6 +56,7 @@ import android.util.EventLog; import android.util.Slog; import android.util.TimeUtils; import android.util.proto.ProtoOutputStream; +import android.util.BoostFramework; import com.android.internal.annotations.CompositeRWLock; import com.android.internal.annotations.GuardedBy; @@ -681,6 +683,21 @@ class ProcessRecord implements WindowProcessListener { @GuardedBy({"mService", "mProcLock"}) public void makeActive(IApplicationThread thread, ProcessStatsService tracker) { + // TODO(b/180501180): Add back this logging message. + /* + String seempStr = "app_uid=" + uid + + ",app_pid=" + pid + ",oom_adj=" + curAdj + + ",setAdj=" + setAdj + ",hasShownUi=" + (hasShownUi ? 1 : 0) + + ",cached=" + (mCached ? 1 : 0) + + ",fA=" + (mHasForegroundActivities ? 1 : 0) + + ",fS=" + (mHasForegroundServices ? 1 : 0) + + ",systemNoUi=" + (systemNoUi ? 1 : 0) + + ",curSchedGroup=" + mCurSchedGroup + + ",curProcState=" + getCurProcState() + ",setProcState=" + setProcState + + ",killed=" + (killed ? 1 : 0) + ",killedByAm=" + (killedByAm ? 1 : 0) + + ",isDebugging=" + (isDebugging() ? 1 : 0); + android.util.SeempLog.record_str(386, seempStr); + */ mProfile.onProcessActive(thread, tracker); mThread = thread; if (mPid == Process.myPid()) { @@ -693,6 +710,21 @@ class ProcessRecord implements WindowProcessListener { @GuardedBy({"mService", "mProcLock"}) public void makeInactive(ProcessStatsService tracker) { + // TODO(b/180501180): Add back this logging message. + /* + String seempStr = "app_uid=" + uid + + ",app_pid=" + pid + ",oom_adj=" + curAdj + + ",setAdj=" + setAdj + ",hasShownUi=" + (hasShownUi ? 1 : 0) + + ",cached=" + (mCached ? 1 : 0) + + ",fA=" + (mHasForegroundActivities ? 1 : 0) + + ",fS=" + (mHasForegroundServices ? 1 : 0) + + ",systemNoUi=" + (systemNoUi ? 1 : 0) + + ",curSchedGroup=" + mCurSchedGroup + + ",curProcState=" + getCurProcState() + ",setProcState=" + setProcState + + ",killed=" + (killed ? 1 : 0) + ",killedByAm=" + (killedByAm ? 1 : 0) + + ",isDebugging=" + (isDebugging() ? 1 : 0); + android.util.SeempLog.record_str(387, seempStr); + */ mThread = null; mOnewayThread = null; mWindowProcessController.setThread(null); @@ -1197,6 +1229,7 @@ class ProcessRecord implements WindowProcessListener { && mErrorState.getAnrAnnotation() != null) { description = description + ": " + mErrorState.getAnrAnnotation(); } + BoostFramework ux_perf = new BoostFramework(); if (mService != null && (noisy || info.uid == mService.mCurOomAdjUid)) { mService.reportUidInfoMessageLocked(TAG, "Killing " + toShortString() + " (adj " + mState.getSetAdj() @@ -1221,8 +1254,23 @@ class ProcessRecord implements WindowProcessListener { mKillTime = SystemClock.uptimeMillis(); } } + if (ux_perf != null && !mService.mForceStopKill && !mErrorState.isNotResponding() + && !mErrorState.isCrashing()) { + if (ux_perf.board_first_api_lvl < BoostFramework.VENDOR_T_API_LEVEL && + ux_perf.board_api_lvl < BoostFramework.VENDOR_T_API_LEVEL) { + ux_perf.perfUXEngine_events(BoostFramework.UXE_EVENT_KILL, 0, this.processName, 0); + } + ux_perf.perfEvent(BoostFramework.VENDOR_HINT_KILL,this.processName, 2, 0,getPid()); + } else { + mService.mForceStopKill = false; + } Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); } + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + // Device Integartion: If the app is died during the remote task status, + // we need to inform RemoteTaskManager to clear the references and dirty data. + mService.mActivityTaskManager.getRemoteTaskManager().handleProcessDied(getWindowProcessController(), reason); + } } @GuardedBy("mService") diff --git a/services/core/java/com/android/server/am/trace/BinderTransactions.java b/services/core/java/com/android/server/am/trace/BinderTransactions.java new file mode 100644 index 000000000000..1a2da95fb200 --- /dev/null +++ b/services/core/java/com/android/server/am/trace/BinderTransactions.java @@ -0,0 +1,204 @@ +/* Copyright (c) 2021 The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package com.android.server.am.trace; + +import android.os.Process; +import android.util.Slog; +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.Locale; + +public class BinderTransactions { + private static final String TAG = "BinderTransactions"; + private final static String REGEX_PATTERN = + "\\s+(outgoing|incoming|pending)\\s+transaction.*from" + + "\\s+(\\d+):\\d+\\s+to\\s+(\\d+):\\d+\\s+.*"; + private final static String BINDER_TRANSATION_FILE = "/dev/binderfs/binder_logs/state"; + private static final int DUMP_MAX_COUNT = 10; + // binder ref mapping to binder service + private Map<Integer, HashSet<Integer>> mLocalToRemotesMap = + new HashMap<Integer, HashSet<Integer>>(); + private int mCheckPid; + //whether need recursive find the blocked target process + private boolean mRecursiveMode; + private Set<Integer> mRemotePids = new HashSet(); + /** + * @param recursive recursive mode + */ + public BinderTransactions(boolean recursive) { + mRecursiveMode = recursive; + } + + /** + * find all the processes who is binder transaction to {pid} + * @param pid anr happen on PID + * @return + */ + public Set<Integer> getTargetPidsStuckInBinder(int pid){ + mCheckPid = pid; + parseFromFile(); + if(!mRecursiveMode) { + if(mLocalToRemotesMap.containsKey(pid)){ + for(int remotePid: mLocalToRemotesMap.get(pid)) { + mRemotePids.add(remotePid); + } + } + }else { + Set<Integer> keyPids = mLocalToRemotesMap.keySet(); + for(Integer p: keyPids) { + if(p == mCheckPid) { + mRemotePids.add(p); + findRemotePid(p); + } + } + } + + Set<Integer> ret = new HashSet<Integer>(); + mRemotePids.forEach( + p->{if(p!= 0 && ret.size() <= SmartTraceUtils.DUMP_MAX_COUNT) ret.add(p);}); + return ret; + } + + public void binderStateRead(File outputFile) { + try { + boolean binderfsNodePresent = false; + BufferedReader in = null; + Slog.i(TAG,"Collecting Binder Transaction Status Information"); + try { + in = new BufferedReader(new FileReader(BINDER_TRANSATION_FILE)); + Slog.i(TAG, "Collecting Binder state file from binderfs"); + binderfsNodePresent = true; + } catch(IOException e) { + Slog.i(TAG, "Binderfs node not found, Trying to collect it from debugfs", e); + } + try { + if (binderfsNodePresent == false) { + in = new BufferedReader(new FileReader("/sys/kernel/debug/binder/state")); + Slog.i(TAG, "Collecting Binder state file from debugfs"); + } + } catch(IOException e) { + Slog.i(TAG, "Debugfs node not found", e); + } + if (in == null) { + return; + } + String format = "yyyy-MM-dd-HH-mm-ss"; + String now = new SimpleDateFormat(format, Locale.US).format(new Date()); + FileWriter out = new FileWriter(outputFile, true); + String line = null; + + // Write line-by-line + while ((line = in.readLine()) != null) { + out.write(line); + out.write('\n'); + } + in.close(); + out.close(); + } catch (IOException e) { + Slog.w(TAG, "Failed to collect state file", e); + } + } + + private void findRemotePid(int s) { + if(mLocalToRemotesMap.containsKey(s)) { + for(Integer p: mLocalToRemotesMap.get(s)) { + if(!mRemotePids.contains(p)) { + mRemotePids.add(p); + //continue to search + findRemotePid(p); + } + } + } + } + + private void parseFromFile() { + try { + mLocalToRemotesMap.clear(); + mRemotePids.clear(); + BufferedReader in = + new BufferedReader(new FileReader(BINDER_TRANSATION_FILE)); + Pattern outP=Pattern.compile(REGEX_PATTERN); + Matcher m; + String line = null; + while ((line = in.readLine()) != null) { + // match outgoing transaction + m = outP.matcher(line); + if(m.find()) { + addItem(Integer.parseInt(m.group(2)), + Integer.parseInt(m.group(3)), + m.group(1).equals("outgoing")); + } + } + in.close(); + } catch (FileNotFoundException e) { + Slog.w(TAG, "Unexpected FileNotFoundException" , e); + } catch (IOException e) { + Slog.w(TAG, "Unexpected IOException" , e); + } catch (NumberFormatException e) { + Slog.w(TAG,"Unexpected NumberFormatException ", e); + } + } + + /** + * @spid source pid + * @stid source tid + * @tpid target pid + * @ttid target tid + */ + private void addItem(int spid, int tpid, boolean outgoing) { + if(outgoing) { + if(mLocalToRemotesMap.containsKey(spid)) { + mLocalToRemotesMap.get(spid).add(tpid); + }else { + HashSet<Integer> set = new HashSet<Integer>(); + set.add(tpid); + mLocalToRemotesMap.put(spid, set); + } + }else { + if(tpid == mCheckPid) { + mRemotePids.add(spid); + } + } + } +} diff --git a/services/core/java/com/android/server/am/trace/SmartTraceUtils.java b/services/core/java/com/android/server/am/trace/SmartTraceUtils.java new file mode 100644 index 000000000000..8262fd8ff55e --- /dev/null +++ b/services/core/java/com/android/server/am/trace/SmartTraceUtils.java @@ -0,0 +1,172 @@ +/* Copyright (c) 2021 The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package com.android.server.am.trace; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Comparator; +import java.util.Set; + +import static android.text.format.DateUtils.DAY_IN_MILLIS; + +import android.os.SystemProperties; +import android.text.TextUtils; +import android.util.Slog; + +public class SmartTraceUtils { + // true to enable smart trace function + public static final String PROP_ENABLE_SMART_TRACE= "persist.sys.smtrace.enable"; + public static final String PROP_ENABLE_ON_BG_APP = "persist.sys.smtrace.bgapp.enable"; + public static final String PROP_ENABLE_PERFETTO_DUMP = "persist.sys.perfetto_dump.enable"; + public static final String PROP_ENABLE_PERFETTO_ON_BG_APP = "persist.sys.perfetto.bgapp.enable"; + //whether need to dump process defined in NATIVE_STACKS_OF_INTEREST Watchdog.java + //default value false + public static final String PROP_ENABLE_DUMP_PREDEFINED_PIDS = + "persist.sys.smtrace.dump.predefined_pids.enable"; + //defined extra cmdline to dump trace + public static final String PROP_DUMP_CMDLINES= "persist.sys.smtrace.dump.cmdlines.extra"; + //whether need recursive find the blocked target process + public static final String PROP_ENABLE_RECURSIVE_MODE = + "persist.sys.smtrace.recursivemode.enable"; + + public static final int DUMP_MAX_COUNT = 10; + private static final String PROP_PERFETTO_COMMAND = "sys.perfetto.cmd"; + //should not set by user + private static final String PROP_DUMP_CMD = "sys.smtrace.cmd"; + //perfetto max file count + private static final String PROP_PERFETTO_MAX_TRACE_COUNT= + "persist.sys.perfetto.max_trace_count"; + private static final String TRACE_DIRECTORY = "/data/misc/perfetto-traces/"; + private static final String TAG = "SmartTraceUtils"; + + public static boolean isSmartTraceEnabled() { + return SystemProperties.getBoolean(PROP_ENABLE_SMART_TRACE, false); + } + + public static boolean isSmartTraceEnabledOnBgApp() { + return SystemProperties.getBoolean(PROP_ENABLE_ON_BG_APP, true); + } + + public static boolean isDumpPredefinedPidsEnabled() { + return SystemProperties.getBoolean(PROP_ENABLE_DUMP_PREDEFINED_PIDS, false); + } + + public static boolean isPerfettoDumpEnabled() { + return SystemProperties.getBoolean(PROP_ENABLE_PERFETTO_DUMP, false); + } + + public static boolean isPerfettoDumpEnabledOnBgApp() { + return SystemProperties.getBoolean(PROP_ENABLE_PERFETTO_ON_BG_APP, true); + } + + public static boolean isRecursiveModeEnabled() { + return SystemProperties.getBoolean(PROP_ENABLE_RECURSIVE_MODE, true); + } + + //process ids store in "sys.smtrace.cmd" property shows IPC communicate with + //system process, it requires /system/bin/binder_trace_dump.sh tool to dump their trace + //and reset property value to "" after work finished. + public static void dumpStackTraces(int pid, ArrayList<Integer> firstPids, + ArrayList<Integer> nativePids, File outputFile) { + if(!isSmartTraceEnabled()) { + return; + } + if (isDumpingOn()){ + Slog.e(TAG, + "Attempting to run smart trace dump but trace is already in progress, skip it"); + return; + } + Set<Integer> pidSet = getTargetPidsStuckInBinder(pid, firstPids, nativePids, outputFile); + if(pidSet != null && pidSet.size() != 0) { + StringBuilder sb = new StringBuilder(); + sb.append(pid); + pidSet.forEach(p->{sb.append(","); sb.append(p);}); + sb.append(":"+outputFile.getPath()); + SystemProperties.set(PROP_DUMP_CMD,sb.toString()); + Slog.i(TAG, "Start collect stack trace for "+sb.toString()); + } + } + + public static boolean traceStart() { + if (isTracingOn()){ + Slog.e(TAG, + "Attempting to start perfetto trace but trace is already in progress, skip it"); + return false; + } + Slog.i(TAG,"Perfetto trace start.."); + SystemProperties.set(PROP_PERFETTO_COMMAND,"START"); + return true; + } + + private static boolean isDumpingOn() { + return !TextUtils.isEmpty(SystemProperties.get(PROP_DUMP_CMD,"")); + } + + private static boolean isTracingOn() { + return !TextUtils.isEmpty(SystemProperties.get(PROP_PERFETTO_COMMAND,"")); + } + + private static Set<Integer> getTargetPidsStuckInBinder(int pid, ArrayList<Integer> firstPids, + ArrayList<Integer> nativePids, File outputFile) { + BinderTransactions transactions = new BinderTransactions(isRecursiveModeEnabled()); + transactions.binderStateRead(outputFile); + Set<Integer> pidSet = transactions.getTargetPidsStuckInBinder(pid); + //remove duplicate process + pidSet.removeAll(firstPids); + if(nativePids != null){ + pidSet.removeAll(nativePids); + } + + int[] extraPids = readExtraCmdlinesFromProperty(); + if(extraPids != null) { + for(int p: extraPids){ + pidSet.add(p); + } + } + return pidSet; + } + + private static int[] readExtraCmdlinesFromProperty() { + String cmdlines = SystemProperties.get(PROP_DUMP_CMDLINES, ""); + if (TextUtils.isEmpty(cmdlines)) { + return null; + } + + try { + return android.os.Process.getPidsForCommands(cmdlines.split(",")); + }catch(NullPointerException e) { + Slog.e(TAG, "Exception get pid for commonds " + cmdlines, e); + }catch(OutOfMemoryError e) { + Slog.e(TAG, "Out of Memory when get pid for commonds " + cmdlines, e); + } + return null; + } +} diff --git a/services/core/java/com/android/server/audio/AudioDeviceBroker.java b/services/core/java/com/android/server/audio/AudioDeviceBroker.java index 054a26f9c0fb..ddadf53731c8 100644 --- a/services/core/java/com/android/server/audio/AudioDeviceBroker.java +++ b/services/core/java/com/android/server/audio/AudioDeviceBroker.java @@ -12,6 +12,11 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + * */ package com.android.server.audio; @@ -49,6 +54,7 @@ import android.os.PowerManager; import android.os.RemoteCallbackList; import android.os.RemoteException; import android.os.SystemClock; +import android.os.SystemProperties; import android.os.UserHandle; import android.provider.Settings; import android.text.TextUtils; @@ -428,7 +434,7 @@ public class AudioDeviceBroker { // LE Audio it stays the same and we must trigger the proper stream volume alignment, if // LE Audio communication device is activated after the audio system has already switched to // MODE_IN_CALL mode. - if (isBluetoothLeAudioRequested()) { + if (isBluetoothLeAudioRequested() && device != null) { final int streamType = mAudioService.getBluetoothContextualVolumeStream(); final int leAudioVolIndex = getVssVolumeForDevice(streamType, device.getInternalType()); final int leAudioMaxVolIndex = getMaxVssVolumeForStream(streamType); @@ -665,7 +671,12 @@ public class AudioDeviceBroker { * @return true if Bluetooth SCO is preferred , false otherwise. */ /*package*/ boolean isBluetoothScoOn() { - return isDeviceOnForCommunication(AudioDeviceInfo.TYPE_BLUETOOTH_SCO); + boolean mVoipLeaWarEnabled = + SystemProperties.getBoolean("persist.enable.bluetooth.voipleawar", false); + return isDeviceOnForCommunication(AudioDeviceInfo.TYPE_BLUETOOTH_SCO) || + (mVoipLeaWarEnabled && isBluetoothScoRequested() && + mActiveCommunicationDevice != null && + mActiveCommunicationDevice.getType() == AudioDeviceInfo.TYPE_BLE_HEADSET); } /*package*/ boolean isBluetoothScoActive() { @@ -871,9 +882,30 @@ public class AudioDeviceBroker { .set(MediaMetrics.Property.STATUS, data.mInfo.getProfile()) .record(); synchronized (mDeviceStateLock) { - postBluetoothDeviceConfigChange(createBtDeviceInfo(data, data.mNewDevice, - BluetoothProfile.STATE_CONNECTED)); + if (mDeviceInventory.isA2dpDeviceConnected(data.mPreviousDevice)) { + postBluetoothDeviceConfigChange(createBtDeviceInfo(data, data.mNewDevice, + BluetoothProfile.STATE_CONNECTED)); + + } else { + btMediaMetricRecord(data.mNewDevice, MediaMetrics.Value.CONNECTED, data); + sendLMsgNoDelay(MSG_L_BT_ACTIVE_DEVICE_CHANGE_EXT, SENDMSG_QUEUE, + createBtDeviceInfo(data, data.mNewDevice, + BluetoothProfile.STATE_CONNECTED)); + } } + } else if (data.mPreviousDevice != null && data.mNewDevice != null + && data.mInfo.getProfile() == BluetoothProfile.A2DP + && mDeviceInventory.isA2dpDeviceConnected(data.mPreviousDevice)) { + final String name = TextUtils.emptyIfNull(data.mNewDevice.getName()); + new MediaMetrics.Item(MediaMetrics.Name.AUDIO_DEVICE + MediaMetrics.SEPARATOR + + "queueOnBluetoothActiveDeviceChanged_update") + .set(MediaMetrics.Property.NAME, name) + .set(MediaMetrics.Property.STATUS, data.mInfo.getProfile()) + .record(); + synchronized (mDeviceStateLock) { + postBluetoothDeviceConfigChange(createBtDeviceInfo(data, data.mNewDevice, + BluetoothProfile.STATE_CONNECTED)); + } } else { synchronized (mDeviceStateLock) { if (data.mPreviousDevice != null) { @@ -998,9 +1030,16 @@ public class AudioDeviceBroker { if (AudioService.DEBUG_COMM_RTE) { Log.v(TAG, "setBluetoothScoOn: " + on + " " + eventSource); } + boolean mVoipLeaWarEnabled = + SystemProperties.getBoolean("persist.enable.bluetooth.voipleawar", false); synchronized (mBluetoothAudioStateLock) { mBluetoothScoOn = on; - updateAudioHalBluetoothState(); + // Avoid update BT_SCO=on to Audio Hal if SCO is not connected in BT app + if (mVoipLeaWarEnabled && on && !mBtHelper.isBluetoothScoOn()) { + Log.v(TAG, "skip updateAudioHalBluetoothState if SCO is not on" ); + } else { + updateAudioHalBluetoothState(); + } postUpdateCommunicationRouteClient(eventSource); } } @@ -1111,6 +1150,10 @@ public class AudioDeviceBroker { sendLMsgNoDelay(MSG_L_BLUETOOTH_DEVICE_CONFIG_CHANGE, SENDMSG_QUEUE, info); } + /*package*/ void postBluetoothA2dpDeviceConfigChange(@NonNull BtDeviceInfo info) { + sendLMsgNoDelay(MSG_L_A2DP_DEVICE_CONFIG_CHANGE_SHO, SENDMSG_QUEUE, info); + } + /*package*/ void startBluetoothScoForClient(IBinder cb, int pid, int scoAudioMode, @NonNull String eventSource) { @@ -1700,6 +1743,14 @@ public class AudioDeviceBroker { (BtDeviceInfo) msg.obj, BtHelper.EVENT_DEVICE_CONFIG_CHANGE); } break; + case MSG_L_A2DP_DEVICE_CONFIG_CHANGE_SHO: + final BtDeviceInfo btDeviceInfo = (BtDeviceInfo) msg.obj; + if (btDeviceInfo.mDevice == null) break; + synchronized (mDeviceStateLock) { + final int a2dpCodec = mBtHelper.getA2dpCodec(btDeviceInfo.mDevice); + mDeviceInventory.onBluetoothDeviceConfigChange(btDeviceInfo, BtHelper.EVENT_DEVICE_CONFIG_CHANGE); + } + break; case MSG_BROADCAST_AUDIO_BECOMING_NOISY: onSendBecomingNoisyIntent(); break; @@ -1821,6 +1872,22 @@ public class AudioDeviceBroker { mDeviceInventory.setBluetoothActiveDevice(info); } } break; + case MSG_L_A2DP_ACTIVE_DEVICE_CHANGE_EXT: { + final BtDeviceInfo info = (BtDeviceInfo) msg.obj; + AudioService.sDeviceLogger.enqueue((new EventLogger.StringEvent( + "handleBluetoothA2dpActiveDeviceChangeExt " + + " state=" + info.mState + // only querying address as this is the only readily available + // field on the device + + " addr=" + info.mDevice.getAddress() + + " prof=" + info.mProfile + " supprNoisy=" + info.mSupprNoisy + + " vol=" + info.mVolume)).printLog(TAG)); + synchronized (mDeviceStateLock) { + mDeviceInventory.handleBluetoothA2dpActiveDeviceChangeExt( + info.mDevice, info.mState, info.mProfile, + info.mSupprNoisy, info.mVolume); + } + } break; case MSG_IL_SAVE_PREF_DEVICES_FOR_STRATEGY: { final int strategy = msg.arg1; final List<AudioDeviceAttributes> devices = @@ -1908,7 +1975,7 @@ public class AudioDeviceBroker { private static final int MSG_I_BT_SERVICE_DISCONNECTED_PROFILE = 22; private static final int MSG_IL_BT_SERVICE_CONNECTED_PROFILE = 23; - // process external command to (dis)connect an A2DP device, obj is BtDeviceConnectionInfo + // process external command to (dis)connect an A2DP device, obj is BtDeviceInfo private static final int MSG_L_A2DP_DEVICE_CONNECTION_CHANGE_EXT = 29; // process external command to (dis)connect a hearing aid device @@ -1928,10 +1995,14 @@ public class AudioDeviceBroker { private static final int MSG_L_UPDATE_COMMUNICATION_ROUTE_CLIENT = 43; private static final int MSG_I_SCO_AUDIO_STATE_CHANGED = 44; + // process external command to (dis)connect or change active A2DP device + private static final int MSG_L_A2DP_ACTIVE_DEVICE_CHANGE_EXT = 64; + private static final int MSG_L_BT_ACTIVE_DEVICE_CHANGE_EXT = 45; // // process set volume for Le Audio, obj is BleVolumeInfo private static final int MSG_II_SET_LE_AUDIO_OUT_VOLUME = 46; + private static final int MSG_L_A2DP_DEVICE_CONFIG_CHANGE_SHO = 41; private static final int MSG_IL_SAVE_NDEF_DEVICE_FOR_STRATEGY = 47; private static final int MSG_IL_SAVE_REMOVE_NDEF_DEVICE_FOR_STRATEGY = 48; @@ -1948,10 +2019,12 @@ public class AudioDeviceBroker { case MSG_IL_BTA2DP_TIMEOUT: case MSG_IL_BTLEAUDIO_TIMEOUT: case MSG_L_BLUETOOTH_DEVICE_CONFIG_CHANGE: + case MSG_L_A2DP_DEVICE_CONFIG_CHANGE_SHO: case MSG_TOGGLE_HDMI: case MSG_L_A2DP_DEVICE_CONNECTION_CHANGE_EXT: case MSG_L_HEARING_AID_DEVICE_CONNECTION_CHANGE_EXT: case MSG_CHECK_MUTE_MUSIC: + case MSG_L_A2DP_ACTIVE_DEVICE_CHANGE_EXT: return true; default: return false; @@ -2040,6 +2113,7 @@ public class AudioDeviceBroker { case MSG_IL_BTA2DP_TIMEOUT: case MSG_IL_BTLEAUDIO_TIMEOUT: case MSG_L_BLUETOOTH_DEVICE_CONFIG_CHANGE: + case MSG_L_A2DP_DEVICE_CONFIG_CHANGE_SHO: if (sLastDeviceConnectMsgTime >= time) { // add a little delay to make sure messages are ordered as expected time = sLastDeviceConnectMsgTime + 30; @@ -2060,6 +2134,7 @@ public class AudioDeviceBroker { MESSAGES_MUTE_MUSIC = new HashSet<>(); MESSAGES_MUTE_MUSIC.add(MSG_L_SET_BT_ACTIVE_DEVICE); MESSAGES_MUTE_MUSIC.add(MSG_L_BLUETOOTH_DEVICE_CONFIG_CHANGE); + MESSAGES_MUTE_MUSIC.add(MSG_L_A2DP_DEVICE_CONFIG_CHANGE_SHO); MESSAGES_MUTE_MUSIC.add(MSG_L_A2DP_DEVICE_CONNECTION_CHANGE_EXT); MESSAGES_MUTE_MUSIC.add(MSG_IIL_SET_FORCE_BT_A2DP_USE); } @@ -2080,7 +2155,8 @@ public class AudioDeviceBroker { // Do not mute on bluetooth event if music is playing on a wired headset. if ((message == MSG_L_SET_BT_ACTIVE_DEVICE || message == MSG_L_A2DP_DEVICE_CONNECTION_CHANGE_EXT - || message == MSG_L_BLUETOOTH_DEVICE_CONFIG_CHANGE) + || message == MSG_L_BLUETOOTH_DEVICE_CONFIG_CHANGE + || message == MSG_L_A2DP_DEVICE_CONFIG_CHANGE_SHO) && AudioSystem.isStreamActive(AudioSystem.STREAM_MUSIC, 0) && hasIntersection(mDeviceInventory.DEVICE_OVERRIDE_A2DP_ROUTE_ON_PLUG_SET, mAudioService.getDeviceSetForStream(AudioSystem.STREAM_MUSIC))) { @@ -2191,7 +2267,7 @@ public class AudioDeviceBroker { // what has been communicated to audio policy manager. The device // returned by requestedCommunicationDevice() can be a dummy SCO device if legacy // APIs are used to start SCO audio. - AudioDeviceAttributes device = mBtHelper.getHeadsetAudioDevice(); + AudioDeviceAttributes device = mBtHelper.getHeadsetAudioDummyDevice(); if (device != null) { return device; } @@ -2222,6 +2298,24 @@ public class AudioDeviceBroker { if (preferredCommunicationDevice == null) { AudioDeviceAttributes defaultDevice = getDefaultCommunicationDevice(); + boolean mVoipLeaWarEnabled = + SystemProperties.getBoolean("persist.enable.bluetooth.voipleawar", false); + if (AudioService.DEBUG_COMM_RTE) { + Log.v(TAG, "onUpdateCommunicationRoute, voipLeaEnabled " + mVoipLeaWarEnabled); + } + if (mVoipLeaWarEnabled) { + AudioDeviceAttributes requestedDevice = requestedCommunicationDevice(); + if (defaultDevice == null && requestedDevice != null && + requestedDevice.getType() == AudioDeviceInfo.TYPE_BLUETOOTH_SCO) { + Log.w(TAG, "onUpdateCommunicationRoute, defaultDevice is null, set it to active BLE device"); + defaultDevice = mDeviceInventory.getDeviceOfType(AudioSystem.DEVICE_OUT_BLE_HEADSET); + } else if (defaultDevice != null && requestedDevice == null && + defaultDevice.getType() == AudioDeviceInfo.TYPE_BLE_HEADSET) { + Log.w(TAG, "onUpdateCommunicationRoute, requestedDevice is null, clear default BLE device"); + defaultDevice = null; + } + } + if (defaultDevice != null) { mDeviceInventory.setPreferredDevicesForStrategyInt( mCommunicationStrategyId, Arrays.asList(defaultDevice)); diff --git a/services/core/java/com/android/server/audio/AudioDeviceInventory.java b/services/core/java/com/android/server/audio/AudioDeviceInventory.java index 5332acae13ad..7fa7bf62316a 100644 --- a/services/core/java/com/android/server/audio/AudioDeviceInventory.java +++ b/services/core/java/com/android/server/audio/AudioDeviceInventory.java @@ -12,6 +12,11 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + * */ package com.android.server.audio; @@ -31,6 +36,7 @@ import android.media.AudioManager; import android.media.AudioPort; import android.media.AudioRoutesInfo; import android.media.AudioSystem; +import android.media.BluetoothProfileConnectionInfo; import android.media.IAudioRoutesObserver; import android.media.ICapturePresetDevicesRoleDispatcher; import android.media.IStrategyNonDefaultDevicesDispatcher; @@ -522,7 +528,7 @@ public class AudioDeviceInventory { if (switchToUnavailable) { makeA2dpSrcUnavailable(address); } else if (switchToAvailable) { - makeA2dpSrcAvailable(address); + makeA2dpSrcAvailable(address, btInfo.mCodec); } break; case BluetoothProfile.A2DP: @@ -568,7 +574,7 @@ public class AudioDeviceInventory { MediaMetrics.Item mmi = new MediaMetrics.Item(mMetricsId + "onBluetoothDeviceConfigChange") .set(MediaMetrics.Property.EVENT, BtHelper.deviceEventToString(event)); - + boolean a2dpCodecChange = false; final BluetoothDevice btDevice = btInfo.mDevice; if (btDevice == null) { mmi.set(MediaMetrics.Property.EARLY_RETURN, "btDevice null").record(); @@ -589,7 +595,20 @@ public class AudioDeviceInventory { + " event=" + BtHelper.deviceEventToString(event))); synchronized (mDevicesLock) { + final String key = DeviceInfo.makeDeviceListKey( + AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, address); + DeviceInfo di = mConnectedDevices.get(key); + if (di == null) { + Log.e(TAG, "invalid null DeviceInfo in onBluetoothA2dpDeviceConfigChange"); + mmi.set(MediaMetrics.Property.EARLY_RETURN, "null DeviceInfo").record(); + } + if (mDeviceBroker.hasScheduledA2dpConnection(btDevice)) { + //Incase of Active device change, mConnectedDevices might have already + //updated in handleBluetoothA2dpActiveDeviceChangeExt + //Now if we are ignoring active device change,update mApmConnected , + //so that next connection events are handled + mApmConnectedDevices.replace(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, key); AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent( "A2dp config change ignored (scheduled connection change)") .printLog(TAG)); @@ -597,58 +616,77 @@ public class AudioDeviceInventory { .record(); return; } - final String key = DeviceInfo.makeDeviceListKey( - AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, address); - final DeviceInfo di = mConnectedDevices.get(key); - if (di == null) { - Log.e(TAG, "invalid null DeviceInfo in onBluetoothDeviceConfigChange"); - mmi.set(MediaMetrics.Property.EARLY_RETURN, "null DeviceInfo").record(); - return; - } - mmi.set(MediaMetrics.Property.ADDRESS, address) + if (di == null) { + // Device is connected + synchronized (mConnectedDevices) { + for (Map.Entry<String, DeviceInfo> existingDevice : mConnectedDevices.entrySet()) { + if (existingDevice.getValue().mDeviceType != AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP) { + continue; + } + // A2DP device exists, handle active device change + mConnectedDevices.remove(existingDevice.getKey()); + mConnectedDevices.put(key, new DeviceInfo( + AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, BtHelper.getName(btDevice), + address, audioCodec)); + di = mConnectedDevices.get(key); + mmi.set(MediaMetrics.Property.ADDRESS, address) + .set(MediaMetrics.Property.ENCODING, + AudioSystem.audioFormatToString(audioCodec)) + .set(MediaMetrics.Property.INDEX, volume) + .set(MediaMetrics.Property.NAME, di.mDeviceName); + mApmConnectedDevices.replace(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, key); + if (volume != -1) { + mDeviceBroker.postSetVolumeIndexOnDevice(AudioSystem.STREAM_MUSIC, + // convert index to internal representation in VolumeStreamState + volume * 10, + AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, + "onBluetoothA2dpDeviceConfigChange"); + } + break; + } + } + } else if (event == BtHelper.EVENT_DEVICE_CONFIG_CHANGE) { + mmi.set(MediaMetrics.Property.ADDRESS, address) .set(MediaMetrics.Property.ENCODING, AudioSystem.audioFormatToString(audioCodec)) .set(MediaMetrics.Property.INDEX, volume) .set(MediaMetrics.Property.NAME, di.mDeviceName); - - - if (event == BtHelper.EVENT_DEVICE_CONFIG_CHANGE) { - boolean a2dpCodecChange = false; if (btInfo.mProfile == BluetoothProfile.A2DP) { if (di.mDeviceCodecFormat != audioCodec) { di.mDeviceCodecFormat = audioCodec; mConnectedDevices.replace(key, di); a2dpCodecChange = true; } - final int res = mAudioSystem.handleDeviceConfigChange( - btInfo.mAudioSystemDevice, address, - BtHelper.getName(btDevice), audioCodec); - - if (res != AudioSystem.AUDIO_STATUS_OK) { - AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent( - "APM handleDeviceConfigChange failed for A2DP device addr=" - + address + " codec=" - + AudioSystem.audioFormatToString(audioCodec)) - .printLog(TAG)); - - // force A2DP device disconnection in case of error so that AudioService - // state is consistent with audio policy manager state - setBluetoothActiveDevice(new AudioDeviceBroker.BtDeviceInfo(btInfo, - BluetoothProfile.STATE_DISCONNECTED)); - } else { - AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent( - "APM handleDeviceConfigChange success for A2DP device addr=" - + address - + " codec=" + AudioSystem.audioFormatToString(audioCodec)) - .printLog(TAG)); - - } - } - if (!a2dpCodecChange) { - updateBluetoothPreferredModes_l(btDevice /*connectedDevice*/); } } + + final int res = mAudioSystem.handleDeviceConfigChange( + btInfo.mAudioSystemDevice, address, + BtHelper.getName(btDevice), audioCodec); + + if (res != AudioSystem.AUDIO_STATUS_OK) { + AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent( + "APM handleDeviceConfigChange failed for A2DP device addr=" + + address + " codec=" + + AudioSystem.audioFormatToString(audioCodec)) + .printLog(TAG)); + + // force A2DP device disconnection in case of error so that AudioService + // state is consistent with audio policy manager state + setBluetoothActiveDevice(new AudioDeviceBroker.BtDeviceInfo(btInfo, + BluetoothProfile.STATE_DISCONNECTED)); + } else { + AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent( + "APM handleDeviceConfigChange success for A2DP device addr=" + + address + + " codec=" + AudioSystem.audioFormatToString(audioCodec)) + .printLog(TAG)); + } + + if (!a2dpCodecChange) { + updateBluetoothPreferredModes_l(btDevice /*connectedDevice*/); + } } mmi.record(); } @@ -1483,15 +1521,11 @@ public class AudioDeviceInventory { } /*package*/ void disconnectLeAudio(int device) { - if (device != AudioSystem.DEVICE_OUT_BLE_HEADSET - && device != AudioSystem.DEVICE_OUT_BLE_BROADCAST) { - Log.e(TAG, "disconnectLeAudio: Can't disconnect not LE Audio device " + device); - return; - } - synchronized (mDevicesLock) { final ArraySet<String> toRemove = new ArraySet<>(); - // Disconnect ALL DEVICE_OUT_BLE_HEADSET or DEVICE_OUT_BLE_BROADCAST devices + /* Disconnect ALL DEVICE_OUT_BLE_HEADSET, + * DEVICE_IN_BLE_HEADSET or DEVICE_OUT_BLE_BROADCAST devices + */ mConnectedDevices.values().forEach(deviceInfo -> { if (deviceInfo.mDeviceType == device) { toRemove.add(deviceInfo.mDeviceAddress); @@ -1500,9 +1534,13 @@ public class AudioDeviceInventory { new MediaMetrics.Item(mMetricsId + "disconnectLeAudio") .record(); if (toRemove.size() > 0) { - final int delay = checkSendBecomingNoisyIntentInt(device, - AudioService.CONNECTION_STATE_DISCONNECTED, + final int delay; + if (device != AudioSystem.DEVICE_IN_BLE_HEADSET) { + delay = checkSendBecomingNoisyIntentInt(device, AudioService.CONNECTION_STATE_DISCONNECTED, AudioSystem.DEVICE_NONE); + } else { + delay = 0; + } toRemove.stream().forEach(deviceAddress -> makeLeAudioDeviceUnavailableLater(deviceAddress, device, delay) ); @@ -1512,6 +1550,7 @@ public class AudioDeviceInventory { /*package*/ void disconnectLeAudioUnicast() { disconnectLeAudio(AudioSystem.DEVICE_OUT_BLE_HEADSET); + disconnectLeAudio(AudioSystem.DEVICE_IN_BLE_HEADSET); } /*package*/ void disconnectLeAudioBroadcast() { @@ -1580,6 +1619,63 @@ public class AudioDeviceInventory { return delay; } + /*package*/ void handleBluetoothA2dpActiveDeviceChangeExt( + @NonNull BluetoothDevice device, + @AudioService.BtProfileConnectionState int state, int profile, + boolean suppressNoisyIntent, int a2dpVolume) { + if (state == BluetoothProfile.STATE_DISCONNECTED) { + mDeviceBroker.queueOnBluetoothActiveDeviceChanged( + new AudioDeviceBroker.BtDeviceChangedData(null, device, new BluetoothProfileConnectionInfo(profile), "AudioDeviceInventory")); + BtHelper.SetA2dpActiveDevice(null); + return; + } + + if (state == BluetoothProfile.STATE_CONNECTED && profile == BluetoothProfile.A2DP_SINK) { + mDeviceBroker.queueOnBluetoothActiveDeviceChanged( + new AudioDeviceBroker.BtDeviceChangedData(device, null, new BluetoothProfileConnectionInfo(profile), "AudioDeviceInventory")); + return; + } + + // state == BluetoothProfile.STATE_CONNECTED + synchronized (mConnectedDevices) { + final String address = device.getAddress(); + BtHelper btHelper = new BtHelper(mDeviceBroker); + final int a2dpCodec = btHelper.getA2dpCodec(device); + final String deviceKey = DeviceInfo.makeDeviceListKey( + AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, address); + DeviceInfo deviceInfo = mConnectedDevices.get(deviceKey); + if (deviceInfo != null) { + // Device config change for matching A2DP device + mDeviceBroker.postBluetoothDeviceConfigChange(new AudioDeviceBroker.BtDeviceInfo(device, profile)); + return; + } + for (Map.Entry<String, DeviceInfo> existingDevice : mConnectedDevices.entrySet()) { + if (existingDevice.getValue().mDeviceType != AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP) { + continue; + } + // A2DP device exists, handle active device change + mConnectedDevices.remove(existingDevice.getKey()); + mConnectedDevices.put(deviceKey, new DeviceInfo( + AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, BtHelper.getName(device), + address, a2dpCodec)); + if (BtHelper.isTwsPlusSwitch(device, existingDevice.getValue().mDeviceAddress)) { + BtHelper.SetA2dpActiveDevice(device); + if (AudioService.DEBUG_DEVICES) { + Log.d(TAG,"TWS+ device switch"); + } + return; + } + //Bug(b/) + //mDeviceBroker.queueOnBluetoothActiveDeviceChanged( + // new AudioDeviceBroker.BtDeviceChangedData(null, existingDevice, new BtProfileConnectionInfo(profile), "AudioDeviceInventory")); + return; + } + } + // New A2DP device connection + mDeviceBroker.queueOnBluetoothActiveDeviceChanged( + new AudioDeviceBroker.BtDeviceChangedData(device, null, new BluetoothProfileConnectionInfo(profile), "AudioDeviceInventory")); + } + /*package*/ int setWiredDeviceConnectionState(AudioDeviceAttributes attributes, @AudioService.ConnectionState int state, String caller) { synchronized (mDevicesLock) { @@ -1625,8 +1721,13 @@ public class AudioDeviceInventory { AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent( "APM failed to make available A2DP device addr=" + address + " error=" + res).printLog(TAG)); - // TODO: connection failed, stop here - // TODO: return; + // If error is audioserver died,add device to the list,so that during restart AS will + // restore by triggering onRestoreDevices to add A2DP device to APM by calling + // setDeviceConnection + if (res != AudioSystem.AUDIO_STATUS_SERVER_DIED) { + return; + } + } else { AudioService.sDeviceLogger.enqueue(new EventLogger.StringEvent( "A2DP device addr=" + address + " now available").printLog(TAG)); @@ -1923,13 +2024,22 @@ public class AudioDeviceInventory { mDeviceBroker.setA2dpTimeout(address, a2dpCodec, delayMs); } + @GuardedBy("mDevicesLock") + private void makeLeAudioUnavailableLater(String address, int delayMs, int device) { + final String deviceKey = + DeviceInfo.makeDeviceListKey(device, address); + // the device will be made unavailable later, so consider it disconnected right away + mConnectedDevices.remove(deviceKey); + // send the delayed message to make the device unavailable later + mDeviceBroker.setLeAudioTimeout(address, device, delayMs); + } @GuardedBy("mDevicesLock") - private void makeA2dpSrcAvailable(String address) { + private void makeA2dpSrcAvailable(String address, int a2dpCodec) { mAudioSystem.setDeviceConnectionState(new AudioDeviceAttributes( AudioSystem.DEVICE_IN_BLUETOOTH_A2DP, address), AudioSystem.DEVICE_STATE_AVAILABLE, - AudioSystem.AUDIO_FORMAT_DEFAULT); + a2dpCodec); mConnectedDevices.put( DeviceInfo.makeDeviceListKey(AudioSystem.DEVICE_IN_BLUETOOTH_A2DP, address), new DeviceInfo(AudioSystem.DEVICE_IN_BLUETOOTH_A2DP, "", address)); @@ -1937,10 +2047,15 @@ public class AudioDeviceInventory { @GuardedBy("mDevicesLock") private void makeA2dpSrcUnavailable(String address) { + final String deviceKey = + DeviceInfo.makeDeviceListKey(AudioSystem.DEVICE_IN_BLUETOOTH_A2DP, address); + final DeviceInfo deviceInfo = mConnectedDevices.get(deviceKey); + final int a2dpCodec = deviceInfo != null ? deviceInfo.mDeviceCodecFormat : + AudioSystem.AUDIO_FORMAT_DEFAULT; mAudioSystem.setDeviceConnectionState(new AudioDeviceAttributes( AudioSystem.DEVICE_IN_BLUETOOTH_A2DP, address), AudioSystem.DEVICE_STATE_UNAVAILABLE, - AudioSystem.AUDIO_FORMAT_DEFAULT); + a2dpCodec); mConnectedDevices.remove( DeviceInfo.makeDeviceListKey(AudioSystem.DEVICE_IN_BLUETOOTH_A2DP, address)); } @@ -2079,7 +2194,7 @@ public class AudioDeviceInventory { : volumeIndex; final int maxIndex = mDeviceBroker.getMaxVssVolumeForStream(streamType); mDeviceBroker.postSetLeAudioVolumeIndex(leAudioVolIndex, maxIndex, streamType); - mDeviceBroker.postApplyVolumeOnDevice(streamType, device, "makeLeAudioDeviceAvailable"); + mDeviceBroker.postSetVolumeIndexOnDevice(streamType, leAudioVolIndex, device, "makeLeAudioDeviceAvailable"); updateBluetoothPreferredModes_l(btInfo.mDevice /*connectedDevice*/); } @@ -2220,7 +2335,7 @@ public class AudioDeviceInventory { return 0; } mDeviceBroker.postBroadcastBecomingNoisy(); - delay = AudioService.BECOMING_NOISY_DELAY_MS; + delay = SystemProperties.getInt("audio.sys.noisy.broadcast.delay", 700); } else { Log.i(TAG, "not sending NOISY: device:0x" + Integer.toHexString(device) + " musicDevice:0x" + Integer.toHexString(musicDevice) diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index d82cef546315..affc95a265ad 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -12,6 +12,11 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + * + * Changes from Qualcomm Innovation Center are provided under the following license: + * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + * */ package com.android.server.audio; @@ -272,6 +277,9 @@ public class AudioService extends IAudioService.Stub /** Debug log sound fx (touchsounds...) in dumpsys */ protected static final boolean DEBUG_LOG_SOUND_FX = false; + /** debug SCO modes */ + protected static final boolean DEBUG_SCO = true; + /** How long to delay before persisting a change in volume/ringer mode. */ private static final int PERSIST_DELAY = 500; @@ -300,6 +308,9 @@ public class AudioService extends IAudioService.Stub // indicates whether the system maps all streams to a single stream. private final boolean mIsSingleVolume; + private static HashMap<String, String> mCachedParams = + new HashMap<String, String>(); + /** * indicates whether STREAM_NOTIFICATION is aliased to STREAM_RING * not final due to test method, see {@link #setNotifAliasRingForTest(boolean)}. @@ -1250,6 +1261,15 @@ public class AudioService extends IAudioService.Stub // done with service initialization, continue additional work in our Handler thread queueMsgUnderWakeLock(mAudioHandler, MSG_INIT_STREAMS_VOLUMES, 0 /* arg1 */, 0 /* arg2 */, null /* obj */, 0 /* delay */); + + mCachedParams.put("hdr_record_on", "false"); + mCachedParams.put("wnr_on", "false"); + mCachedParams.put("ans_on", "false"); + mCachedParams.put("orientation", "landscape"); + mCachedParams.put("inverted", "false"); + mCachedParams.put("facing", "none"); + mCachedParams.put("hdr_audio_channel_count", "0"); + mCachedParams.put("hdr_audio_sampling_rate", "0"); queueMsgUnderWakeLock(mAudioHandler, MSG_INIT_SPATIALIZER, 0 /* arg1 */, 0 /* arg2 */, null /* obj */, 0 /* delay */); } @@ -1622,6 +1642,26 @@ public class AudioService extends IAudioService.Stub // process restarts after a crash, not the first time it is started. AudioSystem.setParameters("restarting=true"); + // Restore cached parameters + String params = new String(""); + Log.i(TAG, "Cached params " + mCachedParams.toString()); + for (HashMap.Entry<String, String> parm : mCachedParams.entrySet()) { + if (!params.isEmpty()) { + params += ";"; + } + Log.i(TAG, "Key " + parm.getKey() + " Value " + parm.getValue()); + params += parm.getKey(); + params += "="; + params += parm.getValue(); + Log.i(TAG, "Params " + params); + } + if (!params.isEmpty()) { + Log.i(TAG, "Restore params " + params); + AudioSystem.setParameters(params); + } else { + Log.i(TAG, "Empty cached params " + params); + } + readAndSetLowRamDevice(); mIsCallScreeningModeSupported = AudioSystem.isCallScreeningModeSupported(); @@ -3290,6 +3330,10 @@ public class AudioService extends IAudioService.Stub final int streamType; synchronized (mForceControlStreamLock) { + if (DEBUG_VOL) Log.d(TAG, "adjustSuggestedStreamVolume() stream=" + suggestedStreamType + + ", flags=" + flags + ", caller=" + caller + + ", volControlStream=" + mVolumeControlStream + + ", userSelect=" + mUserSelectedVolumeControlStream); // Request lock in case mVolumeControlStream is changed by other thread. if (mUserSelectedVolumeControlStream) { // implies mVolumeControlStream != -1 streamType = mVolumeControlStream; @@ -3383,11 +3427,12 @@ public class AudioService extends IAudioService.Stub protected void adjustStreamVolume(int streamType, int direction, int flags, String callingPackage, String caller, int uid, int pid, String attributionTag, boolean hasModifyAudioSettings, int keyEventMode) { + if (DEBUG_VOL) Log.d(TAG, "adjustStreamVolume() stream=" + streamType + ", dir=" + direction + + ", flags=" + flags + ", caller=" + caller); + if (mUseFixedVolume) { return; } - if (DEBUG_VOL) Log.d(TAG, "adjustStreamVolume() stream=" + streamType + ", dir=" + direction - + ", flags=" + flags + ", caller=" + caller); ensureValidDirection(direction); ensureValidStreamType(streamType); @@ -4233,7 +4278,7 @@ public class AudioService extends IAudioService.Stub // other conditions will influence the stream type choice, read on... break; } - if (mVoicePlaybackActive.get()) { + if (mVoicePlaybackActive.get() && mode != AudioSystem.MODE_NORMAL) { return AudioSystem.STREAM_VOICE_CALL; } return AudioSystem.STREAM_MUSIC; @@ -4480,6 +4525,7 @@ public class AudioService extends IAudioService.Stub + ", dev=" + ada + ", calling=" + callingPackage + ")"); } + if (mUseFixedVolume) { return; } @@ -6373,6 +6419,8 @@ public class AudioService extends IAudioService.Stub final String eventSource = new StringBuilder("setSpeakerphoneOn(").append(on) .append(") from u/pid:").append(uid).append("/") .append(pid).toString(); + Log.i(TAG, "In setSpeakerphoneOn(), on: " + on + ", eventSource: " + eventSource); + new MediaMetrics.Item(MediaMetrics.Name.AUDIO_DEVICE + MediaMetrics.SEPARATOR + "setSpeakerphoneOn") .setUid(uid) @@ -6403,9 +6451,11 @@ public class AudioService extends IAudioService.Stub if (!checkAudioSettingsPermission("setBluetoothScoOn()")) { return; } - // Only enable calls from system components if (UserHandle.getCallingAppId() >= FIRST_APPLICATION_UID) { + Log.i(TAG, "In setBluetoothScoOn(), on: "+on+". The calling application Uid: " + + Binder.getCallingUid() + ", is greater than FIRST_APPLICATION_UID" + + " exiting from setBluetoothScoOn()"); mBtScoOnByApp = on; return; } @@ -6415,6 +6465,7 @@ public class AudioService extends IAudioService.Stub final int pid = Binder.getCallingPid(); final String eventSource = new StringBuilder("setBluetoothScoOn(").append(on) .append(") from u/pid:").append(uid).append("/").append(pid).toString(); + Log.i(TAG, "In setBluetoothScoOn(), eventSource: " + eventSource); //bt sco new MediaMetrics.Item(MediaMetrics.Name.AUDIO_DEVICE @@ -6487,6 +6538,7 @@ public class AudioService extends IAudioService.Stub /** @see AudioManager#startBluetoothSco() */ public void startBluetoothSco(IBinder cb, int targetSdkVersion) { + Log.i(TAG, "In startBluetoothSco()"); if (!checkAudioSettingsPermission("startBluetoothSco()")) { return; } @@ -6513,6 +6565,7 @@ public class AudioService extends IAudioService.Stub /** @see AudioManager#startBluetoothScoVirtualCall() */ public void startBluetoothScoVirtualCall(IBinder cb) { + Log.i(TAG, "In startBluetoothScoVirtualCall()"); if (!checkAudioSettingsPermission("startBluetoothScoVirtualCall()")) { return; } @@ -6534,6 +6587,7 @@ public class AudioService extends IAudioService.Stub } void startBluetoothScoInt(IBinder cb, int pid, int scoAudioMode, @NonNull String eventSource) { + Log.i(TAG, "In startBluetoothScoInt(), scoAudioMode: " + scoAudioMode); MediaMetrics.Item mmi = new MediaMetrics.Item(MediaMetrics.Name.AUDIO_BLUETOOTH) .set(MediaMetrics.Property.EVENT, "startBluetoothScoInt") .set(MediaMetrics.Property.SCO_AUDIO_MODE, @@ -6555,6 +6609,7 @@ public class AudioService extends IAudioService.Stub /** @see AudioManager#stopBluetoothSco() */ public void stopBluetoothSco(IBinder cb){ + Log.i(TAG, "In stopBluetoothSco()"); if (!checkAudioSettingsPermission("stopBluetoothSco()") || !mSystemReady) { return; @@ -7615,12 +7670,34 @@ public class AudioService extends IAudioService.Stub mStreamStates[AudioSystem.STREAM_MUSIC].muteInternally(mute); } + /** + * @see AudioManager#handleBluetoothA2dpActiveDeviceChange(BluetoothDevice, int, int, + * boolean, int) + */ + public void handleBluetoothA2dpActiveDeviceChange( + BluetoothDevice device, int state, int profile, boolean suppressNoisyIntent, + int a2dpVolume) { + if (device == null) { + throw new IllegalArgumentException("Illegal null device"); + } + if (profile != BluetoothProfile.A2DP && profile != BluetoothProfile.A2DP_SINK) { + throw new IllegalArgumentException("invalid profile " + profile); + } + if (state != BluetoothProfile.STATE_CONNECTED + && state != BluetoothProfile.STATE_DISCONNECTED) { + throw new IllegalArgumentException("Invalid state " + state); + } + mDeviceBroker.queueOnBluetoothActiveDeviceChanged( + new AudioDeviceBroker.BtDeviceChangedData(device, device, new BluetoothProfileConnectionInfo(profile), "AudioService")); + } + private static final Set<Integer> DEVICE_MEDIA_UNMUTED_ON_PLUG_SET; static { DEVICE_MEDIA_UNMUTED_ON_PLUG_SET = new HashSet<>(); DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.add(AudioSystem.DEVICE_OUT_WIRED_HEADSET); DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.add(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE); DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.add(AudioSystem.DEVICE_OUT_LINE); + DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.add(AudioSystem.DEVICE_OUT_HEARING_AID); DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.addAll(AudioSystem.DEVICE_OUT_ALL_A2DP_SET); DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.addAll(AudioSystem.DEVICE_OUT_ALL_BLE_SET); DEVICE_MEDIA_UNMUTED_ON_PLUG_SET.addAll(AudioSystem.DEVICE_OUT_ALL_USB_SET); @@ -9642,8 +9719,7 @@ public class AudioService extends IAudioService.Stub } } else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) { state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1); - if (state == BluetoothAdapter.STATE_OFF || - state == BluetoothAdapter.STATE_TURNING_OFF) { + if (state == BluetoothAdapter.STATE_OFF) { mDeviceBroker.disconnectAllBluetoothProfiles(); } } else if (action.equals(AudioEffect.ACTION_OPEN_AUDIO_EFFECT_CONTROL_SESSION) || @@ -11179,6 +11255,7 @@ public class AudioService extends IAudioService.Stub + " FromRestrictions=" + mMicMuteFromRestrictions + " FromApi=" + mMicMuteFromApi + " from system=" + mMicMuteFromSystemCached); + pw.print(" mMonitorRotation="); pw.println(mMonitorRotation); dumpAccessibilityServiceUids(pw); dumpAssistantServicesUids(pw); @@ -13041,6 +13118,17 @@ public class AudioService extends IAudioService.Stub } } + public void cacheParameters(String keyValuePairs) { + String[] kvpairs = keyValuePairs.split(";"); + for (String pair : kvpairs) { + String[] kv = pair.split("="); + if (mCachedParams.containsKey(kv[0])) { + String oldVal = mCachedParams.put(kv[0], kv[1]); + Slog.w(TAG, "Updated cached param " + kv[0] + " from " + oldVal + " to " + kv[1]); + } + } + } + /** * @hide * Sets an additional audio output device delay in milliseconds. diff --git a/services/core/java/com/android/server/audio/BtHelper.java b/services/core/java/com/android/server/audio/BtHelper.java index 3560797ce2cf..cc07f90b17ae 100644 --- a/services/core/java/com/android/server/audio/BtHelper.java +++ b/services/core/java/com/android/server/audio/BtHelper.java @@ -44,7 +44,9 @@ import com.android.server.utils.EventLogger; import java.io.PrintWriter; import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Iterator; import java.util.Objects; /** @@ -67,12 +69,15 @@ public class BtHelper { // Bluetooth headset device private @Nullable BluetoothDevice mBluetoothHeadsetDevice; + private @Nullable BluetoothDevice mBluetoothHeadsetDummyDevice; + private @Nullable BluetoothHearingAid mHearingAid; private @Nullable BluetoothLeAudio mLeAudio; // Reference to BluetoothA2dp to query for AbsoluteVolume. - private @Nullable BluetoothA2dp mA2dp; + static private @Nullable BluetoothA2dp mA2dp; + static private @Nullable BluetoothDevice mBluetoothA2dpActiveDevice; // If absolute volume is supported in AVRCP device private boolean mAvrcpAbsVolSupported = false; @@ -170,6 +175,31 @@ public class BtHelper { return deviceName; } + /*packages*/ static void SetA2dpActiveDevice(BluetoothDevice device) { + Log.w(TAG,"SetA2dpActiveDevice for TWS+ pair as " + device); + mBluetoothA2dpActiveDevice = device; + } + + /*packages*/ @NonNull static boolean isTwsPlusSwitch(@NonNull BluetoothDevice device, + String address) { + BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); + BluetoothDevice connDevice = adapter.getRemoteDevice(address); + if (device == null || connDevice == null || + device.getTwsPlusPeerAddress() == null) { + return false; + } + if (device.isTwsPlusDevice() && + connDevice.isTwsPlusDevice() && + device.getTwsPlusPeerAddress().equals(address)) { + if (mBluetoothA2dpActiveDevice == null) { + Log.w(TAG,"Not a TwsPlusSwitch as previous active device was null"); + return false; + } + Log.i(TAG,"isTwsPlusSwitch true"); + return true; + } + return false; + } //---------------------------------------------------------------------- // Interface for AudioDeviceBroker @@ -177,6 +207,9 @@ public class BtHelper { @GuardedBy("AudioDeviceBroker.mDeviceStateLock") /*package*/ synchronized void onSystemReady() { mScoConnectionState = android.media.AudioManager.SCO_AUDIO_STATE_ERROR; + if (AudioService.DEBUG_SCO) { + Log.i(TAG, "In onSystemReady(), calling resetBluetoothSco()"); + } resetBluetoothSco(); getBluetoothHeadset(); @@ -259,6 +292,139 @@ public class BtHelper { return AudioSystem.bluetoothCodecToAudioFormat(btCodecConfig.getCodecType()); } + //SCO device tracking for TWSPLUS or GROUP device + private HashMap<BluetoothDevice, Integer> mScoClientDevices = + new HashMap<BluetoothDevice, Integer>(); + private static final int GROUP_ID_START = 0; + private static final int GROUP_ID_END = 15; + + private void updateTwsPlusScoState(BluetoothDevice device, Integer state) { + if (mScoClientDevices.containsKey(device)) { + Integer prevState = mScoClientDevices.get(device); + Log.i(TAG, "updateTwsPlusScoState: prevState: " + prevState + "state: " + state); + if (state != prevState) { + mScoClientDevices.remove(device); + mScoClientDevices.put(device, state); + } + } else { + mScoClientDevices.put(device, state); + } + } + + private boolean isAudioPathUp() { + boolean ret = false; + Iterator it = mScoClientDevices.entrySet().iterator(); + for (Integer value : mScoClientDevices.values()) { + if (value == BluetoothHeadset.STATE_AUDIO_CONNECTED) { + ret = true; + break; + } + } + Log.d(TAG, "isAudioPathUp returns" + ret); + return ret; + } + + private boolean checkAndUpdatTwsPlusScoState(Intent intent, Integer state) { + //default ret value is true + //so that legacy devices fallsthru + boolean ret = true; + BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); + Log.i(TAG, "device:" + device); + + if (device == null) { + Log.e(TAG, "checkAndUpdatTwsPlusScoState: device is null"); + //intent cant have device has null + //in case it is treat them as non-twsplus case and return true + return ret; + } + + if (device.isTwsPlusDevice()) { + if (state == BluetoothHeadset.STATE_AUDIO_CONNECTED) { + //if adding new Device + //check if there is no device already connected + if (isAudioPathUp()) { + Log.i(TAG, "No need to bringup audio-path"); + ret = false; + } + //Update the States now + updateTwsPlusScoState(device, state); + } else { + //For disconnect cases, update the state first + updateTwsPlusScoState(device, state); + //if deleting new Device + //check if all devices are disconnected + if (isAudioPathUp()) { + Log.i(TAG, "not good to tear down audio-path"); + ret = false; + } + } + } + Log.i(TAG, "checkAndUpdatTwsPlusScoState returns " + ret); + return ret; + } + + private boolean isGroupDevice(BluetoothDevice device) { + int type = device.getDeviceType(); + boolean ret = false; + Log.i(TAG, "Bluetooth device type: " + type); + if (type >= GROUP_ID_START && type <= GROUP_ID_END) + ret = true; + Log.i(TAG, "isGroupDevice return " + ret); + return ret; + } + + private void updateGroupScoState(BluetoothDevice device, Integer state) { + if (mScoClientDevices.containsKey(device)) { + Integer prevState = mScoClientDevices.get(device); + Log.i(TAG, "updateGroupScoState: prevState: " + prevState + "state: " + state); + if (state != prevState) { + mScoClientDevices.remove(device); + mScoClientDevices.put(device, state); + } + } else { + mScoClientDevices.put(device, state); + } + } + + private boolean checkAndUpdateGroupScoState(Intent intent, Integer state) { + //default ret value is true + //so that legacy devices fallsthru + boolean ret = true; + BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); + Log.i(TAG, "device:" + device); + + if (device == null) { + Log.e(TAG, "checkAndUpdateGroupScoState: device is null"); + //intent cant have device has null + //in case it is treat them as non-twsplus case and return true + return ret; + } + + if (isGroupDevice(device)) { + if (state == BluetoothHeadset.STATE_AUDIO_CONNECTED) { + //if adding new Device + //check if there is no device already connected + if (isAudioPathUp()) { + Log.i(TAG, "No need to bringup audio-path"); + ret = false; + } + //Update the States now + updateGroupScoState(device, state); + } else { + //For disconnect cases, update the state first + updateGroupScoState(device, state); + //if deleting new Device + //check if all devices are disconnected + if (isAudioPathUp()) { + Log.i(TAG, "not good to tear down audio-path"); + ret = false; + } + } + } + Log.i(TAG, "checkAndUpdateGroupScoState returns " + ret); + return ret; + } + // @GuardedBy("AudioDeviceBroker.mSetModeLock") @GuardedBy("AudioDeviceBroker.mDeviceStateLock") /*package*/ synchronized void receiveBtEvent(Intent intent) { @@ -271,10 +437,42 @@ public class BtHelper { } else if (action.equals(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED)) { int btState = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, -1); Log.i(TAG,"receiveBtEvent ACTION_AUDIO_STATE_CHANGED: "+btState); - mDeviceBroker.postScoAudioStateChanged(btState); + if (checkAndUpdatTwsPlusScoState(intent, + btState) && + checkAndUpdateGroupScoState(intent, + btState)) { + mDeviceBroker.postScoAudioStateChanged(btState); + } } } + /*package*/ boolean isBluetoothAudioNotConnectedToEarbud() { + //default value as true so that + //non-twsplus device case returns true + boolean ret = true; + + if (mBluetoothHeadsetDevice != null + && mBluetoothHeadsetDevice.isTwsPlusDevice()) { + //If It is TWSplus Device, check for TWS pair device + //Sco state + String pDevAddr = mBluetoothHeadsetDevice.getTwsPlusPeerAddress(); + if (pDevAddr != null) { + BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); + BluetoothDevice peerDev = adapter.getRemoteDevice(pDevAddr); + Log.d(TAG, "peer device audio State: " + mBluetoothHeadset.getAudioState(peerDev)); + if (mBluetoothHeadset.getAudioState(peerDev) + == BluetoothHeadset.STATE_AUDIO_CONNECTED || + mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice) + == BluetoothHeadset.STATE_AUDIO_CONNECTED) { + Log.w(TAG, "TwsPLus Case: one of eb SCO is connected"); + ret = false; + } + } + } + Log.d(TAG, "isBluetoothAudioConnectedToEarbud returns: " + ret); + return ret; + } + /** * Exclusively called from AudioDeviceBroker when handling MSG_I_SCO_AUDIO_STATE_CHANGED * as part of the serialization of the communication route selection @@ -443,10 +641,14 @@ public class BtHelper { // @GuardedBy("AudioDeviceBroker.mSetModeLock") //@GuardedBy("AudioDeviceBroker.mDeviceStateLock") /*package*/ synchronized void resetBluetoothSco() { + if (AudioService.DEBUG_SCO) { + Log.i(TAG, "In resetBluetoothSco(), calling clearAllScoClients()"); + } mScoAudioState = SCO_STATE_INACTIVE; broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_DISCONNECTED); mDeviceBroker.clearA2dpSuspended(false /* internalOnly */); mDeviceBroker.clearLeAudioSuspended(false /* internalOnly */); + mScoClientDevices.clear(); mDeviceBroker.setBluetoothScoOn(false, "resetBluetoothSco"); } @@ -573,16 +775,28 @@ public class BtHelper { return btHeadsetDeviceToAudioDevice(mBluetoothHeadsetDevice); } + @Nullable AudioDeviceAttributes getHeadsetAudioDummyDevice() { + if (mBluetoothHeadsetDummyDevice == null) { + return null; + } + return btHeadsetDeviceToAudioDevice(mBluetoothHeadsetDummyDevice); + } + private static AudioDeviceAttributes btHeadsetDeviceToAudioDevice(BluetoothDevice btDevice) { if (btDevice == null) { return new AudioDeviceAttributes(AudioSystem.DEVICE_OUT_BLUETOOTH_SCO, ""); } String address = btDevice.getAddress(); - String name = getName(btDevice); + String dummyAddress = "00:00:00:00:00:00"; + String name = ""; + if (!address.equals(dummyAddress)) { + name = getName(btDevice); + } if (!BluetoothAdapter.checkBluetoothAddress(address)) { address = ""; } - BluetoothClass btClass = btDevice.getBluetoothClass(); + BluetoothClass btClass = dummyAddress.equals(address) ? null : + btDevice.getBluetoothClass(); int nativeType = AudioSystem.DEVICE_OUT_BLUETOOTH_SCO; if (btClass != null) { switch (btClass.getDeviceClass()) { @@ -607,6 +821,10 @@ public class BtHelper { if (btDevice == null) { return true; } + String address = btDevice.getAddress(); + String dummyAddress = "00:00:00:00:00:00"; + BluetoothClass btClass = dummyAddress.equals(address) ? null : + btDevice.getBluetoothClass(); int inDevice = AudioSystem.DEVICE_IN_BLUETOOTH_SCO_HEADSET; AudioDeviceAttributes audioDevice = btHeadsetDeviceToAudioDevice(btDevice); boolean result = false; @@ -643,21 +861,45 @@ public class BtHelper { Log.i(TAG, "setBtScoActiveDevice: " + getAnonymizedAddress(mBluetoothHeadsetDevice) + " -> " + getAnonymizedAddress(btDevice)); final BluetoothDevice previousActiveDevice = mBluetoothHeadsetDevice; + if (mBluetoothHeadsetDevice != null && mBluetoothHeadsetDevice.isTwsPlusDevice() + && btDevice != null + && Objects.equals(mBluetoothHeadsetDevice.getTwsPlusPeerAddress(), btDevice.getAddress())) { + Log.i(TAG, "setBtScoActiveDevice: Active device switch between twsplus devices"); + //Keep the same mBluetoothHeadsetDevice as current Active so + //that It tears down when active becomes null + return; + } if (Objects.equals(btDevice, previousActiveDevice)) { return; } - if (!handleBtScoActiveDeviceChange(previousActiveDevice, false)) { - Log.w(TAG, "setBtScoActiveDevice() failed to remove previous device " - + getAnonymizedAddress(previousActiveDevice)); + String DummyAddress = "00:00:00:00:00:00"; + BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); + if (adapter == null) { + Log.i(TAG, "adapter is null, returning from setBtScoActiveDevice"); + return; } - if (!handleBtScoActiveDeviceChange(btDevice, true)) { - Log.e(TAG, "setBtScoActiveDevice() failed to add new device " - + getAnonymizedAddress(btDevice)); - // set mBluetoothHeadsetDevice to null when failing to add new device - btDevice = null; + mBluetoothHeadsetDummyDevice = adapter.getRemoteDevice(DummyAddress); + if (mBluetoothHeadsetDevice == null && btDevice != null) { + //SCO device entry is added to mConnectedDevices hash map only when active + //device connects for the first time. + if (!handleBtScoActiveDeviceChange(mBluetoothHeadsetDummyDevice, true)) { + Log.e(TAG, "setBtScoActiveDevice() failed to add new device " + btDevice); + // set mBluetoothHeadsetDevice to null when failing to add new device + btDevice = null; + } + } + if (mBluetoothHeadsetDevice != null && btDevice == null) { + //SCO device entry is removed from mConnectedDevices hash map only when active + //device is disconnected. + if (!handleBtScoActiveDeviceChange(mBluetoothHeadsetDummyDevice, false)) { + Log.w(TAG, "setBtScoActiveDevice() failed to remove previous device " + + previousActiveDevice); + } } mBluetoothHeadsetDevice = btDevice; if (mBluetoothHeadsetDevice == null) { + mBluetoothHeadsetDummyDevice = null; + Log.i(TAG, "In setBtScoActiveDevice(), calling resetBluetoothSco()"); resetBluetoothSco(); } } @@ -667,6 +909,10 @@ public class BtHelper { private BluetoothProfile.ServiceListener mBluetoothProfileServiceListener = new BluetoothProfile.ServiceListener() { public void onServiceConnected(int profile, BluetoothProfile proxy) { + if (AudioService.DEBUG_SCO) { + Log.i(TAG, "In onServiceConnected(), profile: " + profile + + ", proxy: "+proxy); + } switch(profile) { case BluetoothProfile.A2DP: case BluetoothProfile.HEADSET: @@ -711,28 +957,32 @@ public class BtHelper { //---------------------------------------------------------------------- - // @GuardedBy("AudioDeviceBroker.mSetModeLock") - //@GuardedBy("AudioDeviceBroker.mDeviceStateLock") - @GuardedBy("BtHelper.this") - private boolean requestScoState(int state, int scoAudioMode) { - checkScoAudioState(); - if (state == BluetoothHeadset.STATE_AUDIO_CONNECTED) { - // Make sure that the state transitions to CONNECTING even if we cannot initiate - // the connection. - broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_CONNECTING); - switch (mScoAudioState) { - case SCO_STATE_INACTIVE: - mScoAudioMode = scoAudioMode; - if (scoAudioMode == SCO_MODE_UNDEFINED) { - mScoAudioMode = SCO_MODE_VIRTUAL_CALL; - if (mBluetoothHeadsetDevice != null) { - mScoAudioMode = Settings.Global.getInt( - mDeviceBroker.getContentResolver(), - "bluetooth_sco_channel_" - + mBluetoothHeadsetDevice.getAddress(), - SCO_MODE_VIRTUAL_CALL); - if (mScoAudioMode > SCO_MODE_MAX || mScoAudioMode < 0) { - mScoAudioMode = SCO_MODE_VIRTUAL_CALL; + // @GuardedBy("AudioDeviceBroker.mSetModeLock") + //@GuardedBy("AudioDeviceBroker.mDeviceStateLock") + @GuardedBy("BtHelper.this") + private boolean requestScoState(int state, int scoAudioMode) { + if (AudioService.DEBUG_SCO) { + Log.i(TAG, "In requestScoState(), state: " + state + ", scoAudioMode: " + + scoAudioMode); + } + checkScoAudioState(); + if (state == BluetoothHeadset.STATE_AUDIO_CONNECTED) { + // Make sure that the state transitions to CONNECTING even if we cannot initiate + // the connection. + broadcastScoConnectionState(AudioManager.SCO_AUDIO_STATE_CONNECTING); + switch (mScoAudioState) { + case SCO_STATE_INACTIVE: + mScoAudioMode = scoAudioMode; + if (scoAudioMode == SCO_MODE_UNDEFINED) { + mScoAudioMode = SCO_MODE_VIRTUAL_CALL; + if (mBluetoothHeadsetDevice != null) { + mScoAudioMode = Settings.Global.getInt( + mDeviceBroker.getContentResolver(), + "bluetooth_sco_channel_" + + mBluetoothHeadsetDevice.getAddress(), + SCO_MODE_VIRTUAL_CALL); + if (mScoAudioMode > SCO_MODE_MAX || mScoAudioMode < 0) { + mScoAudioMode = SCO_MODE_VIRTUAL_CALL; } } } @@ -851,10 +1101,22 @@ public class BtHelper { private static boolean disconnectBluetoothScoAudioHelper(BluetoothHeadset bluetoothHeadset, BluetoothDevice device, int scoAudioMode) { + if (AudioService.DEBUG_SCO) { + Log.i(TAG, "In disconnectBluetoothScoAudioHelper(), scoAudioMode: " + scoAudioMode + + ", bluetoothHeadset: " + bluetoothHeadset + ", BluetoothDevice: " + device); + } switch (scoAudioMode) { case SCO_MODE_VIRTUAL_CALL: + if (AudioService.DEBUG_SCO) { + Log.i(TAG, "In disconnectBluetoothScoAudioHelper(), calling " + + "stopScoUsingVirtualVoiceCall()"); + } return bluetoothHeadset.stopScoUsingVirtualVoiceCall(); case SCO_MODE_VR: + if (AudioService.DEBUG_SCO) { + Log.i(TAG, "In disconnectBluetoothScoAudioHelper(), calling " + + "stopVoiceRecognition()"); + } return bluetoothHeadset.stopVoiceRecognition(device); default: return false; @@ -863,10 +1125,22 @@ public class BtHelper { private static boolean connectBluetoothScoAudioHelper(BluetoothHeadset bluetoothHeadset, BluetoothDevice device, int scoAudioMode) { + if (AudioService.DEBUG_SCO) { + Log.i(TAG, "In connectBluetoothScoAudioHelper(), scoAudioMode: " + scoAudioMode + + ", bluetoothHeadset: " + bluetoothHeadset + ", BluetoothDevice: " + device); + } switch (scoAudioMode) { case SCO_MODE_VIRTUAL_CALL: + if (AudioService.DEBUG_SCO) { + Log.i(TAG, "In connectBluetoothScoAudioHelper(), calling " + + "startScoUsingVirtualVoiceCall()"); + } return bluetoothHeadset.startScoUsingVirtualVoiceCall(); case SCO_MODE_VR: + if (AudioService.DEBUG_SCO) { + Log.i(TAG, "In connectBluetoothScoAudioHelper(), calling " + + "startVoiceRecognition()"); + } return bluetoothHeadset.startVoiceRecognition(device); default: return false; @@ -881,6 +1155,9 @@ public class BtHelper { != BluetoothHeadset.STATE_AUDIO_DISCONNECTED) { mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL; } + if (AudioService.DEBUG_SCO) { + Log.i(TAG, "In checkScoAudioState(), mScoAudioState: " + mScoAudioState); + } } private boolean getBluetoothHeadset() { diff --git a/services/core/java/com/android/server/display/DisplayDeviceConfig.java b/services/core/java/com/android/server/display/DisplayDeviceConfig.java index 7a797dd2250c..3b994b1d7aa1 100644 --- a/services/core/java/com/android/server/display/DisplayDeviceConfig.java +++ b/services/core/java/com/android/server/display/DisplayDeviceConfig.java @@ -495,7 +495,9 @@ public class DisplayDeviceConfig { private final SensorData mScreenOffBrightnessSensor = new SensorData(); // The details of the proximity sensor associated with this display. - private final SensorData mProximitySensor = new SensorData(); + // Is null when no sensor should be used for that display + @Nullable + private SensorData mProximitySensor = new SensorData(); private final List<RefreshRateLimitation> mRefreshRateLimitations = new ArrayList<>(2 /*initialCapacity*/); @@ -1314,7 +1316,8 @@ public class DisplayDeviceConfig { return mScreenOffBrightnessSensor; } - SensorData getProximitySensor() { + @Nullable + public SensorData getProximitySensor() { return mProximitySensor; } @@ -2485,46 +2488,51 @@ public class DisplayDeviceConfig { private void loadAmbientLightSensorFromDdc(DisplayConfiguration config) { final SensorDetails sensorDetails = config.getLightSensor(); if (sensorDetails != null) { - mAmbientLightSensor.type = sensorDetails.getType(); - mAmbientLightSensor.name = sensorDetails.getName(); - final RefreshRateRange rr = sensorDetails.getRefreshRate(); - if (rr != null) { - mAmbientLightSensor.minRefreshRate = rr.getMinimum().floatValue(); - mAmbientLightSensor.maxRefreshRate = rr.getMaximum().floatValue(); - } + loadSensorData(sensorDetails, mAmbientLightSensor); } else { loadAmbientLightSensorFromConfigXml(); } } private void setProxSensorUnspecified() { - mProximitySensor.name = null; - mProximitySensor.type = null; + mProximitySensor = new SensorData(); } private void loadScreenOffBrightnessSensorFromDdc(DisplayConfiguration config) { final SensorDetails sensorDetails = config.getScreenOffBrightnessSensor(); if (sensorDetails != null) { - mScreenOffBrightnessSensor.type = sensorDetails.getType(); - mScreenOffBrightnessSensor.name = sensorDetails.getName(); + loadSensorData(sensorDetails, mScreenOffBrightnessSensor); } } private void loadProxSensorFromDdc(DisplayConfiguration config) { SensorDetails sensorDetails = config.getProxSensor(); if (sensorDetails != null) { - mProximitySensor.name = sensorDetails.getName(); - mProximitySensor.type = sensorDetails.getType(); - final RefreshRateRange rr = sensorDetails.getRefreshRate(); - if (rr != null) { - mProximitySensor.minRefreshRate = rr.getMinimum().floatValue(); - mProximitySensor.maxRefreshRate = rr.getMaximum().floatValue(); + String name = sensorDetails.getName(); + String type = sensorDetails.getType(); + if ("".equals(name) && "".equals(type)) { + // <proxSensor> with empty values to the config means no sensor should be used + mProximitySensor = null; + } else { + mProximitySensor = new SensorData(); + loadSensorData(sensorDetails, mProximitySensor); } } else { setProxSensorUnspecified(); } } + private void loadSensorData(@NonNull SensorDetails sensorDetails, + @NonNull SensorData sensorData) { + sensorData.name = sensorDetails.getName(); + sensorData.type = sensorDetails.getType(); + final RefreshRateRange rr = sensorDetails.getRefreshRate(); + if (rr != null) { + sensorData.minRefreshRate = rr.getMinimum().floatValue(); + sensorData.maxRefreshRate = rr.getMaximum().floatValue(); + } + } + private void loadBrightnessChangeThresholdsFromXml() { loadBrightnessChangeThresholds(/* config= */ null); } diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java index da8eb23cbeae..61a7a3cc6ee2 100644 --- a/services/core/java/com/android/server/display/DisplayManagerService.java +++ b/services/core/java/com/android/server/display/DisplayManagerService.java @@ -39,6 +39,7 @@ import static android.hardware.display.DisplayManagerGlobal.DisplayEvent; import static android.hardware.display.DisplayViewport.VIEWPORT_EXTERNAL; import static android.hardware.display.DisplayViewport.VIEWPORT_INTERNAL; import static android.hardware.display.DisplayViewport.VIEWPORT_VIRTUAL; +import static android.Manifest.permission.MANAGE_CROSS_DEVICE; import static android.hardware.display.HdrConversionMode.HDR_CONVERSION_UNSUPPORTED; import static android.os.Process.FIRST_APPLICATION_UID; import static android.os.Process.ROOT_UID; @@ -54,6 +55,7 @@ import android.app.ActivityManager; import android.app.ActivityManagerInternal; import android.app.AppOpsManager; import android.app.compat.CompatChanges; +import android.app.ICrossDeviceService; import android.companion.virtual.IVirtualDevice; import android.companion.virtual.VirtualDeviceManager; import android.compat.annotation.ChangeId; @@ -99,6 +101,7 @@ import android.media.projection.IMediaProjection; import android.media.projection.IMediaProjectionManager; import android.net.Uri; import android.os.Binder; +import android.os.DeviceIntegrationUtils; import android.os.Handler; import android.os.HandlerExecutor; import android.os.IBinder; @@ -131,6 +134,7 @@ import android.view.ContentRecordingSession; import android.view.Display; import android.view.DisplayEventReceiver; import android.view.DisplayInfo; +import android.view.DisplayAddress; import android.view.Surface; import android.view.SurfaceControl; import android.view.SurfaceControl.RefreshRateRange; @@ -526,6 +530,13 @@ public final class DisplayManagerService extends SystemService { @EnabledSince(targetSdkVersion = android.os.Build.VERSION_CODES.S) static final long DISPLAY_MODE_RETURNS_PHYSICAL_REFRESH_RATE = 170503758L; + // The synchronization root for the display dumpsys. + private final SyncRoot mSyncDump = new SyncRoot(); + + // Whether dump is inprogress or not. + @GuardedBy("mSyncDump") + private boolean mDumpInProgress; + public DisplayManagerService(Context context) { this(context, new Injector()); } @@ -558,6 +569,7 @@ public final class DisplayManagerService extends SystemService { mWideColorSpace = colorSpaces[1]; mOverlayProperties = SurfaceControl.getOverlaySupport(); mSystemReady = false; + mDumpInProgress = false; } public void setupSchedulerPolicies() { @@ -1479,7 +1491,12 @@ public final class DisplayManagerService extends SystemService { } if (callingUid != Process.SYSTEM_UID && (flags & VIRTUAL_DISPLAY_FLAG_TRUSTED) != 0) { - if (!checkCallingPermission(ADD_TRUSTED_DISPLAY, "createVirtualDisplay()")) { + // check MANAGE_CROSS_DEVICE permission + boolean manageCrossDeviceGranted = false; + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + manageCrossDeviceGranted = checkCallingPermission(MANAGE_CROSS_DEVICE, "createVirtualDisplay()"); + } + if (!manageCrossDeviceGranted && !checkCallingPermission(ADD_TRUSTED_DISPLAY, "createVirtualDisplay()")) { EventLog.writeEvent(0x534e4554, "162627132", callingUid, "Attempt to create a trusted display without holding permission!"); throw new SecurityException("Requires ADD_TRUSTED_DISPLAY permission to " @@ -1817,7 +1834,7 @@ public final class DisplayManagerService extends SystemService { }); } - mDisplayStates.append(displayId, Display.STATE_UNKNOWN); + mDisplayStates.append(displayId, Display.STATE_ON); final float brightnessDefault = display.getDisplayInfoLocked().brightnessDefault; mDisplayBrightnesses.append(displayId, @@ -2934,6 +2951,14 @@ public final class DisplayManagerService extends SystemService { } private void dumpInternal(PrintWriter pw) { + synchronized (mSyncDump) { + if (mDumpInProgress) { + pw.println("One dump is in service already."); + return; + } + mDumpInProgress = true; + } + pw.println("DISPLAY MANAGER (dumpsys display)"); BrightnessTracker brightnessTrackerLocal; @@ -3031,6 +3056,9 @@ public final class DisplayManagerService extends SystemService { pw.println(); mDisplayModeDirector.dump(pw); mBrightnessSynchronizer.dump(pw); + synchronized (mSyncDump) { + mDumpInProgress = false; + } } private static float[] getFloatArray(TypedArray array) { @@ -4253,6 +4281,13 @@ public final class DisplayManagerService extends SystemService { } @VisibleForTesting + void overrideSensorManager(SensorManager sensorManager) { + synchronized (mSyncRoot) { + mSensorManager = sensorManager; + } + } + + @VisibleForTesting final class LocalService extends DisplayManagerInternal { @Override @@ -4505,7 +4540,7 @@ public final class DisplayManagerService extends SystemService { } final DisplayDeviceConfig config = device.getDisplayDeviceConfig(); SensorData sensorData = config.getProximitySensor(); - if (sensorData.matches(sensorName, sensorType)) { + if (sensorData != null && sensorData.matches(sensorName, sensorType)) { return new RefreshRateRange(sensorData.minRefreshRate, sensorData.maxRefreshRate); } diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java index 9d31572c7d76..a777b54ca717 100644 --- a/services/core/java/com/android/server/display/DisplayPowerController.java +++ b/services/core/java/com/android/server/display/DisplayPowerController.java @@ -2295,29 +2295,23 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call } private void loadAmbientLightSensor() { - DisplayDeviceConfig.SensorData lightSensor = mDisplayDeviceConfig.getAmbientLightSensor(); final int fallbackType = mDisplayId == Display.DEFAULT_DISPLAY ? Sensor.TYPE_LIGHT : SensorUtils.NO_FALLBACK; - mLightSensor = SensorUtils.findSensor(mSensorManager, lightSensor.type, lightSensor.name, - fallbackType); + mLightSensor = SensorUtils.findSensor(mSensorManager, + mDisplayDeviceConfig.getAmbientLightSensor(), fallbackType); } private void loadScreenOffBrightnessSensor() { - DisplayDeviceConfig.SensorData screenOffBrightnessSensor = - mDisplayDeviceConfig.getScreenOffBrightnessSensor(); mScreenOffBrightnessSensor = SensorUtils.findSensor(mSensorManager, - screenOffBrightnessSensor.type, screenOffBrightnessSensor.name, - SensorUtils.NO_FALLBACK); + mDisplayDeviceConfig.getScreenOffBrightnessSensor(), SensorUtils.NO_FALLBACK); } private void loadProximitySensor() { if (DEBUG_PRETEND_PROXIMITY_SENSOR_ABSENT || mDisplayId != Display.DEFAULT_DISPLAY) { return; } - final DisplayDeviceConfig.SensorData proxSensor = - mDisplayDeviceConfig.getProximitySensor(); - mProximitySensor = SensorUtils.findSensor(mSensorManager, proxSensor.type, proxSensor.name, - Sensor.TYPE_PROXIMITY); + mProximitySensor = SensorUtils.findSensor(mSensorManager, + mDisplayDeviceConfig.getProximitySensor(), Sensor.TYPE_PROXIMITY); if (mProximitySensor != null) { mProximityThreshold = Math.min(mProximitySensor.getMaximumRange(), TYPICAL_PROXIMITY_THRESHOLD); @@ -2688,7 +2682,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call private void updateScreenBrightnessSetting(float brightnessValue) { if (!isValidBrightnessValue(brightnessValue) || brightnessValue == mCurrentScreenBrightnessSetting) { - return; + return; } setCurrentScreenBrightness(brightnessValue); setBrightness(brightnessValue); diff --git a/services/core/java/com/android/server/display/DisplayPowerController2.java b/services/core/java/com/android/server/display/DisplayPowerController2.java index 41e4671df1a7..5f58f3698e17 100644 --- a/services/core/java/com/android/server/display/DisplayPowerController2.java +++ b/services/core/java/com/android/server/display/DisplayPowerController2.java @@ -1941,19 +1941,15 @@ final class DisplayPowerController2 implements AutomaticBrightnessController.Cal } private void loadAmbientLightSensor() { - DisplayDeviceConfig.SensorData lightSensor = mDisplayDeviceConfig.getAmbientLightSensor(); final int fallbackType = mDisplayId == Display.DEFAULT_DISPLAY ? Sensor.TYPE_LIGHT : SensorUtils.NO_FALLBACK; - mLightSensor = SensorUtils.findSensor(mSensorManager, lightSensor.type, lightSensor.name, - fallbackType); + mLightSensor = SensorUtils.findSensor(mSensorManager, + mDisplayDeviceConfig.getAmbientLightSensor(), fallbackType); } private void loadScreenOffBrightnessSensor() { - DisplayDeviceConfig.SensorData screenOffBrightnessSensor = - mDisplayDeviceConfig.getScreenOffBrightnessSensor(); mScreenOffBrightnessSensor = SensorUtils.findSensor(mSensorManager, - screenOffBrightnessSensor.type, screenOffBrightnessSensor.name, - SensorUtils.NO_FALLBACK); + mDisplayDeviceConfig.getScreenOffBrightnessSensor(), SensorUtils.NO_FALLBACK); } private float clampScreenBrightness(float value) { diff --git a/services/core/java/com/android/server/display/DisplayPowerProximityStateController.java b/services/core/java/com/android/server/display/DisplayPowerProximityStateController.java index c0747867b620..882c02faedf9 100644 --- a/services/core/java/com/android/server/display/DisplayPowerProximityStateController.java +++ b/services/core/java/com/android/server/display/DisplayPowerProximityStateController.java @@ -358,10 +358,8 @@ public final class DisplayPowerProximityStateController { if (DEBUG_PRETEND_PROXIMITY_SENSOR_ABSENT || mDisplayId != Display.DEFAULT_DISPLAY) { return; } - final DisplayDeviceConfig.SensorData proxSensor = - mDisplayDeviceConfig.getProximitySensor(); - mProximitySensor = SensorUtils.findSensor(mSensorManager, proxSensor.type, proxSensor.name, - Sensor.TYPE_PROXIMITY); + mProximitySensor = SensorUtils.findSensor(mSensorManager, + mDisplayDeviceConfig.getProximitySensor(), Sensor.TYPE_PROXIMITY); if (mProximitySensor != null) { mProximityThreshold = Math.min(mProximitySensor.getMaximumRange(), TYPICAL_PROXIMITY_THRESHOLD); diff --git a/services/core/java/com/android/server/display/ExtendedRemoteDisplayHelper.java b/services/core/java/com/android/server/display/ExtendedRemoteDisplayHelper.java new file mode 100644 index 000000000000..1be474b09ef2 --- /dev/null +++ b/services/core/java/com/android/server/display/ExtendedRemoteDisplayHelper.java @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2014, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.android.server.display; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import android.media.RemoteDisplay; +import android.os.Handler; +import android.util.Slog; +import android.content.Context; + +class ExtendedRemoteDisplayHelper { + private static final String TAG = "ExtendedRemoteDisplayHelper"; + + // ExtendedRemoteDisplay class + // ExtendedRemoteDisplay is an enhanced RemoteDisplay. It has + // similar interface as RemoteDisplay class + private static Class sExtRemoteDisplayClass; + + // Method object for the API ExtendedRemoteDisplay.Listen + // ExtendedRemoteDisplay.Listen has the same API signature as + // RemoteDisplay.Listen except for an additional argument to pass the + // Context + private static Method sExtRemoteDisplayListen; + + // Method Object for the API ExtendedRemoteDisplay.Dispose + // ExtendedRemoteDisplay.Dispose follows the same API signature as + // RemoteDisplay.Dispose + private static Method sExtRemoteDisplayDispose; + + static { + //Check availability of ExtendedRemoteDisplay runtime + try { + sExtRemoteDisplayClass = Class.forName("com.qualcomm.wfd.ExtendedRemoteDisplay"); + } catch (Throwable t) { + Slog.i(TAG, "ExtendedRemoteDisplay Not available."); + } + + if(sExtRemoteDisplayClass != null) { + // If ExtendedRemoteDisplay is available find the methods + Slog.i(TAG, "ExtendedRemoteDisplay Is available. Find Methods"); + try { + Class args[] = { + String.class, + RemoteDisplay.Listener.class, + Handler.class, Context.class + }; + sExtRemoteDisplayListen = sExtRemoteDisplayClass.getDeclaredMethod("listen", args); + } catch (Throwable t) { + Slog.i(TAG, "ExtendedRemoteDisplay.listen Not available."); + } + + try { + Class args[] = {}; + sExtRemoteDisplayDispose = sExtRemoteDisplayClass.getDeclaredMethod("dispose", args); + } catch (Throwable t) { + Slog.i(TAG, "ExtendedRemoteDisplay.dispose Not available."); + } + } + } + + /** + * Starts listening for displays to be connected on the specified interface. + * + * @param iface The interface address and port in the form "x.x.x.x:y". + * @param listener The listener to invoke + * when displays are connected or disconnected. + * @param handler The handler on which to invoke the listener. + * @param context The current service context + * */ + public static Object listen(String iface, RemoteDisplay.Listener listener, + Handler handler, Context context) + { + Object extRemoteDisplay = null; + Slog.i(TAG, "ExtendedRemoteDisplay.listen"); + + if(sExtRemoteDisplayListen != null && sExtRemoteDisplayDispose != null){ + try { + extRemoteDisplay = sExtRemoteDisplayListen.invoke(null, + iface, listener, handler, context); + } catch (InvocationTargetException e) { + Slog.i(TAG, "ExtendedRemoteDisplay.listen - InvocationTargetException"); + Throwable cause = e.getCause(); + if (cause instanceof RuntimeException) { + throw (RuntimeException) cause; + } else if (cause instanceof Error) { + throw (Error) cause; + } else { + throw new RuntimeException(e); + } + } catch (IllegalAccessException e) { + Slog.i(TAG, "ExtendedRemoteDisplay.listen -IllegalAccessException"); + e.printStackTrace(); + } + } + return extRemoteDisplay; + } + + /** + * Disconnects the remote display and stops listening for new connections. + */ + public static void dispose(Object extRemoteDisplay) { + Slog.i(TAG, "ExtendedRemoteDisplay.dispose"); + try{ + sExtRemoteDisplayDispose.invoke(extRemoteDisplay); + } catch (InvocationTargetException e) { + Slog.i(TAG, "ExtendedRemoteDisplay.dispose - InvocationTargetException"); + Throwable cause = e.getCause(); + if (cause instanceof RuntimeException) { + throw (RuntimeException) cause; + } else if (cause instanceof Error) { + throw (Error) cause; + } else { + throw new RuntimeException(e); + } + } catch (IllegalAccessException e) { + Slog.i(TAG, "ExtendedRemoteDisplay.dispose-IllegalAccessException"); + e.printStackTrace(); + } + } + + /** + * Checks if ExtendedRemoteDisplay is available + */ + public static boolean isAvailable() + { + if(sExtRemoteDisplayClass != null && + sExtRemoteDisplayDispose != null && + sExtRemoteDisplayListen != null) { + Slog.i(TAG, "ExtendedRemoteDisplay isAvailable() : Available."); + return true; + } + Slog.i(TAG, "ExtendedRemoteDisplay isAvailable() : Not Available."); + return false; + } +} diff --git a/services/core/java/com/android/server/display/LocalDisplayAdapter.java b/services/core/java/com/android/server/display/LocalDisplayAdapter.java index c7c0fab6140d..71405d4c56a1 100644 --- a/services/core/java/com/android/server/display/LocalDisplayAdapter.java +++ b/services/core/java/com/android/server/display/LocalDisplayAdapter.java @@ -672,6 +672,8 @@ final class LocalDisplayAdapter extends DisplayAdapter { } final Resources res = getOverlayContext().getResources(); + final boolean isBuiltIn = ((mInfo.address) != null) ? + ((((DisplayAddress.Physical) mInfo.address).getPort() & 0x80) == 0x80) : false; mInfo.flags |= DisplayDeviceInfo.FLAG_ALLOWED_TO_BE_DEFAULT_DISPLAY; @@ -681,6 +683,26 @@ final class LocalDisplayAdapter extends DisplayAdapter { && SystemProperties.getBoolean(PROPERTY_EMULATOR_CIRCULAR, false))) { mInfo.flags |= DisplayDeviceInfo.FLAG_ROUND; } + } else if (isBuiltIn) { + mInfo.type = Display.TYPE_INTERNAL; + mInfo.touch = DisplayDeviceInfo.TOUCH_INTERNAL; + mInfo.name = getContext().getResources().getString( + com.android.internal.R.string.display_manager_built_in_display_name); + mInfo.flags |= DisplayDeviceInfo.FLAG_ROTATES_WITH_CONTENT; + + if (SystemProperties.getBoolean( + "vendor.display.builtin_presentation", false)) { + mInfo.flags |= DisplayDeviceInfo.FLAG_PRESENTATION; + } else { + mInfo.flags |= DisplayDeviceInfo.FLAG_PRIVATE; + } + + if (!SystemProperties.getBoolean( + "vendor.display.builtin_mirroring", false)) { + mInfo.flags |= DisplayDeviceInfo.FLAG_OWN_CONTENT_ONLY; + } + + mInfo.setAssumedDensityForExternalDisplay(mActiveSfDisplayMode.width, mActiveSfDisplayMode.height); } else { if (!res.getBoolean(R.bool.config_localDisplaysMirrorContent)) { mInfo.flags |= DisplayDeviceInfo.FLAG_OWN_CONTENT_ONLY; diff --git a/services/core/java/com/android/server/display/LogicalDisplayMapper.java b/services/core/java/com/android/server/display/LogicalDisplayMapper.java index d01b03f836a5..edaa2c62d943 100644 --- a/services/core/java/com/android/server/display/LogicalDisplayMapper.java +++ b/services/core/java/com/android/server/display/LogicalDisplayMapper.java @@ -38,6 +38,7 @@ import android.util.SparseIntArray; import android.view.Display; import android.view.DisplayAddress; import android.view.DisplayInfo; +import android.view.DisplayAddress; import com.android.internal.annotations.VisibleForTesting; import com.android.server.display.layout.DisplayIdProducer; @@ -122,6 +123,7 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener { */ private final SparseArray<LogicalDisplay> mLogicalDisplays = new SparseArray<LogicalDisplay>(); + private int mNextBuiltInDisplayId = 4096; /** Map of all display groups indexed by display group id. */ private final SparseArray<DisplayGroup> mDisplayGroups = new SparseArray<>(); diff --git a/services/core/java/com/android/server/display/WifiDisplayController.java b/services/core/java/com/android/server/display/WifiDisplayController.java index f6d06aa2fec0..7677b2511c02 100644 --- a/services/core/java/com/android/server/display/WifiDisplayController.java +++ b/services/core/java/com/android/server/display/WifiDisplayController.java @@ -40,6 +40,7 @@ import android.net.wifi.p2p.WifiP2pManager.GroupInfoListener; import android.net.wifi.p2p.WifiP2pManager.PeerListListener; import android.net.wifi.p2p.WifiP2pWfdInfo; import android.os.Handler; +import android.os.SystemProperties; import android.provider.Settings; import android.util.Slog; import android.view.Surface; @@ -47,6 +48,8 @@ import android.view.Surface; import com.android.internal.util.DumpUtils; import java.io.PrintWriter; +import java.lang.StackTraceElement; +import java.lang.Thread; import java.net.Inet4Address; import java.net.InetAddress; import java.net.NetworkInterface; @@ -69,8 +72,10 @@ import java.util.Objects; */ final class WifiDisplayController implements DumpUtils.Dump { private static final String TAG = "WifiDisplayController"; - private static final boolean DEBUG = false; - + private static final boolean DEBUG = + SystemProperties.getBoolean("persist.vendor.debug.wfdcdbg",false); + private static final boolean DEBUGV = + SystemProperties.getBoolean("persist.vendor.debug.wfdcdbgv",false); private static final int DEFAULT_CONTROL_PORT = 7236; private static final int MAX_THROUGHPUT = 50; private static final int CONNECTION_TIMEOUT_SECONDS = 30; @@ -136,6 +141,10 @@ final class WifiDisplayController implements DumpUtils.Dump { // Number of connection retries remaining. private int mConnectionRetriesLeft; + // The Extended remote display that is listening on the connection. + // Created after the Wifi P2P network is connected. + private Object mExtRemoteDisplay; + // The remote display that is listening on the connection. // Created after the Wifi P2P network is connected. private RemoteDisplay mRemoteDisplay; @@ -246,6 +255,35 @@ final class WifiDisplayController implements DumpUtils.Dump { } } + private void dump() { + Slog.d(TAG,"mWifiDisplayOnSetting=" + mWifiDisplayOnSetting); + Slog.d(TAG,"mWifiP2pEnabled=" + mWifiP2pEnabled); + Slog.d(TAG,"mWfdEnabled=" + mWfdEnabled); + Slog.d(TAG,"mWfdEnabling=" + mWfdEnabling); + Slog.d(TAG,"mNetworkInfo=" + mNetworkInfo); + Slog.d(TAG,"mScanRequested=" + mScanRequested); + Slog.d(TAG,"mDiscoverPeersInProgress=" + mDiscoverPeersInProgress); + Slog.d(TAG,"mDesiredDevice=" + describeWifiP2pDevice(mDesiredDevice)); + Slog.d(TAG,"mConnectingDisplay=" + describeWifiP2pDevice(mConnectingDevice)); + Slog.d(TAG,"mDisconnectingDisplay=" + describeWifiP2pDevice(mDisconnectingDevice)); + Slog.d(TAG,"mCancelingDisplay=" + describeWifiP2pDevice(mCancelingDevice)); + Slog.d(TAG,"mConnectedDevice=" + describeWifiP2pDevice(mConnectedDevice)); + Slog.d(TAG,"mConnectionRetriesLeft=" + mConnectionRetriesLeft); + Slog.d(TAG,"mRemoteDisplay=" + mRemoteDisplay); + Slog.d(TAG,"mRemoteDisplayInterface=" + mRemoteDisplayInterface); + Slog.d(TAG,"mRemoteDisplayConnected=" + mRemoteDisplayConnected); + Slog.d(TAG,"mAdvertisedDisplay=" + mAdvertisedDisplay); + Slog.d(TAG,"mAdvertisedDisplaySurface=" + mAdvertisedDisplaySurface); + Slog.d(TAG,"mAdvertisedDisplayWidth=" + mAdvertisedDisplayWidth); + Slog.d(TAG,"mAdvertisedDisplayHeight=" + mAdvertisedDisplayHeight); + Slog.d(TAG,"mAdvertisedDisplayFlags=" + mAdvertisedDisplayFlags); + + Slog.d(TAG,"mAvailableWifiDisplayPeers: size=" + mAvailableWifiDisplayPeers.size()); + for (WifiP2pDevice device : mAvailableWifiDisplayPeers) { + Slog.d(TAG," " + describeWifiP2pDevice(device)); + } + } + public void requestStartScan() { if (!mScanRequested) { mScanRequested = true; @@ -367,7 +405,9 @@ final class WifiDisplayController implements DumpUtils.Dump { } private void updateScanState() { - if (mScanRequested && mWfdEnabled && mDesiredDevice == null) { + if (mScanRequested && mWfdEnabled && + (mDesiredDevice == null) && (mConnectedDevice == null) + && (mDisconnectingDevice == null)) { if (!mDiscoverPeersInProgress) { Slog.i(TAG, "Starting Wifi display scan."); mDiscoverPeersInProgress = true; @@ -543,6 +583,10 @@ final class WifiDisplayController implements DumpUtils.Dump { return; } + if (handlePreExistingConnection(device)) { + Slog.i(TAG, "already handle the preexisting p2p connection status"); + return; + } mDesiredDevice = device; mConnectionRetriesLeft = CONNECT_MAX_RETRIES; updateConnection(); @@ -567,20 +611,35 @@ final class WifiDisplayController implements DumpUtils.Dump { * connection is established (or not). */ private void updateConnection() { + if(DEBUGV) { + //new Throwable("WFD_DBG").printStackTrace(); + StackTraceElement[] st = Thread.currentThread().getStackTrace(); + for(int i = 2 ; i < st.length && i < 5; i++) { + Slog.i(TAG,st[i].toString()); + } + dump(); + } // Step 0. Stop scans if necessary to prevent interference while connected. // Resume scans later when no longer attempting to connect. updateScanState(); // Step 1. Before we try to connect to a new device, tell the system we // have disconnected from the old one. - if (mRemoteDisplay != null && mConnectedDevice != mDesiredDevice) { - Slog.i(TAG, "Stopped listening for RTSP connection on " + mRemoteDisplayInterface - + " from Wifi display: " + mConnectedDevice.deviceName); + if ((mRemoteDisplay != null || mExtRemoteDisplay != null) && + (mConnectedDevice != mDesiredDevice)|| + (mRemoteDisplayInterface != null && mConnectedDevice == null)) { + Slog.i(TAG, "Stopped listening for RTSP connection on " + + mRemoteDisplayInterface); + + if(mRemoteDisplay != null) { + mRemoteDisplay.dispose(); + } else if(mExtRemoteDisplay != null) { + ExtendedRemoteDisplayHelper.dispose(mExtRemoteDisplay); + } - mRemoteDisplay.dispose(); + mExtRemoteDisplay = null; mRemoteDisplay = null; mRemoteDisplayInterface = null; - mRemoteDisplayConnected = false; mHandler.removeCallbacks(mRtspTimeout); mWifiP2pManager.setMiracastMode(WifiP2pManager.MIRACAST_DISABLED); @@ -590,7 +649,7 @@ final class WifiDisplayController implements DumpUtils.Dump { } // Step 2. Before we try to connect to a new device, disconnect from the old one. - if (mDisconnectingDevice != null) { + if (mRemoteDisplayConnected || mDisconnectingDevice != null) { return; // wait for asynchronous callback } if (mConnectedDevice != null && mConnectedDevice != mDesiredDevice) { @@ -674,6 +733,76 @@ final class WifiDisplayController implements DumpUtils.Dump { return; // done } + //Before we connect, we need to set the oldDevice to the desiredDevice to check + //the device on receiving callbacks from the Remote display modules + final WifiP2pDevice oldDevice = mDesiredDevice; + RemoteDisplay.Listener listener = new RemoteDisplay.Listener() { + @Override + public void onDisplayConnected(Surface surface, + int width, int height, int flags, int session) { + if (mConnectedDevice == oldDevice && !mRemoteDisplayConnected) { + Slog.i(TAG, "Opened RTSP connection with Wifi display: " + + mConnectedDevice.deviceName); + mRemoteDisplayConnected = true; + mHandler.removeCallbacks(mRtspTimeout); + + if (mWifiDisplayCertMode) { + mListener.onDisplaySessionInfo( + getSessionInfo(mConnectedDeviceGroupInfo, session)); + } + + final WifiDisplay display = createWifiDisplay(mConnectedDevice); + advertiseDisplay(display, surface, width, height, flags); + } + } + + @Override + public void onDisplayDisconnected() { + if (mConnectedDevice == oldDevice) { + Slog.i(TAG, "Closed RTSP connection with Wifi display: " + + mConnectedDevice.deviceName); + mHandler.removeCallbacks(mRtspTimeout); + mRemoteDisplayConnected = false; + disconnect(); + } + } + + @Override + public void onDisplayError(int error) { + if (mConnectedDevice == oldDevice) { + Slog.i(TAG, "Lost RTSP connection with Wifi display due to error " + + error + ": " + mConnectedDevice.deviceName); + mHandler.removeCallbacks(mRtspTimeout); + handleConnectionFailure(false); + } + } + }; + + int WFDR2Info = SystemProperties.getInt("persist.vendor.setWFDInfo.R2",0); + Slog.i(TAG, "WFDR2info is: " + WFDR2Info); + /*R1 source - R1 sink ->0 + *R1 source - R2 sink ->1 + *R2 source - R1 sink ->2 + *R2 source - R2 sink ->3*/ + if(WFDR2Info==2 || WFDR2Info==3){ + WifiP2pWfdInfo wfdInfo = mThisDevice.getWfdInfo(); + wfdInfo.setR2DeviceType(WifiP2pWfdInfo.DEVICE_TYPE_WFD_SOURCE); + mWifiP2pManager.setWfdInfo(mWifiP2pChannel, wfdInfo, new ActionListener() { + @Override + public void onSuccess() { + if (DEBUG) { + Slog.i(TAG, "Successfully set WFD R2 info."); + } + } + + @Override + public void onFailure(int reason) { + if (DEBUG) { + Slog.i(TAG, "Failed to set WFD R2 info with reason " + reason + "."); + } + } + }); + } // Step 5. Try to connect. if (mConnectedDevice == null && mConnectingDevice == null) { Slog.i(TAG, "Connecting to Wifi display: " + mDesiredDevice.deviceName); @@ -694,11 +823,26 @@ final class WifiDisplayController implements DumpUtils.Dump { config.wps = wps; config.deviceAddress = mConnectingDevice.deviceAddress; // Helps with STA & P2P concurrency - config.groupOwnerIntent = WifiP2pConfig.GROUP_OWNER_INTENT_MIN; + int WFDGoIntent = SystemProperties.getInt("persist.vendor.sys.debug.wfd.gointent", WifiP2pConfig.GROUP_OWNER_INTENT_MIN); + config.groupOwnerIntent = WFDGoIntent; + Slog.i(TAG, "WFD P2P GO Intent value: " + config.groupOwnerIntent); WifiDisplay display = createWifiDisplay(mConnectingDevice); advertiseDisplay(display, null, 0, 0, 0); + if(ExtendedRemoteDisplayHelper.isAvailable()&& + mExtRemoteDisplay == null){ + final int port = getPortNumber(mDesiredDevice); + //IP is superfluous for WFD source, and we don't have one at this stage anyway since + //P2P connection hasn't been established yet + final String iface = "255.255.255.255:" + port; + mRemoteDisplayInterface = iface; + Slog.i(TAG, "Listening for RTSP connection on " + iface + + " from Wifi display: " + mDesiredDevice.deviceName); + mExtRemoteDisplay = ExtendedRemoteDisplayHelper.listen(iface, + listener, mHandler, mContext); + } + final WifiP2pDevice newDevice = mDesiredDevice; mWifiP2pManager.connect(mWifiP2pChannel, config, new ActionListener() { @Override @@ -736,54 +880,16 @@ final class WifiDisplayController implements DumpUtils.Dump { mWifiP2pManager.setMiracastMode(WifiP2pManager.MIRACAST_SOURCE); - final WifiP2pDevice oldDevice = mConnectedDevice; final int port = getPortNumber(mConnectedDevice); final String iface = addr.getHostAddress() + ":" + port; mRemoteDisplayInterface = iface; - Slog.i(TAG, "Listening for RTSP connection on " + iface - + " from Wifi display: " + mConnectedDevice.deviceName); - - mRemoteDisplay = RemoteDisplay.listen(iface, new RemoteDisplay.Listener() { - @Override - public void onDisplayConnected(Surface surface, - int width, int height, int flags, int session) { - if (mConnectedDevice == oldDevice && !mRemoteDisplayConnected) { - Slog.i(TAG, "Opened RTSP connection with Wifi display: " - + mConnectedDevice.deviceName); - mRemoteDisplayConnected = true; - mHandler.removeCallbacks(mRtspTimeout); - - if (mWifiDisplayCertMode) { - mListener.onDisplaySessionInfo( - getSessionInfo(mConnectedDeviceGroupInfo, session)); - } - - final WifiDisplay display = createWifiDisplay(mConnectedDevice); - advertiseDisplay(display, surface, width, height, flags); - } - } - - @Override - public void onDisplayDisconnected() { - if (mConnectedDevice == oldDevice) { - Slog.i(TAG, "Closed RTSP connection with Wifi display: " - + mConnectedDevice.deviceName); - mHandler.removeCallbacks(mRtspTimeout); - disconnect(); - } - } - - @Override - public void onDisplayError(int error) { - if (mConnectedDevice == oldDevice) { - Slog.i(TAG, "Lost RTSP connection with Wifi display due to error " - + error + ": " + mConnectedDevice.deviceName); - mHandler.removeCallbacks(mRtspTimeout); - handleConnectionFailure(false); - } - } - }, mHandler, mContext.getOpPackageName()); + if(!ExtendedRemoteDisplayHelper.isAvailable()){ + Slog.i(TAG, "Listening for RTSP connection on " + iface + + " from Wifi display: " + mConnectedDevice.deviceName); + mRemoteDisplay = RemoteDisplay.listen(iface, listener, + mHandler, mContext.getOpPackageName()); + } // Use extended timeout value for certification, as some tests require user inputs int rtspTimeout = mWifiDisplayCertMode ? @@ -794,7 +900,7 @@ final class WifiDisplayController implements DumpUtils.Dump { } private WifiDisplaySessionInfo getSessionInfo(WifiP2pGroup info, int session) { - if (info == null) { + if (info == null || info.getOwner() == null) { return null; } Inet4Address addr = getInterfaceAddress(info); @@ -835,6 +941,10 @@ final class WifiDisplayController implements DumpUtils.Dump { mWifiP2pManager.requestGroupInfo(mWifiP2pChannel, new GroupInfoListener() { @Override public void onGroupInfoAvailable(WifiP2pGroup info) { + if(info == null) { + return; + } + if (DEBUG) { Slog.d(TAG, "Received group info: " + describeWifiP2pGroup(info)); } @@ -854,8 +964,9 @@ final class WifiDisplayController implements DumpUtils.Dump { } if (mWifiDisplayCertMode) { - boolean owner = info.getOwner().deviceAddress - .equals(mThisDevice.deviceAddress); + boolean owner = (info.getOwner() != null)? + info.getOwner().deviceAddress + .equals(mThisDevice.deviceAddress):false; if (owner && info.getClientList().isEmpty()) { // this is the case when we started Autonomous GO, // and no client has connected, save group info @@ -893,6 +1004,12 @@ final class WifiDisplayController implements DumpUtils.Dump { disconnect(); } + if (mDesiredDevice != null) { + Slog.i(TAG, "reconnect new device: " + mDesiredDevice.deviceName); + updateConnection(); + return; + } + // After disconnection for a group, for some reason we have a tendency // to get a peer change notification with an empty list of peers. // Perform a fresh scan. @@ -925,7 +1042,8 @@ final class WifiDisplayController implements DumpUtils.Dump { @Override public void run() { if (mConnectedDevice != null - && mRemoteDisplay != null && !mRemoteDisplayConnected) { + && (mRemoteDisplay != null || mExtRemoteDisplay != null) + && !mRemoteDisplayConnected) { Slog.i(TAG, "Timed out waiting for Wifi display RTSP connection after " + RTSP_TIMEOUT_SECONDS + " seconds: " + mConnectedDevice.deviceName); @@ -1009,6 +1127,41 @@ final class WifiDisplayController implements DumpUtils.Dump { mAdvertisedDisplayFlags); } + private boolean handlePreExistingConnection(final WifiP2pDevice device) { + if (mNetworkInfo == null || !mNetworkInfo.isConnected() || mWifiDisplayCertMode) { + return false; + } + Slog.i(TAG, "handle the preexisting p2p connection status"); + mWifiP2pManager.requestGroupInfo(mWifiP2pChannel, new GroupInfoListener() { + @Override + public void onGroupInfoAvailable(WifiP2pGroup info) { + if (info == null) { + return; + } + if (contains(info, device)) { + Slog.i(TAG, "already connected to the desired device: " + device.deviceName); + updateConnection(); + handleConnectionChanged(mNetworkInfo); + } else { + mWifiP2pManager.removeGroup(mWifiP2pChannel, new ActionListener() { + @Override + public void onSuccess() { + Slog.i(TAG, "disconnect the old device"); + } + + @Override + public void onFailure(int reason) { + Slog.i(TAG, "Failed to disconnect the old device: reason=" + reason); + } + }); + } + } + }); + mDesiredDevice = device; + mConnectionRetriesLeft = CONNECT_MAX_RETRIES; + return true; + } + private static Inet4Address getInterfaceAddress(WifiP2pGroup info) { NetworkInterface iface; try { diff --git a/services/core/java/com/android/server/display/mode/DisplayModeDirector.java b/services/core/java/com/android/server/display/mode/DisplayModeDirector.java index 18895788e4ec..07961c75854b 100644 --- a/services/core/java/com/android/server/display/mode/DisplayModeDirector.java +++ b/services/core/java/com/android/server/display/mode/DisplayModeDirector.java @@ -2463,14 +2463,12 @@ public class DisplayModeDirector { void dump(PrintWriter pw) { pw.println(" SensorObserver"); - synchronized (mSensorObserverLock) { pw.println(" mIsProxActive=" + mIsProxActive); pw.println(" mDozeStateByDisplay:"); for (int i = 0; i < mDozeStateByDisplay.size(); i++) { final int id = mDozeStateByDisplay.keyAt(i); final boolean dozed = mDozeStateByDisplay.valueAt(i); pw.println(" " + id + " -> " + dozed); - } } } diff --git a/services/core/java/com/android/server/display/utils/SensorUtils.java b/services/core/java/com/android/server/display/utils/SensorUtils.java index 48bc46c88df1..56321cd01e20 100644 --- a/services/core/java/com/android/server/display/utils/SensorUtils.java +++ b/services/core/java/com/android/server/display/utils/SensorUtils.java @@ -16,10 +16,13 @@ package com.android.server.display.utils; +import android.annotation.Nullable; import android.hardware.Sensor; import android.hardware.SensorManager; import android.text.TextUtils; +import com.android.server.display.DisplayDeviceConfig; + import java.util.List; /** @@ -29,15 +32,24 @@ public class SensorUtils { public static final int NO_FALLBACK = 0; /** - * Finds the specified sensor by type and name using SensorManager. + * Finds the specified sensor for SensorData from DisplayDeviceConfig. */ - public static Sensor findSensor(SensorManager sensorManager, String sensorType, - String sensorName, int fallbackType) { - if (sensorManager == null) { + @Nullable + public static Sensor findSensor(@Nullable SensorManager sensorManager, + @Nullable DisplayDeviceConfig.SensorData sensorData, int fallbackType) { + if (sensorData == null) { return null; + } else { + return findSensor(sensorManager, sensorData.type, sensorData.name, fallbackType); } - - if ("".equals(sensorName) && "".equals(sensorType)) { + } + /** + * Finds the specified sensor by type and name using SensorManager. + */ + @Nullable + public static Sensor findSensor(@Nullable SensorManager sensorManager, + @Nullable String sensorType, @Nullable String sensorName, int fallbackType) { + if (sensorManager == null) { return null; } final boolean isNameSpecified = !TextUtils.isEmpty(sensorName); diff --git a/services/core/java/com/android/server/location/LocationManagerService.java b/services/core/java/com/android/server/location/LocationManagerService.java index 115421db4d31..d4080dc662ab 100644 --- a/services/core/java/com/android/server/location/LocationManagerService.java +++ b/services/core/java/com/android/server/location/LocationManagerService.java @@ -252,6 +252,11 @@ public class LocationManagerService extends ILocationManager.Stub implements private final GeofenceManager mGeofenceManager; private volatile @Nullable GnssManagerService mGnssManagerService = null; + + private String mComboNlpPackageName; + private String mComboNlpReadyMarker; + private String mComboNlpScreenMarker; + private GeocoderProxy mGeocodeProvider; private final Object mDeprecatedGnssBatchingLock = new Object(); @@ -490,6 +495,13 @@ public class LocationManagerService extends ILocationManager.Stub implements Log.e(TAG, "no geocoder provider found"); } + mComboNlpPackageName = mContext.getResources().getString( + com.android.internal.R.string.config_comboNetworkLocationProvider); + if (mComboNlpPackageName != null) { + mComboNlpReadyMarker = mComboNlpPackageName + ".nlp:ready"; + mComboNlpScreenMarker = mComboNlpPackageName + ".nlp:screen"; + } + // bind to hardware activity recognition HardwareActivityRecognitionProxy hardwareActivityRecognitionProxy = HardwareActivityRecognitionProxy.createAndRegister(mContext); diff --git a/services/core/java/com/android/server/locksettings/LockSettingsService.java b/services/core/java/com/android/server/locksettings/LockSettingsService.java index 48d46df37061..fa418d650d03 100644 --- a/services/core/java/com/android/server/locksettings/LockSettingsService.java +++ b/services/core/java/com/android/server/locksettings/LockSettingsService.java @@ -223,6 +223,7 @@ public class LockSettingsService extends ILockSettings.Stub { // Order of holding lock: mSeparateChallengeLock -> mSpManager -> this // Do not call into ActivityManager while holding mSpManager lock. private final Object mSeparateChallengeLock = new Object(); + private static final String DEFAULT_PASSWORD = "default_password"; private final DeviceProvisionedObserver mDeviceProvisionedObserver = new DeviceProvisionedObserver(); @@ -245,6 +246,8 @@ public class LockSettingsService extends ILockSettings.Stub { private final SyntheticPasswordManager mSpManager; private final java.security.KeyStore mJavaKeyStore; + private static String mSavePassword = DEFAULT_PASSWORD; + private final RecoverableKeyStoreManager mRecoverableKeyStoreManager; private ManagedProfilePasswordCache mManagedProfilePasswordCache; @@ -1327,6 +1330,45 @@ public class LockSettingsService extends ILockSettings.Stub { return getCredentialTypeInternal(userId) != CREDENTIAL_TYPE_NONE; } + public void retainPassword(String password) { + if (LockPatternUtils.isDeviceEncryptionEnabled()) { + if (password != null) + mSavePassword = password; + else + mSavePassword = DEFAULT_PASSWORD; + } + } + + public void sanitizePassword() { + if (LockPatternUtils.isDeviceEncryptionEnabled()) { + mSavePassword = DEFAULT_PASSWORD; + } + } + + private boolean checkCryptKeeperPermissions() { + boolean permission_err = false; + try { + mContext.enforceCallingOrSelfPermission( + android.Manifest.permission.CRYPT_KEEPER, + "no permission to get the password"); + } catch (SecurityException e) { + permission_err = true; + } + return permission_err; + } + + public String getPassword() { + /** if calling process does't have crypt keeper or admin permissions, + * throw the exception. + */ + if (checkCryptKeeperPermissions()) + mContext.enforceCallingOrSelfPermission( + android.Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE, + "no crypt_keeper or admin permission to get the password"); + + return mSavePassword; + } + @VisibleForTesting /** Note: this method is overridden in unit tests */ void setKeystorePassword(byte[] password, int userHandle) { AndroidKeyStoreMaintenance.onUserPasswordChanged(userHandle, password); @@ -2112,7 +2154,15 @@ public class LockSettingsService extends ILockSettings.Stub { checkPasswordReadPermission(); final long identity = Binder.clearCallingIdentity(); try { - return doVerifyCredential(credential, userId, progressCallback, 0 /* flags */); + VerifyCredentialResponse response = doVerifyCredential(credential, + userId, progressCallback, 0 /* flags */); + if ((response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK) && + (userId == UserHandle.USER_OWNER)) { + //TODO(b/127810705): Update to credentials to use LockscreenCredential + String credentialString = credential.isNone() ? null : new String(credential.getCredential()); + retainPassword(credentialString); + } + return response; } finally { Binder.restoreCallingIdentity(identity); scheduleGc(); diff --git a/services/core/java/com/android/server/net/NetworkManagementService.java b/services/core/java/com/android/server/net/NetworkManagementService.java index e5ffa7e15f28..e8c59aa6ba45 100644 --- a/services/core/java/com/android/server/net/NetworkManagementService.java +++ b/services/core/java/com/android/server/net/NetworkManagementService.java @@ -305,7 +305,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub { public void sendCallback(INetworkManagementEventObserver o) throws RemoteException; } - private void invokeForAllObservers(NetworkManagementEventCallback eventCallback) { + private synchronized void invokeForAllObservers(NetworkManagementEventCallback eventCallback) { final int length = mObservers.beginBroadcast(); try { for (int i = 0; i < length; i++) { diff --git a/services/core/java/com/android/server/om/OverlayManagerSettings.java b/services/core/java/com/android/server/om/OverlayManagerSettings.java index eae614ac9e77..eae614ac9e77 100644..100755 --- a/services/core/java/com/android/server/om/OverlayManagerSettings.java +++ b/services/core/java/com/android/server/om/OverlayManagerSettings.java diff --git a/services/core/java/com/android/server/pm/DeletePackageHelper.java b/services/core/java/com/android/server/pm/DeletePackageHelper.java index 5f52c16d319c..9901dfbbb134 100644 --- a/services/core/java/com/android/server/pm/DeletePackageHelper.java +++ b/services/core/java/com/android/server/pm/DeletePackageHelper.java @@ -54,6 +54,7 @@ import android.os.RemoteException; import android.os.UserHandle; import android.os.UserManager; import android.text.TextUtils; +import android.util.BoostFramework; import android.util.EventLog; import android.util.Log; import android.util.Slog; @@ -340,6 +341,17 @@ final class DeletePackageHelper { packageInstallerService.onInstallerPackageDeleted(uninstalledPs.getAppId(), removeUser); } + if (res && packageName != null) { + BoostFramework ux_perf = new BoostFramework(); + if (ux_perf != null) { + if (ux_perf.board_first_api_lvl < BoostFramework.VENDOR_T_API_LEVEL && + ux_perf.board_api_lvl < BoostFramework.VENDOR_T_API_LEVEL) { + ux_perf.perfUXEngine_events(BoostFramework.UXE_EVENT_PKG_UNINSTALL, 0, packageName, userId); + } else { + ux_perf.perfEvent(BoostFramework.VENDOR_HINT_PKG_UNINSTALL, packageName, 2, userId, 0); + } + } + } return res ? DELETE_SUCCEEDED : PackageManager.DELETE_FAILED_INTERNAL_ERROR; } diff --git a/services/core/java/com/android/server/pm/InstallPackageHelper.java b/services/core/java/com/android/server/pm/InstallPackageHelper.java index f26a9f8f3aed..7312b4282d74 100644 --- a/services/core/java/com/android/server/pm/InstallPackageHelper.java +++ b/services/core/java/com/android/server/pm/InstallPackageHelper.java @@ -157,6 +157,7 @@ import android.util.Pair; import android.util.Slog; import android.util.SparseArray; import android.util.SparseIntArray; +import android.util.BoostFramework; import com.android.internal.annotations.GuardedBy; import com.android.internal.content.F2fsUtils; @@ -193,6 +194,7 @@ import com.android.server.pm.pkg.component.ParsedPermissionGroup; import com.android.server.pm.pkg.parsing.ParsingPackageUtils; import com.android.server.rollback.RollbackManagerInternal; import com.android.server.security.FileIntegrityService; +import com.android.server.utils.TimingsTraceAndSlog; import com.android.server.utils.WatchedArrayMap; import com.android.server.utils.WatchedLongSparseArray; @@ -200,6 +202,8 @@ import dalvik.system.VMRuntime; import java.io.File; import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileReader; import java.io.IOException; import java.security.DigestException; import java.security.DigestInputStream; @@ -210,12 +214,17 @@ import java.security.cert.CertificateException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; +import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.ExecutorService; +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; +import org.xmlpull.v1.XmlPullParserFactory; + final class InstallPackageHelper { private final PackageManagerService mPm; private final AppDataHelper mAppDataHelper; @@ -232,6 +241,21 @@ final class InstallPackageHelper { private final SharedLibrariesImpl mSharedLibraries; private final PackageManagerServiceInjector mInjector; private final UpdateOwnershipHelper mUpdateOwnershipHelper; + private static final String PROPERTY_NO_RIL = "ro.radio.noril"; + /** + * Tracks packages that need to be disabled. + * Map of package name to its path on the file system. + */ + final private HashMap<String, String> mPackagesToBeDisabled = new HashMap<>(); + + /** + * Tracks packages that need to be disabled for QSPA enabled taregts. + * List of packages path on the file system. + */ + final private List<String> mPackagesPathToBeDisabledForQSPA = new ArrayList<String>(); + final private boolean mQspaEnabled = SystemProperties.getBoolean( + "ro.vendor.config.qspa.apps", false); + // TODO(b/198166813): remove PMS dependency InstallPackageHelper(PackageManagerService pm, AppDataHelper appDataHelper) { @@ -250,6 +274,18 @@ final class InstallPackageHelper { mViewCompiler = pm.mInjector.getViewCompiler(); mSharedLibraries = pm.mInjector.getSharedLibrariesImpl(); mUpdateOwnershipHelper = pm.mInjector.getUpdateOwnershipHelper(); + + if (mQspaEnabled) { + mPackagesPathToBeDisabledForQSPA.add("/system_ext/priv-app/SystemUI"); + mPackagesPathToBeDisabledForQSPA.add("/system_ext/priv-app/Launcher3QuickStepGo"); + mPackagesPathToBeDisabledForQSPA.add("/system_ext/priv-app/Launcher3Go"); + mPackagesPathToBeDisabledForQSPA.add("/system/app/PrintSpooler"); + mPackagesPathToBeDisabledForQSPA.add("/system/priv-app/StatementService"); + mPackagesPathToBeDisabledForQSPA.add("/product/app/Calendar"); + } else { + mPackagesPathToBeDisabledForQSPA.add("/system_ext/app/HeadlessLauncher"); + } + } InstallPackageHelper(PackageManagerService pm) { @@ -1261,6 +1297,16 @@ final class InstallPackageHelper { // on the device; we should replace it. replace = true; if (DEBUG_INSTALL) Slog.d(TAG, "Replace existing package: " + pkgName); + if (pkgName != null) { + BoostFramework mPerf = new BoostFramework(); + if (mPerf != null) { + if (mPerf.board_first_api_lvl < BoostFramework.VENDOR_T_API_LEVEL && + mPerf.board_api_lvl < BoostFramework.VENDOR_T_API_LEVEL) { + mPerf.perfUXEngine_events(BoostFramework.UXE_EVENT_PKG_INSTALL, 0, pkgName, 1); + } + mPerf.perfEvent(BoostFramework.VENDOR_HINT_APP_UPDATE, pkgName, 2, 0, -1); + } + } } if (replace) { @@ -2178,6 +2224,17 @@ final class InstallPackageHelper { final String installerPackageName = installRequest.getInstallerPackageName(); if (DEBUG_INSTALL) Slog.d(TAG, "New package installed in " + pkg.getPath()); + if (pkgName != null) { + BoostFramework mPerf = new BoostFramework(); + if (mPerf != null) { + if (mPerf.board_first_api_lvl < BoostFramework.VENDOR_T_API_LEVEL && + mPerf.board_api_lvl < BoostFramework.VENDOR_T_API_LEVEL) { + mPerf.perfUXEngine_events(BoostFramework.UXE_EVENT_PKG_INSTALL, 0, pkgName, 0); + } else { + mPerf.perfEvent(BoostFramework.VENDOR_HINT_PKG_INSTALL, pkgName, 2, 0, 0); + } + } + } synchronized (mPm.mLock) { // For system-bundled packages, we assume that installing an upgraded version // of the package implies that the user actually wants to run that new code, @@ -3730,6 +3787,24 @@ final class InstallPackageHelper { Log.w(TAG, "Dropping cache of " + file.getAbsolutePath()); cacher.cleanCachedResult(file); } + + + if (mPackagesPathToBeDisabledForQSPA != null && + mPackagesPathToBeDisabledForQSPA.contains(file.toString())) { + // Ignore entries contained in {@link #mPackagesPathToBeDisabledForQSPA} + Slog.d(TAG, "QSPA is " + mQspaEnabled + " ignoring package for install : " + file); + continue; + } + + + if (mPackagesToBeDisabled.values() != null && + (mPackagesToBeDisabled.values().contains(file.toString()) || + mPackagesToBeDisabled.values().stream().anyMatch(file.toString()::contains))) { + // Ignore entries contained in {@link #mPackagesToBeDisabled} + Slog.d(TAG, "ignoring package: " + file); + continue; + } + parallelPackageParser.submit(file, parseFlags); fileCount++; } @@ -3775,6 +3850,75 @@ final class InstallPackageHelper { } /** + * Read the list of packages that need to be disabled. + * + * For wifi-only devices (modem-less), telephony related applications do not need to run. + * This method will read the list of packages from a predefined file in the file system, + * and store it in {@link #mPackagesToBeDisabled}. These applications will be skipped when + * directories are scanned later. + */ + protected void readListOfPackagesToBeDisabled() { + boolean wifiOnly = SystemProperties.getBoolean(PROPERTY_NO_RIL, false); + if (!wifiOnly) { + // Apps need to be disabled only for modem-less devices + return; + } + + final String TELEPHONY_PACKAGES_PATH = "etc/telephony_packages.xml"; + File telephonyPackagesFile = + new File(Environment.getVendorDirectory(), TELEPHONY_PACKAGES_PATH); + FileReader packagesReader = null; + Slog.d(TAG, "Disabling packages for wifi-only device, source: " + telephonyPackagesFile); + + try { + XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); + factory.setNamespaceAware(true); + XmlPullParser packagesParser = factory.newPullParser(); + packagesReader = new FileReader(telephonyPackagesFile); + + if (packagesParser != null) { + packagesParser.setInput(packagesReader); + int eventType = packagesParser.getEventType(); + while (eventType != XmlPullParser.END_DOCUMENT) { + String tagName = packagesParser.getName(); + switch (eventType) { + case XmlPullParser.START_TAG: + if (TextUtils.equals(tagName, "packageinfo")) { + String name = packagesParser.getAttributeValue(null, "name"); + String path = packagesParser.getAttributeValue(null, "path"); + mPackagesToBeDisabled.put(name, path); + } + break; + } + eventType = packagesParser.next(); + } + } + } catch (XmlPullParserException e) { + Log.e(TAG, "XmlPullParserException parsing '"+ telephonyPackagesFile + "'", e); + } catch (IOException e) { + Log.e(TAG, "IOException parsing '" + telephonyPackagesFile + "'", e); + } catch (Exception e) { + Log.e(TAG, "Exception parsing '" + telephonyPackagesFile + "'", e); + } + + if (packagesReader != null) { + try { + packagesReader.close(); + } catch (IOException e) { + // do nothing + } + } + + if (DEBUG_PACKAGE_SCANNING) { + for (String packageName : mPackagesToBeDisabled.keySet()) { + Slog.d(TAG, "readListOfPackagesToBeDisabled" + + ", package: " + packageName + + ", path: " + mPackagesToBeDisabled.get(packageName)); + } + } + } + + /** * Make sure all system apps that we expected to appear on * the userdata partition actually showed up. If they never * appeared, crawl back and revive the system version. diff --git a/services/core/java/com/android/server/pm/PackageInstallerService.java b/services/core/java/com/android/server/pm/PackageInstallerService.java index b99e66f68038..b63f079b7e4d 100644 --- a/services/core/java/com/android/server/pm/PackageInstallerService.java +++ b/services/core/java/com/android/server/pm/PackageInstallerService.java @@ -634,6 +634,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements private int createSessionInternal(SessionParams params, String installerPackageName, String installerAttributionTag, int userId) throws IOException { + android.util.SeempLog.record(90); final int callingUid = Binder.getCallingUid(); final Computer snapshot = mPm.snapshotComputer(); snapshot.enforceCrossUserPermission(callingUid, userId, true, true, "createSession"); diff --git a/services/core/java/com/android/server/pm/PackageInstallerSession.java b/services/core/java/com/android/server/pm/PackageInstallerSession.java index d662aaedb774..9847428a32cf 100644 --- a/services/core/java/com/android/server/pm/PackageInstallerSession.java +++ b/services/core/java/com/android/server/pm/PackageInstallerSession.java @@ -155,6 +155,7 @@ import android.util.MathUtils; import android.util.Slog; import android.util.SparseArray; import android.util.apk.ApkSignatureVerifier; +import android.util.BoostFramework; import com.android.internal.R; import com.android.internal.annotations.GuardedBy; @@ -362,6 +363,13 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { */ private final StagingManager mStagingManager; + /* + * @hide + */ + private BoostFramework mPerfBoostInstall = null; + private boolean mIsPerfLockAcquired = false; + private final int MAX_INSTALL_DURATION = 20000; + final int sessionId; final int userId; final SessionParams params; @@ -1632,6 +1640,14 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { public ParcelFileDescriptor openWrite(String name, long offsetBytes, long lengthBytes) { assertCanWrite(false); try { + if (mPerfBoostInstall == null){ + mPerfBoostInstall = new BoostFramework(); + } + if (mPerfBoostInstall != null && !mIsPerfLockAcquired) { + mPerfBoostInstall.perfHint(BoostFramework.VENDOR_HINT_PACKAGE_INSTALL_BOOST, + null, MAX_INSTALL_DURATION, -1); + mIsPerfLockAcquired = true; + } return doWriteInternal(name, offsetBytes, lengthBytes, null); } catch (IOException e) { throw ExceptionUtils.wrap(e); @@ -1888,6 +1904,10 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { @Override public void commit(@NonNull IntentSender statusReceiver, boolean forTransfer) { + if (mIsPerfLockAcquired && mPerfBoostInstall != null) { + mPerfBoostInstall.perfLockRelease(); + mIsPerfLockAcquired = false; + } assertNotChild("commit"); if (!markAsSealed(statusReceiver, forTransfer)) { @@ -4083,6 +4103,10 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { @Override public void abandon() { + if (mIsPerfLockAcquired && mPerfBoostInstall != null) { + mPerfBoostInstall.perfLockRelease(); + mIsPerfLockAcquired = false; + } final Runnable r; synchronized (mLock) { assertNotChild("abandon"); diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index cac96e544432..4211d0322510 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -169,6 +169,7 @@ import android.util.Slog; import android.util.SparseArray; import android.util.SparseBooleanArray; import android.util.Xml; +import android.util.BoostFramework; import android.view.Display; import com.android.internal.R; @@ -367,6 +368,7 @@ public class PackageManagerService implements PackageSender, TestUtilityService private static final int SE_UID = Process.SE_UID; private static final int NETWORKSTACK_UID = Process.NETWORK_STACK_UID; private static final int UWB_UID = Process.UWB_UID; + private static final int VENDOR_DATA_UID = Process.VENDOR_DATA_UID; static final int SCAN_NO_DEX = 1 << 0; static final int SCAN_UPDATE_SIGNATURE = 1 << 1; @@ -963,6 +965,7 @@ public class PackageManagerService implements PackageSender, TestUtilityService int mNextInstallToken = 1; // nonzero; will be wrapped back to 1 when ++ overflows final @NonNull String[] mRequiredVerifierPackages; + final @Nullable String mOptionalVerifierPackage; final @NonNull String mRequiredInstallerPackage; final @NonNull String mRequiredUninstallerPackage; final @NonNull String mRequiredPermissionControllerPackage; @@ -1773,6 +1776,7 @@ public class PackageManagerService implements PackageSender, TestUtilityService mSeparateProcesses = testParams.separateProcesses; mViewCompiler = testParams.viewCompiler; mRequiredVerifierPackages = testParams.requiredVerifierPackages; + mOptionalVerifierPackage = testParams.optionalVerifierPackage; mRequiredInstallerPackage = testParams.requiredInstallerPackage; mRequiredUninstallerPackage = testParams.requiredUninstallerPackage; mRequiredPermissionControllerPackage = testParams.requiredPermissionControllerPackage; @@ -1907,6 +1911,8 @@ public class PackageManagerService implements PackageSender, TestUtilityService ApplicationInfo.FLAG_SYSTEM, ApplicationInfo.PRIVATE_FLAG_PRIVILEGED); mSettings.addSharedUserLPw("android.uid.uwb", UWB_UID, ApplicationInfo.FLAG_SYSTEM, ApplicationInfo.PRIVATE_FLAG_PRIVILEGED); + mSettings.addSharedUserLPw("android.uid.vendordata", VENDOR_DATA_UID, + ApplicationInfo.PRIVATE_FLAG_VENDOR, ApplicationInfo.PRIVATE_FLAG_PRIVILEGED); t.traceEnd(); String separateProcesses = SystemProperties.get("debug.separate_processes"); @@ -1981,6 +1987,10 @@ public class PackageManagerService implements PackageSender, TestUtilityService mStorageEventHelper = new StorageEventHelper(this, mDeletePackageHelper, mRemovePackageHelper); + t.traceBegin("readListOfPackagesToBeDisabled"); + mInstallPackageHelper.readListOfPackagesToBeDisabled(); + t.traceEnd(); + synchronized (mLock) { // Create the computer as soon as the state objects have been installed. The // cached computer is the same as the live computer until the end of the @@ -2288,6 +2298,7 @@ public class PackageManagerService implements PackageSender, TestUtilityService EventLog.writeEvent(EventLogTags.BOOT_PROGRESS_PMS_READY, SystemClock.uptimeMillis()); + mOptionalVerifierPackage = getOptionalVerifierLPr(computer); ComponentName intentFilterVerifierComponent = getIntentFilterVerifierComponentNameLPr(computer); ComponentName domainVerificationAgent = @@ -2474,6 +2485,26 @@ public class PackageManagerService implements PackageSender, TestUtilityService + matches); } + private @Nullable String getOptionalVerifierLPr(@NonNull Computer computer) { + final Intent intent = new Intent("com.qualcomm.qti.intent.action.PACKAGE_NEEDS_OPTIONAL_VERIFICATION"); + + final List<ResolveInfo> matches = mResolveIntentHelper.queryIntentReceiversInternal(computer, + intent, PACKAGE_MIME_TYPE, + MATCH_SYSTEM_ONLY | MATCH_DIRECT_BOOT_AWARE | MATCH_DIRECT_BOOT_UNAWARE, + UserHandle.USER_SYSTEM, Binder.getCallingUid()); + if (matches.size() >= 1) { + String optionalVerifierName = mContext.getResources().getString(R.string.config_optionalPackageVerifierName); + if (TextUtils.isEmpty(optionalVerifierName)) + return null; + for (int i = 0; i < matches.size(); i++) { + if (matches.get(i).getComponentInfo().packageName.contains(optionalVerifierName)) { + return matches.get(i).getComponentInfo().packageName; + } + } + } + return null; + } + @NonNull private String getRequiredSharedLibrary(@NonNull Computer snapshot, @NonNull String name, int version) { @@ -4315,6 +4346,7 @@ public class PackageManagerService implements PackageSender, TestUtilityService }, overlayFilter); mModuleInfoProvider.systemReady(); + new BoostFramework(mContext, true); // Installer service might attempt to install some packages that have been staged for // installation on reboot. Make sure this is the last component to be call since the diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceTestParams.java b/services/core/java/com/android/server/pm/PackageManagerServiceTestParams.java index 0ed90e478e30..5bb715c2d994 100644 --- a/services/core/java/com/android/server/pm/PackageManagerServiceTestParams.java +++ b/services/core/java/com/android/server/pm/PackageManagerServiceTestParams.java @@ -84,6 +84,7 @@ public final class PackageManagerServiceTestParams { public @NonNull String requiredPermissionControllerPackage; public @NonNull String requiredUninstallerPackage; public @NonNull String[] requiredVerifierPackages; + public @Nullable String optionalVerifierPackage; public String[] separateProcesses; public @NonNull String servicesExtensionPackageName; public @Nullable String setupWizardPackage; diff --git a/services/core/java/com/android/server/pm/PackageVerificationState.java b/services/core/java/com/android/server/pm/PackageVerificationState.java index 0b6ccc41d956..d415f0903e66 100644 --- a/services/core/java/com/android/server/pm/PackageVerificationState.java +++ b/services/core/java/com/android/server/pm/PackageVerificationState.java @@ -43,6 +43,14 @@ class PackageVerificationState { private boolean mRequiredVerificationPassed; + private int mOptionalVerifierUid; + + private boolean mHasOptionalVerifier; + + private boolean mOptionalVerificationComplete; + + private boolean mOptionalVerificationPassed; + private boolean mIntegrityVerificationComplete; /** @@ -83,6 +91,11 @@ class PackageVerificationState { mSufficientVerifierUids.put(uid, true); } + public void addOptionalVerifier(int uid) { + mOptionalVerifierUid = uid; + mHasOptionalVerifier = true; + } + /** Returns true if the uid a sufficient verifier. */ boolean checkSufficientVerifierUid(int uid) { return mSufficientVerifierUids.get(uid, false); @@ -135,6 +148,15 @@ class PackageVerificationState { if (mUnrespondedRequiredVerifierUids.size() == 0) { mRequiredVerificationComplete = true; } + } else if (mHasOptionalVerifier && uid == mOptionalVerifierUid) { + mOptionalVerificationComplete = true; + switch (code) { + case PackageManager.VERIFICATION_ALLOW: + mOptionalVerificationPassed = true; + break; + default: + mOptionalVerificationPassed = false; + } } else if (mSufficientVerifierUids.get(uid)) { if (code == PackageManager.VERIFICATION_ALLOW) { mSufficientVerificationPassed = true; @@ -166,7 +188,11 @@ class PackageVerificationState { * @return {@code true} when verification is considered complete */ boolean isVerificationComplete() { - if (!mRequiredVerificationComplete) { + if (mRequiredVerifierUids.size() > 0 && !mRequiredVerificationComplete) { + return false; + } + + if (mHasOptionalVerifier && !mOptionalVerificationComplete) { return false; } @@ -184,7 +210,11 @@ class PackageVerificationState { * @return {@code true} if installation should be allowed */ boolean isInstallAllowed() { - if (!mRequiredVerificationComplete || !mRequiredVerificationPassed) { + if (mRequiredVerifierUids.size() > 0 && (!mRequiredVerificationComplete || !mRequiredVerificationPassed)) { + return false; + } + + if (mHasOptionalVerifier && !mOptionalVerificationPassed) { return false; } diff --git a/services/core/java/com/android/server/pm/StorageEventHelper.java b/services/core/java/com/android/server/pm/StorageEventHelper.java index 8f8f4376d2cc..15b874a835f4 100644 --- a/services/core/java/com/android/server/pm/StorageEventHelper.java +++ b/services/core/java/com/android/server/pm/StorageEventHelper.java @@ -45,6 +45,7 @@ import android.util.ArrayMap; import android.util.ArraySet; import android.util.Log; import android.util.Slog; +import android.os.storage.DiskInfo; import com.android.internal.annotations.GuardedBy; import com.android.internal.policy.AttributeCache; @@ -182,7 +183,7 @@ public final class StorageEventHelper extends StorageEventListener { StorageManagerInternal smInternal = mPm.mInjector.getLocalService( StorageManagerInternal.class); for (UserInfo user : mPm.mUserManager.getUsers(false /* includeDying */)) { - final int flags; + int flags; if (StorageManager.isUserKeyUnlocked(user.id) && smInternal.isCeStoragePrepared(user.id)) { flags = StorageManager.FLAG_STORAGE_DE | StorageManager.FLAG_STORAGE_CE; @@ -191,9 +192,12 @@ public final class StorageEventHelper extends StorageEventListener { } else { continue; } - + if ((vol.disk.flags & DiskInfo.FLAG_UFS_CARD) == DiskInfo.FLAG_UFS_CARD) { + flags = flags | DiskInfo.FLAG_UFS_CARD; + } + final int pflags = flags; try { - sm.prepareUserStorage(volumeUuid, user.id, user.serialNumber, flags); + sm.prepareUserStorage(volumeUuid, user.id, user.serialNumber, pflags); synchronized (mPm.mInstallLock) { appDataHelper.reconcileAppsDataLI(volumeUuid, user.id, flags, true /* migrateAppData */); diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index a88e2b06a4c3..4517b56f1245 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -57,6 +57,8 @@ import static android.view.WindowManager.LayoutParams.TYPE_NOTIFICATION_SHADE; import static android.view.WindowManager.LayoutParams.TYPE_PRESENTATION; import static android.view.WindowManager.LayoutParams.TYPE_PRIVATE_PRESENTATION; import static android.view.WindowManager.LayoutParams.TYPE_QS_DIALOG; +import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_BLACKSCREEN_OVERLAY; +import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DRAGDROP_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_TOAST; import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION; import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; @@ -96,6 +98,7 @@ import android.app.ActivityManager.RecentTaskInfo; import android.app.ActivityManagerInternal; import android.app.ActivityTaskManager; import android.app.AppOpsManager; +import android.app.CrossDeviceManager; import android.app.IUiModeManager; import android.app.NotificationManager; import android.app.ProgressDialog; @@ -132,6 +135,7 @@ import android.media.session.MediaSessionLegacyHelper; import android.os.Binder; import android.os.Bundle; import android.os.DeviceIdleManager; +import android.os.DeviceIntegrationUtils; import android.os.FactoryTest; import android.os.Handler; import android.os.IBinder; @@ -225,6 +229,7 @@ import com.android.server.statusbar.StatusBarManagerInternal; import com.android.server.vr.VrManagerInternal; import com.android.server.wallpaper.WallpaperManagerInternal; import com.android.server.wm.ActivityTaskManagerInternal; +import com.android.server.wm.BlackScreenWindowManager; import com.android.server.wm.DisplayPolicy; import com.android.server.wm.DisplayRotation; import com.android.server.wm.WindowManagerInternal; @@ -763,6 +768,22 @@ public class PhoneWindowManager implements WindowManagerPolicy { } }; + private UEventObserver mHDMISwitchObserver = new UEventObserver() { + @Override + public void onUEvent(UEventObserver.UEvent event) { + mDefaultDisplayPolicy.setHdmiPlugged("1".equals(event.get("STATUS"))); + } + }; + + private UEventObserver mExtEventObserver = new UEventObserver() { + @Override + public void onUEvent(UEventObserver.UEvent event) { + if (event.get("status") != null) { + mDefaultDisplayPolicy.setHdmiPlugged("connected".equals(event.get("status"))); + } + } + }; + class SettingsObserver extends ContentObserver { SettingsObserver(Handler handler) { super(handler); @@ -1027,6 +1048,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { + "fingerprint sensor"); return; } + + // Device Integration: If the power button is handled by black screen, then do nothing + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && BlackScreenWindowManager.getInstance().interceptPowerKey()) { + return; + } + switch (mShortPressOnPowerBehavior) { case SHORT_PRESS_POWER_NOTHING: break; @@ -2731,6 +2759,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { case TYPE_NAVIGATION_BAR_PANEL: // The window manager will check these. return ADD_OKAY; + case TYPE_SYSTEM_DRAGDROP_OVERLAY: + case TYPE_SYSTEM_BLACKSCREEN_OVERLAY: + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + // Device Integration: permission check + return (CrossDeviceManager.isCallerAllowed(mContext)) ? ADD_OKAY : ADD_PERMISSION_DENIED; + } } return (mContext.checkCallingOrSelfPermission(INTERNAL_SYSTEM_WINDOW) @@ -3933,7 +3967,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { void initializeHdmiStateInternal() { boolean plugged = false; + mExtEventObserver.startObserving("mdss_mdp/drm/card"); // watch for HDMI plug messages if the hdmi switch exists + mHDMISwitchObserver.startObserving("change@/devices/virtual/graphics/fb2"); if (new File("/sys/devices/virtual/switch/hdmi/state").exists()) { mHDMIObserver.startObserving("DEVPATH=/devices/virtual/switch/hdmi"); diff --git a/services/core/java/com/android/server/policy/WindowManagerPolicy.java b/services/core/java/com/android/server/policy/WindowManagerPolicy.java index 03a7bd3b68b3..dd7e0e50e80c 100644 --- a/services/core/java/com/android/server/policy/WindowManagerPolicy.java +++ b/services/core/java/com/android/server/policy/WindowManagerPolicy.java @@ -52,7 +52,9 @@ import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_SUB_PANEL; import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ALERT; +import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_BLACKSCREEN_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG; +import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DRAGDROP_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_ERROR; import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_TOAST; @@ -619,6 +621,12 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { case TYPE_POINTER: // the (mouse) pointer layer return 35; + case TYPE_SYSTEM_DRAGDROP_OVERLAY: + // Device Integration: the drag drop layer + return 36; + case TYPE_SYSTEM_BLACKSCREEN_OVERLAY: + // Device Integration: the black screen layer + return 37; default: Slog.e("WindowManager", "Unknown window type: " + type); return 3; @@ -635,7 +643,9 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { * @see WindowManager.LayoutParams#PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY */ default int getMaxWindowLayer() { - return 36; + // Device Integration: please refer to findAreaForToken(WindowToken token) in DisplayAreaPolicyBuilder + // Array length should be greater than index + return 38; } /** diff --git a/services/core/java/com/android/server/power/ShutdownThread.java b/services/core/java/com/android/server/power/ShutdownThread.java index b1430e7138e7..5666c3388f0d 100644 --- a/services/core/java/com/android/server/power/ShutdownThread.java +++ b/services/core/java/com/android/server/power/ShutdownThread.java @@ -78,6 +78,12 @@ public final class ShutdownThread extends Thread { private static final int PACKAGE_MANAGER_STOP_PERCENT = 6; private static final int RADIO_STOP_PERCENT = 18; private static final int MOUNT_SERVICE_STOP_PERCENT = 20; + // Time we should wait for vendor subsystem shutdown + // Sleep times(ms) between checks of the vendor subsystem state + private static final int VENDOR_SUBSYS_STATE_CHECK_INTERVAL_MS = 100; + // Max time we wait for vendor subsystems to shut down before resuming + // with full system shutdown + private static final int VENDOR_SUBSYS_MAX_WAIT_MS = 10000; // length of vibration before shutting down private static final int SHUTDOWN_VIBRATE_MS = 500; @@ -694,6 +700,59 @@ public final class ShutdownThread extends Thread { * @param reason reason for reboot/shutdown */ public static void rebootOrShutdown(final Context context, boolean reboot, String reason) { + String subsysProp; + subsysProp = SystemProperties.get("vendor.peripheral.shutdown_critical_list", + "ERROR"); + //If we don't have the shutdown critical subsystem list we can't + //really do anything. Proceed with full system shutdown. + if (!subsysProp.equals("ERROR")) { + Log.i(TAG, "Shutdown critical subsyslist is :"+subsysProp+": "); + Log.i(TAG, "Waiting for a maximum of " + + (VENDOR_SUBSYS_MAX_WAIT_MS) + "ms"); + String[] subsysList = subsysProp.split(" "); + int wait_count = 0; + boolean okToShutdown = true; + String subsysState; + int subsysListLength = subsysList.length; + do { + okToShutdown = true; + for (int i = 0; i < subsysListLength; i++) { + subsysState = + SystemProperties.get( + "vendor.peripheral." + + subsysList[i] + + ".state", + "ERROR"); + if(subsysState.equals("ONLINE")) { + //We only want to delay shutdown while + //one of the shutdown critical + //subsystems still shows as 'ONLINE'. + okToShutdown = false; + } + } + if (okToShutdown == false) { + SystemClock.sleep(VENDOR_SUBSYS_STATE_CHECK_INTERVAL_MS); + wait_count++; + } + } while (okToShutdown != true && + wait_count < (VENDOR_SUBSYS_MAX_WAIT_MS/VENDOR_SUBSYS_STATE_CHECK_INTERVAL_MS)); + if (okToShutdown != true) { + for (int i = 0; i < subsysList.length; i++) { + subsysState = + SystemProperties.get( + "vendor.peripheral." + + subsysList[i] + + ".state", + "ERROR"); + if(subsysState.equals("ONLINE")) { + Log.w(TAG, "Subsystem " + subsysList[i]+ + "did not shut down within timeout"); + } + } + } else { + Log.i(TAG, "Vendor subsystem(s) shutdown successful"); + } + } if (reboot) { Log.i(TAG, "Rebooting, reason: " + reason); PowerManagerService.lowLevelReboot(reason); diff --git a/services/core/java/com/android/server/recoverysystem/hal/BootControlHIDL.java b/services/core/java/com/android/server/recoverysystem/hal/BootControlHIDL.java index 65325c297719..a7ae0c7ff9a0 100644 --- a/services/core/java/com/android/server/recoverysystem/hal/BootControlHIDL.java +++ b/services/core/java/com/android/server/recoverysystem/hal/BootControlHIDL.java @@ -21,6 +21,7 @@ import android.hardware.boot.V1_0.CommandResult; import android.os.IBinder; import android.os.RemoteException; import android.util.Slog; +import java.util.NoSuchElementException; public class BootControlHIDL implements IBootControl { private static final String TAG = "BootControlHIDL"; @@ -41,7 +42,7 @@ public class BootControlHIDL implements IBootControl { public static boolean isV1_2ServicePresent() { try { android.hardware.boot.V1_2.IBootControl.getService(true); - } catch (RemoteException e) { + } catch (NoSuchElementException | RemoteException e) { return false; } return true; diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java index 044d30b368da..16d5f0dab4f5 100644 --- a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java +++ b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java @@ -114,6 +114,7 @@ import com.android.server.notification.NotificationDelegate; import com.android.server.policy.GlobalActionsProvider; import com.android.server.power.ShutdownCheckPoints; import com.android.server.power.ShutdownThread; +import com.android.server.UiThread; import com.android.server.wm.ActivityTaskManagerInternal; import java.io.FileDescriptor; diff --git a/services/core/java/com/android/server/wm/ActivityClientController.java b/services/core/java/com/android/server/wm/ActivityClientController.java index f2567561ed8c..7ff14614cb61 100644 --- a/services/core/java/com/android/server/wm/ActivityClientController.java +++ b/services/core/java/com/android/server/wm/ActivityClientController.java @@ -67,6 +67,7 @@ import android.app.FullscreenRequestHandler; import android.app.IActivityClientController; import android.app.ICompatCameraControlCallback; import android.app.IRequestFinishCallback; +import android.app.RemoteTaskConstants; import android.app.PictureInPictureParams; import android.app.PictureInPictureUiState; import android.app.compat.CompatChanges; @@ -82,6 +83,7 @@ import android.content.pm.PackageManagerInternal; import android.content.res.Configuration; import android.os.Binder; import android.os.Bundle; +import android.os.DeviceIntegrationUtils; import android.os.IBinder; import android.os.IRemoteCallback; import android.os.Parcel; @@ -364,7 +366,15 @@ class ActivityClientController extends IActivityClientController.Stub { final int taskId = ActivityRecord.getTaskForActivityLocked(token, !nonRoot); final Task task = mService.mRootWindowContainer.anyTaskForId(taskId); if (task != null) { - return ActivityRecord.getRootTask(token).moveTaskToBack(task); + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + final boolean ret = ActivityRecord.getRootTask(token).moveTaskToBack(task); + if (ret) { + mService.getRemoteTaskManager().closeRemoteTask(taskId); + } + return ret; + } else { + return ActivityRecord.getRootTask(token).moveTaskToBack(task); + } } } } finally { @@ -500,6 +510,7 @@ class ActivityClientController extends IActivityClientController.Stub { final long origId = Binder.clearCallingIdentity(); Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "finishActivity"); try { + r.releaseActivityBoost(); final boolean res; final boolean finishWithRootActivity = finishTask == Activity.FINISH_TASK_WITH_ROOT_ACTIVITY; @@ -519,6 +530,10 @@ class ActivityClientController extends IActivityClientController.Stub { r.finishIfPossible(resultCode, resultData, resultGrants, "app-request", true /* oomAdj */); res = r.finishing; + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + // Device Integration: deliver activity finish event to our manager. + mService.getRemoteTaskManager().handleFinishActivity(tr, r); + } if (!res) { Slog.i(TAG, "Failed to finish by app-request"); } diff --git a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java index a6d5c19395b0..27c3ff040f1a 100644 --- a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java +++ b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java @@ -1,5 +1,6 @@ package com.android.server.wm; +import android.app.ActivityManager; import static android.app.ActivityManager.PROCESS_STATE_NONEXISTENT; import static android.app.ActivityManager.START_SUCCESS; import static android.app.ActivityManager.START_TASK_TO_FRONT; @@ -101,6 +102,7 @@ import android.os.SystemClock; import android.os.Trace; import android.os.incremental.IncrementalManager; import android.util.ArrayMap; +import android.util.BoostFramework; import android.util.EventLog; import android.util.Log; import android.util.Slog; @@ -186,6 +188,10 @@ class ActivityMetricsLogger { private ArtManagerInternal mArtManagerInternal; private final StringBuilder mStringBuilder = new StringBuilder(); + public static BoostFramework mUxPerf = new BoostFramework(); + public static BoostFramework mPerfBoost = new BoostFramework(); + private static ActivityRecord mLaunchedActivity; + /** * Due to the global single concurrent launch sequence, all calls to this observer must be made * in-order on the same thread to fulfill the "happens-before" guarantee in LaunchObserver. @@ -1057,6 +1063,8 @@ class ActivityMetricsLogger { private void logAppTransitionFinished(@NonNull TransitionInfo info, boolean isHibernating) { if (DEBUG_METRICS) Slog.i(TAG, "logging finished transition " + info); + mLaunchedActivity = info.mLastLaunchedActivity; + // Take a snapshot of the transition info before sending it to the handler for logging. // This will avoid any races with other operations that modify the ActivityRecord. final TransitionInfoSnapshot infoSnapshot = new TransitionInfoSnapshot(info); @@ -1210,7 +1218,47 @@ class ActivityMetricsLogger { sb.append(info.userId); sb.append(": "); TimeUtils.formatDuration(info.windowsDrawnDelayMs, sb); + + if (mPerfBoost != null) { + if (info.processRecord != null) { + mPerfBoost.perfHint(BoostFramework.VENDOR_HINT_FIRST_DRAW, info.packageName, + info.processRecord.getPid(), info.windowsDrawnDelayMs); + } + } + + if (mUxPerf != null) { + if (mUxPerf.board_first_api_lvl < BoostFramework.VENDOR_T_API_LEVEL && + mUxPerf.board_api_lvl < BoostFramework.VENDOR_T_API_LEVEL) { + mUxPerf.perfUXEngine_events(BoostFramework.UXE_EVENT_DISPLAYED_ACT, 0, info.packageName, info.windowsDrawnDelayMs); + } + } + Log.i(TAG, sb.toString()); + + if (mUxPerf != null) { + int isGame; + + if (ActivityManager.isLowRamDeviceStatic()) { + isGame = mLaunchedActivity.isAppInfoGame(); + } else { + isGame = (mUxPerf.perfGetFeedback(BoostFramework.VENDOR_FEEDBACK_WORKLOAD_TYPE, + mLaunchedActivity.packageName) == BoostFramework.WorkloadType.GAME) ? 1 : 0; + } + if (mLaunchedActivity.processName != null) { + if (!mLaunchedActivity.processName.equals(info.packageName)) { + isGame = 1; + } + } + if (mUxPerf.board_first_api_lvl < BoostFramework.VENDOR_T_API_LEVEL && + mUxPerf.board_api_lvl < BoostFramework.VENDOR_T_API_LEVEL) { + mUxPerf.perfUXEngine_events(BoostFramework.UXE_EVENT_GAME, 0, info.packageName, isGame); + } + } + + if (mLaunchedActivity.mPerf != null && mLaunchedActivity.perfActivityBoostHandler > 0) { + mLaunchedActivity.mPerf.perfLockReleaseHandler(mLaunchedActivity.perfActivityBoostHandler); + mLaunchedActivity.perfActivityBoostHandler = -1; + } } private void logRecentsAnimationLatency(TransitionInfo info) { diff --git a/services/core/java/com/android/server/wm/ActivityPluginDelegate.java b/services/core/java/com/android/server/wm/ActivityPluginDelegate.java new file mode 100644 index 000000000000..b2b08f2198d7 --- /dev/null +++ b/services/core/java/com/android/server/wm/ActivityPluginDelegate.java @@ -0,0 +1,174 @@ +/* + *Copyright (c) 2018, The Linux Foundation. All rights reserved. + * + *Redistribution and use in source and binary forms, with or without + *modification, are permitted provided that the following conditions are + *met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + *THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + *WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + *MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + *ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + *BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + *CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + *SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + *BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + *WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + *OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + *IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package com.android.server.wm; + +import dalvik.system.PathClassLoader; + +import java.io.File; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; + +import android.os.Environment; +import android.util.Log; +import android.content.Context; +import android.provider.Settings; +import android.app.ActivityThread; + +public class ActivityPluginDelegate { + + private static final String TAG = "ActivityPluginDelegate"; + private static final boolean LOGV = false; + + private static Class activityServiceClass = null; + private static Object activityServiceObj = null; + private static boolean extJarAvail = true; + + private static final String FOREGROUND_ACTIVITY_TRIGGER = + "foreground_activity_trigger"; + + //Try to get global settings for 15 times, if + //foreground_activity_trigger does not set to 1 after 15 times + //stop retry and foreground_activity_trigger is 0 + private static final int MAX_CONNECT_RETRIES = 15; + + static int mGetFeatureEnableRetryCount = MAX_CONNECT_RETRIES; + static boolean isEnabled = false; + + public static void activityInvokeNotification(String appName, + boolean isFullScreen) { + if (LOGV) Log.v(TAG, "activityInvokeNotification(" + + appName + ", " + isFullScreen + ")"); + if (!getFeatureFlag() || !extJarAvail || !loadActivityExtJar()) + return; + + try { + activityServiceClass.getMethod("sendActivityInvokeNotification", + String.class, boolean.class).invoke( + activityServiceObj, appName, isFullScreen); + } catch (InvocationTargetException | + SecurityException | NoSuchMethodException e) { + if (LOGV) { + Log.w(TAG, "Failed to invoke activityInvokeNotification: " + e); + e.printStackTrace(); + } + } catch (Exception e) { + if (LOGV) { + Log.w(TAG, "Error calling activityInvokeNotification"+ + "Method on ActivityExt jar: " + e); + e.printStackTrace(); + } + } + } + + public static void activitySuspendNotification(String appName, + boolean isFullScreen, + boolean isBg) { + if (LOGV) Log.v(TAG, "activitySuspendNotification(" + + appName + ", " + isFullScreen + ", " + isBg + ")"); + if (!getFeatureFlag() || !extJarAvail || !loadActivityExtJar()) + return; + + try { + activityServiceClass.getMethod("sendActivitySuspendNotification", + String.class, boolean.class, boolean.class).invoke( + activityServiceObj, appName, isFullScreen, isBg); + } catch (InvocationTargetException | + SecurityException | NoSuchMethodException e) { + if (LOGV) { + Log.w(TAG, "Failed to call sendActivitySuspendNotification: " + e); + e.printStackTrace(); + } + } catch (Exception e) { + if (LOGV) { + Log.w(TAG, "Error calling sendActivitySuspendNotification"+ + "Method on ActivityExt jar: " + e); + e.printStackTrace(); + } + } + } + + private static synchronized boolean loadActivityExtJar() { + final String realProvider = "com.qualcomm.qti."+ + "activityextension.ActivityNotifier"; + final String realProviderPath = Environment.getSystemExtDirectory(). + getAbsolutePath() + "/framework/ActivityExt.jar"; + + if (activityServiceClass != null && activityServiceObj != null) { + return true; + } + + if ((extJarAvail = new File(realProviderPath).exists()) == false) { + if (LOGV) Log.w(TAG, "ActivityExt jar file not present"); + return extJarAvail; + } + + if (activityServiceClass == null && activityServiceObj == null) { + if (LOGV) Log.v(TAG, "loading ActivityExt jar"); + try { + PathClassLoader classLoader = new PathClassLoader + (realProviderPath, ClassLoader.getSystemClassLoader()); + + activityServiceClass = classLoader.loadClass(realProvider); + activityServiceObj = activityServiceClass.newInstance(); + if (LOGV) Log.v(TAG, "ActivityExt jar loaded"); + } catch (ClassNotFoundException | + InstantiationException | IllegalAccessException e) { + if (LOGV) { + Log.w(TAG, "Failed to find, instantiate or access ActivityExt jar:" + e); + e.printStackTrace(); + } + extJarAvail = false; + return false; + } catch (Exception e) { + if (LOGV) { + Log.w(TAG, "unable to load ActivityExt jar:" + e); + e.printStackTrace(); + } + extJarAvail = false; + return false; + } + } + return true; + } + + public static synchronized boolean getFeatureFlag() { + //Global setting has been enabled for foreground_activity_trigger + //Or no one sets foreground_activity_trigger after all retry + //No need to invoke Settings API + if(isEnabled == true || (mGetFeatureEnableRetryCount == 0)) { + return isEnabled; + } + isEnabled = ((Settings.Global.getInt(ActivityThread.currentApplication(). + getApplicationContext().getContentResolver(), + FOREGROUND_ACTIVITY_TRIGGER, 1)) == 1); + --mGetFeatureEnableRetryCount; + return isEnabled; + } +} diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java index f6fa51e3018a..9e3f541d3417 100644 --- a/services/core/java/com/android/server/wm/ActivityRecord.java +++ b/services/core/java/com/android/server/wm/ActivityRecord.java @@ -200,6 +200,7 @@ import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_SWITCH; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_TRANSITION; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_USER_LEAVING; import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_VISIBILITY; +import static com.android.server.wm.ActivityTaskManagerDebugConfig.DEBUG_SERVICETRACKER; import static com.android.server.wm.ActivityTaskManagerDebugConfig.POSTFIX_ADD_REMOVE; import static com.android.server.wm.ActivityTaskManagerDebugConfig.POSTFIX_APP; import static com.android.server.wm.ActivityTaskManagerDebugConfig.POSTFIX_CONFIGURATION; @@ -305,6 +306,7 @@ import android.os.Binder; import android.os.Build; import android.os.Bundle; import android.os.Debug; +import android.os.DeviceIntegrationUtils; import android.os.IBinder; import android.os.IRemoteCallback; import android.os.PersistableBundle; @@ -312,11 +314,13 @@ import android.os.Process; import android.os.RemoteCallbackList; import android.os.RemoteException; import android.os.SystemClock; +import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; import android.service.contentcapture.ActivityEvent; import android.service.dreams.DreamActivity; import android.service.voice.IVoiceInteractionSession; +import android.util.BoostFramework; import android.util.ArraySet; import android.util.EventLog; import android.util.Log; @@ -393,10 +397,14 @@ import java.util.Objects; import java.util.function.Consumer; import java.util.function.Predicate; +import vendor.qti.hardware.servicetracker.V1_2.IServicetracker; +import vendor.qti.hardware.servicetracker.V1_2.ActivityDetails; +import vendor.qti.hardware.servicetracker.V1_2.ActivityStats; +import vendor.qti.hardware.servicetracker.V1_2.ActivityStates; /** * An entry in the history task, representing an activity. */ -final class ActivityRecord extends WindowToken implements WindowManagerService.AppFreezeListener { +public final class ActivityRecord extends WindowToken implements WindowManagerService.AppFreezeListener { private static final String TAG = TAG_WITH_CLASS_NAME ? "ActivityRecord" : TAG_ATM; private static final String TAG_ADD_REMOVE = TAG + POSTFIX_ADD_REMOVE; private static final String TAG_APP = TAG + POSTFIX_APP; @@ -463,7 +471,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A final int mUserId; // The package implementing intent's component // TODO: rename to mPackageName - final String packageName; + public final String packageName; // the intent component, or target of an alias. final ComponentName mActivityComponent; // Input application handle used by the input dispatcher. @@ -492,6 +500,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A private int labelRes; // the label information from the package mgr. private int icon; // resource identifier of activity's icon. private int theme; // resource identifier of activity's theme. + public int perfActivityBoostHandler = -1; //perflock handler when activity is created. private Task task; // the task this is in. private long createTime = System.currentTimeMillis(); long lastVisibleTime; // last time this activity became visible @@ -553,6 +562,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // process that it is hidden. private boolean mLastDeferHidingClient; // If true we will defer setting mClientVisible to false // and reporting to the client that it is hidden. + public boolean launching; // is activity launch in progress? + public boolean translucentWindowLaunch; // a translucent window launch? boolean nowVisible; // is this activity's window visible? boolean mClientVisibilityDeferred;// was the visibility change message to client deferred? boolean idle; // has the activity gone idle? @@ -653,6 +664,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A boolean pendingVoiceInteractionStart; // Waiting for activity-invoked voice session IVoiceInteractionSession voiceSession; // Voice interaction session for this activity + public BoostFramework mPerf = null; + public BoostFramework mPerf_iop = null; + + private final boolean isLowRamDevice = + SystemProperties.getBoolean("ro.config.low_ram", false); + boolean mVoiceInteraction; private int mPendingRelaunchCount; @@ -2103,6 +2120,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A resultWho = _resultWho; requestCode = _reqCode; setState(INITIALIZING, "ActivityRecord ctor"); + callServiceTrackeronActivityStatechange(INITIALIZING, true); launchFailed = false; delayedResume = false; finishing = false; @@ -2113,6 +2131,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A super.setClientVisible(true); idle = false; hasBeenLaunched = false; + launching = false; + translucentWindowLaunch = false; mTaskSupervisor = supervisor; info.taskAffinity = computeTaskAffinity(info.taskAffinity, info.applicationInfo.uid, @@ -2208,6 +2228,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // No such property name. } mAppActivityEmbeddingSplitsEnabled = appActivityEmbeddingEnabled; + + if (mPerf == null) + mPerf = new BoostFramework(); } /** @@ -2383,6 +2406,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A windowDisableStarting); // If this activity is launched from system surface, ignore windowDisableStarting if (windowIsTranslucent || windowIsFloating) { + translucentWindowLaunch = true; return false; } if (windowShowWallpaper @@ -3756,6 +3780,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // destroyed when the next activity reports idle. addToStopping(false /* scheduleIdle */, false /* idleDelayed */, "completeFinishing"); + callServiceTrackeronActivityStatechange(STOPPING, true); setState(STOPPING, "completeFinishing"); } else if (addToFinishingAndWaitForIdle()) { // We added this activity to the finishing list and something else is becoming @@ -3782,6 +3807,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A * destroying it until the next one starts. */ boolean destroyIfPossible(String reason) { + callServiceTrackeronActivityStatechange(FINISHING, true); setState(FINISHING, "destroyIfPossible"); // Make sure the record is cleaned out of other places. @@ -3806,6 +3832,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } makeFinishingLocked(); + getRootTask().onARStopTriggered(this); final boolean activityRemoved = destroyImmediately("finish-imm:" + reason); // If the display does not have running activity, the configuration may need to be @@ -3832,6 +3859,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A @VisibleForTesting boolean addToFinishingAndWaitForIdle() { ProtoLog.v(WM_DEBUG_STATES, "Enqueueing pending finish: %s", this); + callServiceTrackeronActivityStatechange(FINISHING, true); setState(FINISHING, "addToFinishingAndWaitForIdle"); if (!mTaskSupervisor.mFinishingActivities.contains(this)) { mTaskSupervisor.mFinishingActivities.add(this); @@ -3902,12 +3930,14 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // we are not removing it from the list. if (finishing && !skipDestroy) { ProtoLog.v(WM_DEBUG_STATES, "Moving to DESTROYING: %s (destroy requested)", this); + callServiceTrackeronActivityStatechange(DESTROYING, true); setState(DESTROYING, "destroyActivityLocked. finishing and not skipping destroy"); mAtmService.mH.postDelayed(mDestroyTimeoutRunnable, DESTROY_TIMEOUT); } else { ProtoLog.v(WM_DEBUG_STATES, "Moving to DESTROYED: %s " + "(destroy skipped)", this); + callServiceTrackeronActivityStatechange(DESTROYED, true); setState(DESTROYED, "destroyActivityLocked. not finishing or skipping destroy"); if (DEBUG_APP) Slog.v(TAG_APP, "Clearing app during destroy for activity " + this); @@ -3920,6 +3950,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A removedFromHistory = true; } else { ProtoLog.v(WM_DEBUG_STATES, "Moving to DESTROYED: %s (no app)", this); + callServiceTrackeronActivityStatechange(DESTROYED, true); setState(DESTROYED, "destroyActivityLocked. not finishing and had no app"); } } @@ -3956,6 +3987,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A removeTimeouts(); ProtoLog.v(WM_DEBUG_STATES, "Moving to DESTROYED: %s (removed from history)", this); + callServiceTrackeronActivityStatechange(DESTROYED, true); setState(DESTROYED, "removeFromHistory"); if (DEBUG_APP) Slog.v(TAG_APP, "Clearing app during remove for activity " + this); detachFromProcess(); @@ -4054,6 +4086,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A frozenBeforeDestroy = false; if (setState) { + callServiceTrackeronActivityStatechange(DESTROYED, true); setState(DESTROYED, "cleanUp"); if (DEBUG_APP) Slog.v(TAG_APP, "Clearing app during cleanUp for activity " + this); detachFromProcess(); @@ -5766,6 +5799,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A mState = state; + callServiceTrackeronActivityStatechange(state, false); + if (getTaskFragment() != null) { getTaskFragment().onActivityStateChanged(this, state, reason); } @@ -5834,6 +5869,79 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } } + void callServiceTrackeronActivityStatechange(State state, boolean early_notify) { + IServicetracker mServicetracker; + ActivityDetails aDetails = new ActivityDetails(); + ActivityStats aStats = new ActivityStats(); + int aState = ActivityStates.UNKNOWN; + + aDetails.launchedFromPid = this.launchedFromPid; + aDetails.launchedFromUid = this.launchedFromUid; + aDetails.packageName = this.packageName; + aDetails.processName = (this.processName!= null)? this.processName:"none"; + aDetails.intent = this.intent.getComponent().toString(); + aDetails.className = this.intent.getComponent().getClassName(); + aDetails.versioncode = this.info.applicationInfo.versionCode; + + aStats.createTime = this.createTime; + aStats.lastVisibleTime = this.lastVisibleTime; + aStats.launchCount = this.launchCount; + aStats.lastLaunchTime = this.lastLaunchTime; + + switch(state) { + case INITIALIZING : + aState = ActivityStates.INITIALIZING; + break; + case STARTED : + aState = ActivityStates.STARTED; + break; + case RESUMED : + aState = ActivityStates.RESUMED; + break; + case PAUSING : + aState = ActivityStates.PAUSING; + break; + case PAUSED : + aState = ActivityStates.PAUSED; + break; + case STOPPING : + aState = ActivityStates.STOPPING; + break; + case STOPPED: + aState = ActivityStates.STOPPED; + break; + case FINISHING : + aState = ActivityStates.FINISHING; + break; + case DESTROYING: + aState = ActivityStates.DESTROYING; + break; + case DESTROYED : + aState = ActivityStates.DESTROYED; + break; + case RESTARTING_PROCESS: + aState = ActivityStates.RESTARTING_PROCESS; + break; + } + if (!isLowRamDevice) { + if(DEBUG_SERVICETRACKER) { + Slog.v(TAG, "Calling mServicetracker.OnActivityStateChange with flag " + + early_notify + " state " + state); + } + try { + mServicetracker = mAtmService.mTaskSupervisor.getServicetrackerInstance(); + if (mServicetracker != null) + mServicetracker.OnActivityStateChange(aState, aDetails, aStats, early_notify); + else + Slog.e(TAG, "Unable to get servicetracker HAL instance"); + } catch (RemoteException e) { + Slog.e(TAG, "Failed to send activity state change details to servicetracker HAL", e); + mAtmService.mTaskSupervisor.destroyServicetrackerInstance(); + } + } + + } + State getState() { return mState; } @@ -6119,6 +6227,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } // An activity must be in the {@link PAUSING} state for the system to validate // the move to {@link PAUSED}. + callServiceTrackeronActivityStatechange(PAUSING, true); setState(PAUSING, "makeActiveIfNeeded"); EventLogTags.writeWmPauseActivity(mUserId, System.identityHashCode(this), shortComponentName, "userLeaving=false", "make-active"); @@ -6133,13 +6242,15 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (DEBUG_VISIBILITY) { Slog.v(TAG_VISIBILITY, "Start visible activity, " + this); } + callServiceTrackeronActivityStatechange(STARTED, true); setState(STARTED, "makeActiveIfNeeded"); - + acquireActivityBoost(); try { mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token, StartActivityItem.obtain(takeOptions())); } catch (Exception e) { Slog.w(TAG, "Exception thrown sending start: " + intent.getComponent(), e); + releaseActivityBoost(); } // The activity may be waiting for stop, but that is no longer appropriate if we are // starting the activity again @@ -6308,6 +6419,11 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (isActivityTypeHome()) { mTaskSupervisor.updateHomeProcess(task.getBottomMostActivity().app); + try { + mTaskSupervisor.new PreferredAppsTask().execute(); + } catch (Exception e) { + Slog.v (TAG, "Exception: " + e); + } } if (nowVisible) { @@ -6358,6 +6474,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A shortComponentName, pausingActivity != null ? pausingActivity.shortComponentName : "(none)"); if (isState(PAUSING)) { + callServiceTrackeronActivityStatechange(PAUSED, true); setState(PAUSED, "activityPausedLocked"); if (finishing) { ProtoLog.v(WM_DEBUG_STATES, @@ -6404,6 +6521,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A void stopIfPossible() { if (DEBUG_SWITCH) Slog.d(TAG_SWITCH, "Stopping: " + this); + launching = false; final Task rootTask = getRootTask(); if (isNoHistory()) { if (!finishing) { @@ -6427,8 +6545,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A resumeKeyDispatchingLocked(); try { ProtoLog.v(WM_DEBUG_STATES, "Moving to STOPPING: %s (stop requested)", this); + callServiceTrackeronActivityStatechange(STOPPING, true); setState(STOPPING, "stopIfPossible"); + getRootTask().onARStopTriggered(this); if (DEBUG_VISIBILITY) { Slog.v(TAG_VISIBILITY, "Stopping:" + this); } @@ -6445,6 +6565,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A // Just in case, assume it to be stopped. mAppStopped = true; ProtoLog.v(WM_DEBUG_STATES, "Stop failed; moving to STOPPED: %s", this); + callServiceTrackeronActivityStatechange(STOPPED, true); setState(STOPPED, "stopIfPossible"); if (deferRelaunchUntilPaused) { destroyImmediately("stop-except"); @@ -6480,6 +6601,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (isStopping) { ProtoLog.v(WM_DEBUG_STATES, "Moving to STOPPED: %s (stop complete)", this); + callServiceTrackeronActivityStatechange(STOPPED, true); setState(STOPPED, "activityStopped"); } @@ -6788,8 +6910,52 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } } + protected void releaseActivityBoost() { + if (mPerf != null && perfActivityBoostHandler > 0) { + mPerf.perfLockReleaseHandler(perfActivityBoostHandler); + perfActivityBoostHandler = -1; + } else if (perfActivityBoostHandler > 0) { + Slog.w(TAG, "activity boost didn't release as expected"); + } + } + + protected void acquireActivityBoost() { + if (mPerf != null) { + if (mPerf.getPerfHalVersion() >= BoostFramework.PERF_HAL_V23) { + int pkgType = mPerf.perfGetFeedback(BoostFramework.VENDOR_FEEDBACK_WORKLOAD_TYPE, + packageName); + int pid = -1; + WindowProcessController wpc = null; + if (app == null) { + if (info != null && info.applicationInfo != null && mAtmService != null) { + wpc = mAtmService.getProcessController(processName, + info.applicationInfo.uid); + } + } else { + wpc = app; + } + if (wpc != null && wpc.hasThread()) { + pid = wpc.getPid(); + } + perfActivityBoostHandler = + mPerf.perfHintAcqRel(perfActivityBoostHandler, + BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, packageName, + -1, BoostFramework.Launch.ACTIVITY_LAUNCH_BOOST, 2, pkgType, pid); + } else { + if (perfActivityBoostHandler > 0) { + Slog.i(TAG, "Activity boosted, release it firstly"); + mPerf.perfLockReleaseHandler(perfActivityBoostHandler); + } + perfActivityBoostHandler = + mPerf.perfHint(BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + packageName, -1, BoostFramework.Launch.BOOST_V1); + } + } + } + /** Called when the windows associated app window container are drawn. */ private void onWindowsDrawn() { + releaseActivityBoost(); final TransitionInfoSnapshot info = mTaskSupervisor .getActivityMetricsLogger().notifyWindowsDrawn(this); final boolean validInfo = info != null; @@ -6819,6 +6985,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (DEBUG_SWITCH) Log.v(TAG_SWITCH, "windowsVisibleLocked(): " + this); if (!nowVisible) { nowVisible = true; + launching = false; lastVisibleTime = SystemClock.uptimeMillis(); mAtmService.scheduleAppGcsLocked(); // The nowVisible may be false in onAnimationFinished because the transition animation @@ -6843,6 +7010,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A if (DEBUG_VISIBILITY) Slog.v(TAG_WM, "Reporting gone in " + token); if (DEBUG_SWITCH) Log.v(TAG_SWITCH, "windowsGone(): " + this); nowVisible = false; + launching = false; } @Override @@ -7518,6 +7686,15 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A return task == null || task.shouldAnimate(); } + public int isAppInfoGame() { + int isGame = 0; + if (info.applicationInfo != null) { + isGame = (info.applicationInfo.category == ApplicationInfo.CATEGORY_GAME || + (info.applicationInfo.flags & ApplicationInfo.FLAG_IS_GAME) == ApplicationInfo.FLAG_IS_GAME) ? 1 : 0; + } + return isGame; + } + /** * Creates a layer to apply crop to an animation. */ @@ -9524,6 +9701,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A final int newDisplayId = getDisplayId(); final boolean displayChanged = mLastReportedDisplayId != newDisplayId; + final int lastReportDisplayID = mLastReportedDisplayId; if (displayChanged) { mLastReportedDisplayId = newDisplayId; } @@ -9605,7 +9783,12 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A Integer.toHexString(changes), Integer.toHexString(info.getRealConfigChanged()), mLastReportedConfiguration); - if (shouldRelaunchLocked(changes, mTmpConfig) || forceNewConfig) { + boolean shouldRelaunchLocked = shouldRelaunchLocked(changes, mTmpConfig); + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + shouldRelaunchLocked &= !mAtmService.mRemoteTaskManager.shouldIgnoreRelaunch(task, displayChanged, + lastReportDisplayID, newDisplayId, changes); + } + if (shouldRelaunchLocked || forceNewConfig) { // Aha, the activity isn't handling the change, so DIE DIE DIE. configChangeFlags |= changes; startFreezingScreenLocked(globalChanges); @@ -9864,6 +10047,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A mAtmService.getAppWarningsLocked().onResumeActivity(this); } else { removePauseTimeout(); + callServiceTrackeronActivityStatechange(PAUSED, true); setState(PAUSED, "relaunchActivityLocked"); } @@ -9894,6 +10078,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } // The restarting state avoids removing this record when process is died. + callServiceTrackeronActivityStatechange(RESTARTING_PROCESS, true); setState(RESTARTING_PROCESS, "restartActivityProcess"); if (!mVisibleRequested || mHaveState) { diff --git a/services/core/java/com/android/server/wm/ActivityStarter.java b/services/core/java/com/android/server/wm/ActivityStarter.java index a0a45e67e77b..d3103ab600ba 100644 --- a/services/core/java/com/android/server/wm/ActivityStarter.java +++ b/services/core/java/com/android/server/wm/ActivityStarter.java @@ -103,6 +103,7 @@ import android.app.PendingIntent; import android.app.ProfilerInfo; import android.app.WaitResult; import android.app.WindowConfiguration; +import android.app.RemoteTaskConstants; import android.compat.annotation.ChangeId; import android.compat.annotation.Disabled; import android.compat.annotation.EnabledSince; @@ -120,6 +121,7 @@ import android.content.res.Configuration; import android.os.Binder; import android.os.Build; import android.os.Bundle; +import android.os.DeviceIntegrationUtils; import android.os.IBinder; import android.os.RemoteException; import android.os.Trace; @@ -127,6 +129,7 @@ import android.os.UserHandle; import android.os.UserManager; import android.service.voice.IVoiceInteractionSession; import android.text.TextUtils; +import android.util.BoostFramework; import android.util.Pair; import android.util.Pools.SynchronizedPool; import android.util.Slog; @@ -269,6 +272,8 @@ class ActivityStarter { private long mLastStartActivityTimeMs; // The reason we were trying to start the last activity private String mLastStartReason; + // Device Integration: RemoteTaskManager + private RemoteTaskManager mRemoteTaskManager; /* * Request details provided through setter methods. Should be reset after {@link #execute()} @@ -616,6 +621,9 @@ class ActivityStarter { mRootWindowContainer = service.mRootWindowContainer; mSupervisor = supervisor; mInterceptor = interceptor; + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + mRemoteTaskManager = mService.getRemoteTaskManager(); + } reset(true); } @@ -1662,6 +1670,22 @@ class ActivityStarter { // Compute if there is an existing task that should be used for. final Task targetTask = reusedTask != null ? reusedTask : computeTargetTask(); final boolean newTask = targetTask == null; + + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && (newTask || reusedTask != null)) { + final boolean shouldInterfere + = newTask && mRemoteTaskManager.isDeliverToCurrentTop( + mPreferredTaskDisplayArea, mStartActivity, + mNotTop, mLaunchFlags, mLaunchMode); + if (!shouldInterfere) { + options = mRemoteTaskManager.verifyRemoteTaskIfNeeded(mRootWindowContainer, + mRequest.caller, mRequest.callingPid, mRequest.callingUid, + mRequest.realCallingPid, mRequest.realCallingUid, reusedTask, + mSourceRecord != null ? mSourceRecord : sourceRecord, r, options); + mOptions = options; + } + } + mTargetTask = targetTask; computeLaunchParams(r, sourceRecord, targetTask); @@ -1708,6 +1732,9 @@ class ActivityStarter { // Recycle the target task for this launch. startResult = recycleTask(targetTask, targetTaskTop, reusedTask, intentGrants); if (startResult != START_SUCCESS) { + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION && reusedTask != null) { + mRemoteTaskManager.activateRemoteTaskIfNeeded(newTask, reusedTask,r, mOptions); + } return startResult; } } else { @@ -1720,6 +1747,9 @@ class ActivityStarter { if (topRootTask != null) { startResult = deliverToCurrentTopIfNeeded(topRootTask, intentGrants); if (startResult != START_SUCCESS) { + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION && reusedTask != null) { + mRemoteTaskManager.activateRemoteTaskIfNeeded(newTask, reusedTask,r, mOptions); + } return startResult; } } @@ -1828,6 +1858,9 @@ class ActivityStarter { mRootWindowContainer.moveActivityToPinnedRootTask(mStartActivity, sourceRecord, "launch-into-pip"); } + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + mRemoteTaskManager.activateRemoteTaskIfNeeded(newTask, reusedTask, r, mOptions); + } return START_SUCCESS; } @@ -2399,7 +2432,15 @@ class ActivityStarter { // removed from calling performClearTaskLocked (For example, if it is being brought out // of history or if it is finished immediately), thus disassociating the task. Keep the // task-overlay activity because the targetTask will be reused to launch new activity. - targetTask.performClearTaskForReuse(true /* excludingTaskOverlay*/); + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + if (!mRemoteTaskManager.inAnyInterceptSession(mOptions)) { + // Device Integration: if we got a intention for moving task between displays, stop cleaning + // any activity from task, we want to keep context in apps unchange. + targetTask.performClearTaskForReuse(true /* excludingTaskOverlay*/); + } + } else { + targetTask.performClearTaskForReuse(true /* excludingTaskOverlay*/); + } targetTask.setIntent(mStartActivity); mAddingToTask = true; mIsTaskCleared = true; @@ -2407,6 +2448,13 @@ class ActivityStarter { || isDocumentLaunchesIntoExisting(mLaunchFlags) || isLaunchModeOneOf(LAUNCH_SINGLE_INSTANCE, LAUNCH_SINGLE_TASK, LAUNCH_SINGLE_INSTANCE_PER_TASK)) { + // Device Integration: if we got a intention for moving task between displays, stop cleaning any activity from task + // we want to keep context in app unchange. + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && mRemoteTaskManager.inAnyInterceptSession(mOptions) + && (mLaunchFlags & FLAG_ACTIVITY_CLEAR_TOP) == 0) { + return; + } // In this situation we want to remove all activities from the task up to the one // being started. In most cases this means we are resetting the task to its initial // state. @@ -2882,6 +2930,9 @@ class ActivityStarter { intentActivity = mRootWindowContainer.findTask(mStartActivity, mPreferredTaskDisplayArea); } + } else if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + intentActivity = mRemoteTaskManager.findTaskForReuseIfNeeded(mStartActivity, + mOptions, mPreferredTaskDisplayArea, mLaunchFlags); } if (intentActivity != null && mLaunchMode == LAUNCH_SINGLE_INSTANCE_PER_TASK @@ -2978,12 +3029,19 @@ class ActivityStarter { final boolean wasTopOfVisibleRootTask = intentActivity.isVisibleRequested() && intentActivity.inMultiWindowMode() && intentActivity == mTargetRootTask.topRunningActivity(); + + boolean noAnimation = mNoAnimation; + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && mRemoteTaskManager.isDisplaySwitchDetected(mOptions)) { + noAnimation = true; + } + // We only want to move to the front, if we aren't going to launch on a // different root task. If we launch on a different root task, we will put the // task on top there. // Defer resuming the top activity while moving task to top, since the // current task-top activity may not be the activity that should be resumed. - mTargetRootTask.moveTaskToFront(intentTask, mNoAnimation, mOptions, + mTargetRootTask.moveTaskToFront(intentTask, noAnimation, mOptions, mStartActivity.appTimeTracker, DEFER_RESUME, "bringingFoundTaskToFront"); mMovedToFront = !wasTopOfVisibleRootTask; @@ -3078,6 +3136,7 @@ class ActivityStarter { /** Places {@link #mStartActivity} in {@code task} or an embedded {@link TaskFragment}. */ private void addOrReparentStartingActivity(@NonNull Task task, String reason) { + mStartActivity.acquireActivityBoost(); TaskFragment newParent = task; if (mInTaskFragment != null) { int embeddingCheckResult = canEmbedActivity(mInTaskFragment, mStartActivity, task); diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerDebugConfig.java b/services/core/java/com/android/server/wm/ActivityTaskManagerDebugConfig.java index 33d1b44b9743..6671b360ed0b 100644 --- a/services/core/java/com/android/server/wm/ActivityTaskManagerDebugConfig.java +++ b/services/core/java/com/android/server/wm/ActivityTaskManagerDebugConfig.java @@ -58,6 +58,8 @@ public class ActivityTaskManagerDebugConfig { static final boolean DEBUG_ACTIVITY_STARTS = DEBUG_ALL || false; public static final boolean DEBUG_CLEANUP = DEBUG_ALL || false; public static final boolean DEBUG_METRICS = DEBUG_ALL || false; + //Flag to enable Servicetracker logs in AOSP side + static final boolean DEBUG_SERVICETRACKER = false; static final String POSTFIX_APP = APPEND_CATEGORY_NAME ? "_App" : ""; static final String POSTFIX_CLEANUP = (APPEND_CATEGORY_NAME) ? "_Cleanup" : ""; diff --git a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java index dd3a3c5e6bbf..0faea256eda6 100644 --- a/services/core/java/com/android/server/wm/ActivityTaskManagerService.java +++ b/services/core/java/com/android/server/wm/ActivityTaskManagerService.java @@ -157,6 +157,8 @@ import android.app.PendingIntent; import android.app.PictureInPictureParams; import android.app.PictureInPictureUiState; import android.app.ProfilerInfo; +import android.app.RemoteAction; +import android.app.RemoteTaskConstants; import android.app.WaitResult; import android.app.admin.DevicePolicyCache; import android.app.admin.DeviceStateCache; @@ -193,6 +195,7 @@ import android.net.Uri; import android.os.Binder; import android.os.Build; import android.os.Bundle; +import android.os.DeviceIntegrationUtils; import android.os.FactoryTest; import android.os.FileUtils; import android.os.Handler; @@ -390,7 +393,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { * @see WindowManagerThreadPriorityBooster */ final Object mGlobalLockWithoutBoost = mGlobalLock; - ActivityTaskSupervisor mTaskSupervisor; + public ActivityTaskSupervisor mTaskSupervisor; ActivityClientController mActivityClientController; RootWindowContainer mRootWindowContainer; WindowManagerService mWindowManager; @@ -763,6 +766,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { @Nullable private ActivityRecord mTracedResumedActivity; + boolean toastWindow = false; + /** If non-null, we are tracking the time the user spends in the currently focused app. */ AppTimeTracker mCurAppTimeTracker; @@ -780,6 +785,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { TaskOrganizerController mTaskOrganizerController; TaskFragmentOrganizerController mTaskFragmentOrganizerController; + final RemoteTaskManager mRemoteTaskManager; + @Nullable private BackgroundActivityStartCallback mBackgroundActivityStartCallback; @@ -857,6 +864,11 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { mTaskFragmentOrganizerController = mWindowOrganizerController.mTaskFragmentOrganizerController; mBackNavigationController = new BackNavigationController(); + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + mRemoteTaskManager = new RemoteTaskManager(this); + } else { + mRemoteTaskManager = null; + } } public void onSystemReady() { @@ -874,6 +886,10 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { } } + public RemoteTaskManager getRemoteTaskManager() { + return mRemoteTaskManager; + } + public void onInitPowerManagement() { synchronized (mGlobalLock) { mTaskSupervisor.initPowerManagement(); @@ -1040,6 +1056,10 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { mTaskSupervisor.setWindowManager(wm); mRootWindowContainer.setWindowManager(wm); mBackNavigationController.setWindowManager(wm); + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && mRemoteTaskManager != null) { + mRemoteTaskManager.setRootWindowContainer(mRootWindowContainer); + } } } @@ -3650,6 +3670,15 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { getTransitionController(), mWindowManager.mSyncEngine) : null; + // Device Integration: Essentially we don't want a task who live in remote task could enter PIP mode, + // that may somehow cause difficulty for handling the Launch same app scenarios. In addition, + // pip mode comes with bad user experiences(whole black screen) when shows in Virtual Display + // in some cases, so we have to relinquish this mode. + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && getRemoteTaskManager().anyTaskExist(r.getTask())) { + return false; + } + final Runnable enterPipRunnable = () -> { synchronized (mGlobalLock) { if (r.getParent() == null) { @@ -5221,6 +5250,18 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { return mCompatModePackages.compatibilityInfoForPackageLocked(ai); } + void setToastWindow() { + toastWindow = true; + } + + void resetToastWindow() { + toastWindow = false; + } + + boolean getToastWindow() { + return toastWindow; + } + /** * Returns the PackageManager. Used by classes hosted by {@link ActivityTaskManagerService}. The * PackageManager could be unavailable at construction time and therefore needs to be accessed diff --git a/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java b/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java index b34ae1930048..bcfcf21af0fe 100644 --- a/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java +++ b/services/core/java/com/android/server/wm/ActivityTaskSupervisor.java @@ -51,6 +51,7 @@ import static android.view.WindowManager.TRANSIT_TO_FRONT; import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_STATES; import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_TASKS; +import static com.android.server.wm.ActivityRecord.State.DESTROYED; import static com.android.server.wm.ActivityRecord.State.PAUSED; import static com.android.server.wm.ActivityRecord.State.PAUSING; import static com.android.server.wm.ActivityRecord.State.RESTARTING_PROCESS; @@ -120,6 +121,7 @@ import android.os.Binder; import android.os.Build; import android.os.Bundle; import android.os.Debug; +import android.os.DeviceIntegrationUtils; import android.os.Handler; import android.os.IBinder; import android.os.Looper; @@ -138,6 +140,8 @@ import android.util.Pair; import android.util.Slog; import android.util.SparseArray; import android.util.SparseIntArray; +import android.util.BoostFramework; +import com.android.internal.app.procstats.ProcessStats; import android.view.Display; import android.widget.Toast; @@ -165,6 +169,11 @@ import java.util.List; import java.util.function.Consumer; import java.util.function.Predicate; +import java.util.Arrays; +import android.os.AsyncTask; + +import vendor.qti.hardware.servicetracker.V1_2.IServicetracker; + // TODO: This class has become a dumping ground. Let's // - Move things relating to the hierarchy to RootWindowContainer // - Move things relating to activity life cycles to maybe a new class called ActivityLifeCycler @@ -191,6 +200,12 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { // How long we delay processing the stopping and finishing activities. private static final int SCHEDULE_FINISHING_STOPPING_ACTIVITY_MS = 200; + public static boolean mPerfSendTapHint = false; + public static boolean mIsPerfBoostAcquired = false; + public static int mPerfHandle = -1; + public BoostFramework mPerfBoost = new BoostFramework(); + public BoostFramework mUxPerf = new BoostFramework(); + /** How long we wait until giving up on the activity telling us it released the top state. */ private static final int TOP_RESUMED_STATE_LOSS_TIMEOUT = 500; @@ -254,7 +269,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { private static final int MAX_TASK_IDS_PER_USER = UserHandle.PER_USER_RANGE; final ActivityTaskManagerService mService; - RootWindowContainer mRootWindowContainer; + public RootWindowContainer mRootWindowContainer; /** The historial list of recent tasks including inactive tasks */ RecentTasks mRecentTasks; @@ -276,6 +291,8 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { private AppOpsManager mAppOpsManager; private VirtualDeviceManager mVirtualDeviceManager; + private IServicetracker mServicetracker; + /** Common synchronization logic used to save things to disks. */ PersisterQueue mPersisterQueue; LaunchParamsPersister mLaunchParamsPersister; @@ -472,6 +489,28 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { mLaunchParamsPersister.onSystemReady(); } + public IServicetracker getServicetrackerInstance() { + if (mServicetracker == null) { + try { + mServicetracker = IServicetracker.getService(false); + } catch (java.util.NoSuchElementException e) { + // Service doesn't exist or cannot be opened logged below + } catch (RemoteException e) { + Slog.e(TAG, "Failed to get servicetracker interface", e); + return null; + } + if (mServicetracker == null) { + Slog.w(TAG, "servicetracker HIDL not available"); + return null; + } + } + return mServicetracker; + } + + public void destroyServicetrackerInstance() { + mServicetracker = null; + } + void onUserUnlocked(int userId) { // Only start persisting when the first user is unlocked. The method call is // idempotent so there is no side effect to call it again when the second user is @@ -774,7 +813,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { } } - ActivityInfo resolveActivity(Intent intent, String resolvedType, int startFlags, + public ActivityInfo resolveActivity(Intent intent, String resolvedType, int startFlags, ProfilerInfo profilerInfo, int userId, int filterCallingUid, int callingPid) { final ResolveInfo rInfo = resolveIntent(intent, resolvedType, userId, 0, filterCallingUid, callingPid); @@ -1061,6 +1100,10 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { boolean knownToBeDead = false; if (wpc != null && wpc.hasThread()) { try { + if (mPerfBoost != null) { + Slog.i(TAG, "The Process " + r.processName + " Already Exists in BG. So sending its PID: " + wpc.getPid()); + mPerfBoost.perfHint(BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, r.processName, wpc.getPid(), BoostFramework.Launch.TYPE_START_APP_FROM_BG); + } realStartActivityLocked(r, wpc, andResume, checkConfig); return; } catch (RemoteException e) { @@ -1475,6 +1518,16 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { void findTaskToMoveToFront(Task task, int flags, ActivityOptions options, String reason, boolean forceNonResizeable) { Task currentRootTask = task.getRootTask(); + + Task focusedStack = mRootWindowContainer.getTopDisplayFocusedRootTask(); + ActivityRecord top_activity = focusedStack != null ? focusedStack.getTopNonFinishingActivity() : null; + + //top_activity = task.stack.topRunningActivityLocked(); + /* App is launching from recent apps and it's a new process */ + if((top_activity != null) && (top_activity.getState() == DESTROYED)) { + acquireAppLaunchPerfLock(top_activity); + } + if (currentRootTask == null) { Slog.e(TAG, "findTaskToMoveToFront: can't move task=" + task + " to front. Root task is null"); @@ -1693,6 +1746,15 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { mService.notifyTaskPersisterLocked(null, true); } checkActivitySecurityForTaskClear(callingUid, task, callerActivityClassName); + + // Device Integration: Intercept task remove event and notify remote task handler manager. + // If current task to be removed is hold and managed by RemoteTaskManager + // remove event should be sent and notify correspond remote task instance handler. + // If current removed task is handled by remote task manger, need to notify + // correspond handler that the task already been closed. + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + mService.getRemoteTaskManager().handleRemoveTask(task); + } } finally { task.mInRemoveTask = false; } @@ -1958,6 +2020,15 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { ActivityManagerInternal::killProcessesForRemovedTask, mService.mAmInternal, procsToKill); mService.mH.sendMessage(m); + + } + + public void startPreferredApps() { + try { + new PreferredAppsTask().execute(); + } catch (Exception e) { + Slog.v (TAG, "Exception while calling PreferredAppsTask: " + e); + } } /** @@ -2112,6 +2183,81 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { return timedout; } + void acquireAppLaunchPerfLock(ActivityRecord r) { + /* Acquire perf lock during new app launch */ + if (mPerfBoost != null) { + + int pkgType = mPerfBoost.perfGetFeedback(BoostFramework.VENDOR_FEEDBACK_WORKLOAD_TYPE, + r.packageName); + int wpcPid = -1; + if (mService != null && r != null && r.info != null && r.info.applicationInfo !=null) { + final WindowProcessController wpc = + mService.getProcessController(r.processName, r.info.applicationInfo.uid); + if (wpc != null && wpc.hasThread()) { + //If target process didn't start yet, this operation will be done when app call attach + wpcPid = wpc.getPid(); + } + } + if (mPerfBoost.getPerfHalVersion() >= BoostFramework.PERF_HAL_V23) { + mPerfBoost.perfHintAcqRel(-1, BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, -1, BoostFramework.Launch.BOOST_V1, 2, pkgType, wpcPid); + mPerfSendTapHint = true; + mPerfBoost.perfHintAcqRel(-1, BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, -1, BoostFramework.Launch.BOOST_V2, 2, pkgType, wpcPid); + if (wpcPid != -1) { + mPerfBoost.perfHintAcqRel(-1, BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, wpcPid, BoostFramework.Launch.TYPE_ATTACH_APPLICATION, + 2, pkgType, wpcPid); + } + + if (pkgType == BoostFramework.WorkloadType.GAME) + { + mPerfHandle = + mPerfBoost.perfHintAcqRel(-1, BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, -1, BoostFramework.Launch.BOOST_GAME, 2, pkgType, wpcPid); + } else { + mPerfHandle = + mPerfBoost.perfHintAcqRel(-1, BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, -1, BoostFramework.Launch.BOOST_V3, 2, pkgType, wpcPid); + } + + } else { + mPerfBoost.perfHint(BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, r.packageName, + -1, BoostFramework.Launch.BOOST_V1); + mPerfSendTapHint = true; + mPerfBoost.perfHint(BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, r.packageName, + -1, BoostFramework.Launch.BOOST_V2); + if (wpcPid != -1) { + mPerfBoost.perfHint(BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, wpcPid, BoostFramework.Launch.TYPE_ATTACH_APPLICATION); + } + + if (pkgType == BoostFramework.WorkloadType.GAME) + { + mPerfHandle = mPerfBoost.perfHint(BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, -1, BoostFramework.Launch.BOOST_GAME); + } else { + mPerfHandle = mPerfBoost.perfHint(BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, -1, BoostFramework.Launch.BOOST_V3); + } + } + if (mPerfHandle > 0) + mIsPerfBoostAcquired = true; + // Start IOP + if (r.info.applicationInfo != null && r.info.applicationInfo.sourceDir != null) { + if (mPerfBoost.board_first_api_lvl < BoostFramework.VENDOR_T_API_LEVEL && + mPerfBoost.board_api_lvl < BoostFramework.VENDOR_T_API_LEVEL) { + mPerfBoost.perfIOPrefetchStart(-1,r.packageName, + r.info.applicationInfo.sourceDir.substring(0, r.info.applicationInfo.sourceDir.lastIndexOf('/'))); + } + } + } + } + + public ActivityRecord getTopResumedActivity() { + return mTopResumedActivity; + } + void comeOutOfSleepIfNeededLocked() { removeSleepTimeouts(); if (mGoingToSleepWakeLock.isHeld()) { @@ -2870,6 +3016,12 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { // Recents always has a new launching state (not combinable). null /* caller */, isCallerRecents ? INVALID_UID : callingUid); try { + // Device Integration: Once detect this task already shows in VD,and user click this app + // again from Recent task list, we need to execute interception flow in + // RemoteTaskManager. + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + mService.getRemoteTaskManager().interceptFromRecents(task, targetActivity.intent); + } mService.moveTaskToFrontLocked(null /* appThread */, null /* callingPackage */, task.mTaskId, 0, options); // Apply options to prevent pendingOptions be taken when scheduling @@ -3032,4 +3184,42 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { mResult.dump(pw, prefix + " "); } } + + class PreferredAppsTask extends AsyncTask<Void, Void, Void> { + @Override + protected Void doInBackground(Void... params) { + String res = null; + final Intent intent = new Intent(Intent.ACTION_MAIN); + int trimLevel = 0; + try { + trimLevel = ActivityManager.getService().getMemoryTrimLevel(); + } catch (RemoteException e) { + return null; + } + if (mUxPerf != null + && trimLevel < ProcessStats.ADJ_MEM_FACTOR_CRITICAL) { + if (mUxPerf.board_first_api_lvl < BoostFramework.VENDOR_T_API_LEVEL && + mUxPerf.board_api_lvl < BoostFramework.VENDOR_T_API_LEVEL) { + res = mUxPerf.perfUXEngine_trigger(BoostFramework.UXE_TRIGGER); + } else { + res = mUxPerf.perfSyncRequest(BoostFramework.VENDOR_FEEDBACK_PA_FW); + } + if (res == null) + return null; + String[] p_apps = res.trim().split("/"); + if (p_apps.length != 0) { + ArrayList<String> apps_l = new ArrayList(Arrays.asList(p_apps)); + Bundle bParams = new Bundle(); + if (bParams == null) + return null; + bParams.putStringArrayList("start_empty_apps", apps_l); + final Message msg = PooledLambda.obtainMessage( + ActivityManagerInternal::startActivityAsUserEmpty, mService.mAmInternal, bParams); + mService.mH.sendMessage(msg); + } + } + return null; + } + } + } diff --git a/services/core/java/com/android/server/wm/AsyncRotationController.java b/services/core/java/com/android/server/wm/AsyncRotationController.java index 01158779c24f..5455dd90b9e2 100644 --- a/services/core/java/com/android/server/wm/AsyncRotationController.java +++ b/services/core/java/com/android/server/wm/AsyncRotationController.java @@ -24,6 +24,7 @@ import static com.android.server.wm.SurfaceAnimator.ANIMATION_TYPE_TOKEN_TRANSFO import android.annotation.IntDef; import android.os.HandlerExecutor; import android.util.ArrayMap; +import android.util.BoostFramework; import android.util.Slog; import android.view.SurfaceControl; import android.view.WindowManager; @@ -103,11 +104,16 @@ class AsyncRotationController extends FadeAnimationController implements Consume private final int mOriginalRotation; private final boolean mHasScreenRotationAnimation; + private BoostFramework mPerf = null; + private boolean mIsLatencyPerfLockAcquired = false; AsyncRotationController(DisplayContent displayContent) { super(displayContent); mService = displayContent.mWmService; mOriginalRotation = displayContent.getWindowConfiguration().getRotation(); + if (mPerf == null) { + mPerf = new BoostFramework(); + } final int transitionType = displayContent.mTransitionController.getCollectingTransitionType(); if (transitionType == WindowManager.TRANSIT_CHANGE) { @@ -334,6 +340,11 @@ class AsyncRotationController extends FadeAnimationController implements Consume if (DEBUG) Slog.d(TAG, "Complete directly " + token.getTopChild()); finishOp(token); if (mTargetWindowTokens.isEmpty()) { + if (mPerf != null && mIsLatencyPerfLockAcquired) { + mPerf.perfLockRelease(); + mIsLatencyPerfLockAcquired = false; + } + if (mTimeoutRunnable != null) mService.mH.removeCallbacks(mTimeoutRunnable); return true; } @@ -348,6 +359,10 @@ class AsyncRotationController extends FadeAnimationController implements Consume * be seamlessly rotated later. */ void start() { + if (mPerf != null) { + mPerf.perfHint(BoostFramework.VENDOR_HINT_ROTATION_LATENCY_BOOST, null); + mIsLatencyPerfLockAcquired = true; + } for (int i = mTargetWindowTokens.size() - 1; i >= 0; i--) { final WindowToken windowToken = mTargetWindowTokens.keyAt(i); final Operation op = mTargetWindowTokens.valueAt(i); diff --git a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java index 188f4d0b8ced..089f2fcc125e 100644 --- a/services/core/java/com/android/server/wm/BackgroundActivityStartController.java +++ b/services/core/java/com/android/server/wm/BackgroundActivityStartController.java @@ -39,6 +39,7 @@ import android.app.ComponentOptions; import android.content.ComponentName; import android.content.Intent; import android.content.pm.PackageManager; +import android.os.DeviceIntegrationUtils; import android.os.Process; import android.os.UserHandle; import android.provider.DeviceConfig; @@ -237,6 +238,10 @@ public class BackgroundActivityStartController { // visible to user after user clicking home button. final int appSwitchState = mService.getBalAppSwitchesState(); + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && mService.getRemoteTaskManager().isFromBackgroundWhiteList(realCallingUid)) { + return BAL_ALLOW_DEFAULT; + } // don't abort if the callingUid has a visible window or is a persistent system process final int callingUidProcState = mService.mActiveUids.getUidState(callingUid); final boolean callingUidHasAnyVisibleWindow = mService.hasActiveVisibleWindow(callingUid); diff --git a/services/core/java/com/android/server/wm/BasePreferredTaskDisplayQualifier.java b/services/core/java/com/android/server/wm/BasePreferredTaskDisplayQualifier.java new file mode 100644 index 000000000000..6755a3d418ea --- /dev/null +++ b/services/core/java/com/android/server/wm/BasePreferredTaskDisplayQualifier.java @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.wm; + +import android.app.ActivityOptions; +import android.content.Intent; + +/** + * Class for getting preferred TaskDisplayArea when we are in launch same app + * scenarios + */ +abstract class BasePreferredTaskDisplayQualifier { + protected RootWindowContainer mRootWindowContainer; + protected final RemoteTaskManager mManager; + + /** + * Get preferred display. + * + * @param defaultArea TaskDisplayArea + * @param intent Intent + * @param sourceRecord ActivityRecord + * @param record ActivityRecord + * @param options ActivityOptions + * @return TaskDisplayArea if we find one, otherwise null. + */ + abstract TaskDisplayArea queryPreferredDisplay(TaskDisplayArea defaultArea, + Intent intent, ActivityRecord sourceRecord, + ActivityRecord record, ActivityOptions options); + + BasePreferredTaskDisplayQualifier(RemoteTaskManager manager) { + mManager = manager; + } + + void setRootWindowContainer(RootWindowContainer rootWindowContainer) { + mRootWindowContainer = rootWindowContainer; + } +} diff --git a/services/core/java/com/android/server/wm/BlackScreenWindowManager.java b/services/core/java/com/android/server/wm/BlackScreenWindowManager.java new file mode 100644 index 000000000000..ea117903b83a --- /dev/null +++ b/services/core/java/com/android/server/wm/BlackScreenWindowManager.java @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.wm; + +import android.os.DeviceIntegrationUtils; +import android.os.RemoteException; +import android.os.SystemProperties; +import android.util.Log; +import android.view.KeyEvent; +import android.view.WindowManager; + +/** + * Responsible for managing black screen window. + * The key function is to distribute the power event to black screen if it exists + * Black screen can be dismissed by pressing power button + */ +public class BlackScreenWindowManager { + + private static final String TAG = BlackScreenWindowManager.class.getSimpleName(); + private static volatile BlackScreenWindowManager sInstance; + + private final boolean mDeviceIntegrationDisabled; + private WindowState mBlackScreenWindow; + + BlackScreenWindowManager() { + mDeviceIntegrationDisabled = DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION; + } + + public static BlackScreenWindowManager getInstance() { + if (sInstance == null) { + synchronized (BlackScreenWindowManager.class) { + if (sInstance == null) { + sInstance = new BlackScreenWindowManager(); + } + } + } + return sInstance; + } + + /** + * Called when add a window + */ + public void onWindowAdded(WindowState windowState) { + if (windowState.getAttrs().type + == WindowManager.LayoutParams.TYPE_SYSTEM_BLACKSCREEN_OVERLAY) { + mBlackScreenWindow = windowState; + } + } + + /** + * Called when remove a window + */ + public void onWindowRemoved(WindowState windowState) { + if (windowState.getAttrs().type + == WindowManager.LayoutParams.TYPE_SYSTEM_BLACKSCREEN_OVERLAY) { + mBlackScreenWindow = null; + } + } + + /** + * Intercept power key down event + * + * @return true if black screen window handle the event, otherwise false + */ + public boolean interceptPowerKey() { + if (!mDeviceIntegrationDisabled) { + if (mBlackScreenWindow != null) { + try { + mBlackScreenWindow.mClient.dispatchBlackScreenKeyEvent( + new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_POWER)); + mBlackScreenWindow = null; + return true; + } catch (RemoteException e) { + Log.d(TAG, "interceptPowerKey RemoteException" + e.toString()); + } + } + } + + mBlackScreenWindow = null; + return false; + } +} diff --git a/services/core/java/com/android/server/wm/ContentRecorder.java b/services/core/java/com/android/server/wm/ContentRecorder.java index 6a7e76411fee..cbf850ec60a7 100644 --- a/services/core/java/com/android/server/wm/ContentRecorder.java +++ b/services/core/java/com/android/server/wm/ContentRecorder.java @@ -30,6 +30,7 @@ import android.content.res.Configuration; import android.graphics.Point; import android.graphics.Rect; import android.media.projection.IMediaProjectionManager; +import android.os.DeviceIntegrationUtils; import android.os.IBinder; import android.os.RemoteException; import android.os.ServiceManager; @@ -86,6 +87,11 @@ final class ContentRecorder implements WindowContainerListener { */ private int mLastOrientation = ORIENTATION_UNDEFINED; + /** + * Device Integration: last SurfaceSize + */ + @Nullable private Point mLastSurfaceSize = null; + ContentRecorder(@NonNull DisplayContent displayContent) { this(displayContent, new RemoteMediaProjectionManagerWrapper()); } @@ -484,6 +490,9 @@ final class ContentRecorder implements WindowContainerListener { .setPosition(mRecordedSurface, shiftedX /* x */, shiftedY /* y */) .apply(); mLastRecordedBounds = new Rect(recordedContentBounds); + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + mLastSurfaceSize = surfaceSize; + } // Request to notify the client about the resize. mMediaProjectionManager.notifyActiveProjectionCapturedContentResized( mLastRecordedBounds.width(), mLastRecordedBounds.height()); @@ -624,4 +633,22 @@ final class ContentRecorder implements WindowContainerListener { return mContentRecordingSession != null && mContentRecordingSession.getContentToRecord() == RECORD_CONTENT_TASK; } + + boolean updateMirroringIfSurfaceSizeChanged() { + if (!isCurrentlyRecording() || mLastRecordedBounds == null || mRecordedWindowContainer == null) { + return false; + } + + WindowContainer container = mRecordedWindowContainer; + final Rect displayAreaBounds = container.getDisplayContent().getBounds(); + Point surfaceSize = fetchSurfaceSizeIfPresent(); + + if (surfaceSize != null && !surfaceSize.equals(mLastSurfaceSize) + && surfaceSize.x != 0 && surfaceSize.y != 0) { + updateMirroredSurface(mDisplayContent.mWmService.mTransactionFactory.get(), + displayAreaBounds, surfaceSize); + return true; + } + return false; + } } diff --git a/services/core/java/com/android/server/wm/CrossDeviceService.java b/services/core/java/com/android/server/wm/CrossDeviceService.java new file mode 100644 index 000000000000..c8e4779dc17d --- /dev/null +++ b/services/core/java/com/android/server/wm/CrossDeviceService.java @@ -0,0 +1,566 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.wm; + +import android.annotation.NonNull; +import android.app.ActivityManager; +import android.app.CrossDeviceManager; +import android.app.ICrossDeviceService; +import android.app.RemoteTaskConstants; +import android.app.IRemoteTaskHandler; +import android.app.RemoteTaskInfo; +import android.app.SystemTaskContext; +import android.app.RemoteTaskParams; +import android.app.IRemoteTaskInstanceBroker; +import android.os.Bundle; +import android.os.IThermalService; +import android.content.Intent; +import android.content.Context; +import android.content.pm.FeatureInfo; +import android.content.pm.PackageManager; +import android.content.res.Configuration; +import android.hardware.input.InputManager; +import android.os.Binder; +import android.os.Parcel; +import android.os.IBinder; +import android.os.PowerManager; +import android.os.RemoteException; +import android.os.ServiceManager; +import android.os.Temperature; +import android.os.RemoteCallbackList; +import android.text.TextUtils; +import android.util.Log; +import android.view.InputEvent; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.concurrent.CopyOnWriteArraySet; + +import static android.app.RemoteTaskConstants.DEVICE_AVAILABILITY_STATE_FREE; + +/** + * System service for managing Cross Device features + */ +public class CrossDeviceService extends ICrossDeviceService.Stub { + private static final String TAG = CrossDeviceService.class.getSimpleName(); + + private final Object mClientDiedLock = new Object(); + private final Object mServiceLock = new Object(); + private final Set<String> mActivityBackgroundSet = new CopyOnWriteArraySet<>(); + private final Set<Integer> mPermissionGrantedSet = new CopyOnWriteArraySet<>(); + private final ActivityTaskManagerService mActivityTaskManagerService; + private IThermalService mThermalService; + private final Context mContext; + private final PowerManager mPowerManager; + private final ActivityManager mActivityManager; + private final IRemoteTaskInstanceBroker mRemoteTaskInstanceBroker; + private OnClientDiedListener mClientDiedListener; + + private volatile IRemoteTaskHandler mRemoteHandler; + + interface OnClientDiedListener { + void onClientDied(); + } + + private IBinder.DeathRecipient mBinderDeathRecipient = new IBinder.DeathRecipient() { + @Override + public void binderDied() { + RemoteTaskLogger.i(TAG, "Remote Task Handler Died!"); + mRemoteHandler = null; + handleClientDied(); + } + }; + + public CrossDeviceService(Context context, ActivityTaskManagerService service) { + mContext = context; + mActivityTaskManagerService = service; + mPowerManager = context.getSystemService(PowerManager.class); + mActivityManager = context.getSystemService(ActivityManager.class); + mRemoteTaskInstanceBroker = new RemoteTaskInstanceBroker(context, service); + } + + public void setClientDiedListener(@NonNull OnClientDiedListener clientDiedListener) { + //Make sure ClientDiedListener assignment is thread-safe, note that every place where + //use ClientDiedListener should wrap int mClientDiedLock + synchronized (mClientDiedLock) { + mClientDiedListener = clientDiedListener; + } + } + + /** + * Method for handling client die + */ + private void handleClientDied() { + synchronized (mClientDiedLock) { + if (mClientDiedListener != null) { + mClientDiedListener.onClientDied(); + } + } + } + + private List<String> getActivityBakcgroundSnapshot() { + return new ArrayList(mActivityBackgroundSet); + } + + boolean isAnyClientAliveInService() { + return mRemoteHandler != null; + } + + @Override + public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { + if (!CrossDeviceManager.isCallerAllowed(mContext)) { + throw new RemoteException("Caller is not allowed"); + } + return super.onTransact(code, data, reply, flags); + } + + /** + * Inject input event + * + * @param event Input event + * @param injectInputEventModeAsync event mode async + */ + @Override + public void injectInputEvent(InputEvent event, int injectInputEventModeAsync) { + final long token = Binder.clearCallingIdentity(); + try { + InputManager.getInstance().injectInputEvent(event, injectInputEventModeAsync); + } finally { + Binder.restoreCallingIdentity(token); + } + } + + /** + * Get top running package name which will be used by input injection + * + * @return top running package name + */ + @Override + public String getTopRunningPackageName() { + final long token = Binder.clearCallingIdentity(); + try { + return mActivityManager.getRunningTasks(1).get(0).topActivity.getPackageName(); + } finally { + Binder.restoreCallingIdentity(token); + } + } + + /** + * Wake up phone when injecting input from main display + * + * @param time Wake up time + */ + @Override + public void wakeUp(long time) { + final long token = Binder.clearCallingIdentity(); + try { + mPowerManager.wakeUp(time, 0, ""); + } finally { + Binder.restoreCallingIdentity(token); + } + } + + /** + * get device temperature + */ + @Override + public Bundle getDeviceTemperature() { + final long token = Binder.clearCallingIdentity(); + try { + Bundle res = new Bundle(); + try { + if (mThermalService == null) { + mThermalService = IThermalService.Stub.asInterface( + ServiceManager.getService(Context.THERMAL_SERVICE)); + } + if (mThermalService != null) { + final Temperature[] temps = mThermalService.getCurrentTemperaturesWithType(Temperature.TYPE_BATTERY); + if (temps != null && temps.length > 0) { + RemoteTaskLogger.d(TAG, "getCurrentTemperaturesWithType, size = " + temps.length); + float sum = 0.0f; + for (Temperature temp : temps) { + sum += temp.getValue(); + } + res.putFloat(RemoteTaskConstants.DEVICE_TEMPERATURE, sum / temps.length); + } + } + } catch (RemoteException e) { + e.printStackTrace(); + } + RemoteTaskLogger.d(TAG, "getDeviceTemperatureBundle, res = " + res); + return res; + } finally { + Binder.restoreCallingIdentity(token); + } + } + + /** + * get the threshold of overheat + */ + @Override + public Bundle getOverheatThreshold() { + Bundle temp = new Bundle(); + // if you want to set the OverheatThreshold by yourself, please activate the next line and modify expect_value to your value. + // temp.putFloat(RemoteTaskConstants.OVERHEAT_THRESHOLD, expect_value); + return temp; + } + + /** + * get the threshold of resume overheat + */ + @Override + public Bundle getResumeOverheatThreshold() { + Bundle temp = new Bundle(); + // if you want to set the OverheatThreshold by yourself, please activate the next line and modify expect_value to your value. + // temp.putFloat(RemoteTaskConstants.RESUME_OVERHEAT_THRESHOLD, expect_value); + return temp; + } + + /** + * get the maximum app count of Suspend + */ + @Override + public Bundle getMaximumAppCount() { + Bundle temp = new Bundle(); + // if you want to set the MAXIMUM_RUNNING_APP_COUNT by yourself, please activate the next line and modify expect_value to your value. + // temp.putFloat(RemoteTaskConstants.MAXIMUM_RUNNING_APP_COUNT, expect_value); + return temp; + } + + /** + * Update white list for this service + * + * @param activityList List<String> + */ + @Override + public void updateBackgroundActivityList(List<String> activityList) throws RemoteException { + RemoteTaskLogger.i(TAG, "updateBackgroundActivityList"); + mActivityBackgroundSet.addAll(activityList); + } + + /** + * Check if package is from background white list with current binder caller + * + * @return true if activity is from background white list, false otherwise + */ + @Override + public boolean isFromBackgroundWhiteList() { + return isFromBackgroundWhiteListByUid(Binder.getCallingUid()); + } + + /** + * Check if package is from background white list + * + * @param uid caller uid + * @return true if activity is from background white list, false otherwise + */ + @Override + public boolean isFromBackgroundWhiteListByUid(int uid) { + String pkgName = mActivityTaskManagerService. + getPackageManagerInternalLocked().getNameForUid(uid); + if (TextUtils.isEmpty(pkgName)) { + return false; + } + + List<String> backGroundList = getActivityBakcgroundSnapshot(); + for (String value : backGroundList) { + if (TextUtils.equals(pkgName, value)) { + return true; + } + } + return false; + } + + /** + * Check if touch is required + * @Param packageName app package name + * @return true if touch is required + */ + @Override + public boolean isTouchRequired(String packageName) throws RemoteException { + try { + PackageManager packageManager = mActivityTaskManagerService.mContext.getPackageManager(); + FeatureInfo[] features = packageManager.getPackageInfo(packageName, + PackageManager.GET_CONFIGURATIONS).reqFeatures; + if (features != null) { + for (int i = 0; i < features.length; i++) { + if (TextUtils.equals(features[i].name, PackageManager.FEATURE_TOUCHSCREEN) + && features[i].flags == 1) { + // android.hardware.touchscreen flag == 1 means this app required touchscreen + RemoteTaskLogger.d(TAG, "isTouchRequired(): " + + packageName + " : true"); + return true; + } + } + } + } catch (PackageManager.NameNotFoundException e) { + e.printStackTrace(); + } + RemoteTaskLogger.d(TAG, "isTouchRequired(): " + packageName + " : false"); + return false; + } + + /** + * Get {@link #android.app.IRemoteTaskInstanceBroker} + * @return IRemoteTaskInstanceBroker stub + */ + @Override + public IRemoteTaskInstanceBroker getRemoteTaskInstanceBroker() { + RemoteTaskLogger.i(TAG, "getRemoteTaskInstanceBroker"); + return mRemoteTaskInstanceBroker; + } + + /** + * Get device availability state + * Please refer {@link RemoteTaskConstants} for the meaning of device + * availabiltiy state code + * + * @return Device availability state code + */ + private int getDeviceAvailabilityStatus() { + /* + * OEM change this method according to special policy to customize the initial + * device availability state. + */ + return DEVICE_AVAILABILITY_STATE_FREE; + } + + /** + * Each client who wants to handle remote task lifecycle event should register a {@link IRemoteTaskHandler} + * + * @param handler IRemoteTaskHandler + * @throws RemoteException + */ + @Override + public void registerRemoteTaskHandler(IRemoteTaskHandler handler) throws RemoteException { + RemoteTaskLogger.i(TAG, "registerRemoteTaskHandler"); + synchronized (mServiceLock) { + mRemoteHandler = handler; + if (mRemoteHandler != null) { + mRemoteHandler.asBinder().linkToDeath(mBinderDeathRecipient, 0); + } + } + if (handler != null) { + /* + * if OEM want to set the device availability state according to special scenarios, please add OEM + * device availability judgement strategy (such as battery/memory/... policy) whenever needed and + * set correspond availability value as the parameter to call "handleDeviceAvailabilityStateChanged" + * in CrossDeviceServiceDelegate. + */ + handler.notifyDeviceAvailabilityStateChanged(getDeviceAvailabilityStatus()); + } + } + + /** + * Unregister remote task handler + * + * @param handler IRemoteTaskHandler + * @throws RemoteException + */ + @Override + public void unRegisterRemoteTaskHandler(IRemoteTaskHandler handler) throws RemoteException { + RemoteTaskLogger.i(TAG, "unRegisterRemoteTaskHandler"); + synchronized (mServiceLock) { + if (mRemoteHandler != null) { + mRemoteHandler.asBinder().unlinkToDeath(mBinderDeathRecipient, 0); + } + mRemoteHandler = null; + } + handleClientDied(); + } + + /** + * Set media projection permission granted + * @param uid user id to be grant permission + */ + @Override + public void setPermissionGranted(int uid) { + if (uid > 0) { + mPermissionGrantedSet.add(uid); + } + } + + /** + * Get media projection permission granted + * @param uid user id to get permission grant status + * @return true if permission granted, false otherwise + */ + @Override + public boolean getPermissionGranted(int uid) { + return mPermissionGrantedSet.contains(uid); + } + + /** + * Call remote task handler to verify remote task context + * + * @param taskContext System Task context + * @return Remote Task launch options + */ + RemoteTaskParams verifyRemoteTask(SystemTaskContext taskContext) { + RemoteTaskLogger.i(TAG, "verifyRemoteTask"); + RemoteTaskParams params = null; + IRemoteTaskHandler handler = mRemoteHandler; + + if (handler != null) { + try { + params = handler.verifyRemoteTask(taskContext); + } catch (RemoteException re) { + re.printStackTrace(); + } + } + + if (params == null) { + params = RemoteTaskParams.create(taskContext.getUuid(), + RemoteTaskConstants.FLAG_TASK_LAUNCH_SCENARIO_COMMON, taskContext.getDisplayId()); + } + return params; + } + + /** + * Call service to start a new remote task + * + * @param taskInfo remote task informations + */ + void activateRemoteTask(RemoteTaskInfo taskInfo) { + RemoteTaskLogger.i(TAG, "activateRemoteTask"); + IRemoteTaskHandler handler = mRemoteHandler; + + if (handler != null) { + try { + handler.activateRemoteTask(taskInfo); + } catch (RemoteException re) { + re.printStackTrace(); + } + } + } + + /** + * Call remote task handler to get remote task info list + * + * @return Remote task info list + */ + List getRemoteTaskInfoList() { + RemoteTaskLogger.i(TAG, "getRemoteTaskInfoList"); + List taskList = null; + IRemoteTaskHandler handler = mRemoteHandler; + + if (handler != null) { + try { + taskList = handler.getRemoteTaskInfoList(); + } catch (RemoteException re) { + re.printStackTrace(); + } + } + + if (taskList == null) { + taskList = new ArrayList<String>(); + } + return taskList; + } + + /** + * Notify service the remote task has been removed + * + * @param taskId remote task id to be removed + */ + void notifyRemoteTaskRemoved(int taskId) { + RemoteTaskLogger.i(TAG, "notifyRemoteTaskRemoved=" + taskId); + IRemoteTaskHandler handler = mRemoteHandler; + + if (handler != null) { + try { + handler.notifyRemoteTaskRemoved(taskId); + } catch (RemoteException re) { + re.printStackTrace(); + } + } + } + + /** + * Notify service an empty UUID remote task detected + * + * @param intent the intent of remote task + */ + void notifyRemoteTaskEmptyUUIDetected(Intent intent) { + RemoteTaskLogger.i(TAG, "notifyRemoteTaskEmptyUUIDetected"); + IRemoteTaskHandler handler = mRemoteHandler; + + if (handler != null) { + try { + handler.notifyRemoteTaskEmptyUUIDetected(intent); + } catch (RemoteException re) { + re.printStackTrace(); + } + } + } + + /** + * Notify service the display of remote task is switched + * + * @param displayId current display id + */ + void notifyDisplaySwitched(int displayId) { + RemoteTaskLogger.i(TAG, "notifyDisplaySwitched"); + IRemoteTaskHandler handler = mRemoteHandler; + + if (handler != null) { + try { + handler.notifyDisplaySwitched(displayId); + } catch (RemoteException re) { + re.printStackTrace(); + } + } + } + + /** + * Notify service the device availability state changed + * + * @param deviceAvailabilityState the device availability state value + */ + void notifyDeviceAvailabilityStateChanged(int deviceAvailabilityState) { + RemoteTaskLogger.i(TAG, "notifyDeviceAvailabilityStateChanged=" + deviceAvailabilityState); + IRemoteTaskHandler handler = mRemoteHandler; + + if (handler != null) { + try { + handler.notifyDeviceAvailabilityStateChanged(deviceAvailabilityState); + } catch (RemoteException re) { + re.printStackTrace(); + } + } + } + + /** + * Notify remote task service to handle showing secure content changed + * + * @param taskId remote task id + * @param isShowingSecuredContent if remote task is showing secure content + */ + void notifyRemoteShowingSecuredContentChanged(int taskId, boolean isShowingSecuredContent) { + RemoteTaskLogger.i(TAG, "notifyRemoteShowingSecuredContentChanged"); + IRemoteTaskHandler handler = mRemoteHandler; + + if (handler != null) { + try { + handler.notifyRemoteShowingSecuredContentChanged(taskId, isShowingSecuredContent); + } catch (RemoteException re) { + re.printStackTrace(); + } + } + } +} diff --git a/services/core/java/com/android/server/wm/CrossDeviceServiceDelegate.java b/services/core/java/com/android/server/wm/CrossDeviceServiceDelegate.java new file mode 100644 index 000000000000..e9c23b71758e --- /dev/null +++ b/services/core/java/com/android/server/wm/CrossDeviceServiceDelegate.java @@ -0,0 +1,223 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.wm; + +import android.content.Context; +import android.content.Intent; +import android.os.IBinder; +import android.os.Handler; +import android.os.ServiceManager; +import android.app.RemoteTaskInfo; +import android.app.SystemTaskContext; +import android.app.RemoteTaskParams; +import android.app.RemoteTaskConstants; +import android.app.ICrossDeviceService; +import android.text.TextUtils; + +import java.util.List; +import java.util.ArrayList; + +/** + * Specially handle the communication between Device Integration Service and AOSP about + * remote task instance event. If AOSP wants to communicate with sdk about remote + * task instance event, it should use this class. + */ + +class CrossDeviceServiceDelegate implements CrossDeviceService.OnClientDiedListener { + private static final String TAG = CrossDeviceServiceDelegate.class.getSimpleName(); + + private final Handler mHandler; + private final RemoteTaskManager mRemoteTaskManager; + private CrossDeviceService mCrossDeviceService; + + CrossDeviceServiceDelegate(RemoteTaskManager manager, Handler handler) { + mHandler = handler; + mRemoteTaskManager = manager; + mCrossDeviceService = getCrossDeviceService(); + if (mCrossDeviceService != null) { + mCrossDeviceService.setClientDiedListener(this); + } + } + + /** + * Return cross device service + * + * @return {@link ICrossDeviceService} + */ + private CrossDeviceService getCrossDeviceService() { + IBinder b = ServiceManager.getService(Context.CROSS_DEVICE_SERVICE); + return (CrossDeviceService) ICrossDeviceService.Stub.asInterface(b); + } + + /** + * Inform remote task service for device availability state change, + * OEM should call this API when device availability state changed + * for example device temperature too high, memory/cpu resource exhuasted. + * Please refer {@link RemoteTaskConstants} for the meaning of device + * availabiltiy state code + * + * @param deviceAvailabilityState current device state + */ + void handleDeviceAvailabilityStateChanged(int deviceAvailabilityState) { + if (isAnyClientAliveInService()) { + mHandler.post(() -> mCrossDeviceService + .notifyDeviceAvailabilityStateChanged(deviceAvailabilityState)); + } + } + + @Override + public void onClientDied() { + if (mRemoteTaskManager != null) { + mRemoteTaskManager.recycleAll(); + } + } + + /** + * Check for service is alive or not. + * + * @return remote task display infos + */ + boolean isAnyClientAliveInService() { + if (mCrossDeviceService == null) { + mCrossDeviceService = getCrossDeviceService(); + if (mCrossDeviceService != null) { + mCrossDeviceService.setClientDiedListener(this); + } + } + if (mCrossDeviceService != null) { + return mCrossDeviceService.isAnyClientAliveInService(); + } + return false; + } + + /** + * Acquir remote task service that we need to verify remote task context. + * + * @param taskContext System Task context + * @return Remote Task launch options + */ + RemoteTaskParams handleVerifyRemoteTask(SystemTaskContext taskContext) { + if (isAnyClientAliveInService()) { + return mCrossDeviceService.verifyRemoteTask(taskContext); + } + + RemoteTaskLogger.e(TAG, "Service is died, default as common scenario"); + return RemoteTaskParams.create(taskContext.getUuid(), + RemoteTaskConstants.FLAG_TASK_LAUNCH_SCENARIO_COMMON, taskContext.getDisplayId()); + } + + /** + * Inform remote task service that we should create new remote task instance. + * + * @param intent Intent + * @param taskInfo Remote Task Information + */ + void handleActivateRemoteTask(Intent intent, RemoteTaskInfo taskInfo) { + if (isAnyClientAliveInService()) { + mHandler.post(() -> { + String uuid = taskInfo.getUuid(); + if (TextUtils.isEmpty(uuid)) { + mCrossDeviceService.notifyRemoteTaskEmptyUUIDetected(intent); + } else { + mCrossDeviceService.activateRemoteTask(taskInfo); + } + }); + return; + } + RemoteTaskLogger.e(TAG, "Service is died, need to restart system"); + } + + /** + * Get current remote task info list + * + * @return Remote Task info list + */ + List getRemoteTaskInfoList() { + if (isAnyClientAliveInService()) { + return mCrossDeviceService.getRemoteTaskInfoList(); + } + + RemoteTaskLogger.e(TAG, "Service is died, default as empty task info list"); + List defaultTaskList = new ArrayList<String>(); + return defaultTaskList; + } + + /** + * Inform remote task service to close remote task + * + * @param reason the reason why we close this remote task + * @param uuid current uuid + */ + void handleCloseRemoteTask(int taskId) { + if (isAnyClientAliveInService()) { + RemoteTaskLogger.d(TAG, "closeTask appExecutionContainerService!= null"); + mHandler.post(() -> { + try { + mCrossDeviceService.notifyRemoteTaskRemoved(taskId); + } catch (SecurityException e) { + //TODO need to eliminate this exception or close will not work correctly + RemoteTaskExceptionHandler.onExceptionThrow(e); + } catch (Exception e) { + RemoteTaskExceptionHandler.onExceptionThrow(e); + } + }); + return; + } + RemoteTaskLogger.e(TAG, "Service is died, need to restart system"); + } + + /** + * Notify remote task service to handle showing secure content changed + * + * @param taskId remote task id + * @param isShowingSecuredContent if remote task is showing secure content + */ + void handleRemoteShowingSecuredContentChanged(int taskId, + boolean isShowingSecuredContent) { + if (isAnyClientAliveInService()) { + mHandler.post(() -> mCrossDeviceService + .notifyRemoteShowingSecuredContentChanged(taskId, isShowingSecuredContent)); + return; + } + RemoteTaskLogger.e(TAG, "Service is died, need to restart system"); + } + + /** + * Inform remote task service to handle launch same app flow + * + * @param displayId current display id + */ + void notifyDisplaySwitched(int displayId) { + if (isAnyClientAliveInService()) { + mHandler.post(() -> mCrossDeviceService.notifyDisplaySwitched(displayId)); + return; + } + RemoteTaskLogger.e(TAG, "Service is died, need to restart system"); + } + + /** + * Check white list for user id + * @param uid caller user id that need to be check from white list + * @return true if call user id is in white list, false otherwise + */ + boolean isFromBackgroundWhiteList(int uid) { + if (isAnyClientAliveInService()) { + return mCrossDeviceService.isFromBackgroundWhiteListByUid(uid); + } + return false; + } +}
\ No newline at end of file diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index ef19eef22794..aa514e895b12 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -187,6 +187,7 @@ import android.hardware.display.DisplayManagerInternal; import android.metrics.LogMaker; import android.os.Bundle; import android.os.Debug; +import android.os.DeviceIntegrationUtils; import android.os.Handler; import android.os.HandlerExecutor; import android.os.IBinder; @@ -6713,6 +6714,10 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp * example, the user has granted consent to token re-use, so we can now start mirroring). */ void updateRecording() { + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && getContentRecorder().updateMirroringIfSurfaceSizeChanged()) { + return; + } if (mContentRecorder == null || !mContentRecorder.isContentRecordingSessionSet()) { if (!setDisplayMirroring()) { return; diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java index a1a9a0877710..384ff6c69139 100644 --- a/services/core/java/com/android/server/wm/DisplayPolicy.java +++ b/services/core/java/com/android/server/wm/DisplayPolicy.java @@ -16,7 +16,9 @@ package com.android.server.wm; +import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS; import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM; +import static android.view.Display.INVALID_DISPLAY; import static android.view.Display.TYPE_INTERNAL; import static android.view.InsetsFrameProvider.SOURCE_ARBITRARY_RECTANGLE; import static android.view.InsetsFrameProvider.SOURCE_CONTAINER_BOUNDS; @@ -78,12 +80,14 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.Px; import android.app.ActivityManager; +import android.app.ActivityTaskManager; import android.app.ActivityThread; import android.app.LoadedApk; import android.app.ResourcesManager; import android.content.Context; import android.content.Intent; import android.content.res.Resources; +import android.content.pm.ApplicationInfo; import android.graphics.Insets; import android.graphics.PixelFormat; import android.graphics.Rect; @@ -97,6 +101,7 @@ import android.os.Message; import android.os.SystemClock; import android.os.SystemProperties; import android.os.UserHandle; +import android.util.BoostFramework; import android.util.ArraySet; import android.util.PrintWriterPrinter; import android.util.Slog; @@ -193,6 +198,19 @@ public class DisplayPolicy { private final ImmersiveModeConfirmation mImmersiveModeConfirmation; private final ScreenshotHelper mScreenshotHelper; + private static boolean SCROLL_BOOST_SS_ENABLE = false; + private static boolean SILKY_SCROLLS_ENABLE = false; + private static boolean isLowRAM = false; + + /* + * @hide + */ + BoostFramework mPerfBoostDrag = null; + BoostFramework mPerfBoostFling = null; + BoostFramework mPerfBoostPrefling = null; + BoostFramework mPerf = new BoostFramework(); + private boolean mIsPerfBoostFlingAcquired; + private final Object mServiceAcquireLock = new Object(); private StatusBarManagerInternal mStatusBarManagerInternal; @@ -385,6 +403,39 @@ public class DisplayPolicy { } } + private String getAppPackageName() { + String currentPackage; + try { + ActivityManager.RunningTaskInfo rti = ActivityTaskManager.getService().getTasks( + 1, false /* filterVisibleRecents */, false /*keepIntentExtra */, + INVALID_DISPLAY).get(0); + currentPackage = rti.topActivity.getPackageName(); + } catch (Exception e) { + currentPackage = null; + } + return currentPackage; + } + + private boolean isTopAppGame(String currentPackage, BoostFramework BoostType) { + boolean isGame = false; + if (isLowRAM) { + try { + ApplicationInfo ai = mContext.getPackageManager().getApplicationInfo(currentPackage, 0); + if(ai != null) { + isGame = (ai.category == ApplicationInfo.CATEGORY_GAME) || + ((ai.flags & ApplicationInfo.FLAG_IS_GAME) == + ApplicationInfo.FLAG_IS_GAME); + } + } catch (Exception e) { + return false; + } + } else { + isGame = (BoostType.perfGetFeedback(BoostFramework.VENDOR_FEEDBACK_WORKLOAD_TYPE, + currentPackage) == BoostFramework.WorkloadType.GAME); + } + return isGame; + } + DisplayPolicy(WindowManagerService service, DisplayContent displayContent) { mService = service; mContext = displayContent.isDefaultDisplay ? service.mContext @@ -413,6 +464,12 @@ public class DisplayPolicy { mScreenOnFully = true; } + if (mPerf != null) { + SCROLL_BOOST_SS_ENABLE = Boolean.parseBoolean(mPerf.perfGetProp("vendor.perf.gestureflingboost.enable", "false")); + SILKY_SCROLLS_ENABLE = Boolean.parseBoolean(mPerf.perfGetProp("ro.vendor.perf.ss", "false")); + } + isLowRAM = SystemProperties.getBoolean("ro.config.low_ram", false); + final Looper looper = UiThread.getHandler().getLooper(); mHandler = new PolicyHandler(looper); // TODO(b/181821798) Migrate SystemGesturesPointerEventListener to use window context. @@ -516,6 +573,100 @@ public class DisplayPolicy { } } + @Override + public void onVerticalFling(int duration) { + String currentPackage = getAppPackageName(); + if (currentPackage == null) { + Slog.e(TAG, "Error: package name null"); + return; + } + if (SCROLL_BOOST_SS_ENABLE) { + if (mPerfBoostFling == null) { + mPerfBoostFling = new BoostFramework(); + mIsPerfBoostFlingAcquired = false; + } + if (mPerfBoostFling == null) { + Slog.e(TAG, "Error: boost object null"); + return; + } + boolean isGame = isTopAppGame(currentPackage, mPerfBoostFling); + if (!isGame) { + mPerfBoostFling.perfHint(BoostFramework.VENDOR_HINT_SCROLL_BOOST, + currentPackage, duration + 160, BoostFramework.Scroll.VERTICAL); + mIsPerfBoostFlingAcquired = true; + } + } + } + + @Override + public void onHorizontalFling(int duration) { + String currentPackage = getAppPackageName(); + if (currentPackage == null) { + Slog.e(TAG, "Error: package name null"); + return; + } + if (SCROLL_BOOST_SS_ENABLE) { + if (mPerfBoostFling == null) { + mPerfBoostFling = new BoostFramework(); + mIsPerfBoostFlingAcquired = false; + } + if (mPerfBoostFling == null) { + Slog.e(TAG, "Error: boost object null"); + return; + } + boolean isGame = isTopAppGame(currentPackage, mPerfBoostFling); + if (!isGame) { + mPerfBoostFling.perfHint(BoostFramework.VENDOR_HINT_SCROLL_BOOST, + currentPackage, duration + 160, BoostFramework.Scroll.HORIZONTAL); + mIsPerfBoostFlingAcquired = true; + } + } + } + + @Override + public void onScroll(boolean started) { + String currentPackage = getAppPackageName(); + if (currentPackage == null) { + Slog.e(TAG, "Error: package name null"); + return; + } + boolean isGame; + if (mPerfBoostDrag == null) { + mPerfBoostDrag = new BoostFramework(); + } + if (mPerfBoostDrag == null) { + Slog.e(TAG, "Error: boost object null"); + return; + } + if (SCROLL_BOOST_SS_ENABLE && started) { + if (mPerfBoostPrefling == null) { + mPerfBoostPrefling = new BoostFramework(); + } + if (mPerfBoostPrefling == null) { + Slog.e(TAG, "Error: boost object null"); + return; + } + isGame = isTopAppGame(currentPackage, mPerfBoostPrefling); + if (!isGame) { + mPerfBoostPrefling.perfHint(BoostFramework.VENDOR_HINT_SCROLL_BOOST, + currentPackage, -1, BoostFramework.Scroll.PREFILING); + } + } + isGame = isTopAppGame(currentPackage, mPerfBoostDrag); + if (!isGame && started) { + if (SILKY_SCROLLS_ENABLE) { + mPerfBoostDrag.perfEvent(BoostFramework.VENDOR_HINT_DRAG_START, currentPackage); + } + mPerfBoostDrag.perfHint(BoostFramework.VENDOR_HINT_DRAG_BOOST, + currentPackage, -1, 1); + } else { + if (SILKY_SCROLLS_ENABLE){ + mPerfBoostDrag.perfEvent(BoostFramework.VENDOR_HINT_DRAG_END, currentPackage); + } + mPerfBoostDrag.perfLockRelease(); + } + } + @Override public void onUpOrCancel() { final WindowOrientationListener listener = getOrientationListener(); diff --git a/services/core/java/com/android/server/wm/DisplayRotation.java b/services/core/java/com/android/server/wm/DisplayRotation.java index b681c198538f..82c236d4b6a0 100644 --- a/services/core/java/com/android/server/wm/DisplayRotation.java +++ b/services/core/java/com/android/server/wm/DisplayRotation.java @@ -46,14 +46,17 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.app.ActivityManager; +import android.content.BroadcastReceiver; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; +import android.content.IntentFilter; import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo.ScreenOrientation; import android.content.pm.PackageManager; import android.content.res.Resources; import android.database.ContentObserver; +import android.hardware.display.DeviceProductInfo; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; @@ -71,6 +74,7 @@ import android.util.TimeUtils; import android.util.proto.ProtoOutputStream; import android.view.DisplayAddress; import android.view.IWindowManager; +import android.view.Display; import android.view.Surface; import android.window.TransitionRequestInfo; import android.window.WindowContainerTransaction; @@ -118,6 +122,10 @@ public class DisplayRotation { private final DisplayWindowSettings mDisplayWindowSettings; private final Context mContext; private final Object mLock; + /* QTI_BEGIN */ + private final boolean overrideMirroring; + private final boolean isBuiltin; + /* QTI_END */ @Nullable private final DisplayRotationImmersiveAppCompatPolicy mCompatPolicyForImmersiveApps; @@ -247,6 +255,31 @@ public class DisplayRotation { private boolean mDemoHdmiRotationLock; private boolean mDemoRotationLock; + /** + * Broadcast Action: WiFi Display video is enabled or disabled + * + * <p>The intent will have the following extra values:</p> + * <ul> + * <li><em>state</em> - 0 for disabled, 1 for enabled. </li> + * </ul> + */ + + private static final String ACTION_WIFI_DISPLAY_VIDEO = + "org.codeaurora.intent.action.WIFI_DISPLAY_VIDEO"; + + /** + * Broadcast Permission for Wifi Display + */ + + private static final String WIFI_DISPLAY_PERMISSION = + "com.qualcomm.permission.wfd.QC_WFD"; + + /** + * Wifi Display specific variables + */ + private boolean mWifiDisplayConnected = false; + private int mWifiDisplayRotation = -1; + DisplayRotation(WindowManagerService service, DisplayContent displayContent, DisplayAddress displayAddress, @NonNull DeviceStateController deviceStateController, @NonNull DisplayRotationCoordinator displayRotationCoordinator) { @@ -284,7 +317,15 @@ public class DisplayRotation { mRotation = defaultRotation; mDisplayRotationCoordinator = displayRotationCoordinator; - if (isDefaultDisplay) { + + /* QTI_BEGIN */ + overrideMirroring = + SystemProperties.getBoolean("vendor.display.override_mirroring_rotation", false); + + isBuiltin = (displayContent.mDisplay.getType() == Display.TYPE_INTERNAL); + /* QTI_END */ + + if (/* QTI_BEGIN */ (overrideMirroring && isBuiltin) || /* QTI_END */ isDefaultDisplay) { mDisplayRotationCoordinator.setDefaultDisplayDefaultRotation(mRotation); } mDefaultDisplayRotationChangedCallback = this::updateRotationAndSendNewConfigIfChanged; @@ -296,7 +337,7 @@ public class DisplayRotation { mDefaultDisplayRotationChangedCallback); } - if (isDefaultDisplay) { + if (/* QTI_BEGIN */ (overrideMirroring && isBuiltin) || /* QTI_END */ isDefaultDisplay) { final Handler uiHandler = UiThread.getHandler(); mOrientationListener = new OrientationListener(mContext, uiHandler, defaultRotation); @@ -309,6 +350,50 @@ public class DisplayRotation { } else { mFoldController = null; } + + /* Register for WIFI Display Intents in a separate thread + * to avoid possible deadlock between ActivityManager and + * WindowManager global locks*/ + Thread t = new Thread(){ + public void run() { + context.registerReceiver(new BroadcastReceiver(){ + public void onReceive(Context context, Intent intent) { + String action = intent.getAction(); + if (action.equals(ACTION_WIFI_DISPLAY_VIDEO)) { + int state = intent.getIntExtra("state", 0); + if(state == 1) { + mWifiDisplayConnected = true; + } else { + mWifiDisplayConnected = false; + } + int rotation = intent.getIntExtra("wfd_UIBC_rot", -1); + switch (rotation) { + case 0: + mWifiDisplayRotation = Surface.ROTATION_0; + break; + case 1: + mWifiDisplayRotation = Surface.ROTATION_90; + break; + case 2: + mWifiDisplayRotation = Surface.ROTATION_180; + break; + case 3: + mWifiDisplayRotation = Surface.ROTATION_270; + break; + default: + mWifiDisplayRotation = -1; + } + mService.updateRotation(true /* alwaysSendConfiguration */, + false/* forceRelayout */); + } + } + }, new IntentFilter(ACTION_WIFI_DISPLAY_VIDEO), + WIFI_DISPLAY_PERMISSION, + UiThread.getHandler() + , Context.RECEIVER_EXPORTED); + } + }; + t.start(); } else { mFoldController = null; } @@ -1243,7 +1328,8 @@ public class DisplayRotation { @Surface.Rotation final int preferredRotation; - if (!isDefaultDisplay) { + + if (/* QTI_BEGIN */ !(overrideMirroring && isBuiltin) && /* QTI_END */ !isDefaultDisplay) { // For secondary displays we ignore things like displays sensors, docking mode and // rotation lock, and always prefer user rotation. preferredRotation = mUserRotation; @@ -1265,10 +1351,13 @@ public class DisplayRotation { // Ignore sensor when in desk dock unless explicitly enabled. // This case can enable 180 degree rotation while docked. preferredRotation = deskDockEnablesAccelerometer ? sensorRotation : mDeskDockRotation; - } else if (hdmiPlugged && mDemoHdmiRotationLock) { + } else if ((hdmiPlugged || mWifiDisplayConnected) && mDemoHdmiRotationLock) { // Ignore sensor when plugged into HDMI when demo HDMI rotation lock enabled. // Note that the dock orientation overrides the HDMI orientation. preferredRotation = mDemoHdmiRotation; + } else if (mWifiDisplayConnected && (mWifiDisplayRotation > -1)) { + // Ignore sensor when WFD is active and UIBC rotation is enabled + preferredRotation = mWifiDisplayRotation; } else if (hdmiPlugged && dockMode == Intent.EXTRA_DOCK_STATE_UNDOCKED && mUndockedHdmiRotation >= 0) { // Ignore sensor when plugged into HDMI and an undocked orientation has diff --git a/services/core/java/com/android/server/wm/ForceRefreshRatePackagelist.java b/services/core/java/com/android/server/wm/ForceRefreshRatePackagelist.java new file mode 100755 index 000000000000..15d1e7df1f69 --- /dev/null +++ b/services/core/java/com/android/server/wm/ForceRefreshRatePackagelist.java @@ -0,0 +1,154 @@ +/*
+ * Copyright (c) 2020, The Linux Foundation. All rights reserved.
+ *
+ * Not a contribution.
+*/
+
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.wm;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.database.ContentObserver;
+import android.net.Uri;
+import android.os.Handler;
+import android.os.Looper; +import android.os.UserHandle;
+import android.provider.Settings;
+import android.text.TextUtils;
+import android.util.ArrayMap;
+import android.util.Log;
+import android.view.Display;
+import android.view.DisplayInfo;
+
+import com.android.server.UiThread; + +/**
+ * A list for packages that should force the display out of high refresh rate.
+ */
+class ForceRefreshRatePackageList {
+
+ private static final String TAG = ForceRefreshRatePackageList.class.getSimpleName();
+ private static final String KEY_FORCE_REFRESH_RATE_LIST = "ext_force_refresh_rate_list";
+ private static final float REFRESH_RATE_EPSILON = 0.01f;
+
+ private final ArrayMap<String, Float> mForcedPackageList = new ArrayMap<>();
+ private final Object mLock = new Object();
+ private final Handler mHandler; + private DisplayInfo mDisplayInfo;
+ private SettingsObserver mSettingsObserver;
+
+ ForceRefreshRatePackageList(WindowManagerService wmService, DisplayInfo displayInfo) { + mDisplayInfo = displayInfo; + final Looper looper = UiThread.getHandler().getLooper(); + mHandler = new Handler(looper); + mSettingsObserver = new SettingsObserver(wmService.mContext);
+ mHandler.post(mSettingsObserver::observe); + }
+
+ private void updateForcedPackagelist(String forcePackagesStr) {
+ synchronized (mLock) {
+ mForcedPackageList.clear();
+ if (!TextUtils.isEmpty(forcePackagesStr)) {
+ String[] pairs = forcePackagesStr.split(";");
+ for (String pair : pairs) {
+ String[] keyValue = pair.split(",");
+ if (keyValue != null && keyValue.length == 2) {
+ if (!TextUtils.isEmpty(keyValue[0].trim())
+ && !TextUtils.isEmpty(keyValue[1].trim())) {
+ try {
+ String packageName = keyValue[0].trim();
+ Float refreshRate = new Float(keyValue[1].trim());
+ mForcedPackageList.put(packageName, refreshRate);
+ } catch (NumberFormatException e) {
+ Log.e(TAG, "Invalid refresh rate input! input: " + keyValue);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ int getForceRefreshRateId(String packageName) {
+ synchronized (mLock) {
+ if(mForcedPackageList.containsKey(packageName)) {
+ float refreshRate = mForcedPackageList.get(packageName).floatValue(); + Display.Mode mode = findModeByRefreshRate(refreshRate); + return mode != null ? mode.getModeId() : 0; + }else {
+ return 0;
+ }
+ }
+ }
+
+ float getForceRefreshRate(String packageName) { + synchronized (mLock) { + if(mForcedPackageList.containsKey(packageName)) { + float refreshRate = mForcedPackageList.get(packageName).floatValue(); + Display.Mode mode = findModeByRefreshRate(refreshRate); + return mode != null ? mode.getRefreshRate() : 0; + }else { + return 0; + } + } + } + + private Display.Mode findModeByRefreshRate(float refreshRate) { + Display.Mode[] modes = mDisplayInfo.supportedModes;
+ for (int i = 0; i < modes.length; i++) {
+ if (Math.abs(modes[i].getRefreshRate() - refreshRate) < REFRESH_RATE_EPSILON) {
+ return modes[i]; + }
+ }
+ return null; + }
+
+ private class SettingsObserver extends ContentObserver {
+ private final Uri mForceRefreshRateListSetting =
+ Settings.System.getUriFor(KEY_FORCE_REFRESH_RATE_LIST);
+ private Context mContext;
+
+ SettingsObserver(@NonNull Context context) {
+ super(mHandler);
+ mContext = context;
+ }
+
+ public void observe() {
+ final ContentResolver cr = mContext.getContentResolver();
+ cr.registerContentObserver(mForceRefreshRateListSetting, false, this,
+ UserHandle.USER_SYSTEM);
+ updateForcedPackagelist(getForcePackages());
+ }
+
+ @Override
+ public void onChange(boolean selfChange, Uri uri, int userId) {
+ if (mForceRefreshRateListSetting.equals(uri)) {
+ updateForcedPackagelist(getForcePackages());
+ }
+ }
+
+ private String getForcePackages() {
+ ContentResolver cr = mContext.getContentResolver();
+ return Settings.System.getString(cr, KEY_FORCE_REFRESH_RATE_LIST);
+ }
+ }
+}
+
diff --git a/services/core/java/com/android/server/wm/InputMonitor.java b/services/core/java/com/android/server/wm/InputMonitor.java index 825d38b3eed7..d57943ad9792 100644 --- a/services/core/java/com/android/server/wm/InputMonitor.java +++ b/services/core/java/com/android/server/wm/InputMonitor.java @@ -38,6 +38,8 @@ import static android.view.WindowManager.LayoutParams.TYPE_NOTIFICATION_SHADE; import static android.view.WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL; +import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_BLACKSCREEN_OVERLAY; +import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DRAGDROP_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION; import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; @@ -749,6 +751,8 @@ final class InputMonitor { || type == TYPE_ACCESSIBILITY_OVERLAY || type == TYPE_INPUT_CONSUMER || type == TYPE_VOICE_INTERACTION - || type == TYPE_STATUS_BAR_ADDITIONAL; + || type == TYPE_STATUS_BAR_ADDITIONAL + || type == TYPE_SYSTEM_DRAGDROP_OVERLAY + || type == TYPE_SYSTEM_BLACKSCREEN_OVERLAY; } } diff --git a/services/core/java/com/android/server/wm/LaunchIntentPreferredTaskDisplayQualifier.java b/services/core/java/com/android/server/wm/LaunchIntentPreferredTaskDisplayQualifier.java new file mode 100644 index 000000000000..534cb6fb459c --- /dev/null +++ b/services/core/java/com/android/server/wm/LaunchIntentPreferredTaskDisplayQualifier.java @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.wm; + +import android.app.RemoteTaskInfo; +import android.app.ActivityOptions; +import android.content.Intent; +import android.view.Display; + +import java.util.List; + +/** + * This class only handles launch intent. + */ +class LaunchIntentPreferredTaskDisplayQualifier extends BasePreferredTaskDisplayQualifier { + + + LaunchIntentPreferredTaskDisplayQualifier(RemoteTaskManager manager) { + super(manager); + } + + /** + * @param defaultArea TaskDisplayArea + * @param intent Intent + * @param sourceRecord ActivityRecord + * @param record ActivityRecord + * @param options ActivityOptions + * @return TaskDisplayArea if we find one + */ + @Override + TaskDisplayArea queryPreferredDisplay(TaskDisplayArea defaultArea, Intent intent, + ActivityRecord sourceRecord, ActivityRecord record, + ActivityOptions options) { + if (!RemoteTaskManager.isLaunchIntent(intent)) { + return null; + } + //If it's launch intent, think about launch same app scenarios + int targetDisplayId = Display.INVALID_DISPLAY; + if (options != null) { + targetDisplayId = options.getLaunchDisplayId(); + //Call from Device Integration Service, if targetDisplayId != Display.INVALID_DISPLAY, + //defaultArea will be assigned to a VD TaskDisplayArea. + if (targetDisplayId != Display.INVALID_DISPLAY) { + //Try to find same ActivityRecord from MD, if we find one, we should move this task + // to our VD + ActivityRecord intentActivity = mRootWindowContainer.findTask(record, + mRootWindowContainer.getDefaultTaskDisplayArea()); + if (intentActivity != null + && intentActivity.getDisplayId() == Display.DEFAULT_DISPLAY + && intentActivity.getTask().getRootActivity() == intentActivity) { + //Find one in MD, double check if it's root activity in task, if so, set out + //to move this task to specific VD. + return intentActivity.getDisplayArea(); + } else { + return defaultArea; + } + } + } + //In most of cases, this intent comes from MD, we need to take VD2MD into consideration. + List<RemoteTaskInfo> taskList = mManager.getRemoteTaskInfoList(); + for (RemoteTaskInfo taskInfo : taskList) { + if (taskInfo == null) { + continue; + } + int displayId = taskInfo.getDisplayId(); + if (displayId == Display.INVALID_DISPLAY) { + continue; + } + DisplayContent content = mRootWindowContainer.getDisplayContent(displayId); + if (content != null) { + ActivityRecord intentActivity + = mRootWindowContainer.findTask(record, content.getDefaultTaskDisplayArea()); + if (intentActivity != null + && intentActivity.getTask().getRootActivity() == intentActivity) { + //Find a VD, return this + return intentActivity.getDisplayArea(); + } + } + } + return null; + } + +} diff --git a/services/core/java/com/android/server/wm/LaunchParamsController.java b/services/core/java/com/android/server/wm/LaunchParamsController.java index e74e5787ef5a..3a429f3538b2 100644 --- a/services/core/java/com/android/server/wm/LaunchParamsController.java +++ b/services/core/java/com/android/server/wm/LaunchParamsController.java @@ -30,6 +30,7 @@ import android.annotation.Nullable; import android.app.ActivityOptions; import android.content.pm.ActivityInfo.WindowLayout; import android.graphics.Rect; +import android.os.DeviceIntegrationUtils; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -122,6 +123,17 @@ class LaunchParamsController { // should always use that. result.mPreferredTaskDisplayArea = mService.mRootWindowContainer .getDisplayContent(mService.mVr2dDisplayId).getDefaultTaskDisplayArea(); + } else if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && mService.getRemoteTaskManager().isDisplaySwitchDetected(options)) { + // Device Integration: If switch display action is detected, we should reassign prefer + // TaskDisplayArea so that RootWindowContainer will help reparent task to target display. + TaskDisplayArea area = mService.getRemoteTaskManager(). + getFinalPreferredTaskDisplayArea(request.caller, request.callingPid, + request.callingUid, request.realCallingPid, request.realCallingUid, + source, options); + if (area != null) { + result.mPreferredTaskDisplayArea = area; + } } } diff --git a/services/core/java/com/android/server/wm/OtherIntentPreferredTaskDisplayQualifier.java b/services/core/java/com/android/server/wm/OtherIntentPreferredTaskDisplayQualifier.java new file mode 100644 index 000000000000..0fed9bf0c6e7 --- /dev/null +++ b/services/core/java/com/android/server/wm/OtherIntentPreferredTaskDisplayQualifier.java @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.wm; + +import android.app.RemoteTaskInfo; +import android.app.ActivityOptions; +import android.content.Intent; +import android.content.pm.ActivityInfo; +import android.text.TextUtils; +import android.view.Display; + +import java.util.List; + +/** + * Handle all intent except launch intent. + */ +class OtherIntentPreferredTaskDisplayQualifier extends BasePreferredTaskDisplayQualifier { + OtherIntentPreferredTaskDisplayQualifier(RemoteTaskManager manager) { + super(manager); + } + + /** + * @param defaultArea TaskDisplayArea + * @param intent Intent + * @param sourceRecord ActivityRecord + * @param record ActivityRecord + * @param options ActivityOptions + * @return TaskDisplayArea if we find one + */ + @Override + TaskDisplayArea queryPreferredDisplay(TaskDisplayArea defaultArea, Intent intent, + ActivityRecord sourceRecord, ActivityRecord record, + ActivityOptions options) { + //This intent launch inside the app + List<RemoteTaskInfo> taskList = mManager.getRemoteTaskInfoList(); + if (sourceRecord != null) { + int sourceDisplayId = sourceRecord.getDisplayId(); + if (!mManager.anyTaskExist(sourceRecord.getRootTask())) { + return null; + } + if (record.launchMode != ActivityInfo.LAUNCH_SINGLE_TASK + && (intent.getFlags() & Intent.FLAG_ACTIVITY_NEW_TASK) == 0) { + return null; + } + + for (RemoteTaskInfo taskInfo : taskList) { + if (taskInfo == null) { + continue; + } + Task task = mManager.anyTaskForId(taskInfo.getTaskId()); + int displayId = taskInfo.getDisplayId(); + if (task == null || displayId == sourceDisplayId) { + continue; + } + ActivityRecord intentActivity = mRootWindowContainer.findTask( + record, task.getDisplayArea()); + if (intentActivity != null) { + return intentActivity.getDisplayArea(); + } + } + //No way! have to find from Default display + ActivityRecord intentActivity + = mRootWindowContainer.findTask(record, + mRootWindowContainer.getDefaultTaskDisplayArea()); + if (intentActivity != null) { + return intentActivity.getDisplayArea(); + } + } else { + //sourceRecord = null, better to find related display by affinity, we only need to check + //our remote task, eg, Tencent video. For other case, return default TaskDisplayArea. + if (options != null && options.getLaunchDisplayId() > Display.DEFAULT_DISPLAY) { + return defaultArea; + } + + for (RemoteTaskInfo taskInfo : taskList) { + Task task = mManager.anyTaskForId(taskInfo.getTaskId()); + int displayId = taskInfo.getDisplayId(); + if (task == null) { + continue; + } + if (displayId != Display.INVALID_DISPLAY) { + if (TextUtils.equals(task.affinity, record.taskAffinity) + && TextUtils.equals(task.realActivity.getPackageName(), record.packageName)) { + ActivityRecord activityRecord = mRootWindowContainer + .findTask(record, task.getDisplayArea()); + if (activityRecord != null) { + return activityRecord.getDisplayArea(); + } + } + } + } + + //No way! have to find from Default display + ActivityRecord intentActivity + = mRootWindowContainer.findTask(record, + mRootWindowContainer.getDefaultTaskDisplayArea()); + if (intentActivity != null) { + return intentActivity.getDisplayArea(); + } + } + return null; + } +} diff --git a/services/core/java/com/android/server/wm/RecentTasks.java b/services/core/java/com/android/server/wm/RecentTasks.java index e47787e97f20..de39a1480f2c 100644 --- a/services/core/java/com/android/server/wm/RecentTasks.java +++ b/services/core/java/com/android/server/wm/RecentTasks.java @@ -61,6 +61,7 @@ import android.content.pm.ParceledListSlice; import android.content.pm.UserInfo; import android.content.res.Resources; import android.graphics.Bitmap; +import android.os.DeviceIntegrationUtils; import android.os.Environment; import android.os.IBinder; import android.os.RemoteException; @@ -71,6 +72,7 @@ import android.util.ArraySet; import android.util.Slog; import android.util.SparseArray; import android.util.SparseBooleanArray; +import android.util.BoostFramework; import android.view.MotionEvent; import android.view.WindowManagerPolicyConstants.PointerEventListener; @@ -205,6 +207,7 @@ class RecentTasks { private final HashMap<ComponentName, ActivityInfo> mTmpAvailActCache = new HashMap<>(); private final HashMap<String, ApplicationInfo> mTmpAvailAppCache = new HashMap<>(); private final SparseBooleanArray mTmpQuietProfileUserIds = new SparseBooleanArray(); + private final BoostFramework mUxPerf = new BoostFramework(); // TODO(b/127498985): This is currently a rough heuristic for interaction inside an app private final PointerEventListener mListener = new PointerEventListener() { @@ -1214,6 +1217,22 @@ class RecentTasks { void remove(Task task) { mTasks.remove(task); notifyTaskRemoved(task, false /* wasTrimmed */, false /* killProcess */); + if (task != null) { + final Intent intent = task.getBaseIntent(); + if (intent == null) return; + final ComponentName componentName = intent.getComponent(); + if (componentName == null) return; + + final String taskPkgName = componentName.getPackageName(); + if (mUxPerf != null) { + if (mUxPerf.board_first_api_lvl < BoostFramework.VENDOR_T_API_LEVEL && + mUxPerf.board_api_lvl < BoostFramework.VENDOR_T_API_LEVEL) { + mUxPerf.perfUXEngine_events(BoostFramework.UXE_EVENT_KILL, 0, taskPkgName, 0); + } else { + mUxPerf.perfEvent(BoostFramework.VENDOR_HINT_KILL, taskPkgName, 2, 0, 0); + } + } + } } /** @@ -1489,6 +1508,12 @@ class RecentTasks { // after dismissing primary split screen. continue; } + // Device Integration: We don't want to system remove our remote task while in home Activity idle scenario, + // skip this. + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && mService.getRemoteTaskManager().anyTaskExist(hiddenTask)) { + continue; + } mHiddenTasks.remove(i); mSupervisor.removeTask(hiddenTask, false /* killProcess */, !REMOVE_FROM_RECENTS, "remove-hidden-task"); diff --git a/services/core/java/com/android/server/wm/RefreshRatePolicy.java b/services/core/java/com/android/server/wm/RefreshRatePolicy.java index 99831d3f6e48..8bb3df210349 100644..100755 --- a/services/core/java/com/android/server/wm/RefreshRatePolicy.java +++ b/services/core/java/com/android/server/wm/RefreshRatePolicy.java @@ -64,6 +64,7 @@ class RefreshRatePolicy { private final WindowManagerService mWmService; private float mMinSupportedRefreshRate; private float mMaxSupportedRefreshRate; + private final ForceRefreshRatePackageList mForceList; /** * The following constants represent priority of the window. SF uses this information when @@ -93,6 +94,7 @@ class RefreshRatePolicy { mLowRefreshRateMode = findLowRefreshRateMode(displayInfo, mDefaultMode); mHighRefreshRateDenylist = denylist; mWmService = wmService; + mForceList = new ForceRefreshRatePackageList(mWmService, displayInfo); } /** @@ -133,6 +135,11 @@ class RefreshRatePolicy { return 0; } + // If app is forced to specified refresh rate, return the corresponding mode id. + int forceRefreshRateId = mForceList.getForceRefreshRateId(w.getOwningPackage()); + if(forceRefreshRateId > 0) { + return forceRefreshRateId; + } // If app is animating, it's not able to control refresh rate because we want the animation // to run in default refresh rate. But if the display size of default mode is different // from the using preferred mode, then still keep the preferred mode to avoid disturbing @@ -255,6 +262,13 @@ class RefreshRatePolicy { return w.mFrameRateVote.reset(); } + // If app is forced to specified refresh rate, return the specified refresh rate. + float forceRefreshRate = mForceList.getForceRefreshRate(w.getOwningPackage()); + if(forceRefreshRate > 0) { + return w.mFrameRateVote.update(forceRefreshRate, + Surface.FRAME_RATE_COMPATIBILITY_EXACT); + } + // If the app set a preferredDisplayModeId, the preferred refresh rate is the refresh rate // of that mode id. if (refreshRateSwitchingType != SWITCHING_TYPE_RENDER_FRAME_RATE_ONLY) { diff --git a/services/core/java/com/android/server/wm/RemoteTaskExceptionHandler.java b/services/core/java/com/android/server/wm/RemoteTaskExceptionHandler.java new file mode 100644 index 000000000000..c7171227471b --- /dev/null +++ b/services/core/java/com/android/server/wm/RemoteTaskExceptionHandler.java @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.wm; + +import android.util.Log; + +import java.io.File; +import java.io.FileOutputStream; +import java.text.SimpleDateFormat; +import java.util.Locale; +import java.util.LinkedList; +import java.util.Queue; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +/** + * Notice: This file only use for self-host, release version should remove this class. + * + * All associated exceptions with remote task should deliver here. + * Once exception happen, stack traces and the latest 100 RemoteTaskLogs will be store in folder /data/anr/rth-logs + */ +class RemoteTaskExceptionHandler { + private static final boolean DEBUG = RemoteTaskLogger.REMOTE_TASK_DEBUG; + private static final String TAG = RemoteTaskExceptionHandler.class.getSimpleName(); + private static final String LOG_ROOT_DIR = "/data/anr/rth-logs"; + private static final int MAX_LINES = 100; + + private static ExecutorService mExecutor = Executors.newSingleThreadExecutor(); + private static LogHistoryHelper mLogHistoryHelper = new LogHistoryHelper(); + + public static void onExceptionThrow(Exception exception) { + if (DEBUG) { + RemoteTaskLogger.d(TAG, "Remote Task Exception Detected"); + + mExecutor.submit(() -> { + String curTime = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", Locale.getDefault()) + .format(new java.util.Date()); + String logInfo = mergeLogInfo(Log.getStackTraceString(exception), mLogHistoryHelper.toString(), curTime); + + dumpStackToFile(logInfo, curTime); + }); + } + } + + public static void onLogSave(String type, String tag, String msg) { + mExecutor.submit(() -> { + mLogHistoryHelper.add("Type: " + type + " - " + "Tag: " + tag + " - " + "Msg: " + msg + "\n"); + }); + } + + private static void dumpStackToFile(String logInfo, String curTime) { + String filePath = LOG_ROOT_DIR + "/rth_log_" + curTime; + File logDir = new File(LOG_ROOT_DIR); + File logFile = new File(filePath); + try { + if (!logDir.exists()) { + logDir.mkdirs(); + } + logFile.createNewFile(); + try (FileOutputStream fos = new FileOutputStream(logFile)) { + fos.write(logInfo.getBytes()); + fos.flush(); + } + } catch (Exception e) { + RemoteTaskLogger.d(TAG, "Wrote Log file failed: " + e.toString()); + } + } + + private static String mergeLogInfo(String stackTraceString, String logHistory, String curTime) { + StringBuilder sb = new StringBuilder(); + sb.append("========================== RemoteTaskException ==========================\n"); + sb.append("Time: ").append(curTime).append("\n"); + sb.append("Stack Traces: \n").append(stackTraceString); + sb.append("Log Hostory: \n").append(logHistory); + + return sb.toString(); + } + + // Make sure LogHistoryHelper runs on sigle thread + private static class LogHistoryHelper { + private Queue<String> q = new LinkedList<>(); + + public void add(String log) { + if (log == null) { + return; + } + if (q.size() >= MAX_LINES) { + q.poll(); + } + q.offer(log); + } + + public String toString() { + StringBuilder sb = new StringBuilder(); + for (String log : q) { + sb.append(log); + } + sb.append("Log History End: " + q.size() + " logs.\n"); + return sb.toString(); + } + } +} diff --git a/services/core/java/com/android/server/wm/RemoteTaskInstanceBroker.java b/services/core/java/com/android/server/wm/RemoteTaskInstanceBroker.java new file mode 100644 index 000000000000..a4b3470b2027 --- /dev/null +++ b/services/core/java/com/android/server/wm/RemoteTaskInstanceBroker.java @@ -0,0 +1,173 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.wm; + +import android.os.Parcel; +import android.os.RemoteException; +import android.content.Context; +import android.content.res.Configuration; +import android.app.RemoteTaskConstants; +import android.app.ActivityClient; +import android.app.CrossDeviceManager; +import android.app.IRemoteTaskInstanceBroker; +import android.graphics.Rect; + +import static android.view.Surface.ROTATION_0; +import static android.view.Surface.ROTATION_180; +import static android.view.Surface.ROTATION_270; +import static android.view.Surface.ROTATION_90; +import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; +import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_PORTRAIT; +import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE; +import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT; +import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; +import static android.view.WindowManager.LayoutParams.FLAG_SECURE; + +/** + * System service for managing Remote Task Instance features + */ +public class RemoteTaskInstanceBroker extends IRemoteTaskInstanceBroker.Stub { + private static final String TAG = RemoteTaskInstanceBroker.class.getSimpleName(); + + private final Context mContext; + private final ActivityTaskManagerService mActivityTaskManagerService; + + public RemoteTaskInstanceBroker(Context context, ActivityTaskManagerService service) { + mContext = context; + mActivityTaskManagerService = service; + } + + @Override + public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException { + if (!CrossDeviceManager.isCallerAllowed(mContext)) { + throw new RemoteException("Caller is not allowed"); + } + return super.onTransact(code, data, reply, flags); + } + + /** + * Get current orientation status of remote task + * @Param taskId task id + * @return orientation state value + */ + @Override + public int getOrientation(int taskId) { + Task task = mActivityTaskManagerService.mRootWindowContainer.anyTaskForId(taskId); + if (task != null) { + return task.getConfiguration().orientation; + } + RemoteTaskLogger.e(TAG, "Task == null, orientation = undefined"); + return Configuration.ORIENTATION_UNDEFINED; + } + + /** + * Get remote task bounds + * @Param taskId task id + * @return remote task bounds + */ + @Override + public Rect getRemoteTaskBounds(int taskId) { + Rect rect = null; + Task task = mActivityTaskManagerService.mRootWindowContainer.anyTaskForId(taskId); + if (task == null) { + return null; + } + rect = task.getBounds(); + if (rect == null && task.getTaskInfo() != null) { + rect = task.getTaskInfo().configuration.windowConfiguration.getAppBounds(); + } + return rect; + } + + /** + * Check if remote task instance is showing secure content + * @Param taskId task id + * @return true if current remote task instance is showing secure content + */ + @Override + public boolean isRemoteTaskInstanceShowingSecuredContent(int taskId) { + Task task = mActivityTaskManagerService.mRootWindowContainer.anyTaskForId(taskId); + if (task == null) { + return false; + } + WindowManagerService windowManagerService = mActivityTaskManagerService.mWindowManager; + DisplayContent displayContent + = windowManagerService.mRoot.getDisplayContent(task.getDisplayId()); + if ((displayContent != null) && (displayContent.mCurrentFocus != null)) { + return (displayContent.mCurrentFocus.mAttrs.flags & FLAG_SECURE) != 0; + } + return false; + } + + /** + * Remove remote task + * @Param taskId task id + */ + @Override + public void removeRemoteTask(int taskId) { + Task task = mActivityTaskManagerService.mRootWindowContainer.anyTaskForId(taskId); + if (task == null) { + mActivityTaskManagerService.getRemoteTaskManager().notifyRemoteTaskClosed(taskId); + return; + } + + /* + * If aosp task info correspond to this handler has been set, try to close and + * remove this aosp task. + */ + RemoteTaskLogger.d(TAG, "Task != null task Id =" + taskId); + mActivityTaskManagerService.getRemoteTaskManager().closeRemoteTask(taskId); + } + + /** + * Notify remote display orientation changed + * @Param taskId task id + * @param newOrientation new orientation state + */ + @Override + public void notifyRemoteDisplayOrientationChanged(int taskId, int newOrientation) { + Task task = mActivityTaskManagerService.mRootWindowContainer.anyTaskForId(taskId); + if (task == null) { + return; + } + ActivityRecord topRecord = task.topRunningActivity(); + if (topRecord != null && topRecord.info.isFixedOrientation()) { + return; + } + if (task.getTaskInfo() == null) { + return; + } + switch (newOrientation) { + case ROTATION_0: + newOrientation = SCREEN_ORIENTATION_PORTRAIT; + break; + case ROTATION_90: + newOrientation = SCREEN_ORIENTATION_LANDSCAPE; + break; + case ROTATION_180: + newOrientation = SCREEN_ORIENTATION_REVERSE_PORTRAIT; + break; + case ROTATION_270: + newOrientation = SCREEN_ORIENTATION_REVERSE_LANDSCAPE; + break; + default: + newOrientation = SCREEN_ORIENTATION_UNSPECIFIED; + } + ActivityClient.getInstance().setRequestedOrientation(task.getTaskInfo() + .getToken().asBinder(), newOrientation); + } +}
\ No newline at end of file diff --git a/services/core/java/com/android/server/wm/RemoteTaskLogger.java b/services/core/java/com/android/server/wm/RemoteTaskLogger.java new file mode 100644 index 000000000000..4141278cb570 --- /dev/null +++ b/services/core/java/com/android/server/wm/RemoteTaskLogger.java @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.wm; + +import android.util.Log; + +/** + * Simple Logger especially for remote task + */ +class RemoteTaskLogger { + static final boolean REMOTE_TASK_DEBUG = true; + + static void e(String tag, String msg) { + if (REMOTE_TASK_DEBUG) { + Log.e(tag, msg); + RemoteTaskExceptionHandler.onLogSave("Error", tag, msg); + } + } + + static void i(String tag, String msg) { + if (REMOTE_TASK_DEBUG) { + Log.i(tag, msg); + RemoteTaskExceptionHandler.onLogSave("Info", tag, msg); + } + } + + static void d(String tag, String msg) { + if (REMOTE_TASK_DEBUG) { + Log.d(tag, msg); + RemoteTaskExceptionHandler.onLogSave("Debug", tag, msg); + } + } + + static void w(String tag, String msg) { + if (REMOTE_TASK_DEBUG) { + Log.w(tag, msg); + RemoteTaskExceptionHandler.onLogSave("Warning", tag, msg); + } + } +} diff --git a/services/core/java/com/android/server/wm/RemoteTaskManager.java b/services/core/java/com/android/server/wm/RemoteTaskManager.java new file mode 100644 index 000000000000..1dadba201efb --- /dev/null +++ b/services/core/java/com/android/server/wm/RemoteTaskManager.java @@ -0,0 +1,714 @@ +/* + * Copyright (C) 2023 Microsoft Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.wm; + +import android.content.Context; +import android.annotation.NonNull; +import android.annotation.Nullable; +import android.annotation.SuppressLint; +import android.app.RemoteTaskInfo; +import android.app.SystemTaskContext; +import android.app.RemoteTaskParams; +import android.app.ActivityOptions; +import android.app.IApplicationThread; +import android.app.RemoteTaskConstants; +import android.app.WindowConfiguration; +import android.content.Intent; +import android.content.pm.ActivityInfo; +import android.os.DeviceIntegrationUtils; +import android.os.Handler; +import android.os.HandlerThread; +import android.os.RemoteException; +import android.os.SystemProperties; +import android.text.TextUtils; +import android.view.Display; +import android.view.WindowManager; + +import java.util.List; +import java.util.ArrayList; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; + +import static android.app.RemoteTaskConstants.REMOTE_TASK_FLAG_DEFAULT; +import static android.app.RemoteTaskConstants.FLAG_TASK_LAUNCH_SCENARIO_COMMON; +import static android.app.RemoteTaskConstants.FLAG_TASK_LAUNCH_SCENARIO_CLIENT; +import static android.app.RemoteTaskConstants.FLAG_TASK_LAUNCH_SCENARIO_DUP; +import static android.app.RemoteTaskConstants.FLAG_TASK_LAUNCH_SCENARIO_VDTOMD; +import static android.app.RemoteTaskConstants.FLAG_TASK_LAUNCH_SCENARIO_MDTOVD; +import static android.app.RemoteTaskConstants.REMOTE_TASK_FLAG_LAUNCH; +import static android.content.Intent.ACTION_MAIN; +import static android.content.Intent.CATEGORY_HOME; +import static android.content.Intent.CATEGORY_SECONDARY_HOME; +import static android.content.Intent.FLAG_ACTIVITY_MULTIPLE_TASK; +import static android.content.Intent.FLAG_ACTIVITY_SINGLE_TOP; +import static android.content.pm.ActivityInfo.LAUNCH_SINGLE_TOP; + +/** + * Responsible for managing remote task event. + */ +public class RemoteTaskManager { + private static final String THREAD_NAME = "RemoteTaskThread"; + private static final String TAG = RemoteTaskManager.class.getSimpleName(); + private static final String REASON_PROCESS_RESTART = "restartActivityProcess"; + + final ActivityTaskManagerService mActivityTaskManagerService; + private final boolean mDeviceIntegrationDisabled; + private final CrossDeviceServiceDelegate mCrossDeviceServiceDelegate; + private final List<BasePreferredTaskDisplayQualifier> mDisplayQualifierList; + private final Handler mRemoteTaskHandler; + private RootWindowContainer mRootWindowContainer; + + RemoteTaskManager(ActivityTaskManagerService service) { + mActivityTaskManagerService = service; + mDeviceIntegrationDisabled = DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION; + HandlerThread handlerThread = new HandlerThread(THREAD_NAME); + handlerThread.start(); + mDisplayQualifierList = new ArrayList<>(); + mDisplayQualifierList.add(new LaunchIntentPreferredTaskDisplayQualifier(this)); + mDisplayQualifierList.add(new OtherIntentPreferredTaskDisplayQualifier(this)); + mRemoteTaskHandler = new Handler(handlerThread.getLooper()); + mCrossDeviceServiceDelegate = new CrossDeviceServiceDelegate(this, mRemoteTaskHandler); + } + + void setRootWindowContainer(RootWindowContainer container) { + mRootWindowContainer = container; + for (BasePreferredTaskDisplayQualifier qualifier : mDisplayQualifierList) { + qualifier.setRootWindowContainer(container); + } + } + + /** + * Get caller activity reccord + * + * @param thread IApplicationThread + * @param sourceRecord ActivityRecord + * @param callingPid Caller pid + * @param callingUid Caller uid + * @param realCallingPid Real caller pid + * @param realCallingUid Real caller uid + * @return Caller activity reccord + */ + ActivityRecord getCallerRecord(IApplicationThread thread, ActivityRecord sourceRecord, + int callingPid, int callingUid, + int realCallingPid, int realCallingUid) { + ActivityRecord callerRecord = sourceRecord; + if (callerRecord == null) { + WindowProcessController callerApp + = mActivityTaskManagerService.getProcessController(thread); + if (callerApp == null) { + callerApp = + mActivityTaskManagerService.getProcessController(realCallingPid, + realCallingUid); + } + if (callerApp == null) { + callerApp = + mActivityTaskManagerService.getProcessController(callingPid, callingUid); + } + if (callerApp != null) { + callerRecord = callerApp.getTopActivity(); + } + } + return callerRecord; + } + + /** + * Get current remote task info array + * @return array of remote task info array + */ + @NonNull + List<RemoteTaskInfo> getRemoteTaskInfoList() { + return (List<RemoteTaskInfo>)mCrossDeviceServiceDelegate.getRemoteTaskInfoList(); + } + + /** + * Entry for all tasks who want to launch in remote task/VD that may need verify. + * + * @param container RootWindowContainer + * @param thread IApplicationThread + * @param reuseTask Task + * @param sourceRecord ActivityRecord + * @param record ActivityRecord + * @param options ActivityOptions + * @return modified ActivityOptions if needed + */ + ActivityOptions verifyRemoteTaskIfNeeded(RootWindowContainer container, + IApplicationThread thread, int callingPid, + int callingUid, int realCallingPid, + int realCallingUid, Task reuseTask, + ActivityRecord sourceRecord, ActivityRecord record, + ActivityOptions options) { + if(!isAnyClientAlive()) { + return options; + } + //Step 1 : get caller activity record. + ActivityRecord callerRecord = getCallerRecord(thread, sourceRecord, callingPid, + callingUid, realCallingPid, realCallingUid); + //Step 2 : Is current launch an edge case or not. + final boolean isEdgeCase = (sourceRecord != null && sourceRecord.finishing && sourceRecord.isRootOfTask() + && sourceRecord.getTask().getDisplayId() > Display.DEFAULT_DISPLAY + && sourceRecord.getTask().getTopNonFinishingActivity() == null); + /* + * Step 3 : Build up system task launch context. Including launch uuid and flag, perfered + * disply id, caller package name, caller display id, perfered reuse display id, launch from + * home intent or not, edge case or not. + */ + String uuid = ""; + String securityToken = ""; + int launchFlag = RemoteTaskConstants.REMOTE_TASK_FLAG_DEFAULT; + int displayId = Display.INVALID_DISPLAY; + if (options != null) { + uuid = options.getRemoteUuid(); + securityToken = options.getRemoteSecurityToken(); + launchFlag = options.getRemoteTaskFlag(); + displayId = options.getLaunchDisplayId(); + } + final int sourceDisplayId = callerRecord != null ? + callerRecord.getTask().getDisplayId() : Display.INVALID_DISPLAY; + final int reuseDisplayId = reuseTask != null ? reuseTask.getDisplayId() : Display.INVALID_DISPLAY; + + SystemTaskContext taskContext = SystemTaskContext.create(uuid, securityToken, launchFlag, + record.launchedFromPackage, displayId, sourceDisplayId, reuseDisplayId, + isHomeIntent(record.intent), isEdgeCase); + + /* + * Step 4 : transact system task launch context to system privacy app to apply remote task + * policy and return new updated task launch parameters. + */ + RemoteTaskParams taskParams = mCrossDeviceServiceDelegate.handleVerifyRemoteTask(taskContext); + /* + * Step 5 : unpackage task launch parameters returned from system privacy app and build up + * new updated task launch options including task uuid, prefered display id, launch scenario. + */ + int launchScenario = taskParams.getLaunchScenario(); + if (launchScenario == FLAG_TASK_LAUNCH_SCENARIO_COMMON) { + return options; + } + if (options == null) { + options = ActivityOptions.makeBasic(); + } + + displayId = taskParams.getDisplayId(); + if (displayId != Display.INVALID_DISPLAY) { + container.getDisplayContentOrCreate(displayId); + WindowManager windowManager = + (WindowManager)mActivityTaskManagerService.mContext.getSystemService(Context.WINDOW_SERVICE); + if (windowManager != null) { + windowManager.setDisplayImePolicy(displayId, WindowManager.DISPLAY_IME_POLICY_LOCAL); + } + } + + if (options != null) { + options.setRemoteUuid(taskParams.getUuid()); + options.setRemoteTaskLaunchScenario(launchScenario); + options.setLaunchDisplayId(displayId); + setRemoteTaskLaunchScenario(reuseTask, options); + } + + //Step 6 : return updated task launch options to ActivityStarter to execute activity start and task launch. + return options; + } + + /** + * Activate launch remote task/VD. + * + * @param newTask new Task + * @param task Task + * @param record ActivityRecord + * @param options ActivityOptions + */ + void activateRemoteTaskIfNeeded(boolean newTask, Task reuseTask, ActivityRecord record, ActivityOptions options) { + if(!isAnyClientAlive()) { + return; + } + Task remoteTask = null; + if (reuseTask != null) { + remoteTask = reuseTask; + } else if (newTask){ + remoteTask = record.getRootTask(); + } + + if (remoteTask != null && options != null && + options.getRemoteTaskLaunchScenario() >= RemoteTaskConstants.FLAG_TASK_LAUNCH_SCENARIO_CLIENT) { + + String pkg = record.intent.getPackage(); + if (pkg == null && record.intent.getComponent() != null) { + pkg = record.intent.getComponent().getPackageName(); + } + RemoteTaskInfo taskInfo = RemoteTaskInfo.create(options.getRemoteUuid(), pkg, + remoteTask.getDisplayId(), remoteTask.mTaskId); + mCrossDeviceServiceDelegate.handleActivateRemoteTask(record.intent, taskInfo); + setRemoteTaskLaunchScenario(remoteTask, options); + } + } + + void setRemoteTaskLaunchScenario(Task task, ActivityOptions options) { + if (task == null || options == null) { + return; + } + + int launchScenario = options.getRemoteTaskLaunchScenario(); + if (launchScenario != FLAG_TASK_LAUNCH_SCENARIO_DUP) { + task.mLaunchScenario = launchScenario; + } + } + + boolean isAnyClientAlive() { + if(mDeviceIntegrationDisabled) { + return false; + } + return mCrossDeviceServiceDelegate.isAnyClientAliveInService(); + } + + private boolean isHomeIntent(Intent intent) { + return ACTION_MAIN.equals(intent.getAction()) + && (intent.hasCategory(CATEGORY_HOME) + || intent.hasCategory(CATEGORY_SECONDARY_HOME)) + && intent.getCategories().size() == 1 + && intent.getData() == null + && intent.getType() == null; + } + + /** + * try to remove task with id = taskId + * + * @param taskId id for task + * @Caller RemoteTaskManager - When some user action trigger task close(such as back/exit + * button on the last activity or home button, handler manager + * will call this function to check if the task is handled by + * remote task manager if it is , close it. + */ + void closeRemoteTask(int taskId) { + if(!isAnyClientAlive()) { + return; + } + + Task task = anyTaskForId(taskId); + if(anyTaskExist(task)) { + /* + * Notify aosp task manager service to close and remove this task really, task remove + * action must be processed in aosp main tread to avoid dead lock. + */ + mRemoteTaskHandler.post(() -> mActivityTaskManagerService.removeTask(taskId)); + } + } + + /** + * Notify task was closed by task id + * This API is only called when PL want to close a task that + * didn't exist, and just notify PL that the task already closed before + * and PL can release the task container safty. + * + * @param taskId id for task + */ + void notifyRemoteTaskClosed(int taskId) { + mRemoteTaskHandler.post(() -> { + mCrossDeviceServiceDelegate.handleCloseRemoteTask(taskId); + }); + } + + /** + * Notify correspond task was closed + * + * @param taskId id for task + * @Caller 1. RemoteTaskManager - If app call Activity.finish on the last + * activity of the task, the task will close itself, if the task is handled by remote + * task handler manager, need to notify the handler that the task + * already closed. + * 2. ActivityStackSupervisor - If task was close and removed by task manager service and the + * task is handled by remote task handler manger, need to notify + * the handler that the task already closed. + */ + void notifyRemoteTaskClosed(Task task) { + task.mAllowReparent = false; + mCrossDeviceServiceDelegate.handleCloseRemoteTask(task.mTaskId); + } + + boolean anyTaskExist(Task task) { + if (task == null) { + return false; + } + return task.mLaunchScenario >= FLAG_TASK_LAUNCH_SCENARIO_CLIENT; + } + + Task anyTaskForId(int taskId) { + return mActivityTaskManagerService.mRootWindowContainer.anyTaskForId(taskId); + } + + boolean findTaskOnlyForLaunch(Intent intent, String affinity, int taskId) { + if(!isAnyClientAlive()) { + return false; + } + Task task = mActivityTaskManagerService.mRootWindowContainer.anyTaskForId(taskId); + if (task == null || task.mLaunchScenario < FLAG_TASK_LAUNCH_SCENARIO_CLIENT || intent == null) { + return false; + } + + return isLaunchIntent(intent) + && TextUtils.equals(affinity, task.affinity); + } + + /** + * This should only call in recent use task scenarios, more specifically, when + * click an app in recent use task, but this app already launch in VD, then we should + * call this method to switch app from VD to MD. + * + * @param task Task which activate from Recent use tasks panel + * @param intent Related intent + * @return true if device system sdk already handle this, otherwise false. + */ + boolean interceptFromRecents(Task task, Intent intent) { + if (!isAnyClientAlive() || task == null || + task.getDisplayId() != Display.DEFAULT_DISPLAY || + task.mPrevDisplayId <= Display.DEFAULT_DISPLAY) { + return false; + } + + RemoteTaskLogger.d(TAG, "interceptFromRecents"); + task.mLaunchScenario = FLAG_TASK_LAUNCH_SCENARIO_VDTOMD; + mCrossDeviceServiceDelegate.notifyDisplaySwitched(task.mPrevDisplayId); + return true; + } + + /** + * While task was removed, we need to guarantee correspond remote handler should be + * notified and removed with correct reason. + * + * @param task the task which was removed. + */ + void handleRemoveTask(Task task) { + if (task.mLaunchScenario < FLAG_TASK_LAUNCH_SCENARIO_CLIENT || !isAnyClientAlive()) { + return; + } + + notifyRemoteTaskClosed(task); + } + + /** + * While trigger launching app, some apps will start an no-window activity and immediately + * finish this activity,for this situation, we need to guarantee this Task should be removed. + * + * @param task the task where activity finish. + */ + void handleFinishActivity(Task task, ActivityRecord finishingRecord) { + if (!isAnyClientAlive() || task.mLaunchScenario < FLAG_TASK_LAUNCH_SCENARIO_CLIENT || + !task.isRootTask() || task.getDisplayId() <= Display.DEFAULT_DISPLAY) { + return; + } + if (!finishingRecord.isRootOfTask()) { + return; + } + if (task.getChildCount() > 1 && task.getTopNonFinishingActivity() != null) { + return; + } + closeRemoteTask(task.mTaskId); + RemoteTaskLogger.d(TAG, "handleFinishActivity start"); + } + + /** + * Query prefer display area + * + * @param defaultArea TaskDisplayArea + * @param intent Intent + * @param sourceRecord ActivityRecord + * @param record ActivityRecord + * @param options ActivityOptions + * @return prefer area + */ + TaskDisplayArea queryPreferredDisplayArea(@Nullable Task task, TaskDisplayArea defaultArea, Intent intent, + ActivityRecord sourceRecord, ActivityRecord record, + ActivityOptions options) { + if (!isAnyClientAlive() || options == null || options.getRemoteTaskLaunchScenario() == FLAG_TASK_LAUNCH_SCENARIO_COMMON) { + return defaultArea; + } + + //For this case, we don't handle, let it goes with default flow + if (options != null) { + if (options.getRemoteTaskFlag() == RemoteTaskConstants.REMOTE_TASK_FLAG_LAUNCH) { + return defaultArea; + } else if (options.getRemoteTaskLaunchScenario() == FLAG_TASK_LAUNCH_SCENARIO_DUP + && task != null) { + return task.getDisplayArea(); + } + } + for (BasePreferredTaskDisplayQualifier handler : mDisplayQualifierList) { + TaskDisplayArea area = handler.queryPreferredDisplay(defaultArea, intent, + sourceRecord, record, options); + if (area != null) { + return area; + } + } + return defaultArea; + } + + /** + * Every document mode with {@link Intent#FLAG_ACTIVITY_MULTIPLE_TASK} will open an new task + * for launching Activity, but on launch same app scenarios, we should make sure if users want + * to move task between VD and MD, if so, we should intercept original logic and find an + * appropriate task from system. + * + * @param startActivity ActivityRecord + * @param options ActivityOptions + * @param area TaskDisplayArea + * @param launchFlags int + * @return existing ActivityRecord on system. + */ + @Nullable + ActivityRecord findTaskForReuseIfNeeded(ActivityRecord startActivity, ActivityOptions options, + TaskDisplayArea area, int launchFlags) { + if (!isAnyClientAlive()) { + return null; + } + if ((launchFlags & Intent.FLAG_ACTIVITY_NEW_DOCUMENT) != 0 + && (launchFlags & FLAG_ACTIVITY_MULTIPLE_TASK) != 0) { + ActivityRecord result = mRootWindowContainer.findTask(startActivity, area); + if (result == null) { + return null; + } + Task task = result.getTask(); + if (task == null) { + return null; + } + if (task.getDisplayId() <= Display.DEFAULT_DISPLAY) { + //Check MD2VD scenario + if (options != null) { + if (!TextUtils.isEmpty(options.getRemoteUuid()) + && options.getRemoteTaskFlag() == REMOTE_TASK_FLAG_LAUNCH) { + return result; + } + } + } else { + //Check VD2MD scenario + if (anyTaskExist(task)) { + return result; + } + } + } + return null; + } + + /** + * Find the top ActivityRecord from WindowProcessController + * + * @param thread IApplicationThread + * @return ActivityRecord if we find one. + */ + ActivityRecord getTopActivityFromController(IApplicationThread thread) { + if (thread == null) { + return null; + } + if (mActivityTaskManagerService != null) { + WindowProcessController controller = + mActivityTaskManagerService.getProcessController(thread); + if (controller != null) { + return controller.getTopActivity(); + } + } + return null; + } + + /** + * If is in display switch session + * + * @return true if yes + */ + boolean isDisplaySwitchDetected(ActivityOptions options) { + if (options == null || !isAnyClientAlive()) { + return false; + } + int scenario = options.getRemoteTaskLaunchScenario(); + return scenario == FLAG_TASK_LAUNCH_SCENARIO_MDTOVD || + scenario == FLAG_TASK_LAUNCH_SCENARIO_VDTOMD; + } + + /** + * Get TaskDisplayArea depends on target displayId + * + * @return TaskDisplayArea + */ + TaskDisplayArea getFinalPreferredTaskDisplayArea( IApplicationThread thread, int callingPid, + int callingUid, int realCallingPid, + int realCallingUid, ActivityRecord sourceRecord, + ActivityOptions options) { + if (!isAnyClientAlive() || options == null || options.getRemoteTaskLaunchScenario() == FLAG_TASK_LAUNCH_SCENARIO_COMMON) { + return null; + } + ActivityTaskManagerService service = mActivityTaskManagerService; + int targetId = Display.INVALID_DISPLAY; + if (options != null) { + targetId = options.getLaunchDisplayId(); + } + if (targetId == Display.INVALID_DISPLAY) { + ActivityRecord callerRecord = getCallerRecord(thread, sourceRecord, callingPid, + callingUid, realCallingPid, realCallingUid); + if (callerRecord != null) { + targetId = callerRecord.getDisplayId(); + } + } + + if (service == null) { + return null; + } + if (service.mRootWindowContainer.getDisplayContent(targetId) != null) { + return service.mRootWindowContainer + .getDisplayContent(targetId).getDefaultTaskDisplayArea(); + } + return null; + } + + /** + * @param options Activity Launch Options + * @return true if we have session needs to handle + */ + boolean inAnyInterceptSession(ActivityOptions options) { + if (!isAnyClientAlive()) { + return false; + } + + if (options != null) { + int scenario = options.getRemoteTaskLaunchScenario(); + return scenario == FLAG_TASK_LAUNCH_SCENARIO_DUP || + scenario == FLAG_TASK_LAUNCH_SCENARIO_MDTOVD || + scenario == FLAG_TASK_LAUNCH_SCENARIO_VDTOMD; + } + return false; + } + + /** + * Clean all of caches from manager. + */ + void recycleAll() { + } + + /** + * Claiming to listen process die event, if it's corresponding to task show in VD, + * try to remove handler + * + * @param wpc WindowProcessController + * @param reason reason of process die + */ + public void handleProcessDied(WindowProcessController wpc, String reason) { + if (!isAnyClientAlive() || TextUtils.equals(reason, REASON_PROCESS_RESTART)) { + return; + } + + List<RemoteTaskInfo> taskInfoList = getRemoteTaskInfoList(); + for (RemoteTaskInfo taskInfo : taskInfoList) { + if (taskInfo != null) { + Task task = mActivityTaskManagerService.mRootWindowContainer.anyTaskForId(taskInfo.getTaskId()); + if (task != null && task.getRemoteTaskPid() == wpc.getRemoteTaskPid()) { + notifyRemoteTaskClosed(task); + } + } + } + } + + /** + * If it's launch intent + * + * @param intent Intent + * @return true if it is. + */ + static boolean isLaunchIntent(Intent intent) { + if (intent == null) { + return false; + } + if (TextUtils.isEmpty(intent.getAction())) { + return false; + } + if (TextUtils.equals(intent.getAction(), Intent.ACTION_MAIN)) { + return intent.getCategories() != null + && intent.getCategories().contains(Intent.CATEGORY_LAUNCHER); + } + return false; + } + + /** + * Attempt to ignore relaunch workflow when we are in display switch session + * + * @param displayChanged flag + * @param previousDisplayId int + * @param currentDisplayId int + * @param changes int + * @return true if so. + */ + @SuppressLint("NewApi") + boolean shouldIgnoreRelaunch(Task task, boolean displayChanged, + int previousDisplayId, int currentDisplayId, int changes) { + if (!isAnyClientAlive()) { + return false; + } + if (displayChanged) { + if (task.mLaunchScenario == FLAG_TASK_LAUNCH_SCENARIO_VDTOMD || + task.mLaunchScenario == FLAG_TASK_LAUNCH_SCENARIO_MDTOVD) { + return true; + } + } else { + //Fix bug that game app PUGB cannot launch on VD. + if ((changes & ActivityInfo.CONFIG_SCREEN_LAYOUT) != 0) { + return anyTaskExist(task) && previousDisplayId == currentDisplayId; + } + } + return false; + } + + /** + * When system find that it's potential new task launch, we should filter + * Single Top mode while checking whether should start a new remote task session. + * + * @param area TaskDisplayArea + * @param startActivity ActivityRecord + * @param notTop ActivityRecord + * @param launchFlags int + * @param launchMode int + * @return true if need to deliver Intent to current top activity + */ + boolean isDeliverToCurrentTop(TaskDisplayArea area, ActivityRecord startActivity, + ActivityRecord notTop, int launchFlags, int launchMode) { + if (area == null || startActivity == null) { + return false; + } + Task topRootTask = + mActivityTaskManagerService.mRootWindowContainer.getTopDisplayFocusedRootTask(); + if (topRootTask == null) { + return false; + } + final ActivityRecord top = topRootTask.topRunningNonDelayedActivityLocked(notTop); + final boolean dontStart = top != null + && top.mActivityComponent.equals(startActivity.mActivityComponent) + && top.mUserId == startActivity.mUserId + && top.attachedToProcess() + && ((launchFlags & FLAG_ACTIVITY_SINGLE_TOP) != 0 + || LAUNCH_SINGLE_TOP == launchMode) + // This allows home activity to automatically launch on secondary task display area + // when it was added, if home was the top activity on default task display area, + // instead of sending new intent to the home activity on default display area. + && (!top.isActivityTypeHome() || top.getDisplayArea() == area); + return dontStart; + } + + /** + * Check white list for user id + * @param uid caller user id that need to be check from white list + * @return true if call user id is in white list, false otherwise + */ + boolean isFromBackgroundWhiteList(int uid) { + if (!isAnyClientAlive()) { + return false; + } + return mCrossDeviceServiceDelegate.isFromBackgroundWhiteList(uid); + } +} diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java index 05f95f813e55..82612eb8bd82 100644 --- a/services/core/java/com/android/server/wm/RootWindowContainer.java +++ b/services/core/java/com/android/server/wm/RootWindowContainer.java @@ -47,6 +47,7 @@ import static com.android.internal.protolog.ProtoLogGroup.WM_SHOW_SURFACE_ALLOC; import static com.android.server.policy.PhoneWindowManager.SYSTEM_DIALOG_REASON_ASSIST; import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_LAYOUT; import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; +import static com.android.server.wm.ActivityRecord.State.DESTROYED; import static com.android.server.wm.ActivityRecord.State.FINISHING; import static com.android.server.wm.ActivityRecord.State.PAUSED; import static com.android.server.wm.ActivityRecord.State.RESUMED; @@ -110,6 +111,7 @@ import android.hardware.power.Mode; import android.net.Uri; import android.os.Binder; import android.os.Debug; +import android.os.DeviceIntegrationUtils; import android.os.FactoryTest; import android.os.Handler; import android.os.IBinder; @@ -125,6 +127,7 @@ import android.provider.Settings; import android.service.voice.IVoiceInteractionSession; import android.util.ArrayMap; import android.util.ArraySet; +import android.util.BoostFramework; import android.util.IntArray; import android.util.Pair; import android.util.Slog; @@ -165,7 +168,7 @@ import java.util.function.Consumer; import java.util.function.Predicate; /** Root {@link WindowContainer} for the device. */ -class RootWindowContainer extends WindowContainer<DisplayContent> +public class RootWindowContainer extends WindowContainer<DisplayContent> implements DisplayManager.DisplayListener { private static final String TAG = TAG_WITH_CLASS_NAME ? "RootWindowContainer" : TAG_WM; @@ -240,6 +243,12 @@ class RootWindowContainer extends WindowContainer<DisplayContent> @NonNull private final DisplayRotationCoordinator mDisplayRotationCoordinator; + public static boolean mPerfSendTapHint = false; + public static boolean mIsPerfBoostAcquired = false; + public static int mPerfHandle = -1; + public BoostFramework mPerfBoost = null; + public BoostFramework mUxPerf = null; + /** Reference to default display so we can quickly look it up. */ private DisplayContent mDefaultDisplay; private final SparseArray<IntArray> mDisplayAccessUIDs = new SparseArray<>(); @@ -1794,7 +1803,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> } @Nullable - Task getTopDisplayFocusedRootTask() { + public Task getTopDisplayFocusedRootTask() { for (int i = getChildCount() - 1; i >= 0; --i) { final Task focusedRootTask = getChildAt(i).getFocusedRootTask(); if (focusedRootTask != null) { @@ -2207,15 +2216,95 @@ class RootWindowContainer extends WindowContainer<DisplayContent> } } + void acquireAppLaunchPerfLock(ActivityRecord r) { + /* Acquire perf lock during new app launch */ + if (mPerfBoost == null) { + mPerfBoost = new BoostFramework(); + } + if (mPerfBoost != null) { + int pkgType = mPerfBoost.perfGetFeedback(BoostFramework.VENDOR_FEEDBACK_WORKLOAD_TYPE, + r.packageName); + int wpcPid = -1; + if (mService != null && r != null && r.info != null && r.info.applicationInfo !=null) { + final WindowProcessController wpc = + mService.getProcessController(r.processName, r.info.applicationInfo.uid); + if (wpc != null && wpc.hasThread()) { + //If target process didn't start yet, + // this operation will be done when app call attach + wpcPid = wpc.getPid(); + } + } + if (mPerfBoost.getPerfHalVersion() >= BoostFramework.PERF_HAL_V23) { + mPerfBoost.perfHintAcqRel(-1, BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, -1, BoostFramework.Launch.BOOST_V1, 2, pkgType, wpcPid); + mPerfSendTapHint = true; + mPerfBoost.perfHintAcqRel(-1, BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, -1, BoostFramework.Launch.BOOST_V2, 2, pkgType, wpcPid); + if (wpcPid != -1) { + mPerfBoost.perfHintAcqRel(-1, + BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, wpcPid, + BoostFramework.Launch.TYPE_ATTACH_APPLICATION, 2, pkgType, wpcPid); + } + + if (pkgType == BoostFramework.WorkloadType.GAME) + { + mPerfHandle = mPerfBoost.perfHintAcqRel(-1, + BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, -1, BoostFramework.Launch.BOOST_GAME, 2, pkgType, wpcPid); + } else { + mPerfHandle = mPerfBoost.perfHintAcqRel(-1, + BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, -1, BoostFramework.Launch.BOOST_V3, 2, pkgType, wpcPid); + } + } else { + mPerfBoost.perfHint(BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, r.packageName, + -1, BoostFramework.Launch.BOOST_V1); + mPerfSendTapHint = true; + mPerfBoost.perfHint(BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, -1, BoostFramework.Launch.BOOST_V2); + if (wpcPid != -1) { + mPerfBoost.perfHint( + BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, wpcPid, + BoostFramework.Launch.TYPE_ATTACH_APPLICATION); + } + + if (pkgType == BoostFramework.WorkloadType.GAME) + { + mPerfHandle = mPerfBoost.perfHint( + BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, -1, BoostFramework.Launch.BOOST_GAME); + } else { + mPerfHandle = mPerfBoost.perfHint( + BoostFramework.VENDOR_HINT_FIRST_LAUNCH_BOOST, + r.packageName, -1, BoostFramework.Launch.BOOST_V3); + } + } + if (mPerfHandle > 0) + mIsPerfBoostAcquired = true; + // Start IOP + if(r.info.applicationInfo != null && + r.info.applicationInfo.sourceDir != null) { + if (mPerfBoost.board_first_api_lvl < BoostFramework.VENDOR_T_API_LEVEL && + mPerfBoost.board_api_lvl < BoostFramework.VENDOR_T_API_LEVEL) { + mPerfBoost.perfIOPrefetchStart(-1,r.packageName, + r.info.applicationInfo.sourceDir.substring( + 0, r.info.applicationInfo.sourceDir.lastIndexOf('/'))); + } + } + } + } + @Nullable ActivityRecord findTask(ActivityRecord r, TaskDisplayArea preferredTaskDisplayArea) { return findTask(r.getActivityType(), r.taskAffinity, r.intent, r.info, - preferredTaskDisplayArea); + preferredTaskDisplayArea, r); } @Nullable ActivityRecord findTask(int activityType, String taskAffinity, Intent intent, ActivityInfo info, - TaskDisplayArea preferredTaskDisplayArea) { + TaskDisplayArea preferredTaskDisplayArea, ActivityRecord r) { ProtoLog.d(WM_DEBUG_TASKS, "Looking for task of type=%s, taskAffinity=%s, intent=%s" + ", info=%s, preferredTDA=%s", activityType, taskAffinity, intent, info, preferredTaskDisplayArea); @@ -2226,12 +2315,39 @@ class RootWindowContainer extends WindowContainer<DisplayContent> if (preferredTaskDisplayArea != null) { mTmpFindTaskResult.process(preferredTaskDisplayArea); if (mTmpFindTaskResult.mIdealRecord != null) { + if(mTmpFindTaskResult.mIdealRecord.getState() == DESTROYED) { + /*It's a new app launch */ + acquireAppLaunchPerfLock(r); + } + + if(mTmpFindTaskResult.mIdealRecord.getState() == STOPPED) { + /*Warm launch */ + mUxPerf = new BoostFramework(); + if (mUxPerf != null) { + if (mUxPerf.board_first_api_lvl < BoostFramework.VENDOR_T_API_LEVEL && + mUxPerf.board_api_lvl < BoostFramework.VENDOR_T_API_LEVEL) { + mUxPerf.perfUXEngine_events(BoostFramework.UXE_EVENT_SUB_LAUNCH, 0, r.packageName, 0); + } else { + mUxPerf.perfEvent(BoostFramework.VENDOR_HINT_WARM_LAUNCH, r.packageName, 2, 0, 0); + } + } + } return mTmpFindTaskResult.mIdealRecord; } else if (mTmpFindTaskResult.mCandidateRecord != null) { candidateActivity = mTmpFindTaskResult.mCandidateRecord; } } + /* Acquire perf lock *only* during new app launch */ + if ((mTmpFindTaskResult.mIdealRecord == null) || + (mTmpFindTaskResult.mIdealRecord.getState() == DESTROYED)) { + if (r != null && r.isMainIntent(r.intent)) { + acquireAppLaunchPerfLock(r); + } else if (r == null) { + Slog.w(TAG, "Should not happen! Didn't apply launch boost"); + } + } + final ActivityRecord idealMatchActivity = getItemFromTaskDisplayAreas(taskDisplayArea -> { if (taskDisplayArea == preferredTaskDisplayArea) { return null; @@ -2240,6 +2356,14 @@ class RootWindowContainer extends WindowContainer<DisplayContent> mTmpFindTaskResult.process(taskDisplayArea); if (mTmpFindTaskResult.mIdealRecord != null) { return mTmpFindTaskResult.mIdealRecord; + } else if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && mTmpFindTaskResult.mCandidateRecord != null + && mService.getRemoteTaskManager(). + findTaskOnlyForLaunch( + intent, + taskAffinity, + mTmpFindTaskResult.mCandidateRecord.getTask().mTaskId)) { + return mTmpFindTaskResult.mCandidateRecord; } return null; }); diff --git a/services/core/java/com/android/server/wm/ScreenRotationAnimation.java b/services/core/java/com/android/server/wm/ScreenRotationAnimation.java index bbb85636f1ee..3b67b07ad7de 100644 --- a/services/core/java/com/android/server/wm/ScreenRotationAnimation.java +++ b/services/core/java/com/android/server/wm/ScreenRotationAnimation.java @@ -42,6 +42,7 @@ import android.graphics.Rect; import android.hardware.HardwareBuffer; import android.os.IBinder; import android.os.Trace; +import android.util.BoostFramework; import android.util.Slog; import android.util.proto.ProtoOutputStream; import android.view.DisplayAddress; @@ -94,6 +95,9 @@ import java.io.PrintWriter; class ScreenRotationAnimation { private static final String TAG = TAG_WITH_CLASS_NAME ? "ScreenRotationAnimation" : TAG_WM; + private BoostFramework mPerf = null; + private boolean mIsPerfLockAcquired = false; + private final Context mContext; private final DisplayContent mDisplayContent; private final float[] mTmpFloats = new float[9]; @@ -143,6 +147,8 @@ class ScreenRotationAnimation { final int width = currentBounds.width(); final int height = currentBounds.height(); + mPerf = new BoostFramework(); + // Screenshot does NOT include rotation! final DisplayInfo displayInfo = displayContent.getDisplayInfo(); final int realOriginalRotation = displayInfo.rotation; @@ -492,6 +498,10 @@ class ScreenRotationAnimation { finalWidth, finalHeight); startAnimation(t, maxAnimationDuration, animationScale, finalWidth, finalHeight, exitAnim, enterAnim); + if (mPerf != null && !mIsPerfLockAcquired) { + mPerf.perfHint(BoostFramework.VENDOR_HINT_ROTATION_ANIM_BOOST, null); + mIsPerfLockAcquired = true; + } } if (!mStarted) { return false; @@ -558,6 +568,11 @@ class ScreenRotationAnimation { mRotateAlphaAnimation.cancel(); mRotateAlphaAnimation = null; } + + if (mPerf != null && mIsPerfLockAcquired) { + mPerf.perfLockRelease(); + mIsPerfLockAcquired = false; + } } public boolean isAnimating() { diff --git a/services/core/java/com/android/server/wm/SystemGesturesPointerEventListener.java b/services/core/java/com/android/server/wm/SystemGesturesPointerEventListener.java index 878b33fa55ef..52c5828abad5 100644 --- a/services/core/java/com/android/server/wm/SystemGesturesPointerEventListener.java +++ b/services/core/java/com/android/server/wm/SystemGesturesPointerEventListener.java @@ -83,6 +83,7 @@ class SystemGesturesPointerEventListener implements PointerEventListener { private boolean mMouseHoveringAtRight; private boolean mMouseHoveringAtBottom; private long mLastFlingTime; + private boolean mScrollFired; SystemGesturesPointerEventListener(Context context, Handler handler, Callbacks callbacks) { mContext = checkNull("context", context); @@ -175,6 +176,7 @@ class SystemGesturesPointerEventListener implements PointerEventListener { case MotionEvent.ACTION_DOWN: mSwipeFireable = true; mDebugFireable = true; + mScrollFired = false; mDownPointers = 0; captureDown(event, 0); if (mMouseHoveringAtLeft) { @@ -262,6 +264,9 @@ class SystemGesturesPointerEventListener implements PointerEventListener { case MotionEvent.ACTION_CANCEL: mSwipeFireable = false; mDebugFireable = false; + if (mScrollFired) + mCallbacks.onScroll(false); + mScrollFired = false; mCallbacks.onUpOrCancel(); break; default: @@ -393,10 +398,25 @@ class SystemGesturesPointerEventListener implements PointerEventListener { if (duration > MAX_FLING_TIME_MILLIS) { duration = MAX_FLING_TIME_MILLIS; } + if(Math.abs(velocityY) >= Math.abs(velocityX)) + mCallbacks.onVerticalFling(duration); + else + mCallbacks.onHorizontalFling(duration); + mLastFlingTime = now; mCallbacks.onFling(duration); return true; } + + @Override + public boolean onScroll(MotionEvent e1, MotionEvent e2, + float distanceX, float distanceY) { + if (!mScrollFired) { + mCallbacks.onScroll(true); + mScrollFired = true; + } + return true; + } } interface Callbacks { @@ -405,6 +425,9 @@ class SystemGesturesPointerEventListener implements PointerEventListener { void onSwipeFromRight(); void onSwipeFromLeft(); void onFling(int durationMs); + void onVerticalFling(int durationMs); + void onHorizontalFling(int durationMs); + void onScroll(boolean started); void onDown(); void onUpOrCancel(); void onMouseHoverAtLeft(); diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java index ceb80d6a1a8b..56390aab6b9b 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -16,6 +16,7 @@ package com.android.server.wm; +import static android.app.RemoteTaskConstants.FLAG_TASK_LAUNCH_SCENARIO_COMMON; import static android.app.ActivityManager.isStartResultSuccessful; import static android.app.ActivityTaskManager.INVALID_TASK_ID; import static android.app.ActivityTaskManager.INVALID_WINDOWING_MODE; @@ -36,6 +37,7 @@ import static android.content.Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS; import static android.content.Intent.FLAG_ACTIVITY_TASK_ON_HOME; import static android.content.pm.ActivityInfo.CONFIG_SCREEN_LAYOUT; import static android.content.pm.ActivityInfo.FLAG_RELINQUISH_TASK_IDENTITY; +import static android.content.pm.ActivityInfo.FLAG_RESUME_WHILE_PAUSING; import static android.content.pm.ActivityInfo.FLAG_SHOW_FOR_ALL_USERS; import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZABLE_LANDSCAPE_ONLY; import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZABLE_PORTRAIT_ONLY; @@ -45,6 +47,7 @@ import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE; import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE_AND_PIPABLE_DEPRECATED; import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION; import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSET; + import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER; import static android.provider.Settings.Secure.USER_SETUP_COMPLETE; import static android.view.Display.DEFAULT_DISPLAY; @@ -141,6 +144,7 @@ import android.app.IActivityController; import android.app.PictureInPictureParams; import android.app.TaskInfo; import android.app.WindowConfiguration; +import android.app.servertransaction.PauseActivityItem; import android.content.ComponentName; import android.content.Intent; import android.content.pm.ActivityInfo; @@ -154,6 +158,7 @@ import android.graphics.Point; import android.graphics.Rect; import android.os.Binder; import android.os.Debug; +import android.os.DeviceIntegrationUtils; import android.os.Handler; import android.os.IBinder; import android.os.Looper; @@ -166,6 +171,7 @@ import android.os.UserHandle; import android.provider.Settings; import android.service.voice.IVoiceInteractionSession; import android.util.ArraySet; +import android.util.BoostFramework; import android.util.DisplayMetrics; import android.util.Slog; import android.util.proto.ProtoOutputStream; @@ -365,6 +371,9 @@ class Task extends TaskFragment { * user wants to return to it. */ private WindowProcessController mRootProcess; + /** The process id that hosted the root activity of this task for remote task check. 0 if none*/ + private int mRemoteTaskPid; + /** Takes on same value as first root activity */ boolean isPersistable = false; int maxRecents; @@ -403,6 +412,8 @@ class Task extends TaskFragment { String mCallingPackage; String mCallingFeatureId; + int mLaunchScenario; + private static final Rect sTmpBounds = new Rect(); // Last non-fullscreen bounds the task was launched in or resized to. @@ -509,6 +520,9 @@ class Task extends TaskFragment { */ boolean mReparentLeafTaskIfRelaunch; + // Device Integration: Allow task reparent to a new display or not. Remote Task is not allow to reparent. + boolean mAllowReparent = true; + private final AnimatingActivityRegistry mAnimatingActivityRegistry = new AnimatingActivityRegistry(); @@ -516,6 +530,9 @@ class Task extends TaskFragment { private final Handler mHandler; + private static final ActivityPluginDelegate mActivityPluginDelegate = + new ActivityPluginDelegate(); + private class ActivityTaskHandler extends Handler { ActivityTaskHandler(Looper looper) { @@ -667,6 +684,9 @@ class Task extends TaskFragment { mCallingUid = callingUid; mCallingPackage = callingPackage; mCallingFeatureId = callingFeatureId; + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + mLaunchScenario = FLAG_TASK_LAUNCH_SCENARIO_COMMON; + } mResizeMode = resizeMode; if (info != null) { setIntent(_intent, info); @@ -731,6 +751,9 @@ class Task extends TaskFragment { } removeIfPossible("cleanUpResourcesForDestroy"); + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + mAtmService.getRemoteTaskManager().handleRemoveTask(this); + } } @VisibleForTesting @@ -2320,6 +2343,13 @@ class Task extends TaskFragment { mRootProcess = proc; mRootProcess.addRecentTask(this); } + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + mRemoteTaskPid = proc.getPid(); + } + } + + int getRemoteTaskPid() { + return mRemoteTaskPid; } void clearRootProcess() { @@ -2701,6 +2731,15 @@ class Task extends TaskFragment { } @Override + void reparent(WindowContainer newParent, int position) { + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && !mAllowReparent) { + return; + } + super.reparent(newParent, position); + } + + @Override void onDisplayChanged(DisplayContent dc) { final boolean isRootTask = isRootTask(); if (!isRootTask && !mCreatedByOrganizer) { @@ -5032,13 +5071,11 @@ class Task extends TaskFragment { // Not ready yet! return false; } - final ActivityRecord topActivity = topRunningActivity(true /* focusableOnly */); if (topActivity == null) { // There are no activities left in this task, let's look somewhere else. return resumeNextFocusableActivityWhenRootTaskIsEmpty(prev, options); } - final boolean[] resumed = new boolean[1]; final TaskFragment topFragment = topActivity.getTaskFragment(); resumed[0] = topFragment.resumeTopActivity(prev, options, deferPause); @@ -5120,6 +5157,10 @@ class Task extends TaskFragment { ProtoLog.i(WM_DEBUG_ADD_REMOVE, "Adding activity %s to task %s " + "callers: %s", r, task, new RuntimeException("here").fillInStackTrace()); + if (mActivityPluginDelegate != null) { + mActivityPluginDelegate.activityInvokeNotification + (r.info.packageName, getWindowingMode() == WINDOWING_MODE_FULLSCREEN); + } if (isActivityTypeHomeOrRecents() && getActivityBelow(r) == null) { // If this is the first activity, don't do any fancy animations, // because there is nothing for it to animate on top of. @@ -6117,6 +6158,13 @@ class Task extends TaskFragment { return mAnimatingActivityRegistry; } + public void onARStopTriggered(ActivityRecord r) { + if (mActivityPluginDelegate != null && getWindowingMode() != WINDOWING_MODE_UNDEFINED) { + mActivityPluginDelegate.activitySuspendNotification + (r.info.applicationInfo.packageName, getWindowingMode() == WINDOWING_MODE_FULLSCREEN, false); + } + } + @Override void executeAppTransition(ActivityOptions options) { mDisplayContent.executeAppTransition(); diff --git a/services/core/java/com/android/server/wm/TaskDisplayArea.java b/services/core/java/com/android/server/wm/TaskDisplayArea.java index e80cbb302424..8a9f9ba9488f 100644..100755 --- a/services/core/java/com/android/server/wm/TaskDisplayArea.java +++ b/services/core/java/com/android/server/wm/TaskDisplayArea.java @@ -30,7 +30,9 @@ import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSET; import static android.content.res.Configuration.ORIENTATION_LANDSCAPE; import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_ORIENTATION; +import static com.android.server.wm.ActivityRecord.State.DESTROYED; import static com.android.server.wm.ActivityRecord.State.RESUMED; +import static com.android.server.wm.ActivityRecord.State.STOPPED; import static com.android.server.wm.ActivityTaskManagerService.TAG_ROOT_TASK; import static com.android.server.wm.DisplayContent.alwaysCreateRootTask; import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ROOT_TASK; diff --git a/services/core/java/com/android/server/wm/TaskFragment.java b/services/core/java/com/android/server/wm/TaskFragment.java index 0c1f33ccedbc..1bdb762a9817 100644 --- a/services/core/java/com/android/server/wm/TaskFragment.java +++ b/services/core/java/com/android/server/wm/TaskFragment.java @@ -88,6 +88,7 @@ import android.hardware.HardwareBuffer; import android.os.IBinder; import android.os.RemoteException; import android.os.UserHandle; +import android.util.BoostFramework; import android.util.DisplayMetrics; import android.util.Slog; import android.util.proto.ProtoOutputStream; @@ -101,6 +102,7 @@ import android.window.TaskFragmentInfo; import android.window.TaskFragmentOrganizerToken; import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.app.ActivityTrigger; import com.android.internal.protolog.common.ProtoLog; import com.android.server.am.HostingRecord; import com.android.server.pm.pkg.AndroidPackage; @@ -197,6 +199,10 @@ class TaskFragment extends WindowContainer<WindowContainer> { final RootWindowContainer mRootWindowContainer; private final TaskFragmentOrganizerController mTaskFragmentOrganizerController; + public BoostFramework mPerf = null; + //ActivityTrigger + static final ActivityTrigger mActivityTrigger = new ActivityTrigger(); + // TODO(b/233177466): Move mMinWidth and mMinHeight to Task and remove usages in TaskFragment /** * Minimal width of this task fragment when it's resizeable. {@link #INVALID_MIN_SIZE} means it @@ -1225,8 +1231,18 @@ class TaskFragment extends WindowContainer<WindowContainer> { // appropriate for it. mTaskSupervisor.mStoppingActivities.remove(next); + if (!next.translucentWindowLaunch) + next.launching = true; + if (DEBUG_SWITCH) Slog.v(TAG_SWITCH, "Resuming " + next); + //Trigger Activity Resume + if (mActivityTrigger != null) { + mActivityTrigger.activityResumeTrigger(next.intent, next.info, + next.info.applicationInfo, + next.occludesParent()); + } + mTaskSupervisor.setLaunchSource(next.info.applicationInfo.uid); ActivityRecord lastResumed = null; @@ -1329,6 +1345,11 @@ class TaskFragment extends WindowContainer<WindowContainer> { // to ignore it when computing the desired screen orientation. boolean anim = true; final DisplayContent dc = taskDisplayArea.mDisplayContent; + + if (mPerf == null) { + mPerf = new BoostFramework(); + } + if (prev != null) { if (prev.finishing) { if (DEBUG_TRANSITION) { @@ -1338,6 +1359,10 @@ class TaskFragment extends WindowContainer<WindowContainer> { anim = false; dc.prepareAppTransition(TRANSIT_NONE); } else { + if(prev.getTask() != next.getTask() && mPerf != null) { + mPerf.perfHint(BoostFramework.VENDOR_HINT_ANIM_BOOST, + next.packageName); + } dc.prepareAppTransition(TRANSIT_CLOSE); } prev.setVisibility(false); @@ -1349,6 +1374,10 @@ class TaskFragment extends WindowContainer<WindowContainer> { anim = false; dc.prepareAppTransition(TRANSIT_NONE); } else { + if(prev.getTask() != next.getTask() && mPerf != null) { + mPerf.perfHint(BoostFramework.VENDOR_HINT_ANIM_BOOST, + next.packageName); + } dc.prepareAppTransition(TRANSIT_OPEN, next.mLaunchTaskBehind ? TRANSIT_FLAG_OPEN_BEHIND : 0); } @@ -1360,6 +1389,10 @@ class TaskFragment extends WindowContainer<WindowContainer> { dc.prepareAppTransition(TRANSIT_NONE); } else { dc.prepareAppTransition(TRANSIT_OPEN); + // Exit app animation boost + if (next != null && mPerf != null) { + mPerf.perfHint(BoostFramework.VENDOR_HINT_EXIT_ANIM_BOOST, next.packageName); + } } } @@ -1612,6 +1645,18 @@ class TaskFragment extends WindowContainer<WindowContainer> { return false; } + //Trigger Activity Pause + if (mActivityTrigger != null) { + mActivityTrigger.activityPauseTrigger(prev.intent, prev.info, + prev.info.applicationInfo); + } + + if (mAtmService.getToastWindow() == true) { + // When we have a toast window, that activity will be translucent. + prev.translucentWindowLaunch = true; + mAtmService.resetToastWindow(); + } + ProtoLog.v(WM_DEBUG_STATES, "Moving to PAUSING: %s", prev); mPausingActivity = prev; mLastPausedActivity = prev; diff --git a/services/core/java/com/android/server/wm/TaskLaunchParamsModifier.java b/services/core/java/com/android/server/wm/TaskLaunchParamsModifier.java index ad46770432a1..0c844319bc73 100644 --- a/services/core/java/com/android/server/wm/TaskLaunchParamsModifier.java +++ b/services/core/java/com/android/server/wm/TaskLaunchParamsModifier.java @@ -48,6 +48,7 @@ import android.app.WindowConfiguration; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.graphics.Rect; +import android.os.DeviceIntegrationUtils; import android.util.Size; import android.util.Slog; import android.view.Gravity; @@ -128,8 +129,19 @@ class TaskLaunchParamsModifier implements LaunchParamsModifier { } // STEP 1: Determine the suggested display area to launch the activity/task. - final TaskDisplayArea suggestedDisplayArea = getPreferredLaunchTaskDisplayArea(task, + TaskDisplayArea suggestedDisplayArea = getPreferredLaunchTaskDisplayArea(task, options, source, currentParams, activity, request); + + // Device Integration: We need to find out whether this task should show in VD, if so, replace the + // TaskDisplayArea. getPreferredLaunchTaskDisplayArea() can't find proper TaskDisplayArea when + // an app opens in VD want to start a new activity with FLAG_ACTIVITY_NEW_TASK. That's why we need to do some + // extra check here + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + suggestedDisplayArea + = mSupervisor.mService.getRemoteTaskManager().queryPreferredDisplayArea( + task, suggestedDisplayArea, activity.intent, source, activity, options); + } + outParams.mPreferredTaskDisplayArea = suggestedDisplayArea; final DisplayContent display = suggestedDisplayArea.mDisplayContent; if (DEBUG) { diff --git a/services/core/java/com/android/server/wm/TaskTapPointerEventListener.java b/services/core/java/com/android/server/wm/TaskTapPointerEventListener.java index 7d22b744ad5f..2cf882c4872c 100644 --- a/services/core/java/com/android/server/wm/TaskTapPointerEventListener.java +++ b/services/core/java/com/android/server/wm/TaskTapPointerEventListener.java @@ -30,6 +30,10 @@ import android.view.MotionEvent; import android.view.WindowManagerPolicyConstants.PointerEventListener; import com.android.server.wm.WindowManagerService.H; +import com.android.server.am.ActivityManagerService; +import com.android.server.wm.ActivityTaskSupervisor; +import com.android.server.wm.DisplayContent; +import android.util.BoostFramework; /** * 1. Adjust the top most focus display if touch down on some display. @@ -42,11 +46,15 @@ public class TaskTapPointerEventListener implements PointerEventListener { private final DisplayContent mDisplayContent; private final Rect mTmpRect = new Rect(); private int mPointerIconType = TYPE_NOT_SPECIFIED; + public BoostFramework mPerfObj = null; public TaskTapPointerEventListener(WindowManagerService service, DisplayContent displayContent) { mService = service; mDisplayContent = displayContent; + if (mPerfObj == null) { + mPerfObj = new BoostFramework(); + } } private void restorePointerIcon(int x, int y) { @@ -130,6 +138,29 @@ public class TaskTapPointerEventListener implements PointerEventListener { } break; } + if (ActivityTaskSupervisor.mIsPerfBoostAcquired && (mPerfObj != null)) { + if (ActivityTaskSupervisor.mPerfHandle > 0) { + mPerfObj.perfLockReleaseHandler(ActivityTaskSupervisor.mPerfHandle); + ActivityTaskSupervisor.mPerfHandle = -1; + } + ActivityTaskSupervisor.mIsPerfBoostAcquired = false; + } + if (ActivityTaskSupervisor.mPerfSendTapHint && (mPerfObj != null)) { + mPerfObj.perfHint(BoostFramework.VENDOR_HINT_TAP_EVENT, null); + ActivityTaskSupervisor.mPerfSendTapHint = false; + } + if (RootWindowContainer.mIsPerfBoostAcquired && (mPerfObj != null)) { + if (RootWindowContainer.mPerfHandle > 0) { + mPerfObj.perfLockReleaseHandler( + RootWindowContainer.mPerfHandle); + RootWindowContainer.mPerfHandle = -1; + } + RootWindowContainer.mIsPerfBoostAcquired = false; + } + if (RootWindowContainer.mPerfSendTapHint && (mPerfObj != null)) { + mPerfObj.perfHint(BoostFramework.VENDOR_HINT_TAP_EVENT, null); + RootWindowContainer.mPerfSendTapHint = false; + } } void setTouchExcludeRegion(Region newRegion) { diff --git a/services/core/java/com/android/server/wm/Transition.java b/services/core/java/com/android/server/wm/Transition.java index 65c5c9b35ab7..46d5e3b4b803 100644 --- a/services/core/java/com/android/server/wm/Transition.java +++ b/services/core/java/com/android/server/wm/Transition.java @@ -83,6 +83,7 @@ import android.os.SystemClock; import android.os.Trace; import android.util.ArrayMap; import android.util.ArraySet; +import android.util.BoostFramework; import android.util.Slog; import android.util.SparseArray; import android.view.Display; @@ -177,6 +178,10 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { private SurfaceControl.Transaction mStartTransaction = null; private SurfaceControl.Transaction mFinishTransaction = null; + /** Perf **/ + private BoostFramework mPerf = null; + private boolean mIsAnimationPerfLockAcquired = false; + /** Used for failsafe clean-up to prevent leaks due to misbehaving player impls. */ private SurfaceControl.Transaction mCleanupTransaction = null; @@ -313,6 +318,10 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { mLogger.mCreateWallTimeMs = System.currentTimeMillis(); mLogger.mCreateTimeNs = SystemClock.elapsedRealtimeNanos(); + + if (mPerf == null) { + mPerf = new BoostFramework(); + } } @Nullable @@ -565,6 +574,12 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { return; } mState = STATE_STARTED; + + if (mPerf != null && mType == TRANSIT_CHANGE) { + mPerf.perfHint(BoostFramework.VENDOR_HINT_ROTATION_ANIM_BOOST, null); + mIsAnimationPerfLockAcquired = true; + } + ProtoLog.v(ProtoLogGroup.WM_DEBUG_WINDOW_TRANSITIONS, "Starting Transition %d", mSyncId); applyReady(); @@ -1325,6 +1340,10 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener { validateVisibility(); mState = STATE_FINISHED; + if (mPerf != null && mIsAnimationPerfLockAcquired) { + mPerf.perfLockRelease(); + mIsAnimationPerfLockAcquired = false; + } // Rotation change may be deferred while there is a display change transition, so check // again in case there is a new pending change. if (hasParticipatedDisplay && !mController.useShellTransitionsRotation()) { diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 10687001f9a8..52505c39bcf7 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -198,6 +198,7 @@ import android.os.Binder; import android.os.Build; import android.os.Bundle; import android.os.Debug; +import android.os.DeviceIntegrationUtils; import android.os.Handler; import android.os.HandlerExecutor; import android.os.IBinder; @@ -231,6 +232,7 @@ import android.sysprop.SurfaceFlingerProperties; import android.text.format.DateUtils; import android.util.ArrayMap; import android.util.ArraySet; +import android.util.BoostFramework; import android.util.DisplayMetrics; import android.util.EventLog; import android.util.MergedConfiguration; @@ -374,6 +376,8 @@ public class WindowManagerService extends IWindowManager.Stub static final int LAYOUT_REPEAT_THRESHOLD = 4; static final boolean PROFILE_ORIENTATION = false; + static WindowState mFocusingWindow; + String mFocusingActivity; /** The maximum length we will accept for a loaded animation duration: * this is 10 seconds. @@ -457,6 +461,8 @@ public class WindowManagerService extends IWindowManager.Stub private final DisplayAreaPolicy.Provider mDisplayAreaPolicyProvider; + private BoostFramework mPerf = null; + final private KeyguardDisableHandler mKeyguardDisableHandler; private final RemoteCallbackList<IKeyguardLockedStateListener> mKeyguardLockedStateListeners = @@ -1679,6 +1685,7 @@ public class WindowManagerService extends IWindowManager.Stub // UID, otherwise we allow unlimited duration. When a UID looses focus we // schedule hiding all of its toast windows. if (type == TYPE_TOAST) { + mAtmService.setToastWindow(); if (!displayContent.canAddToastWindowForUid(callingUid)) { ProtoLog.w(WM_ERROR, "Adding more than one toast window for UID at a time."); return WindowManagerGlobal.ADD_DUPLICATE_ADD; @@ -1744,6 +1751,11 @@ public class WindowManagerService extends IWindowManager.Stub mWindowMap.put(client.asBinder(), win); win.initAppOpsState(); + // Device Integration: add black window if match + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + BlackScreenWindowManager.getInstance().onWindowAdded(win); + } + final boolean suspended = mPmInternal.isPackageSuspended(win.getOwningPackage(), UserHandle.getUserId(win.getOwningUid())); win.setHiddenWhileSuspended(suspended); @@ -1993,6 +2005,11 @@ public class WindowManagerService extends IWindowManager.Stub ProtoLog.v(WM_DEBUG_ADD_REMOVE, "postWindowRemoveCleanupLocked: %s", win); mWindowMap.remove(win.mClient.asBinder()); + // Device Integration: Remove black screen if match + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + BlackScreenWindowManager.getInstance().onWindowRemoved(win); + } + final DisplayContent dc = win.getDisplayContent(); dc.getDisplayRotation().markForSeamlessRotation(win, false /* seamlesslyRotated */); @@ -3465,12 +3482,28 @@ public class WindowManagerService extends IWindowManager.Stub ValueAnimator.setDurationScale(scale); } + private float animationScalesCheck (int which) { + float value = -1.0f; + if (!mAnimationsDisabled) { + if (value == -1.0f) { + switch (which) { + case WINDOW_ANIMATION_SCALE: value = mWindowAnimationScaleSetting; break; + case TRANSITION_ANIMATION_SCALE: value = mTransitionAnimationScaleSetting; break; + case ANIMATION_DURATION_SCALE: value = mAnimatorDurationScaleSetting; break; + } + } + } else { + value = 0; + } + return value; + } + public float getWindowAnimationScaleLocked() { - return mAnimationsDisabled ? 0 : mWindowAnimationScaleSetting; + return animationScalesCheck(WINDOW_ANIMATION_SCALE); } public float getTransitionAnimationScaleLocked() { - return mAnimationsDisabled ? 0 : mTransitionAnimationScaleSetting; + return animationScalesCheck(TRANSITION_ANIMATION_SCALE); } @Override @@ -6206,6 +6239,12 @@ public class WindowManagerService extends IWindowManager.Stub } mLatencyTracker.onActionStart(ACTION_ROTATE_SCREEN); + if (mPerf == null) { + mPerf = new BoostFramework(); + } + if (mPerf != null) { + mPerf.perfHint(BoostFramework.VENDOR_HINT_ROTATION_LATENCY_BOOST, null); + } mExitAnimId = exitAnim; mEnterAnimId = enterAnim; @@ -6328,6 +6367,9 @@ public class WindowManagerService extends IWindowManager.Stub } mAtmService.endLaunchPowerMode(POWER_MODE_REASON_CHANGE_DISPLAY); mLatencyTracker.onActionEnd(ACTION_ROTATE_SCREEN); + if (mPerf != null) { + mPerf.perfLockRelease(); + } } static int getPropertyInt(String[] tokens, int index, int defUnits, int defDps, diff --git a/services/core/java/com/android/server/wm/WindowProcessController.java b/services/core/java/com/android/server/wm/WindowProcessController.java index d7d2b4e9dde2..60a8499b3233 100644 --- a/services/core/java/com/android/server/wm/WindowProcessController.java +++ b/services/core/java/com/android/server/wm/WindowProcessController.java @@ -65,6 +65,7 @@ import android.content.pm.ServiceInfo; import android.content.res.Configuration; import android.os.Binder; import android.os.Build; +import android.os.DeviceIntegrationUtils; import android.os.FactoryTest; import android.os.LocaleList; import android.os.Message; @@ -120,6 +121,8 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio // The process of this application; 0 if none private volatile int mPid; + // The real process of this application for remote task; never clear + private volatile int mRemoteTaskPid; // user of process. final int mUserId; // The owner of this window process controller object. Mainly for identification when we @@ -299,12 +302,20 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio public void setPid(int pid) { mPid = pid; + if(!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && pid != 0) { + mRemoteTaskPid = pid; + } } public int getPid() { return mPid; } + public int getRemoteTaskPid() { + return mRemoteTaskPid; + } + @HotPath(caller = HotPath.PROCESS_CHANGE) public void setThread(IApplicationThread thread) { synchronized (mAtm.mGlobalLockWithoutBoost) { @@ -584,6 +595,11 @@ public class WindowProcessController extends ConfigurationContainer<Configuratio mLastActivityFinishTime = finishTime; } + // Device Integration: return top ActivityRecord from this controller + ActivityRecord getTopActivity() { + return mActivities.isEmpty() ? null : mActivities.get(mActivities.size() - 1); + } + /** * @see BackgroundLaunchProcessController#addOrUpdateAllowBackgroundStartPrivileges(Binder, * BackgroundStartPrivileges) diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java index cdb3aa4c110d..e1f5537e72b0 100644 --- a/services/core/java/com/android/server/wm/WindowState.java +++ b/services/core/java/com/android/server/wm/WindowState.java @@ -91,6 +91,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_SEARCH_BAR; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_ADDITIONAL; import static android.view.WindowManager.LayoutParams.TYPE_STATUS_BAR_SUB_PANEL; +import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_BLACKSCREEN_OVERLAY; import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG; import static android.view.WindowManager.LayoutParams.TYPE_TOAST; import static android.view.WindowManager.LayoutParams.TYPE_VOLUME_OVERLAY; @@ -198,6 +199,7 @@ import android.gui.TouchOcclusionMode; import android.os.Binder; import android.os.Build; import android.os.Debug; +import android.os.DeviceIntegrationUtils; import android.os.IBinder; import android.os.PowerManager; import android.os.PowerManager.WakeReason; @@ -1102,7 +1104,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mContext = mWmService.mContext; DeathRecipient deathRecipient = new DeathRecipient(); mPowerManagerWrapper = powerManagerWrapper; - mForceSeamlesslyRotate = token.mRoundedCornerOverlay; + // Device Integration: This is to make phone screen not show our black screen + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + mForceSeamlesslyRotate = token.mRoundedCornerOverlay || mAttrs.type == TYPE_SYSTEM_BLACKSCREEN_OVERLAY; + } else { + mForceSeamlesslyRotate = token.mRoundedCornerOverlay; + } mInputWindowHandle = new InputWindowHandleWrapper(new InputWindowHandle( mActivityRecord != null ? mActivityRecord.getInputApplicationHandle(false /* update */) : null, diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java index 3aac816fcd7a..4127a29c904b 100644 --- a/services/core/java/com/android/server/wm/WindowStateAnimator.java +++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java @@ -21,6 +21,7 @@ import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CO import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; import static android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD; +import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_BLACKSCREEN_OVERLAY; import static android.view.WindowManager.TRANSIT_OLD_NONE; import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_ANIM; @@ -49,6 +50,7 @@ import android.content.Context; import android.graphics.PixelFormat; import android.graphics.Rect; import android.os.Debug; +import android.os.DeviceIntegrationUtils; import android.os.Trace; import android.util.Slog; import android.util.proto.ProtoOutputStream; @@ -290,7 +292,10 @@ class WindowStateAnimator { flags |= SurfaceControl.SECURE; } - if ((mWin.mAttrs.privateFlags & PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY) != 0) { + // Device Integration: This is to make screenshot not include our black screen + if ((mWin.mAttrs.privateFlags & PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY) != 0 + || (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && attrs.type == TYPE_SYSTEM_BLACKSCREEN_OVERLAY)) { flags |= SurfaceControl.SKIP_SCREENSHOT; } diff --git a/services/core/java/com/android/server/wm/WindowToken.java b/services/core/java/com/android/server/wm/WindowToken.java index 31afcbf26220..86987e2945ea 100644 --- a/services/core/java/com/android/server/wm/WindowToken.java +++ b/services/core/java/com/android/server/wm/WindowToken.java @@ -18,6 +18,7 @@ package com.android.server.wm; import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR; +import static android.view.WindowManager.LayoutParams.TYPE_SYSTEM_BLACKSCREEN_OVERLAY; import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_ADD_REMOVE; import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_APP_TRANSITIONS; @@ -39,6 +40,7 @@ import android.content.res.Configuration; import android.graphics.Rect; import android.os.Bundle; import android.os.Debug; +import android.os.DeviceIntegrationUtils; import android.os.IBinder; import android.util.proto.ProtoOutputStream; import android.view.DisplayInfo; @@ -388,7 +390,10 @@ class WindowToken extends WindowContainer<WindowState> { @Override SurfaceControl.Builder makeSurface() { final SurfaceControl.Builder builder = super.makeSurface(); - if (mRoundedCornerOverlay) { + // Device Integration: This is to make phone screen not show our black screen + if (mRoundedCornerOverlay + || (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION + && windowType == TYPE_SYSTEM_BLACKSCREEN_OVERLAY)) { builder.setParent(null); } return builder; diff --git a/services/core/jni/Android.bp b/services/core/jni/Android.bp index d5217c8295bd..ec5e7b54283f 100644 --- a/services/core/jni/Android.bp +++ b/services/core/jni/Android.bp @@ -73,6 +73,7 @@ cc_library_static { "com_android_server_pm_PackageManagerShellCommandDataLoader.cpp", "com_android_server_sensor_SensorService.cpp", "com_android_server_wm_TaskFpsCallbackController.cpp", + "com_android_server_activityTriggerService.cpp", "onload.cpp", ":lib_cachedAppOptimizer_native", ":lib_gameManagerService_native", diff --git a/services/core/jni/com_android_server_activityTriggerService.cpp b/services/core/jni/com_android_server_activityTriggerService.cpp new file mode 100644 index 000000000000..025091f76e38 --- /dev/null +++ b/services/core/jni/com_android_server_activityTriggerService.cpp @@ -0,0 +1,95 @@ +/* +* Copyright (c) 2019, The Linux Foundation. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials provided +* with the distribution. +* * Neither the name of The Linux Foundation nor the names of its +* contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#include "jni.h" +#include <nativehelper/JNIHelp.h> +#include "android_runtime/AndroidRuntime.h" +#include <utils/Log.h> +#include <dlfcn.h> +#include <limits.h> + +namespace android { + +//structure which has a handle for dynamically loading the trigger handler lib. + +typedef struct dlLibHandler { + void *handle; + void (*set_info)(const char*, const char*, int *); + const char *dlname; +}dlLibhandler; + +//initialize the handler +static dlLibHandler handler = { + NULL, NULL, "libtrigger-handler.so" +}; + +static void trigger_handler_lib_init() { + bool dlError = false; + handler.handle = dlopen(handler.dlname, RTLD_NOW | RTLD_LOCAL); + /*no need to proceed if the lib isn't available*/ + if(handler.handle == NULL) { + ALOGE("Activity trigger handling disabled."); + return; + } + *(void **) (&handler.set_info) = dlsym(handler.handle, "set_info"); + if(handler.set_info == NULL) { + dlError = true; + } + if(dlError) { + handler.set_info = NULL; + if(handler.handle) dlclose(handler.handle); + handler.handle = NULL; + } +} + +static void notifyAction_native (JNIEnv* env, jobject /*jclazz*/,jstring pkgName, jlong vCode, jstring /*procName*/, jint pid_in, jint flag) { + int pid = (int)pid_in; + std::string versionCode = std::to_string((long)vCode) + std::to_string((int)flag); + const char* version = versionCode.c_str(); + + if(pkgName && handler.set_info) { + const char *package = env->GetStringUTFChars(pkgName, NULL); + if(package) { + (*handler.set_info)(package,version,&pid); + env->ReleaseStringUTFChars(pkgName, package); + } + } +} + +static JNINativeMethod method_list[] = { + { "notifyAction_native", "(Ljava/lang/String;JLjava/lang/String;II)V", (void*)notifyAction_native }, +}; + +int register_android_server_ActivityTriggerService(JNIEnv *env) { + //load and link to the handler library + trigger_handler_lib_init(); + return jniRegisterNativeMethods(env, "com/android/server/ActivityTriggerService", + method_list, NELEM(method_list)); +} +}; diff --git a/services/core/jni/com_android_server_am_CachedAppOptimizer.cpp b/services/core/jni/com_android_server_am_CachedAppOptimizer.cpp index 0488247ec78b..7e607e9ef048 100644 --- a/services/core/jni/com_android_server_am_CachedAppOptimizer.cpp +++ b/services/core/jni/com_android_server_am_CachedAppOptimizer.cpp @@ -86,6 +86,8 @@ namespace android { // before starting next VMA batch static std::atomic<bool> cancelRunningCompaction; +static bool inSystemCompaction = false; + // A VmaBatch represents a set of VMAs that can be processed // as VMAs are processed by client code it is expected that the // VMAs get consumed which means they are discarded as they are @@ -333,12 +335,16 @@ static int getFilePageAdvice(const Vma& vma) { return -1; } static int getAnonPageAdvice(const Vma& vma) { - if (vma.inode == 0 && !vma.is_shared) { + if (vma.inode == 0) { return MADV_PAGEOUT; } return -1; } static int getAnyPageAdvice(const Vma& vma) { + if (inSystemCompaction == true) { + return MADV_PAGEOUT; + } + if (vma.inode == 0 && !vma.is_shared) { return MADV_PAGEOUT; } @@ -420,6 +426,8 @@ static void compactProcessOrFallback(int pid, int compactionFlags) { // Set when the system does not support process_madvise syscall to avoid // gathering VMAs in subsequent calls prior to falling back to procfs static bool shouldForceProcFs = false; + static std::once_flag checkProcFsFlag; + std::string compactionType; VmaToAdviseFunc vmaToAdviseFunc; @@ -436,6 +444,16 @@ static void compactProcessOrFallback(int pid, int compactionFlags) { vmaToAdviseFunc = getFilePageAdvice; } + // check once if per-process reclaim available + // we don't need to carry it forward once Kernel 5.4 becomes obsolete + std::call_once(checkProcFsFlag, []() { + FILE *fp = fopen("/proc/self/reclaim", "w"); + if (fp != NULL) { + fclose(fp); + shouldForceProcFs = true; + } + }); + if (shouldForceProcFs || compactProcess(pid, vmaToAdviseFunc) == -ENOSYS) { shouldForceProcFs = true; compactProcessProcfs(pid, compactionType); @@ -451,6 +469,7 @@ static void compactProcessOrFallback(int pid, int compactionFlags) { static void com_android_server_am_CachedAppOptimizer_compactSystem(JNIEnv *, jobject) { std::unique_ptr<DIR, decltype(&closedir)> proc(opendir("/proc"), closedir); struct dirent* current; + inSystemCompaction = true; while ((current = readdir(proc.get()))) { if (current->d_type != DT_DIR) { continue; @@ -479,6 +498,7 @@ static void com_android_server_am_CachedAppOptimizer_compactSystem(JNIEnv *, job compactProcessOrFallback(pid, COMPACT_ACTION_ANON_FLAG | COMPACT_ACTION_FILE_FLAG); } + inSystemCompaction = false; } static void com_android_server_am_CachedAppOptimizer_cancelCompaction(JNIEnv*, jobject) { diff --git a/services/core/jni/onload.cpp b/services/core/jni/onload.cpp index 290ad8de9547..d0fe3ef00d23 100644 --- a/services/core/jni/onload.cpp +++ b/services/core/jni/onload.cpp @@ -66,6 +66,7 @@ int register_android_server_app_GameManagerService(JNIEnv* env); int register_com_android_server_wm_TaskFpsCallbackController(JNIEnv* env); int register_com_android_server_display_DisplayControl(JNIEnv* env); int register_com_android_server_SystemClockTime(JNIEnv* env); +int register_android_server_ActivityTriggerService(JNIEnv* env); }; using namespace android; @@ -124,5 +125,6 @@ extern "C" jint JNI_OnLoad(JavaVM* vm, void* /* reserved */) register_com_android_server_wm_TaskFpsCallbackController(env); register_com_android_server_display_DisplayControl(env); register_com_android_server_SystemClockTime(env); + register_android_server_ActivityTriggerService(env); return JNI_VERSION_1_4; } diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 1549677fdbb2..26dd4806588b 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -679,7 +679,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { // to decide whether an existing policy in the {@link #DEVICE_POLICIES_XML} needs to // be upgraded. See {@link PolicyVersionUpgrader} on instructions how to add an upgrade // step. - static final int DPMS_VERSION = 5; + static final int DPMS_VERSION = 6; static { SECURE_SETTINGS_ALLOWLIST = new ArraySet<>(); @@ -875,8 +875,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { private static final boolean DEFAULT_ENABLE_DEVICE_POLICY_ENGINE_FOR_FINANCE_FLAG = true; // TODO(b/265683382) remove the flag after rollout. - private static final String KEEP_PROFILES_RUNNING_FLAG = "enable_keep_profiles_running"; - public static final boolean DEFAULT_KEEP_PROFILES_RUNNING_FLAG = true; + public static final boolean DEFAULT_KEEP_PROFILES_RUNNING_FLAG = false; // TODO(b/261999445) remove the flag after rollout. private static final String HEADLESS_FLAG = "headless"; @@ -23851,10 +23850,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { } private static boolean isKeepProfilesRunningFlagEnabled() { - return DeviceConfig.getBoolean( - NAMESPACE_DEVICE_POLICY_MANAGER, - KEEP_PROFILES_RUNNING_FLAG, - DEFAULT_KEEP_PROFILES_RUNNING_FLAG); + return DEFAULT_KEEP_PROFILES_RUNNING_FLAG; } private boolean isUnicornFlagEnabled() { diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/PolicyVersionUpgrader.java b/services/devicepolicy/java/com/android/server/devicepolicy/PolicyVersionUpgrader.java index 06f11be20245..913860c4c1a0 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/PolicyVersionUpgrader.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/PolicyVersionUpgrader.java @@ -116,6 +116,19 @@ public class PolicyVersionUpgrader { currentVersion = 5; } + if (currentVersion == 5) { + Slog.i(LOG_TAG, String.format("Upgrading from version %d", currentVersion)); + // No-op upgrade here: + // DevicePolicyData.mEffectiveKeepProfilesRunning is only stored in XML file when it is + // different from its default value, otherwise the tag is not written. When loading, if + // the tag is missing, the field retains the value previously assigned in the + // constructor, which is the default value. + // In version 5 the default value was 'true', in version 6 it is 'false', so when + // loading XML version 5 we need to initialize the field to 'true' for it to be restored + // correctly in case the tag is missing. This is done in loadDataForUser(). + currentVersion = 6; + } + writePoliciesAndVersion(allUsers, allUsersData, ownersData, currentVersion); } @@ -281,6 +294,10 @@ public class PolicyVersionUpgrader { private DevicePolicyData loadDataForUser( int userId, int loadVersion, ComponentName ownerComponent) { DevicePolicyData policy = new DevicePolicyData(userId); + // See version 5 -> 6 step in upgradePolicy() + if (loadVersion == 5 && userId == UserHandle.USER_SYSTEM) { + policy.mEffectiveKeepProfilesRunning = true; + } DevicePolicyData.load(policy, mProvider.makeDevicePoliciesJournaledFile(userId), mProvider.getAdminInfoSupplier(userId), diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index af841808992e..5edb11c0f6e5 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -61,11 +61,13 @@ import android.os.BaseBundle; import android.os.Binder; import android.os.Build; import android.os.Debug; +import android.os.DeviceIntegrationUtils; import android.os.Environment; import android.os.FactoryTest; import android.os.FileUtils; import android.os.IBinder; import android.os.IIncidentManager; +import android.os.IBinder; import android.os.Looper; import android.os.Message; import android.os.Parcel; @@ -222,10 +224,14 @@ import com.android.server.vr.VrManagerService; import com.android.server.wearable.WearableSensingManagerService; import com.android.server.webkit.WebViewUpdateService; import com.android.server.wm.ActivityTaskManagerService; +import com.android.server.wm.CrossDeviceService; import com.android.server.wm.WindowManagerGlobalLock; import com.android.server.wm.WindowManagerService; import dalvik.system.VMRuntime; +import dalvik.system.PathClassLoader; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; import java.io.File; import java.io.FileDescriptor; @@ -418,12 +424,10 @@ public final class SystemServer implements Dumpable { private static final String UWB_APEX_SERVICE_JAR_PATH = "/apex/com.android.uwb/javalib/service-uwb.jar"; private static final String UWB_SERVICE_CLASS = "com.android.server.uwb.UwbService"; - private static final String BLUETOOTH_APEX_SERVICE_JAR_PATH = - "/apex/com.android.btservices/javalib/service-bluetooth.jar"; - private static final String BLUETOOTH_SERVICE_CLASS = - "com.android.server.bluetooth.BluetoothService"; private static final String SAFETY_CENTER_SERVICE_CLASS = "com.android.safetycenter.SafetyCenterService"; + private static final String BLUETOOTH_SERVICE_CLASS = + "com.android.server.bluetooth.BluetoothService"; private static final String SDK_SANDBOX_MANAGER_SERVICE_CLASS = "com.android.server.sdksandbox.SdkSandboxManagerService$Lifecycle"; @@ -1441,6 +1445,8 @@ public final class SystemServer implements Dumpable { MmsServiceBroker mmsService = null; HardwarePropertiesManagerService hardwarePropertiesService = null; PacProxyService pacProxyService = null; + Object wigigP2pService = null; + Object wigigService = null; boolean disableSystemTextClassifier = SystemProperties.getBoolean( "config.disable_systemtextclassifier", false); @@ -1451,6 +1457,7 @@ public final class SystemServer implements Dumpable { false); boolean isEmulator = SystemProperties.get("ro.boot.qemu").equals("1"); + boolean enableWigig = SystemProperties.getBoolean("persist.vendor.wigig.enable", false); boolean isWatch = context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_WATCH); @@ -1659,8 +1666,7 @@ public final class SystemServer implements Dumpable { Slog.i(TAG, "No Bluetooth Service (Bluetooth Hardware Not Present)"); } else { t.traceBegin("StartBluetoothService"); - mSystemServiceManager.startServiceFromJar(BLUETOOTH_SERVICE_CLASS, - BLUETOOTH_APEX_SERVICE_JAR_PATH); + mSystemServiceManager.startService(BLUETOOTH_SERVICE_CLASS); t.traceEnd(); } @@ -1676,6 +1682,8 @@ public final class SystemServer implements Dumpable { mSystemServiceManager.startService(PinnerService.class); t.traceEnd(); + mSystemServiceManager.startService(ActivityTriggerService.class); + if (Build.IS_DEBUGGABLE && ProfcollectForwardingService.enabled()) { t.traceBegin("ProfcollectForwardingService"); mSystemServiceManager.startService(ProfcollectForwardingService.class); @@ -2079,6 +2087,34 @@ public final class SystemServer implements Dumpable { } t.traceEnd(); + if (enableWigig) { + try { + Slog.i(TAG, "Wigig Service"); + String wigigClassPath = + "/system/system_ext/framework/wigig-service.jar" + ":" + + "/system/system_ext/framework/vendor.qti.hardware.wigig.supptunnel-V1.0-java.jar" + ":" + + "/system/system_ext/framework/vendor.qti.hardware.wigig.netperftuner-V1.0-java.jar" + ":" + + "/system/system_ext/framework/vendor.qti.hardware.capabilityconfigstore-V1.0-java.jar"; + PathClassLoader wigigClassLoader = + new PathClassLoader(wigigClassPath, getClass().getClassLoader()); + Class wigigP2pClass = wigigClassLoader.loadClass( + "com.qualcomm.qti.server.wigig.p2p.WigigP2pServiceImpl"); + Constructor<Class> ctor = wigigP2pClass.getConstructor(Context.class); + wigigP2pService = ctor.newInstance(context); + Slog.i(TAG, "Successfully loaded WigigP2pServiceImpl class"); + ServiceManager.addService("wigigp2p", (IBinder) wigigP2pService); + + Class wigigClass = wigigClassLoader.loadClass( + "com.qualcomm.qti.server.wigig.WigigService"); + ctor = wigigClass.getConstructor(Context.class); + wigigService = ctor.newInstance(context); + Slog.i(TAG, "Successfully loaded WigigService class"); + ServiceManager.addService("wigig", (IBinder) wigigService); + } catch (Throwable e) { + reportWtf("starting WigigService", e); + } + } + t.traceBegin("StartSystemUpdateManagerService"); try { ServiceManager.addService(Context.SYSTEM_UPDATE_SERVICE, @@ -2747,6 +2783,25 @@ public final class SystemServer implements Dumpable { mSystemServiceManager.startBootPhase(t, SystemService.PHASE_SYSTEM_SERVICES_READY); t.traceEnd(); + // Wigig services are not registered as system services because of class loader + // limitations, send boot phase notification separately + if (enableWigig) { + try { + Slog.i(TAG, "calling onBootPhase for Wigig Services"); + Class wigigP2pClass = wigigP2pService.getClass(); + Method m = wigigP2pClass.getMethod("onBootPhase", int.class); + m.invoke(wigigP2pService, new Integer( + SystemService.PHASE_SYSTEM_SERVICES_READY)); + + Class wigigClass = wigigService.getClass(); + m = wigigClass.getMethod("onBootPhase", int.class); + m.invoke(wigigService, new Integer( + SystemService.PHASE_SYSTEM_SERVICES_READY)); + } catch (Throwable e) { + reportWtf("Wigig services ready", e); + } + } + t.traceBegin("MakeWindowManagerServiceReady"); try { wm.systemReady(); @@ -2798,6 +2853,12 @@ public final class SystemServer implements Dumpable { mPackageManagerService.systemReady(); t.traceEnd(); + if (!DeviceIntegrationUtils.DISABLE_DEVICE_INTEGRATION) { + t.traceBegin("StartCrossDeviceService"); + ServiceManager.addService(Context.CROSS_DEVICE_SERVICE, new CrossDeviceService(mSystemContext, mActivityManagerService.mActivityTaskManager)); + t.traceEnd(); + } + t.traceBegin("MakeDisplayManagerServiceReady"); try { // TODO: use boot phase and communicate this flag some other way diff --git a/services/tests/mockingservicestests/src/com/android/server/display/DisplayPowerProximityStateControllerTest.java b/services/tests/mockingservicestests/src/com/android/server/display/DisplayPowerProximityStateControllerTest.java index 5b0b989d478a..534a708af3c7 100644 --- a/services/tests/mockingservicestests/src/com/android/server/display/DisplayPowerProximityStateControllerTest.java +++ b/services/tests/mockingservicestests/src/com/android/server/display/DisplayPowerProximityStateControllerTest.java @@ -34,8 +34,8 @@ import android.hardware.display.DisplayManagerInternal; import android.os.test.TestLooper; import android.view.Display; +import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; -import androidx.test.runner.AndroidJUnit4; import com.android.server.testutils.OffsettableClock; @@ -92,7 +92,7 @@ public final class DisplayPowerProximityStateControllerTest { }; mDisplayPowerProximityStateController = new DisplayPowerProximityStateController( mWakelockController, mDisplayDeviceConfig, mTestLooper.getLooper(), - mNudgeUpdatePowerState, 0, + mNudgeUpdatePowerState, Display.DEFAULT_DISPLAY, mSensorManager, injector); mSensorEventListener = mDisplayPowerProximityStateController.getProximitySensorListener(); } @@ -128,7 +128,7 @@ public final class DisplayPowerProximityStateControllerTest { enableProximitySensor(); emitAndValidatePositiveProximityEvent(); mDisplayPowerProximityStateController.ignoreProximitySensorUntilChangedInternal(); - advanceTime(1); + advanceTime(); assertTrue(mDisplayPowerProximityStateController.shouldIgnoreProximityUntilChanged()); verify(mNudgeUpdatePowerState, times(2)).run(); @@ -170,7 +170,7 @@ public final class DisplayPowerProximityStateControllerTest { } @Test - public void isProximitySensorAvailableReturnsFalseWhenNotAvailable() { + public void isProximitySensorAvailableReturnsFalseWhenNotAvailableAndNoDefault() { when(mDisplayDeviceConfig.getProximitySensor()).thenReturn( new DisplayDeviceConfig.SensorData() { { @@ -180,12 +180,63 @@ public final class DisplayPowerProximityStateControllerTest { }); mDisplayPowerProximityStateController = new DisplayPowerProximityStateController( mWakelockController, mDisplayDeviceConfig, mTestLooper.getLooper(), + mNudgeUpdatePowerState, Display.DEFAULT_DISPLAY, + mSensorManager, null); + assertFalse(mDisplayPowerProximityStateController.isProximitySensorAvailable()); + } + + @Test + public void isProximitySensorAvailableReturnsTrueWhenNotAvailableAndHasDefault() + throws Exception { + when(mDisplayDeviceConfig.getProximitySensor()).thenReturn( + new DisplayDeviceConfig.SensorData() { + { + type = null; + name = null; + } + }); + when(mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY)).thenReturn( + TestUtils.createSensor(Sensor.TYPE_PROXIMITY, "proximity")); + mDisplayPowerProximityStateController = new DisplayPowerProximityStateController( + mWakelockController, mDisplayDeviceConfig, mTestLooper.getLooper(), + mNudgeUpdatePowerState, Display.DEFAULT_DISPLAY, + mSensorManager, null); + assertTrue(mDisplayPowerProximityStateController.isProximitySensorAvailable()); + } + + @Test + public void isProximitySensorAvailableReturnsFalseWhenNotAvailableHasDefaultNonDefaultDisplay() + throws Exception { + when(mDisplayDeviceConfig.getProximitySensor()).thenReturn( + new DisplayDeviceConfig.SensorData() { + { + type = null; + name = null; + } + }); + when(mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY)).thenReturn( + TestUtils.createSensor(Sensor.TYPE_PROXIMITY, "proximity")); + mDisplayPowerProximityStateController = new DisplayPowerProximityStateController( + mWakelockController, mDisplayDeviceConfig, mTestLooper.getLooper(), mNudgeUpdatePowerState, 1, mSensorManager, null); assertFalse(mDisplayPowerProximityStateController.isProximitySensorAvailable()); } @Test + public void isProximitySensorAvailableReturnsTrueWhenNoSensorConfigured() throws Exception { + when(mDisplayDeviceConfig.getProximitySensor()).thenReturn(null); + when(mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY)).thenReturn( + TestUtils.createSensor(Sensor.TYPE_PROXIMITY, Sensor.STRING_TYPE_PROXIMITY)); + + mDisplayPowerProximityStateController = new DisplayPowerProximityStateController( + mWakelockController, mDisplayDeviceConfig, mTestLooper.getLooper(), + mNudgeUpdatePowerState, Display.DEFAULT_DISPLAY, + mSensorManager, null); + assertFalse(mDisplayPowerProximityStateController.isProximitySensorAvailable()); + } + + @Test public void notifyDisplayDeviceChangedReloadsTheProximitySensor() throws Exception { DisplayDeviceConfig updatedDisplayDeviceConfig = mock(DisplayDeviceConfig.class); when(updatedDisplayDeviceConfig.getProximitySensor()).thenReturn( @@ -326,8 +377,8 @@ public final class DisplayPowerProximityStateControllerTest { assertEquals(mDisplayPowerProximityStateController.getPendingProximityDebounceTime(), -1); } - private void advanceTime(long timeMs) { - mClock.fastForward(timeMs); + private void advanceTime() { + mClock.fastForward(1); mTestLooper.dispatchAll(); } diff --git a/services/tests/servicestests/Android.bp b/services/tests/servicestests/Android.bp index 16e1b457ad96..b3bc5bb9cb06 100644 --- a/services/tests/servicestests/Android.bp +++ b/services/tests/servicestests/Android.bp @@ -22,6 +22,7 @@ android_test { "test-apps/JobTestApp/src/**/*.java", "test-apps/SuspendTestApp/src/**/*.java", + ":service-bluetooth-tests-sources", // TODO(b/214988855) : Remove once framework-bluetooth jar is ready ], static_libs: [ "frameworks-base-testutils", diff --git a/services/tests/servicestests/src/com/android/server/am/AnrHelperTest.java b/services/tests/servicestests/src/com/android/server/am/AnrHelperTest.java index acdfee9af557..26122299d307 100644 --- a/services/tests/servicestests/src/com/android/server/am/AnrHelperTest.java +++ b/services/tests/servicestests/src/com/android/server/am/AnrHelperTest.java @@ -127,7 +127,7 @@ public class AnrHelperTest { final TimeoutRecord timeoutRecord = TimeoutRecord.forInputDispatchWindowUnresponsive( annotation); mAnrHelper.appNotResponding(mAnrApp, activityShortComponentName, appInfo, - parentShortComponentName, parentProcess, aboveSystem, timeoutRecord, + parentShortComponentName, parentProcess, aboveSystem, null, timeoutRecord, /*isContinuousAnr*/ false); verify(mAnrApp.mErrorState, timeout(TIMEOUT_MS)).appNotResponding( @@ -152,7 +152,7 @@ public class AnrHelperTest { "annotation"); final Runnable reportAnr = () -> mAnrHelper.appNotResponding(mAnrApp, "activityShortComponentName", appInfo, "parentShortComponentName", - null /* parentProcess */, false /* aboveSystem */, timeoutRecord, + null /* parentProcess */, false /* aboveSystem */, null, timeoutRecord, false /*isContinuousAnr*/); reportAnr.run(); // This should be skipped because the pid is pending in queue. diff --git a/services/tests/servicestests/src/com/android/server/display/DisplayDeviceConfigTest.java b/services/tests/servicestests/src/com/android/server/display/DisplayDeviceConfigTest.java index 5837b21b89fd..1bae24fc2ef7 100644 --- a/services/tests/servicestests/src/com/android/server/display/DisplayDeviceConfigTest.java +++ b/services/tests/servicestests/src/com/android/server/display/DisplayDeviceConfigTest.java @@ -33,8 +33,8 @@ import android.os.Temperature; import android.util.SparseArray; import android.view.SurfaceControl; +import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.SmallTest; -import androidx.test.runner.AndroidJUnit4; import com.android.internal.R; import com.android.server.display.config.ThermalStatus; diff --git a/services/tests/servicestests/src/com/android/server/display/DisplayManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/display/DisplayManagerServiceTest.java index 0e775d57bbd7..5db9d1f6f5bd 100644 --- a/services/tests/servicestests/src/com/android/server/display/DisplayManagerServiceTest.java +++ b/services/tests/servicestests/src/com/android/server/display/DisplayManagerServiceTest.java @@ -32,6 +32,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -60,6 +61,8 @@ import android.content.pm.PackageManager; import android.content.res.Resources; import android.graphics.Insets; import android.graphics.Rect; +import android.hardware.Sensor; +import android.hardware.SensorManager; import android.hardware.display.BrightnessConfiguration; import android.hardware.display.Curve; import android.hardware.display.DisplayManager; @@ -109,8 +112,6 @@ import com.android.server.wm.WindowManagerInternal; import libcore.junit.util.compat.CoreCompatChangeRule.DisableCompatChanges; import libcore.junit.util.compat.CoreCompatChangeRule.EnableCompatChanges; -import com.google.common.collect.ImmutableMap; - import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -125,6 +126,7 @@ import org.mockito.MockitoAnnotations; import java.time.Duration; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.concurrent.CountDownLatch; @@ -136,6 +138,9 @@ import java.util.stream.LongStream; public class DisplayManagerServiceTest { private static final int MSG_REGISTER_DEFAULT_DISPLAY_ADAPTERS = 1; private static final long SHORT_DEFAULT_DISPLAY_TIMEOUT_MILLIS = 10; + + private static final float FLOAT_TOLERANCE = 0.01f; + private static final String VIRTUAL_DISPLAY_NAME = "Test Virtual Display"; private static final String PACKAGE_NAME = "com.android.frameworks.servicestests"; private static final long STANDARD_DISPLAY_EVENTS = DisplayManager.EVENT_FLAG_DISPLAY_ADDED @@ -250,6 +255,10 @@ public class DisplayManagerServiceTest { @Mock IBinder mMockDisplayToken; @Mock SensorManagerInternal mMockSensorManagerInternal; + @Mock SensorManager mSensorManager; + + @Mock DisplayDeviceConfig mMockDisplayDeviceConfig; + @Captor ArgumentCaptor<ContentRecordingSession> mContentRecordingSessionCaptor; @Before @@ -267,7 +276,7 @@ public class DisplayManagerServiceTest { LocalServices.removeServiceForTest(VirtualDeviceManagerInternal.class); LocalServices.addService( VirtualDeviceManagerInternal.class, mMockVirtualDeviceManagerInternal); - + // TODO: b/287945043 mContext = spy(new ContextWrapper(ApplicationProvider.getApplicationContext())); VirtualDeviceManager vdm = new VirtualDeviceManager(mIVirtualDeviceManager, mContext); @@ -396,7 +405,7 @@ public class DisplayManagerServiceTest { final int size = displayIds.length; assertTrue(size > 0); - Map<Integer, Integer> expectedDisplayTypeToViewPortTypeMapping = ImmutableMap.of( + Map<Integer, Integer> expectedDisplayTypeToViewPortTypeMapping = Map.of( Display.TYPE_INTERNAL, DisplayViewport.VIEWPORT_INTERNAL, Display.TYPE_EXTERNAL, DisplayViewport.VIEWPORT_EXTERNAL ); @@ -1934,6 +1943,74 @@ public class DisplayManagerServiceTest { assertEquals(mode, displayManager.getHdrConversionModeInternal()); } + @Test + public void testReturnsRefreshRateForDisplayAndSensor_proximitySensorSet() { + DisplayManagerService displayManager = new DisplayManagerService(mContext, mBasicInjector); + DisplayManagerInternal localService = displayManager.new LocalService(); + DisplayManagerService.BinderService displayManagerBinderService = + displayManager.new BinderService(); + displayManager.overrideSensorManager(mSensorManager); + + FakeDisplayDevice displayDevice = createFakeDisplayDevice(displayManager, new float[]{60f}); + displayDevice.mDisplayDeviceConfig = mMockDisplayDeviceConfig; + int displayId = getDisplayIdForDisplayDevice(displayManager, displayManagerBinderService, + displayDevice); + + String testSensorName = "testName"; + String testSensorType = "testType"; + Sensor testSensor = TestUtils.createSensor(testSensorType, testSensorName); + + DisplayDeviceConfig.SensorData sensorData = new DisplayDeviceConfig.SensorData(); + sensorData.type = testSensorType; + sensorData.name = testSensorName; + sensorData.minRefreshRate = 10f; + sensorData.maxRefreshRate = 100f; + + when(mMockDisplayDeviceConfig.getProximitySensor()).thenReturn(sensorData); + when(mSensorManager.getSensorList(Sensor.TYPE_ALL)).thenReturn(Collections.singletonList( + testSensor)); + + SurfaceControl.RefreshRateRange result = localService.getRefreshRateForDisplayAndSensor( + displayId, testSensorName, testSensorType); + + assertNotNull(result); + assertEquals(result.min, sensorData.minRefreshRate, FLOAT_TOLERANCE); + assertEquals(result.max, sensorData.maxRefreshRate, FLOAT_TOLERANCE); + } + + @Test + public void testReturnsRefreshRateForDisplayAndSensor_proximitySensorNotSet() { + DisplayManagerService displayManager = new DisplayManagerService(mContext, mBasicInjector); + DisplayManagerInternal localService = displayManager.new LocalService(); + DisplayManagerService.BinderService displayManagerBinderService = + displayManager.new BinderService(); + displayManager.overrideSensorManager(mSensorManager); + + FakeDisplayDevice displayDevice = createFakeDisplayDevice(displayManager, new float[]{60f}); + displayDevice.mDisplayDeviceConfig = mMockDisplayDeviceConfig; + int displayId = getDisplayIdForDisplayDevice(displayManager, displayManagerBinderService, + displayDevice); + + String testSensorName = "testName"; + String testSensorType = "testType"; + Sensor testSensor = TestUtils.createSensor(testSensorType, testSensorName); + + DisplayDeviceConfig.SensorData sensorData = new DisplayDeviceConfig.SensorData(); + sensorData.type = testSensorType; + sensorData.name = testSensorName; + sensorData.minRefreshRate = 10f; + sensorData.maxRefreshRate = 100f; + + when(mMockDisplayDeviceConfig.getProximitySensor()).thenReturn(null); + when(mSensorManager.getSensorList(Sensor.TYPE_ALL)).thenReturn(Collections.singletonList( + testSensor)); + + SurfaceControl.RefreshRateRange result = localService.getRefreshRateForDisplayAndSensor( + displayId, testSensorName, testSensorType); + + assertNull(result); + } + private void testDisplayInfoFrameRateOverrideModeCompat(boolean compatChangeEnabled) throws Exception { DisplayManagerService displayManager = diff --git a/services/tests/servicestests/src/com/android/server/display/TestUtils.java b/services/tests/servicestests/src/com/android/server/display/TestUtils.java index 90d9baed53d7..8b45145b160f 100644 --- a/services/tests/servicestests/src/com/android/server/display/TestUtils.java +++ b/services/tests/servicestests/src/com/android/server/display/TestUtils.java @@ -18,6 +18,7 @@ package com.android.server.display; import android.hardware.Sensor; import android.hardware.SensorEvent; +import android.hardware.input.InputSensorInfo; import android.os.Parcel; import android.os.SystemClock; import android.view.DisplayAddress; @@ -75,6 +76,12 @@ public final class TestUtils { return sensor; } + public static Sensor createSensor(String type, String name) { + return new Sensor(new InputSensorInfo( + name, "vendor", 0, 0, 0, 1f, 1f, 1, 1, 1, 1, + type, "", 0, 0, 0)); + } + /** * Create a custom {@link DisplayAddress} to ensure we're not relying on any specific * display-address implementation in our code. Intentionally uses default object (reference) diff --git a/services/tests/servicestests/src/com/android/server/display/utils/SensorUtilsTest.java b/services/tests/servicestests/src/com/android/server/display/utils/SensorUtilsTest.java new file mode 100644 index 000000000000..4494b0c412dc --- /dev/null +++ b/services/tests/servicestests/src/com/android/server/display/utils/SensorUtilsTest.java @@ -0,0 +1,140 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.server.display.utils; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.mockito.Mockito.when; + +import android.annotation.Nullable; +import android.hardware.Sensor; +import android.hardware.SensorManager; +import android.hardware.input.InputSensorInfo; + +import androidx.test.filters.SmallTest; + +import com.android.internal.annotations.Keep; +import com.android.server.display.DisplayDeviceConfig.SensorData; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +import java.util.Collections; +import java.util.List; + +import junitparams.JUnitParamsRunner; +import junitparams.Parameters; + +@SmallTest +@RunWith(JUnitParamsRunner.class) +public class SensorUtilsTest { + + private static final String TEST_SENSOR_NAME = "test_sensor_name"; + private static final String TEST_SENSOR_TYPE = "test_sensor_type"; + private static final Sensor TEST_SENSOR = createSensor(); + @Mock + private SensorManager mSensorManager; + + @Before + public void setUp() { + MockitoAnnotations.initMocks(this); + } + + @Test + public void testNoSensorData() { + Sensor result = SensorUtils.findSensor(mSensorManager, null, Sensor.TYPE_LIGHT); + assertNull(result); + } + + @Test + public void testNoSensorManager() { + Sensor result = SensorUtils.findSensor(null, new SensorData(), Sensor.TYPE_LIGHT); + assertNull(result); + } + + @Keep + private static Object[][] findSensorData() { + // sensorName, sensorType, fallbackType, allSensors, defaultSensor, expectedResult + return new Object[][]{ + // no data, no default + {null, null, Sensor.TYPE_LIGHT, + Collections.singletonList(TEST_SENSOR), null, null}, + // matching name, matching type, no default + {TEST_SENSOR_NAME, TEST_SENSOR_TYPE, Sensor.TYPE_LIGHT, + Collections.singletonList(TEST_SENSOR), null, TEST_SENSOR}, + // matching name, no default + {TEST_SENSOR_NAME, null, Sensor.TYPE_LIGHT, + Collections.singletonList(TEST_SENSOR), null, TEST_SENSOR}, + // not matching name, no default + {"not_matching_name", null, Sensor.TYPE_LIGHT, + Collections.singletonList(TEST_SENSOR), null, null}, + // matching type, no default + {null, TEST_SENSOR_TYPE, Sensor.TYPE_LIGHT, + Collections.singletonList(TEST_SENSOR), null, TEST_SENSOR}, + // not matching type, no default + {null, "not_matching_type", Sensor.TYPE_LIGHT, + Collections.singletonList(TEST_SENSOR), null, null}, + // not matching type, matching name, no default + {TEST_SENSOR_NAME, "not_matching_type", Sensor.TYPE_LIGHT, + Collections.singletonList(TEST_SENSOR), null, null}, + // not matching name, matching type, no default + {"not_matching_name", TEST_SENSOR_TYPE, Sensor.TYPE_LIGHT, + Collections.singletonList(TEST_SENSOR), null, null}, + // not matching type, not matching name, no default + {"not_matching_name", "not_matching_type", Sensor.TYPE_LIGHT, + Collections.singletonList(TEST_SENSOR), null, null}, + // not matching type, not matching name, with default + {"not_matching_name", "not_matching_type", Sensor.TYPE_LIGHT, + Collections.singletonList(TEST_SENSOR), TEST_SENSOR, TEST_SENSOR}, + // no data, with default + {null, null, Sensor.TYPE_LIGHT, + Collections.singletonList(TEST_SENSOR), TEST_SENSOR, TEST_SENSOR}, + // empty data, with default + {"", "", Sensor.TYPE_LIGHT, + Collections.singletonList(TEST_SENSOR), TEST_SENSOR, TEST_SENSOR}, + // empty data, with default, no fallback + {"", "", SensorUtils.NO_FALLBACK, + Collections.singletonList(TEST_SENSOR), TEST_SENSOR, null}, + }; + } + + @Test + @Parameters(method = "findSensorData") + public void testFindSensor(@Nullable String sensorName, @Nullable String sensorType, + int fallbackType, List<Sensor> allSensors, @Nullable Sensor defaultSensor, + @Nullable Sensor expectedResult) { + when(mSensorManager.getSensorList(Sensor.TYPE_ALL)).thenReturn(allSensors); + when(mSensorManager.getDefaultSensor(fallbackType)).thenReturn(defaultSensor); + + SensorData sensorData = new SensorData(); + sensorData.name = sensorName; + sensorData.type = sensorType; + + Sensor result = SensorUtils.findSensor(mSensorManager, sensorData, fallbackType); + + assertEquals(expectedResult, result); + } + + private static Sensor createSensor() { + return new Sensor(new InputSensorInfo( + TEST_SENSOR_NAME, "vendor", 0, 0, 0, 1f, 1f, 1, 1, 1, 1, + TEST_SENSOR_TYPE, "", 0, 0, 0)); + } +} diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java index 9842d7009444..6e8bd839c272 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityStarterTests.java @@ -121,6 +121,7 @@ import com.android.server.pm.pkg.AndroidPackage; import com.android.server.wm.LaunchParamsController.LaunchParamsModifier; import com.android.server.wm.utils.MockTracker; +import org.junit.Ignore; import org.junit.After; import org.junit.Before; import org.junit.Ignore; @@ -444,6 +445,7 @@ public class ActivityStarterTests extends WindowTestsBase { * Ensures that values specified at launch time are passed to {@link LaunchParamsModifier} * when we are laying out a new task. */ + @Ignore // TODO(b/119048275): Reenable failing test in activity_manager_test suite @Test public void testCreateTaskLayout() { // modifier for validating passed values. @@ -576,6 +578,7 @@ public class ActivityStarterTests extends WindowTestsBase { /** * Tests activity is cleaned up properly in a task mode violation. */ + @Ignore // TODO(b/119048275): Reenable failing test in activity_manager_test suite @Test public void testTaskModeViolation() { final DisplayContent display = mAtm.mRootWindowContainer.getDefaultDisplay(); @@ -602,6 +605,7 @@ public class ActivityStarterTests extends WindowTestsBase { /** * This test ensures that activity starts are not being logged when the logging is disabled. */ + @Ignore // TODO(b/119048275): Reenable failing test in activity_manager_test suite @Test public void testActivityStartsLogging_noLoggingWhenDisabled() { doReturn(false).when(mAtm).isActivityStartsLoggingEnabled(); @@ -618,6 +622,7 @@ public class ActivityStarterTests extends WindowTestsBase { /** * This test ensures that activity starts are being logged when the logging is enabled. */ + @Ignore // TODO(b/119048275): Reenable failing test in activity_manager_test suite @Test public void testActivityStartsLogging_logsWhenEnabled() { // note: conveniently this package doesn't have any activity visible diff --git a/services/tests/wmtests/src/com/android/server/wm/TestIWindow.java b/services/tests/wmtests/src/com/android/server/wm/TestIWindow.java index 3f8acc651110..641daebaf590 100644 --- a/services/tests/wmtests/src/com/android/server/wm/TestIWindow.java +++ b/services/tests/wmtests/src/com/android/server/wm/TestIWindow.java @@ -29,6 +29,7 @@ import android.view.InsetsState; import android.view.ScrollCaptureResponse; import android.view.inputmethod.ImeTracker; import android.window.ClientWindowFrames; +import android.view.KeyEvent; import com.android.internal.os.IResultReceiver; @@ -119,6 +120,10 @@ public class TestIWindow extends IWindow.Stub { } @Override + public void dispatchBlackScreenKeyEvent(KeyEvent event) throws RemoteException { + } + + @Override public void showInsets(int types, boolean fromIme, @Nullable ImeTracker.Token statsToken) throws RemoteException { } diff --git a/services/usb/java/com/android/server/usb/UsbAlsaManager.java b/services/usb/java/com/android/server/usb/UsbAlsaManager.java index fd0d5401dae3..797bc9579f84 100644 --- a/services/usb/java/com/android/server/usb/UsbAlsaManager.java +++ b/services/usb/java/com/android/server/usb/UsbAlsaManager.java @@ -46,6 +46,8 @@ import java.util.HashSet; import java.util.List; import java.util.Stack; +import android.os.SystemProperties; + /** * UsbAlsaManager manages USB audio and MIDI devices. */ @@ -54,9 +56,9 @@ public final class UsbAlsaManager { private static final boolean DEBUG = false; // Flag to turn on/off multi-peripheral select mode - // Set to true to have multi-devices mode - private static final boolean IS_MULTI_MODE = SystemProperties.getBoolean( - "ro.audio.multi_usb_mode", false /*def*/); + + // Set to true to have single-device-only mode + private static boolean mIsSingleMode = true; private static final String ALSA_DIRECTORY = "/dev/snd/"; @@ -174,6 +176,10 @@ public final class UsbAlsaManager { Slog.d(TAG, "selectAlsaDevice() " + alsaDevice); } + if ("true".equals(SystemProperties.get("vendor.audio.gaming.enabled", "false"))) { + mIsSingleMode = false; + } + // FIXME Does not yet handle the case where the setting is changed // after device connection. Ideally we should handle the settings change // in SettingsObserver. Here we should log that a USB device is connected @@ -336,7 +342,7 @@ public final class UsbAlsaManager { isInputHeadset, isOutputHeadset, isDock); alsaDevice.setDeviceNameAndDescription( cardRec.getCardName(), cardRec.getCardDescription()); - if (IS_MULTI_MODE) { + if (mIsSingleMode) { deselectCurrentDevice(alsaDevice.getInputDeviceType()); deselectCurrentDevice(alsaDevice.getOutputDeviceType()); } else { @@ -417,7 +423,7 @@ public final class UsbAlsaManager { if (alsaDevice != null) { waitForAlsaDevice(alsaDevice.getCardNum(), false /*isAdded*/); deselectAlsaDevice(alsaDevice); - if (IS_MULTI_MODE) { + if (mIsSingleMode) { selectDefaultDevice(alsaDevice.getOutputDeviceType()); selectDefaultDevice(alsaDevice.getInputDeviceType()); } else { diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java index 77b263824b78..884204ea23e2 100644..100755 --- a/services/usb/java/com/android/server/usb/UsbDeviceManager.java +++ b/services/usb/java/com/android/server/usb/UsbDeviceManager.java @@ -134,6 +134,8 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser private static final String USB_STATE_MATCH = "DEVPATH=/devices/virtual/android_usb/android0"; + private static final String USB_STATE_MATCH_SEC = + "DEVPATH=/devices/virtual/android_usb/android1"; private static final String ACCESSORY_START_MATCH = "DEVPATH=/devices/virtual/misc/usb_accessory"; private static final String FUNCTIONS_PATH = @@ -400,6 +402,7 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser // Watch for USB configuration changes mUEventObserver = new UsbUEventObserver(); mUEventObserver.startObserving(USB_STATE_MATCH); + mUEventObserver.startObserving(USB_STATE_MATCH_SEC); mUEventObserver.startObserving(ACCESSORY_START_MATCH); sEventLogger = new EventLogger(DUMPSYS_LOG_BUFFER, "UsbDeviceManager activity"); @@ -1879,6 +1882,10 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser mCurrentFunctions = usbFunctions; if (functions == null || applyAdbFunction(functions) .equals(UsbManager.USB_FUNCTION_NONE)) { + functions = getSystemProperty(getPersistProp(true), + UsbManager.USB_FUNCTION_NONE); + + if (functions.equals(UsbManager.USB_FUNCTION_NONE)) functions = UsbManager.usbFunctionsToString(getChargingFunctions()); } functions = applyAdbFunction(functions); diff --git a/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java b/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java index 13945a119e6f..b7e5789eee32 100644 --- a/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java +++ b/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerService.java @@ -815,6 +815,7 @@ public class SoundTriggerService extends SystemService { try (SafeCloseable ignored = ClearCallingIdentityContext.create()) { enforceCallingPermission(Manifest.permission.MANAGE_SOUND_TRIGGER); + synchronized (mLock) { SoundModel soundModel = mLoadedModels.get(soundModelId.getUuid()); if (soundModel == null) { diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordDetectionConnection.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordDetectionConnection.java index 248cc26ce656..ccc4ac28876a 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordDetectionConnection.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/HotwordDetectionConnection.java @@ -27,6 +27,7 @@ import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_KEYPH import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED__RESULT__KEYPHRASE_TRIGGER; import static com.android.internal.util.FrameworkStatsLog.HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED__RESULT__SERVICE_CRASH; +import android.app.AppOpsManager; import android.annotation.NonNull; import android.annotation.Nullable; import android.compat.annotation.ChangeId; @@ -548,13 +549,15 @@ final class HotwordDetectionConnection { static final class SoundTriggerCallback extends IRecognitionStatusCallback.Stub { private final HotwordDetectionConnection mHotwordDetectionConnection; private final IHotwordRecognitionStatusCallback mExternalCallback; - private final int mVoiceInteractionServiceUid; + private final Identity mVoiceInteractorIdentity; + private final Context mContext; - SoundTriggerCallback(IHotwordRecognitionStatusCallback callback, - HotwordDetectionConnection connection, int uid) { + SoundTriggerCallback(Context context, IHotwordRecognitionStatusCallback callback, + HotwordDetectionConnection connection, Identity voiceInteractorIdentity) { + mContext = context; mHotwordDetectionConnection = connection; mExternalCallback = callback; - mVoiceInteractionServiceUid = uid; + mVoiceInteractorIdentity = voiceInteractorIdentity; } @Override @@ -568,15 +571,30 @@ final class HotwordDetectionConnection { HotwordMetricsLogger.writeKeyphraseTriggerEvent( HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED__DETECTOR_TYPE__TRUSTED_DETECTOR_DSP, HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED__RESULT__KEYPHRASE_TRIGGER, - mVoiceInteractionServiceUid); + mVoiceInteractorIdentity.uid); mHotwordDetectionConnection.detectFromDspSource( recognitionEvent, mExternalCallback); } else { - HotwordMetricsLogger.writeKeyphraseTriggerEvent( - HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED__DETECTOR_TYPE__NORMAL_DETECTOR, - HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED__RESULT__KEYPHRASE_TRIGGER, - mVoiceInteractionServiceUid); - mExternalCallback.onKeyphraseDetected(recognitionEvent, null); + // We have to attribute ops here, since we configure all st clients as trusted to + // enable a partial exemption. + // TODO (b/292012931) remove once trusted uniformly required. + int result = mContext.getSystemService(AppOpsManager.class) + .noteOpNoThrow(AppOpsManager.OP_RECORD_AUDIO_HOTWORD, + mVoiceInteractorIdentity.uid, mVoiceInteractorIdentity.packageName, + mVoiceInteractorIdentity.attributionTag, + "Non-HDS keyphrase recognition to VoiceInteractionService"); + + if (result != AppOpsManager.MODE_ALLOWED) { + Slog.w(TAG, "onKeyphraseDetected suppressed, permission check returned: " + + result); + mExternalCallback.onRecognitionPaused(); + } else { + HotwordMetricsLogger.writeKeyphraseTriggerEvent( + HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED__DETECTOR_TYPE__NORMAL_DETECTOR, + HOTWORD_DETECTOR_KEYPHRASE_TRIGGERED__RESULT__KEYPHRASE_TRIGGER, + mVoiceInteractorIdentity.uid); + mExternalCallback.onKeyphraseDetected(recognitionEvent, null); + } } } diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java index 423a81ac0523..3574ef8e91fb 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java @@ -104,6 +104,7 @@ import com.android.server.SystemService; import com.android.server.UiThread; import com.android.server.pm.UserManagerInternal; import com.android.server.pm.permission.LegacyPermissionManagerInternal; +import com.android.server.policy.AppOpsPolicy; import com.android.server.utils.Slogf; import com.android.server.utils.TimingsTraceAndSlog; import com.android.server.wm.ActivityTaskManagerInternal; @@ -336,6 +337,9 @@ public class VoiceInteractionManagerService extends SystemService { /** The start value of showSessionId */ private static final int SHOW_SESSION_START_ID = 0; + private final boolean IS_HDS_REQUIRED = AppOpsPolicy.isHotwordDetectionServiceRequired( + mContext.getPackageManager()); + @GuardedBy("this") private int mShowSessionId = SHOW_SESSION_START_ID; @@ -393,8 +397,14 @@ public class VoiceInteractionManagerService extends SystemService { } try (SafeCloseable ignored = PermissionUtil.establishIdentityDirect( originatorIdentity)) { + if (!IS_HDS_REQUIRED) { + // For devices which still have hotword exemption, any client (not just HDS + // clients) are trusted. + // TODO (b/292012931) remove once trusted uniformly required. + forHotwordDetectionService = true; + } return new SoundTriggerSession(mSoundTriggerInternal.attach(client, - moduleProperties, forHotwordDetectionService)); + moduleProperties, forHotwordDetectionService), originatorIdentity); } } @@ -1674,10 +1684,13 @@ public class VoiceInteractionManagerService extends SystemService { final SoundTriggerInternal.Session mSession; private IHotwordRecognitionStatusCallback mSessionExternalCallback; private IRecognitionStatusCallback mSessionInternalCallback; + private final Identity mVoiceInteractorIdentity; SoundTriggerSession( - SoundTriggerInternal.Session session) { + SoundTriggerInternal.Session session, + Identity voiceInteractorIdentity) { mSession = session; + mVoiceInteractorIdentity = voiceInteractorIdentity; } @Override @@ -1731,7 +1744,8 @@ public class VoiceInteractionManagerService extends SystemService { if (mSessionExternalCallback == null || mSessionInternalCallback == null || callback.asBinder() != mSessionExternalCallback.asBinder()) { - mSessionInternalCallback = createSoundTriggerCallbackLocked(callback); + mSessionInternalCallback = createSoundTriggerCallbackLocked(callback, + mVoiceInteractorIdentity); mSessionExternalCallback = callback; } } @@ -1752,7 +1766,8 @@ public class VoiceInteractionManagerService extends SystemService { if (mSessionExternalCallback == null || mSessionInternalCallback == null || callback.asBinder() != mSessionExternalCallback.asBinder()) { - soundTriggerCallback = createSoundTriggerCallbackLocked(callback); + soundTriggerCallback = createSoundTriggerCallbackLocked(callback, + mVoiceInteractorIdentity); Slog.w(TAG, "stopRecognition() called with a different callback than" + "startRecognition()"); } else { @@ -2090,6 +2105,7 @@ public class VoiceInteractionManagerService extends SystemService { pw.println(" mTemporarilyDisabled: " + mTemporarilyDisabled); pw.println(" mCurUser: " + mCurUser); pw.println(" mCurUserSupported: " + mCurUserSupported); + pw.println(" mIsHdsRequired: " + IS_HDS_REQUIRED); dumpSupportedUsers(pw, " "); mDbHelper.dump(pw); if (mImpl == null) { @@ -2165,11 +2181,13 @@ public class VoiceInteractionManagerService extends SystemService { } private IRecognitionStatusCallback createSoundTriggerCallbackLocked( - IHotwordRecognitionStatusCallback callback) { + IHotwordRecognitionStatusCallback callback, + Identity voiceInteractorIdentity) { if (mImpl == null) { return null; } - return mImpl.createSoundTriggerCallbackLocked(callback); + return mImpl.createSoundTriggerCallbackLocked(mContext, callback, + voiceInteractorIdentity); } class RoleObserver implements OnRoleHoldersChangedListener { diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java index 0ad86c11d29a..5d88a65ce29e 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java @@ -877,12 +877,13 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne } public IRecognitionStatusCallback createSoundTriggerCallbackLocked( - IHotwordRecognitionStatusCallback callback) { + Context context, IHotwordRecognitionStatusCallback callback, + Identity voiceInteractorIdentity) { if (DEBUG) { Slog.d(TAG, "createSoundTriggerCallbackLocked"); } - return new HotwordDetectionConnection.SoundTriggerCallback(callback, - mHotwordDetectionConnection, mInfo.getServiceInfo().applicationInfo.uid); + return new HotwordDetectionConnection.SoundTriggerCallback(context, callback, + mHotwordDetectionConnection, voiceInteractorIdentity); } private static ServiceInfo getServiceInfoLocked(@NonNull ComponentName componentName, diff --git a/telecomm/java/android/telecom/CallerInfo.java b/telecomm/java/android/telecom/CallerInfo.java index 2983e6339d4b..419c28eeb001 100644 --- a/telecomm/java/android/telecom/CallerInfo.java +++ b/telecomm/java/android/telecom/CallerInfo.java @@ -206,6 +206,7 @@ public class CallerInfo { * @hide */ public static CallerInfo getCallerInfo(Context context, Uri contactRef, Cursor cursor) { + android.util.SeempLog.record_uri(12, contactRef); CallerInfo info = new CallerInfo(); info.photoResource = 0; info.phoneLabel = null; @@ -398,6 +399,7 @@ public class CallerInfo { */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) public static CallerInfo getCallerInfo(Context context, String number, int subId) { + android.util.SeempLog.record_str(12, "number="+number+",subId="+subId); if (TextUtils.isEmpty(number)) { return null; diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index 943d8d6cdd55..72416493e300 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -567,8 +567,17 @@ public abstract class Connection extends Conferenceable { */ public static final int PROPERTY_CROSS_SIM = 1 << 13; + /** + * Set by the framework to indicate that a Connection is participant host, which + * means the conference participant's handle is the same as the conference host's handle. + * <p> + * This property is specific to IMS conference calls originating in Telephony. + * @hide + */ + public static final int PROPERTY_IS_PARTICIPANT_HOST = 1 << 14; + //********************************************************************************************** - // Next PROPERTY value: 1<<14 + // Next PROPERTY value: 1<<16 //********************************************************************************************** /** @@ -862,6 +871,14 @@ public abstract class Connection extends Conferenceable { "android.telecom.extra.IS_DEVICE_TO_DEVICE_COMMUNICATION_AVAILABLE"; /** + * Boolean connection extra key set on a {@link Connection} to indicate that swapping + * the call is not allowed. + * @hide + */ + public static final String EXTRA_DISABLE_SWAP_CALL = + "android.telecom.extra.DISABLE_SWAP_CALL"; + + /** * Connection event used to inform Telecom that it should play the on hold tone. This is used * to play a tone when the peer puts the current call on hold. Sent to Telecom via * {@link #sendConnectionEvent(String, Bundle)}. @@ -910,6 +927,17 @@ public abstract class Connection extends Conferenceable { public static final String EVENT_CALL_HOLD_FAILED = "android.telecom.event.CALL_HOLD_FAILED"; /** + * Connection event used to inform Telecom when a resume operation on a call has failed. + * This event is only sent when concurrent calls (DSDA) are possible + * <p> + * Sent via {@link #sendConnectionEvent(String, Bundle)}. The {@link Bundle} parameter is + * expected to be null when this connection event is used. + * @hide + */ + public static final String EVENT_CALL_RESUME_FAILED = + "android.telecom.event.CALL_RESUME_FAILED"; + + /** * Connection event used to inform Telecom when a switch operation on a call has failed. * <p> * Sent via {@link #sendConnectionEvent(String, Bundle)}. The {@link Bundle} parameter is diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index 536e458159d1..686fab65789e 100755 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -2553,7 +2553,8 @@ public abstract class ConnectionService extends Service { findConnectionForAction(callId, "abort").onAbort(); } - private void answerVideo(String callId, int videoState) { + /** {@hide} */ + protected void answerVideo(String callId, int videoState) { Log.i(this, "answerVideo %s", callId); if (mConnectionById.containsKey(callId)) { findConnectionForAction(callId, "answer").onAnswer(videoState); @@ -2562,7 +2563,8 @@ public abstract class ConnectionService extends Service { } } - private void answer(String callId) { + /** {@hide} */ + protected void answer(String callId) { Log.i(this, "answer %s", callId); if (mConnectionById.containsKey(callId)) { findConnectionForAction(callId, "answer").onAnswer(); @@ -2621,7 +2623,8 @@ public abstract class ConnectionService extends Service { } } - private void hold(String callId) { + /** {@hide} */ + protected void hold(String callId) { Log.i(this, "hold %s", callId); if (mConnectionById.containsKey(callId)) { findConnectionForAction(callId, "hold").onHold(); @@ -2630,7 +2633,8 @@ public abstract class ConnectionService extends Service { } } - private void unhold(String callId) { + /** {@hide} */ + protected void unhold(String callId) { Log.i(this, "unhold %s", callId); if (mConnectionById.containsKey(callId)) { findConnectionForAction(callId, "unhold").onUnhold(); @@ -3733,7 +3737,8 @@ public abstract class ConnectionService extends Service { } } - private Connection findConnectionForAction(String callId, String action) { + /** {@hide} */ + protected Connection findConnectionForAction(String callId, String action) { if (callId != null && mConnectionById.containsKey(callId)) { return mConnectionById.get(callId); } @@ -3748,7 +3753,8 @@ public abstract class ConnectionService extends Service { return sNullConnection; } - private Conference findConferenceForAction(String conferenceId, String action) { + /** {@hide} */ + protected Conference findConferenceForAction(String conferenceId, String action) { if (mConferenceById.containsKey(conferenceId)) { return mConferenceById.get(conferenceId); } @@ -3794,7 +3800,8 @@ public abstract class ConnectionService extends Service { return ids; } - private Conference getNullConference() { + /** {@hide} */ + protected Conference getNullConference() { if (sNullConference == null) { sNullConference = new Conference(null) {}; } diff --git a/telecomm/java/android/telecom/PhoneAccount.java b/telecomm/java/android/telecom/PhoneAccount.java index 94c737d61b0a..12403fcd6789 100644 --- a/telecomm/java/android/telecom/PhoneAccount.java +++ b/telecomm/java/android/telecom/PhoneAccount.java @@ -448,6 +448,16 @@ public final class PhoneAccount implements Parcelable { /* NEXT CAPABILITY: [0x100000, 0x200000, 0x400000] */ /** + * Flag indicating that this {@link PhoneAccount} is capable of downgrading a call to voice + * from an RTT (Real-time text) session. + * When set, Dialer can check for this capability to display the downgrade to voice option + * in an RTT call, this capability is set from Telephony based on the carrier config support. + * To avoid conflict with AOSP changes, setting it to a large value. + * @hide + */ + public static final int CAPABILITY_DOWNGRADE_RTT = 0x40000000; + + /** * URI scheme for telephone number URIs. */ public static final String SCHEME_TEL = "tel"; diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java index a72f7806d3ea..b7d8827f07da 100644 --- a/telecomm/java/android/telecom/TelecomManager.java +++ b/telecomm/java/android/telecom/TelecomManager.java @@ -198,6 +198,17 @@ public class TelecomManager { "android.telecom.action.DEFAULT_DIALER_CHANGED"; /** + *@hide Broadcast intent action indicating the call type(CS call or Non-CS call). + * The string extra {@link #EXTRA_CALL_TYPE_CS} will contain the + * boolean value true if call is CS call else false. + * + * @see #EXTRA_CALL_TYPE_CS + */ + public static final String ACTION_CALL_TYPE = + "codeaurora.telecom.action.CALL_TYPE"; + + + /** * Extra value used to provide the package name for {@link #ACTION_CHANGE_DEFAULT_DIALER}. */ public static final String EXTRA_CHANGE_DEFAULT_DIALER_PACKAGE_NAME = @@ -394,6 +405,15 @@ public class TelecomManager { "android.telecom.extra.IS_USER_INTENT_EMERGENCY_CALL"; /** + * Optional extra for {@link #ACTION_INCOMING_CALL} containing a boolean to indicate that the + * call has an externally generated ringer. Used by the HfpClientConnectionService when In Band + * Ringtone is enabled to prevent two ringers from being generated. + * @hide + */ + public static final String EXTRA_CALL_EXTERNAL_RINGER = + "android.telecom.extra.CALL_EXTERNAL_RINGER"; + + /** * A mandatory extra containing a {@link Uri} to be passed in when calling * {@link #addNewUnknownCall(PhoneAccountHandle, Bundle)}. The {@link Uri} value indicates * the remote handle of the new call. @@ -492,6 +512,13 @@ public class TelecomManager { "android.telecom.extra.CALL_NETWORK_TYPE"; /** + *@hide Extra value used to provide the call type for {@link #ACTION_CALL_TYPE}. + */ + public static final String EXTRA_CALL_TYPE_CS = + "codeaurora.telecom.extra.CALL_TYPE_CS"; + + + /** * An optional {@link android.content.Intent#ACTION_CALL} intent extra denoting the * package name of the app specifying an alternative gateway for the call. * The value is a string. diff --git a/telephony/api/system-current.txt b/telephony/api/system-current.txt new file mode 100644 index 000000000000..fc2ef2137c7b --- /dev/null +++ b/telephony/api/system-current.txt @@ -0,0 +1,2073 @@ +// Signature format: 2.0 +package android.telephony { + + public final class AccessNetworkConstants { + field public static final int TRANSPORT_TYPE_INVALID = -1; // 0xffffffff + } + + public static final class AccessNetworkConstants.NgranBands { + method public static int getFrequencyRangeGroup(int); + field public static final int FREQUENCY_RANGE_GROUP_1 = 1; // 0x1 + field public static final int FREQUENCY_RANGE_GROUP_2 = 2; // 0x2 + field public static final int FREQUENCY_RANGE_GROUP_UNKNOWN = 0; // 0x0 + } + + public final class BarringInfo implements android.os.Parcelable { + ctor public BarringInfo(); + method @NonNull public android.telephony.BarringInfo createLocationInfoSanitizedCopy(); + } + + public final class CallAttributes implements android.os.Parcelable { + ctor public CallAttributes(@NonNull android.telephony.PreciseCallState, int, @NonNull android.telephony.CallQuality); + method public int describeContents(); + method @NonNull public android.telephony.CallQuality getCallQuality(); + method public int getNetworkType(); + method @NonNull public android.telephony.PreciseCallState getPreciseCallState(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CallAttributes> CREATOR; + } + + public final class CallForwardingInfo implements android.os.Parcelable { + ctor public CallForwardingInfo(boolean, int, @Nullable String, int); + method public int describeContents(); + method @Nullable public String getNumber(); + method public int getReason(); + method public int getTimeoutSeconds(); + method public boolean isEnabled(); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CallForwardingInfo> CREATOR; + field public static final int REASON_ALL = 4; // 0x4 + field public static final int REASON_ALL_CONDITIONAL = 5; // 0x5 + field public static final int REASON_BUSY = 1; // 0x1 + field public static final int REASON_NOT_REACHABLE = 3; // 0x3 + field public static final int REASON_NO_REPLY = 2; // 0x2 + field public static final int REASON_UNCONDITIONAL = 0; // 0x0 + } + + public final class CallQuality implements android.os.Parcelable { + ctor public CallQuality(int, int, int, int, int, int, int, int, int, int, int); + ctor public CallQuality(int, int, int, int, int, int, int, int, int, int, int, boolean, boolean, boolean); + method public int describeContents(); + method public int getAverageRelativeJitter(); + method public int getAverageRoundTripTime(); + method public int getCallDuration(); + method public int getCodecType(); + method public int getDownlinkCallQualityLevel(); + method public int getMaxRelativeJitter(); + method public int getNumRtpPacketsNotReceived(); + method public int getNumRtpPacketsReceived(); + method public int getNumRtpPacketsTransmitted(); + method public int getNumRtpPacketsTransmittedLost(); + method public int getUplinkCallQualityLevel(); + method public boolean isIncomingSilenceDetectedAtCallSetup(); + method public boolean isOutgoingSilenceDetectedAtCallSetup(); + method public boolean isRtpInactivityDetected(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CALL_QUALITY_BAD = 4; // 0x4 + field public static final int CALL_QUALITY_EXCELLENT = 0; // 0x0 + field public static final int CALL_QUALITY_FAIR = 2; // 0x2 + field public static final int CALL_QUALITY_GOOD = 1; // 0x1 + field public static final int CALL_QUALITY_NOT_AVAILABLE = 5; // 0x5 + field public static final int CALL_QUALITY_POOR = 3; // 0x3 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CallQuality> CREATOR; + } + + public class CarrierConfigManager { + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getDefaultCarrierServicePackageName(); + method @NonNull public static android.os.PersistableBundle getDefaultConfig(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void overrideConfig(int, @Nullable android.os.PersistableBundle); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void updateConfigForPhoneId(int, String); + field public static final String KEY_CARRIER_SETUP_APP_STRING = "carrier_setup_app_string"; + field public static final String KEY_SUPPORT_CDMA_1X_VOICE_CALLS_BOOL = "support_cdma_1x_voice_calls_bool"; + } + + public static final class CarrierConfigManager.Wifi { + field public static final String KEY_HOTSPOT_MAX_CLIENT_COUNT = "wifi.hotspot_maximum_client_count"; + field public static final String KEY_PREFIX = "wifi."; + } + + public final class CarrierRestrictionRules implements android.os.Parcelable { + method @NonNull public java.util.List<java.lang.Boolean> areCarrierIdentifiersAllowed(@NonNull java.util.List<android.service.carrier.CarrierIdentifier>); + method public int describeContents(); + method @NonNull public java.util.List<android.service.carrier.CarrierIdentifier> getAllowedCarriers(); + method public int getDefaultCarrierRestriction(); + method @NonNull public java.util.List<android.service.carrier.CarrierIdentifier> getExcludedCarriers(); + method public int getMultiSimPolicy(); + method public boolean isAllCarriersAllowed(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CARRIER_RESTRICTION_DEFAULT_ALLOWED = 1; // 0x1 + field public static final int CARRIER_RESTRICTION_DEFAULT_NOT_ALLOWED = 0; // 0x0 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CarrierRestrictionRules> CREATOR; + field public static final int MULTISIM_POLICY_NONE = 0; // 0x0 + field public static final int MULTISIM_POLICY_ONE_VALID_SIM_MUST_BE_PRESENT = 1; // 0x1 + } + + public static final class CarrierRestrictionRules.Builder { + ctor public CarrierRestrictionRules.Builder(); + method @NonNull public android.telephony.CarrierRestrictionRules build(); + method @NonNull public android.telephony.CarrierRestrictionRules.Builder setAllCarriersAllowed(); + method @NonNull public android.telephony.CarrierRestrictionRules.Builder setAllowedCarriers(@NonNull java.util.List<android.service.carrier.CarrierIdentifier>); + method @NonNull public android.telephony.CarrierRestrictionRules.Builder setDefaultCarrierRestriction(int); + method @NonNull public android.telephony.CarrierRestrictionRules.Builder setExcludedCarriers(@NonNull java.util.List<android.service.carrier.CarrierIdentifier>); + method @NonNull public android.telephony.CarrierRestrictionRules.Builder setMultiSimPolicy(int); + } + + public class CbGeoUtils { + } + + public static class CbGeoUtils.Circle implements android.telephony.CbGeoUtils.Geometry { + ctor public CbGeoUtils.Circle(@NonNull android.telephony.CbGeoUtils.LatLng, double); + method public boolean contains(@NonNull android.telephony.CbGeoUtils.LatLng); + method @NonNull public android.telephony.CbGeoUtils.LatLng getCenter(); + method public double getRadius(); + } + + public static interface CbGeoUtils.Geometry { + method public boolean contains(@NonNull android.telephony.CbGeoUtils.LatLng); + } + + public static class CbGeoUtils.LatLng { + ctor public CbGeoUtils.LatLng(double, double); + method public double distance(@NonNull android.telephony.CbGeoUtils.LatLng); + method @NonNull public android.telephony.CbGeoUtils.LatLng subtract(@NonNull android.telephony.CbGeoUtils.LatLng); + field public final double lat; + field public final double lng; + } + + public static class CbGeoUtils.Polygon implements android.telephony.CbGeoUtils.Geometry { + ctor public CbGeoUtils.Polygon(@NonNull java.util.List<android.telephony.CbGeoUtils.LatLng>); + method public boolean contains(@NonNull android.telephony.CbGeoUtils.LatLng); + method @NonNull public java.util.List<android.telephony.CbGeoUtils.LatLng> getVertices(); + } + + public abstract class CellBroadcastService extends android.app.Service { + ctor public CellBroadcastService(); + method @NonNull @WorkerThread public abstract CharSequence getCellBroadcastAreaInfo(int); + method public android.os.IBinder onBind(@Nullable android.content.Intent); + method public abstract void onCdmaCellBroadcastSms(int, @NonNull byte[], int); + method public abstract void onCdmaScpMessage(int, @NonNull java.util.List<android.telephony.cdma.CdmaSmsCbProgramData>, @NonNull String, @NonNull java.util.function.Consumer<android.os.Bundle>); + method public abstract void onGsmCellBroadcastSms(int, @NonNull byte[]); + field public static final String CELL_BROADCAST_SERVICE_INTERFACE = "android.telephony.CellBroadcastService"; + } + + public abstract class CellIdentity implements android.os.Parcelable { + method @NonNull public abstract android.telephony.CellLocation asCellLocation(); + method @NonNull public abstract android.telephony.CellIdentity sanitizeLocationInfo(); + } + + public final class CellIdentityCdma extends android.telephony.CellIdentity { + method @NonNull public android.telephony.cdma.CdmaCellLocation asCellLocation(); + method @NonNull public android.telephony.CellIdentityCdma sanitizeLocationInfo(); + } + + public final class CellIdentityGsm extends android.telephony.CellIdentity { + method @NonNull public android.telephony.gsm.GsmCellLocation asCellLocation(); + method @NonNull public android.telephony.CellIdentityGsm sanitizeLocationInfo(); + } + + public final class CellIdentityLte extends android.telephony.CellIdentity { + method @NonNull public android.telephony.gsm.GsmCellLocation asCellLocation(); + method @NonNull public android.telephony.CellIdentityLte sanitizeLocationInfo(); + } + + public final class CellIdentityNr extends android.telephony.CellIdentity { + method @NonNull public android.telephony.CellLocation asCellLocation(); + method @NonNull public android.telephony.CellIdentityNr sanitizeLocationInfo(); + } + + public final class CellIdentityTdscdma extends android.telephony.CellIdentity { + method @NonNull public android.telephony.gsm.GsmCellLocation asCellLocation(); + method @NonNull public android.telephony.CellIdentityTdscdma sanitizeLocationInfo(); + } + + public final class CellIdentityWcdma extends android.telephony.CellIdentity { + method @NonNull public android.telephony.gsm.GsmCellLocation asCellLocation(); + method @NonNull public android.telephony.CellIdentityWcdma sanitizeLocationInfo(); + } + + public final class DataFailCause { + field @Deprecated public static final int VSNCP_APN_UNATHORIZED = 2238; // 0x8be + } + + public final class DataSpecificRegistrationInfo implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public android.telephony.LteVopsSupportInfo getLteVopsSupportInfo(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.DataSpecificRegistrationInfo> CREATOR; + } + + public final class ImsiEncryptionInfo implements android.os.Parcelable { + method public int describeContents(); + method @Nullable public String getKeyIdentifier(); + method @Nullable public java.security.PublicKey getPublicKey(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ImsiEncryptionInfo> CREATOR; + } + + public final class LteVopsSupportInfo implements android.os.Parcelable { + ctor public LteVopsSupportInfo(int, int); + method public int describeContents(); + method public int getEmcBearerSupport(); + method public int getVopsSupport(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.LteVopsSupportInfo> CREATOR; + field public static final int LTE_STATUS_NOT_AVAILABLE = 1; // 0x1 + field public static final int LTE_STATUS_NOT_SUPPORTED = 3; // 0x3 + field public static final int LTE_STATUS_SUPPORTED = 2; // 0x2 + } + + public class MbmsDownloadSession implements java.lang.AutoCloseable { + field public static final String MBMS_DOWNLOAD_SERVICE_ACTION = "android.telephony.action.EmbmsDownload"; + } + + public class MbmsGroupCallSession implements java.lang.AutoCloseable { + field public static final String MBMS_GROUP_CALL_SERVICE_ACTION = "android.telephony.action.EmbmsGroupCall"; + } + + public class MbmsStreamingSession implements java.lang.AutoCloseable { + field public static final String MBMS_STREAMING_SERVICE_ACTION = "android.telephony.action.EmbmsStreaming"; + } + + public final class ModemActivityInfo implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public android.telephony.ModemActivityInfo getDelta(@NonNull android.telephony.ModemActivityInfo); + method public long getIdleTimeMillis(); + method public static int getNumTxPowerLevels(); + method public long getReceiveTimeMillis(); + method public long getSleepTimeMillis(); + method public long getTimestampMillis(); + method public long getTransmitDurationMillisAtPowerLevel(int); + method @NonNull public android.util.Range<java.lang.Integer> getTransmitPowerRange(int); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ModemActivityInfo> CREATOR; + field public static final int TX_POWER_LEVEL_0 = 0; // 0x0 + field public static final int TX_POWER_LEVEL_1 = 1; // 0x1 + field public static final int TX_POWER_LEVEL_2 = 2; // 0x2 + field public static final int TX_POWER_LEVEL_3 = 3; // 0x3 + field public static final int TX_POWER_LEVEL_4 = 4; // 0x4 + } + + public final class NetworkRegistrationInfo implements android.os.Parcelable { + method @Nullable public android.telephony.DataSpecificRegistrationInfo getDataSpecificInfo(); + method public int getRegistrationState(); + method public int getRejectCause(); + method public int getRoamingType(); + method public boolean isEmergencyEnabled(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int REGISTRATION_STATE_DENIED = 3; // 0x3 + field public static final int REGISTRATION_STATE_HOME = 1; // 0x1 + field public static final int REGISTRATION_STATE_NOT_REGISTERED_OR_SEARCHING = 0; // 0x0 + field public static final int REGISTRATION_STATE_NOT_REGISTERED_SEARCHING = 2; // 0x2 + field public static final int REGISTRATION_STATE_ROAMING = 5; // 0x5 + field public static final int REGISTRATION_STATE_UNKNOWN = 4; // 0x4 + } + + public static final class NetworkRegistrationInfo.Builder { + ctor public NetworkRegistrationInfo.Builder(); + method @NonNull public android.telephony.NetworkRegistrationInfo build(); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setAccessNetworkTechnology(int); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setAvailableServices(@NonNull java.util.List<java.lang.Integer>); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setCellIdentity(@Nullable android.telephony.CellIdentity); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setDomain(int); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setEmergencyOnly(boolean); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setRegisteredPlmn(@Nullable String); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setRegistrationState(int); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setRejectCause(int); + method @NonNull public android.telephony.NetworkRegistrationInfo.Builder setTransportType(int); + } + + public abstract class NetworkService extends android.app.Service { + ctor public NetworkService(); + method public android.os.IBinder onBind(android.content.Intent); + method @Nullable public abstract android.telephony.NetworkService.NetworkServiceProvider onCreateNetworkServiceProvider(int); + field public static final String SERVICE_INTERFACE = "android.telephony.NetworkService"; + } + + public abstract class NetworkService.NetworkServiceProvider implements java.lang.AutoCloseable { + ctor public NetworkService.NetworkServiceProvider(int); + method public abstract void close(); + method public final int getSlotIndex(); + method public final void notifyNetworkRegistrationInfoChanged(); + method public void requestNetworkRegistrationInfo(int, @NonNull android.telephony.NetworkServiceCallback); + } + + public class NetworkServiceCallback { + method public void onRequestNetworkRegistrationInfoComplete(int, @Nullable android.telephony.NetworkRegistrationInfo); + field public static final int RESULT_ERROR_BUSY = 3; // 0x3 + field public static final int RESULT_ERROR_FAILED = 5; // 0x5 + field public static final int RESULT_ERROR_ILLEGAL_STATE = 4; // 0x4 + field public static final int RESULT_ERROR_INVALID_ARG = 2; // 0x2 + field public static final int RESULT_ERROR_UNSUPPORTED = 1; // 0x1 + field public static final int RESULT_SUCCESS = 0; // 0x0 + } + + public interface NumberVerificationCallback { + method public default void onCallReceived(@NonNull String); + method public default void onVerificationFailed(int); + field public static final int REASON_CONCURRENT_REQUESTS = 4; // 0x4 + field public static final int REASON_IN_ECBM = 5; // 0x5 + field public static final int REASON_IN_EMERGENCY_CALL = 6; // 0x6 + field public static final int REASON_NETWORK_NOT_AVAILABLE = 2; // 0x2 + field public static final int REASON_TIMED_OUT = 1; // 0x1 + field public static final int REASON_TOO_MANY_CALLS = 3; // 0x3 + field public static final int REASON_UNSPECIFIED = 0; // 0x0 + } + + public final class PhoneNumberRange implements android.os.Parcelable { + ctor public PhoneNumberRange(@NonNull String, @NonNull String, @NonNull String, @NonNull String); + method public int describeContents(); + method public boolean matches(@NonNull String); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.PhoneNumberRange> CREATOR; + } + + public class PhoneNumberUtils { + method @NonNull public static String getUsernameFromUriNumber(@NonNull String); + method public static boolean isUriNumber(@Nullable String); + method public static boolean isVoiceMailNumber(@NonNull android.content.Context, int, @Nullable String); + } + + public final class PhysicalChannelConfig implements android.os.Parcelable { + method public int describeContents(); + method public int getCellBandwidthDownlink(); + method public int getChannelNumber(); + method public int getConnectionStatus(); + method public int getNetworkType(); + method @IntRange(from=0, to=1007) public int getPhysicalCellId(); + method public void writeToParcel(@NonNull android.os.Parcel, int); + field public static final int CHANNEL_NUMBER_UNKNOWN = -1; // 0xffffffff + field public static final int CONNECTION_PRIMARY_SERVING = 1; // 0x1 + field public static final int CONNECTION_SECONDARY_SERVING = 2; // 0x2 + field public static final int CONNECTION_UNKNOWN = -1; // 0xffffffff + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.PhysicalChannelConfig> CREATOR; + field public static final int PHYSICAL_CELL_ID_UNKNOWN = -1; // 0xffffffff + } + + public final class PreciseCallState implements android.os.Parcelable { + ctor public PreciseCallState(int, int, int, int, int); + method public int describeContents(); + method public int getBackgroundCallState(); + method public int getForegroundCallState(); + method public int getRingingCallState(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.PreciseCallState> CREATOR; + field public static final int PRECISE_CALL_STATE_ACTIVE = 1; // 0x1 + field public static final int PRECISE_CALL_STATE_ALERTING = 4; // 0x4 + field public static final int PRECISE_CALL_STATE_DIALING = 3; // 0x3 + field public static final int PRECISE_CALL_STATE_DISCONNECTED = 7; // 0x7 + field public static final int PRECISE_CALL_STATE_DISCONNECTING = 8; // 0x8 + field public static final int PRECISE_CALL_STATE_HOLDING = 2; // 0x2 + field public static final int PRECISE_CALL_STATE_IDLE = 0; // 0x0 + field public static final int PRECISE_CALL_STATE_INCOMING = 5; // 0x5 + field public static final int PRECISE_CALL_STATE_NOT_VALID = -1; // 0xffffffff + field public static final int PRECISE_CALL_STATE_WAITING = 6; // 0x6 + } + + public final class PreciseDataConnectionState implements android.os.Parcelable { + method @Deprecated @NonNull public String getDataConnectionApn(); + method @Deprecated public int getDataConnectionApnTypeBitMask(); + method @Deprecated public int getDataConnectionFailCause(); + method @Deprecated public int getDataConnectionState(); + method public int getId(); + } + + public final class PreciseDisconnectCause { + field public static final int ACCESS_CLASS_BLOCKED = 260; // 0x104 + field public static final int ACCESS_INFORMATION_DISCARDED = 43; // 0x2b + field public static final int ACM_LIMIT_EXCEEDED = 68; // 0x44 + field public static final int BEARER_CAPABILITY_NOT_AUTHORIZED = 57; // 0x39 + field public static final int BEARER_NOT_AVAIL = 58; // 0x3a + field public static final int BEARER_SERVICE_NOT_IMPLEMENTED = 65; // 0x41 + field public static final int BUSY = 17; // 0x11 + field public static final int CALL_BARRED = 240; // 0xf0 + field public static final int CALL_REJECTED = 21; // 0x15 + field public static final int CDMA_ACCESS_BLOCKED = 1009; // 0x3f1 + field public static final int CDMA_ACCESS_FAILURE = 1006; // 0x3ee + field public static final int CDMA_DROP = 1001; // 0x3e9 + field public static final int CDMA_INTERCEPT = 1002; // 0x3ea + field public static final int CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000; // 0x3e8 + field public static final int CDMA_NOT_EMERGENCY = 1008; // 0x3f0 + field public static final int CDMA_PREEMPTED = 1007; // 0x3ef + field public static final int CDMA_REORDER = 1003; // 0x3eb + field public static final int CDMA_RETRY_ORDER = 1005; // 0x3ed + field public static final int CDMA_SO_REJECT = 1004; // 0x3ec + field public static final int CHANNEL_NOT_AVAIL = 44; // 0x2c + field public static final int CHANNEL_UNACCEPTABLE = 6; // 0x6 + field public static final int CONDITIONAL_IE_ERROR = 100; // 0x64 + field public static final int DESTINATION_OUT_OF_ORDER = 27; // 0x1b + field public static final int ERROR_UNSPECIFIED = 65535; // 0xffff + field public static final int FACILITY_REJECTED = 29; // 0x1d + field public static final int FDN_BLOCKED = 241; // 0xf1 + field public static final int IMEI_NOT_ACCEPTED = 243; // 0xf3 + field public static final int IMSI_UNKNOWN_IN_VLR = 242; // 0xf2 + field public static final int INCOMING_CALLS_BARRED_WITHIN_CUG = 55; // 0x37 + field public static final int INCOMPATIBLE_DESTINATION = 88; // 0x58 + field public static final int INFORMATION_ELEMENT_NON_EXISTENT = 99; // 0x63 + field public static final int INTERWORKING_UNSPECIFIED = 127; // 0x7f + field public static final int INVALID_MANDATORY_INFORMATION = 96; // 0x60 + field public static final int INVALID_NUMBER_FORMAT = 28; // 0x1c + field public static final int INVALID_TRANSACTION_IDENTIFIER = 81; // 0x51 + field public static final int MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 101; // 0x65 + field public static final int MESSAGE_TYPE_NON_IMPLEMENTED = 97; // 0x61 + field public static final int MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 98; // 0x62 + field public static final int NETWORK_DETACH = 261; // 0x105 + field public static final int NETWORK_OUT_OF_ORDER = 38; // 0x26 + field public static final int NETWORK_REJECT = 252; // 0xfc + field public static final int NETWORK_RESP_TIMEOUT = 251; // 0xfb + field public static final int NORMAL = 16; // 0x10 + field public static final int NORMAL_UNSPECIFIED = 31; // 0x1f + field public static final int NOT_VALID = -1; // 0xffffffff + field public static final int NO_ANSWER_FROM_USER = 19; // 0x13 + field public static final int NO_CIRCUIT_AVAIL = 34; // 0x22 + field public static final int NO_DISCONNECT_CAUSE_AVAILABLE = 0; // 0x0 + field public static final int NO_ROUTE_TO_DESTINATION = 3; // 0x3 + field public static final int NO_USER_RESPONDING = 18; // 0x12 + field public static final int NO_VALID_SIM = 249; // 0xf9 + field public static final int NUMBER_CHANGED = 22; // 0x16 + field public static final int OEM_CAUSE_1 = 61441; // 0xf001 + field public static final int OEM_CAUSE_10 = 61450; // 0xf00a + field public static final int OEM_CAUSE_11 = 61451; // 0xf00b + field public static final int OEM_CAUSE_12 = 61452; // 0xf00c + field public static final int OEM_CAUSE_13 = 61453; // 0xf00d + field public static final int OEM_CAUSE_14 = 61454; // 0xf00e + field public static final int OEM_CAUSE_15 = 61455; // 0xf00f + field public static final int OEM_CAUSE_2 = 61442; // 0xf002 + field public static final int OEM_CAUSE_3 = 61443; // 0xf003 + field public static final int OEM_CAUSE_4 = 61444; // 0xf004 + field public static final int OEM_CAUSE_5 = 61445; // 0xf005 + field public static final int OEM_CAUSE_6 = 61446; // 0xf006 + field public static final int OEM_CAUSE_7 = 61447; // 0xf007 + field public static final int OEM_CAUSE_8 = 61448; // 0xf008 + field public static final int OEM_CAUSE_9 = 61449; // 0xf009 + field public static final int ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 70; // 0x46 + field public static final int OPERATOR_DETERMINED_BARRING = 8; // 0x8 + field public static final int OUT_OF_SRV = 248; // 0xf8 + field public static final int PREEMPTION = 25; // 0x19 + field public static final int PROTOCOL_ERROR_UNSPECIFIED = 111; // 0x6f + field public static final int QOS_NOT_AVAIL = 49; // 0x31 + field public static final int RADIO_ACCESS_FAILURE = 253; // 0xfd + field public static final int RADIO_INTERNAL_ERROR = 250; // 0xfa + field public static final int RADIO_LINK_FAILURE = 254; // 0xfe + field public static final int RADIO_LINK_LOST = 255; // 0xff + field public static final int RADIO_OFF = 247; // 0xf7 + field public static final int RADIO_RELEASE_ABNORMAL = 259; // 0x103 + field public static final int RADIO_RELEASE_NORMAL = 258; // 0x102 + field public static final int RADIO_SETUP_FAILURE = 257; // 0x101 + field public static final int RADIO_UPLINK_FAILURE = 256; // 0x100 + field public static final int RECOVERY_ON_TIMER_EXPIRED = 102; // 0x66 + field public static final int REQUESTED_FACILITY_NOT_IMPLEMENTED = 69; // 0x45 + field public static final int REQUESTED_FACILITY_NOT_SUBSCRIBED = 50; // 0x32 + field public static final int RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 47; // 0x2f + field public static final int SEMANTICALLY_INCORRECT_MESSAGE = 95; // 0x5f + field public static final int SERVICE_OPTION_NOT_AVAILABLE = 63; // 0x3f + field public static final int SERVICE_OR_OPTION_NOT_IMPLEMENTED = 79; // 0x4f + field public static final int STATUS_ENQUIRY = 30; // 0x1e + field public static final int SWITCHING_CONGESTION = 42; // 0x2a + field public static final int TEMPORARY_FAILURE = 41; // 0x29 + field public static final int UNOBTAINABLE_NUMBER = 1; // 0x1 + field public static final int USER_NOT_MEMBER_OF_CUG = 87; // 0x57 + } + + public class ServiceState implements android.os.Parcelable { + method @Nullable public android.telephony.NetworkRegistrationInfo getNetworkRegistrationInfo(int, int); + method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoListForDomain(int); + method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoListForTransportType(int); + field public static final int ROAMING_TYPE_DOMESTIC = 2; // 0x2 + field public static final int ROAMING_TYPE_INTERNATIONAL = 3; // 0x3 + field public static final int ROAMING_TYPE_NOT_ROAMING = 0; // 0x0 + field public static final int ROAMING_TYPE_UNKNOWN = 1; // 0x1 + } + + public final class SmsCbCmasInfo implements android.os.Parcelable { + ctor public SmsCbCmasInfo(int, int, int, int, int, int); + method public int describeContents(); + method public int getCategory(); + method public int getCertainty(); + method public int getMessageClass(); + method public int getResponseType(); + method public int getSeverity(); + method public int getUrgency(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CMAS_CATEGORY_CBRNE = 10; // 0xa + field public static final int CMAS_CATEGORY_ENV = 7; // 0x7 + field public static final int CMAS_CATEGORY_FIRE = 5; // 0x5 + field public static final int CMAS_CATEGORY_GEO = 0; // 0x0 + field public static final int CMAS_CATEGORY_HEALTH = 6; // 0x6 + field public static final int CMAS_CATEGORY_INFRA = 9; // 0x9 + field public static final int CMAS_CATEGORY_MET = 1; // 0x1 + field public static final int CMAS_CATEGORY_OTHER = 11; // 0xb + field public static final int CMAS_CATEGORY_RESCUE = 4; // 0x4 + field public static final int CMAS_CATEGORY_SAFETY = 2; // 0x2 + field public static final int CMAS_CATEGORY_SECURITY = 3; // 0x3 + field public static final int CMAS_CATEGORY_TRANSPORT = 8; // 0x8 + field public static final int CMAS_CATEGORY_UNKNOWN = -1; // 0xffffffff + field public static final int CMAS_CERTAINTY_LIKELY = 1; // 0x1 + field public static final int CMAS_CERTAINTY_OBSERVED = 0; // 0x0 + field public static final int CMAS_CERTAINTY_UNKNOWN = -1; // 0xffffffff + field public static final int CMAS_CLASS_CHILD_ABDUCTION_EMERGENCY = 3; // 0x3 + field public static final int CMAS_CLASS_CMAS_EXERCISE = 5; // 0x5 + field public static final int CMAS_CLASS_EXTREME_THREAT = 1; // 0x1 + field public static final int CMAS_CLASS_OPERATOR_DEFINED_USE = 6; // 0x6 + field public static final int CMAS_CLASS_PRESIDENTIAL_LEVEL_ALERT = 0; // 0x0 + field public static final int CMAS_CLASS_REQUIRED_MONTHLY_TEST = 4; // 0x4 + field public static final int CMAS_CLASS_SEVERE_THREAT = 2; // 0x2 + field public static final int CMAS_CLASS_UNKNOWN = -1; // 0xffffffff + field public static final int CMAS_RESPONSE_TYPE_ASSESS = 6; // 0x6 + field public static final int CMAS_RESPONSE_TYPE_AVOID = 5; // 0x5 + field public static final int CMAS_RESPONSE_TYPE_EVACUATE = 1; // 0x1 + field public static final int CMAS_RESPONSE_TYPE_EXECUTE = 3; // 0x3 + field public static final int CMAS_RESPONSE_TYPE_MONITOR = 4; // 0x4 + field public static final int CMAS_RESPONSE_TYPE_NONE = 7; // 0x7 + field public static final int CMAS_RESPONSE_TYPE_PREPARE = 2; // 0x2 + field public static final int CMAS_RESPONSE_TYPE_SHELTER = 0; // 0x0 + field public static final int CMAS_RESPONSE_TYPE_UNKNOWN = -1; // 0xffffffff + field public static final int CMAS_SEVERITY_EXTREME = 0; // 0x0 + field public static final int CMAS_SEVERITY_SEVERE = 1; // 0x1 + field public static final int CMAS_SEVERITY_UNKNOWN = -1; // 0xffffffff + field public static final int CMAS_URGENCY_EXPECTED = 1; // 0x1 + field public static final int CMAS_URGENCY_IMMEDIATE = 0; // 0x0 + field public static final int CMAS_URGENCY_UNKNOWN = -1; // 0xffffffff + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.SmsCbCmasInfo> CREATOR; + } + + public final class SmsCbEtwsInfo implements android.os.Parcelable { + ctor public SmsCbEtwsInfo(int, boolean, boolean, boolean, @Nullable byte[]); + method public int describeContents(); + method @Nullable public byte[] getPrimaryNotificationSignature(); + method public long getPrimaryNotificationTimestamp(); + method public int getWarningType(); + method public boolean isEmergencyUserAlert(); + method public boolean isPopupAlert(); + method public boolean isPrimary(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.SmsCbEtwsInfo> CREATOR; + field public static final int ETWS_WARNING_TYPE_EARTHQUAKE = 0; // 0x0 + field public static final int ETWS_WARNING_TYPE_EARTHQUAKE_AND_TSUNAMI = 2; // 0x2 + field public static final int ETWS_WARNING_TYPE_OTHER_EMERGENCY = 4; // 0x4 + field public static final int ETWS_WARNING_TYPE_TEST_MESSAGE = 3; // 0x3 + field public static final int ETWS_WARNING_TYPE_TSUNAMI = 1; // 0x1 + field public static final int ETWS_WARNING_TYPE_UNKNOWN = -1; // 0xffffffff + } + + public final class SmsCbLocation implements android.os.Parcelable { + ctor public SmsCbLocation(@NonNull String, int, int); + method public int describeContents(); + method public int getCid(); + method public int getLac(); + method @NonNull public String getPlmn(); + method public boolean isInLocationArea(@NonNull android.telephony.SmsCbLocation); + method public boolean isInLocationArea(@Nullable String, int, int); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.SmsCbLocation> CREATOR; + } + + public final class SmsCbMessage implements android.os.Parcelable { + ctor public SmsCbMessage(int, int, int, @NonNull android.telephony.SmsCbLocation, int, @Nullable String, int, @Nullable String, int, @Nullable android.telephony.SmsCbEtwsInfo, @Nullable android.telephony.SmsCbCmasInfo, int, @Nullable java.util.List<android.telephony.CbGeoUtils.Geometry>, long, int, int); + method @NonNull public static android.telephony.SmsCbMessage createFromCursor(@NonNull android.database.Cursor); + method public int describeContents(); + method @Nullable public android.telephony.SmsCbCmasInfo getCmasWarningInfo(); + method @NonNull public android.content.ContentValues getContentValues(); + method public int getDataCodingScheme(); + method @Nullable public android.telephony.SmsCbEtwsInfo getEtwsWarningInfo(); + method public int getGeographicalScope(); + method @NonNull public java.util.List<android.telephony.CbGeoUtils.Geometry> getGeometries(); + method @Nullable public String getLanguageCode(); + method @NonNull public android.telephony.SmsCbLocation getLocation(); + method public int getMaximumWaitingDuration(); + method @Nullable public String getMessageBody(); + method public int getMessageFormat(); + method public int getMessagePriority(); + method public long getReceivedTime(); + method public int getSerialNumber(); + method public int getServiceCategory(); + method public int getSlotIndex(); + method public int getSubscriptionId(); + method public boolean isCmasMessage(); + method public boolean isEmergencyMessage(); + method public boolean isEtwsMessage(); + method public boolean needGeoFencingCheck(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.SmsCbMessage> CREATOR; + field public static final int GEOGRAPHICAL_SCOPE_CELL_WIDE = 3; // 0x3 + field public static final int GEOGRAPHICAL_SCOPE_CELL_WIDE_IMMEDIATE = 0; // 0x0 + field public static final int GEOGRAPHICAL_SCOPE_LOCATION_AREA_WIDE = 2; // 0x2 + field public static final int GEOGRAPHICAL_SCOPE_PLMN_WIDE = 1; // 0x1 + field public static final int MAXIMUM_WAIT_TIME_NOT_SET = 255; // 0xff + field public static final int MESSAGE_FORMAT_3GPP = 1; // 0x1 + field public static final int MESSAGE_FORMAT_3GPP2 = 2; // 0x2 + field public static final int MESSAGE_PRIORITY_EMERGENCY = 3; // 0x3 + field public static final int MESSAGE_PRIORITY_INTERACTIVE = 1; // 0x1 + field public static final int MESSAGE_PRIORITY_NORMAL = 0; // 0x0 + field public static final int MESSAGE_PRIORITY_URGENT = 2; // 0x2 + } + + public final class SmsManager { + method public boolean disableCellBroadcastRange(int, int, int); + method public boolean enableCellBroadcastRange(int, int, int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getPremiumSmsConsent(@NonNull String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void sendMultipartTextMessageWithoutPersisting(String, String, java.util.List<java.lang.String>, java.util.List<android.app.PendingIntent>, java.util.List<android.app.PendingIntent>); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setPremiumSmsConsent(@NonNull String, int); + field public static final int PREMIUM_SMS_CONSENT_ALWAYS_ALLOW = 3; // 0x3 + field public static final int PREMIUM_SMS_CONSENT_ASK_USER = 1; // 0x1 + field public static final int PREMIUM_SMS_CONSENT_NEVER_ALLOW = 2; // 0x2 + field public static final int PREMIUM_SMS_CONSENT_UNKNOWN = 0; // 0x0 + } + + public class SmsMessage { + method @Nullable public static android.telephony.SmsMessage createFromNativeSmsSubmitPdu(@NonNull byte[], boolean); + method @Nullable public static android.telephony.SmsMessage.SubmitPdu getSmsPdu(int, int, @Nullable String, @NonNull String, @NonNull String, long); + method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public static byte[] getSubmitPduEncodedMessage(boolean, @NonNull String, @NonNull String, int, @IntRange(from=0) int, @IntRange(from=0) int, @IntRange(from=0, to=255) int, @IntRange(from=1, to=255) int, @IntRange(from=1, to=255) int); + } + + public class SubscriptionInfo implements android.os.Parcelable { + method public boolean areUiccApplicationsEnabled(); + method @Nullable public java.util.List<android.telephony.UiccAccessRule> getAccessRules(); + method public int getProfileClass(); + method public boolean isGroupDisabled(); + } + + public class SubscriptionManager { + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean canDisablePhysicalSubscription(); + method public boolean canManageSubscription(@NonNull android.telephony.SubscriptionInfo, @NonNull String); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int[] getActiveSubscriptionIdList(); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.SubscriptionInfo getActiveSubscriptionInfoForIcc(@NonNull String); + method public java.util.List<android.telephony.SubscriptionInfo> getAvailableSubscriptionInfoList(); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int[] getCompleteActiveSubscriptionIdList(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getEnabledSubscriptionId(int); + method @NonNull public static android.content.res.Resources getResourcesForSubId(@NonNull android.content.Context, int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isSubscriptionEnabled(int); + method public void requestEmbeddedSubscriptionInfoListRefresh(); + method public void requestEmbeddedSubscriptionInfoListRefresh(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDefaultDataSubId(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDefaultSmsSubId(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDefaultVoiceSubscriptionId(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setPreferredDataSubscriptionId(int, boolean, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setSubscriptionEnabled(int, boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUiccApplicationsEnabled(int, boolean); + field @RequiresPermission(android.Manifest.permission.MANAGE_SUBSCRIPTION_PLANS) public static final String ACTION_SUBSCRIPTION_PLANS_CHANGED = "android.telephony.action.SUBSCRIPTION_PLANS_CHANGED"; + field @NonNull public static final android.net.Uri ADVANCED_CALLING_ENABLED_CONTENT_URI; + field @Deprecated public static final int PROFILE_CLASS_DEFAULT; + field public static final int PROFILE_CLASS_OPERATIONAL; + field public static final int PROFILE_CLASS_PROVISIONING; + field public static final int PROFILE_CLASS_TESTING; + field public static final int PROFILE_CLASS_UNSET; + field @NonNull public static final android.net.Uri VT_ENABLED_CONTENT_URI; + field @NonNull public static final android.net.Uri WFC_ENABLED_CONTENT_URI; + field @NonNull public static final android.net.Uri WFC_MODE_CONTENT_URI; + field @NonNull public static final android.net.Uri WFC_ROAMING_ENABLED_CONTENT_URI; + field @NonNull public static final android.net.Uri WFC_ROAMING_MODE_CONTENT_URI; + } + + public final class TelephonyHistogram implements android.os.Parcelable { + ctor public TelephonyHistogram(int, int, int); + ctor public TelephonyHistogram(android.telephony.TelephonyHistogram); + ctor public TelephonyHistogram(android.os.Parcel); + method public void addTimeTaken(int); + method public int describeContents(); + method public int getAverageTime(); + method public int getBucketCount(); + method public int[] getBucketCounters(); + method public int[] getBucketEndPoints(); + method public int getCategory(); + method public int getId(); + method public int getMaxTime(); + method public int getMinTime(); + method public int getSampleCount(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.TelephonyHistogram> CREATOR; + field public static final int TELEPHONY_CATEGORY_RIL = 1; // 0x1 + } + + public class TelephonyManager { + method @Deprecated @RequiresPermission(android.Manifest.permission.CALL_PHONE) public void call(String, String); + method public int checkCarrierPrivilegesForPackage(String); + method public int checkCarrierPrivilegesForPackageAnyPhone(String); + method public void dial(String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean disableDataConnectivity(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean enableDataConnectivity(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean enableModemForSlot(int, boolean); + method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void enableVideoCalling(boolean); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getAidForAppType(int); + method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.List<android.service.carrier.CarrierIdentifier> getAllowedCarriers(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public long getAllowedNetworkTypes(); + method @Nullable @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public android.content.ComponentName getAndUpdateDefaultRespondViaMessageApplication(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void getCallForwarding(int, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.TelephonyManager.CallForwardingInfoCallback); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void getCallWaitingStatus(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.ImsiEncryptionInfo getCarrierInfoForImsiEncryption(int); + method public java.util.List<java.lang.String> getCarrierPackageNamesForIntent(android.content.Intent); + method public java.util.List<java.lang.String> getCarrierPackageNamesForIntentAndPhone(android.content.Intent, int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getCarrierPrivilegeStatus(int); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.List<java.lang.String> getCarrierPrivilegedPackagesForAllActiveSubscriptions(); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.CarrierRestrictionRules getCarrierRestrictionRules(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String getCdmaMdn(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String getCdmaMdn(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String getCdmaMin(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String getCdmaMin(int); + method public String getCdmaPrlVersion(); + method public int getCurrentPhoneType(); + method public int getCurrentPhoneType(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getDataActivationState(); + method @Deprecated public boolean getDataEnabled(); + method @Deprecated public boolean getDataEnabled(int); + method @Nullable @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public android.content.ComponentName getDefaultRespondViaMessageApplication(); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getDeviceSoftwareVersion(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean getEmergencyCallbackMode(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getEmergencyNumberDbVersion(); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimDomain(); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getIsimIst(); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.Map<java.lang.Integer,java.lang.Integer> getLogicalToPhysicalSlotMapping(); + method public int getMaxNumberOfSimultaneouslyActiveSims(); + method public static long getMaxNumberVerificationTimeoutMillis(); + method @NonNull @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String[] getMergedImsisFromGroup(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public long getPreferredNetworkTypeBitmask(); + method @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public int getRadioPowerState(); + method public int getSimApplicationState(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getSimApplicationState(int); + method public int getSimCardState(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getSimCardState(int); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public java.util.Locale getSimLocale(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public long getSupportedRadioAccessFamily(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public java.util.List<android.telephony.TelephonyHistogram> getTelephonyHistograms(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public android.telephony.UiccSlotInfo[] getUiccSlotsInfo(); + method @Nullable public android.os.Bundle getVisualVoicemailSettings(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getVoiceActivationState(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handlePinMmi(String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handlePinMmiForSubscriber(int, String); + method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean iccCloseLogicalChannelBySlot(int, int); + method @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannelBySlot(int, @Nullable String, int); + method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String iccTransmitApduBasicChannelBySlot(int, int, int, int, int, int, @Nullable String); + method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String iccTransmitApduLogicalChannelBySlot(int, int, int, int, int, int, int, @Nullable String); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isAnyRadioPoweredOn(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isApnMetered(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isApplicationOnUicc(int); + method public boolean isDataConnectivityPossible(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isDataEnabledForApn(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isEmergencyAssistanceEnabled(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public boolean isIccLockEnabled(); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isIdle(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isLteCdmaEvdoGsmWcdmaEnabled(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isMobileDataPolicyEnabled(int); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isOffhook(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isOpportunisticNetworkEnabled(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isPotentialEmergencyNumber(@NonNull String); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRadioOn(); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isRinging(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean isTetheringApnRequired(); + method @Deprecated @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isVideoCallingEnabled(); + method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isVisualVoicemailEnabled(android.telecom.PhoneAccountHandle); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean matchesCurrentSimOperator(@NonNull String, int, @Nullable String); + method public boolean needsOtaServiceProvisioning(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void notifyOtaEmergencyNumberDbInstalled(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean rebootRadio(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void reportDefaultNetworkStatus(boolean); + method @RequiresPermission(allOf={android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.MODIFY_PHONE_STATE}) public void requestCellInfoUpdate(@NonNull android.os.WorkSource, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.TelephonyManager.CellInfoCallback); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void requestNumberVerification(@NonNull android.telephony.PhoneNumberRange, long, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.NumberVerificationCallback); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void resetAllCarrierActions(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void resetCarrierKeysForImsiEncryption(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void resetIms(int); + method @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public void resetOtaEmergencyNumberDbFilePath(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean resetRadioConfig(); + method @RequiresPermission(android.Manifest.permission.CONNECTIVITY_INTERNAL) public void resetSettings(); + method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setAllowedCarriers(int, java.util.List<android.service.carrier.CarrierIdentifier>); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setAllowedNetworkTypes(long); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCallForwarding(@NonNull android.telephony.CallForwardingInfo, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCallWaitingEnabled(boolean, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>); + method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setCarrierDataEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setCarrierRestrictionRules(@NonNull android.telephony.CarrierRestrictionRules); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataActivationState(int); + method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataEnabled(int, boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataRoamingEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setMobileDataPolicyEnabledStatus(int, boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setMultiSimCarrierRestriction(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setOpportunisticNetworkState(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setPreferredNetworkTypeBitmask(long); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setRadio(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setRadioEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setRadioPower(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSimPowerState(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSimPowerStateForSlot(int, int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSystemSelectionChannels(@NonNull java.util.List<android.telephony.RadioAccessSpecifier>, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setSystemSelectionChannels(@NonNull java.util.List<android.telephony.RadioAccessSpecifier>); + method @Deprecated public void setVisualVoicemailEnabled(android.telecom.PhoneAccountHandle, boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoiceActivationState(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void shutdownAllRadios(); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean supplyPin(String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int[] supplyPinReportResult(String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean supplyPuk(String, String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int[] supplyPukReportResult(String, String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean switchSlots(int[]); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void toggleRadioOnOff(); + method @RequiresPermission(android.Manifest.permission.READ_ACTIVE_EMERGENCY_SESSION) public void updateOtaEmergencyNumberDbFilePath(@NonNull android.os.ParcelFileDescriptor); + method public void updateServiceLocation(); + field @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public static final String ACTION_ANOMALY_REPORTED = "android.telephony.action.ANOMALY_REPORTED"; + field public static final String ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED = "android.intent.action.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED"; + field public static final String ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED = "android.intent.action.ACTION_DEFAULT_VOICE_SUBSCRIPTION_CHANGED"; + field public static final String ACTION_EMERGENCY_ASSISTANCE = "android.telephony.action.EMERGENCY_ASSISTANCE"; + field public static final String ACTION_EMERGENCY_CALLBACK_MODE_CHANGED = "android.intent.action.EMERGENCY_CALLBACK_MODE_CHANGED"; + field public static final String ACTION_EMERGENCY_CALL_STATE_CHANGED = "android.intent.action.EMERGENCY_CALL_STATE_CHANGED"; + field public static final String ACTION_REQUEST_OMADM_CONFIGURATION_UPDATE = "com.android.omadm.service.CONFIGURATION_UPDATE"; + field public static final String ACTION_SHOW_NOTICE_ECM_BLOCK_OTHERS = "android.telephony.action.SHOW_NOTICE_ECM_BLOCK_OTHERS"; + field public static final String ACTION_SIM_APPLICATION_STATE_CHANGED = "android.telephony.action.SIM_APPLICATION_STATE_CHANGED"; + field public static final String ACTION_SIM_CARD_STATE_CHANGED = "android.telephony.action.SIM_CARD_STATE_CHANGED"; + field public static final String ACTION_SIM_SLOT_STATUS_CHANGED = "android.telephony.action.SIM_SLOT_STATUS_CHANGED"; + field public static final int CALL_WAITING_STATUS_DISABLED = 2; // 0x2 + field public static final int CALL_WAITING_STATUS_ENABLED = 1; // 0x1 + field public static final int CALL_WAITING_STATUS_NOT_SUPPORTED = 4; // 0x4 + field public static final int CALL_WAITING_STATUS_UNKNOWN_ERROR = 3; // 0x3 + field public static final int CARRIER_PRIVILEGE_STATUS_ERROR_LOADING_RULES = -2; // 0xfffffffe + field public static final int CARRIER_PRIVILEGE_STATUS_HAS_ACCESS = 1; // 0x1 + field public static final int CARRIER_PRIVILEGE_STATUS_NO_ACCESS = 0; // 0x0 + field public static final int CARRIER_PRIVILEGE_STATUS_RULES_NOT_LOADED = -1; // 0xffffffff + field public static final String EXTRA_ANOMALY_DESCRIPTION = "android.telephony.extra.ANOMALY_DESCRIPTION"; + field public static final String EXTRA_ANOMALY_ID = "android.telephony.extra.ANOMALY_ID"; + field public static final String EXTRA_PHONE_IN_ECM_STATE = "android.telephony.extra.PHONE_IN_ECM_STATE"; + field public static final String EXTRA_PHONE_IN_EMERGENCY_CALL = "android.telephony.extra.PHONE_IN_EMERGENCY_CALL"; + field public static final String EXTRA_SIM_STATE = "android.telephony.extra.SIM_STATE"; + field public static final String EXTRA_VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL = "android.telephony.extra.VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL"; + field public static final String EXTRA_VOICEMAIL_SCRAMBLED_PIN_STRING = "android.telephony.extra.VOICEMAIL_SCRAMBLED_PIN_STRING"; + field public static final int INVALID_EMERGENCY_NUMBER_DB_VERSION = -1; // 0xffffffff + field public static final int KEY_TYPE_EPDG = 1; // 0x1 + field public static final int KEY_TYPE_WLAN = 2; // 0x2 + field public static final int MOBILE_DATA_POLICY_DATA_ON_NON_DEFAULT_DURING_VOICE_CALL = 1; // 0x1 + field public static final int MOBILE_DATA_POLICY_MMS_ALWAYS_ALLOWED = 2; // 0x2 + field public static final long NETWORK_TYPE_BITMASK_1xRTT = 64L; // 0x40L + field public static final long NETWORK_TYPE_BITMASK_CDMA = 8L; // 0x8L + field public static final long NETWORK_TYPE_BITMASK_EDGE = 2L; // 0x2L + field public static final long NETWORK_TYPE_BITMASK_EHRPD = 8192L; // 0x2000L + field public static final long NETWORK_TYPE_BITMASK_EVDO_0 = 16L; // 0x10L + field public static final long NETWORK_TYPE_BITMASK_EVDO_A = 32L; // 0x20L + field public static final long NETWORK_TYPE_BITMASK_EVDO_B = 2048L; // 0x800L + field public static final long NETWORK_TYPE_BITMASK_GPRS = 1L; // 0x1L + field public static final long NETWORK_TYPE_BITMASK_GSM = 32768L; // 0x8000L + field public static final long NETWORK_TYPE_BITMASK_HSDPA = 128L; // 0x80L + field public static final long NETWORK_TYPE_BITMASK_HSPA = 512L; // 0x200L + field public static final long NETWORK_TYPE_BITMASK_HSPAP = 16384L; // 0x4000L + field public static final long NETWORK_TYPE_BITMASK_HSUPA = 256L; // 0x100L + field public static final long NETWORK_TYPE_BITMASK_IWLAN = 131072L; // 0x20000L + field public static final long NETWORK_TYPE_BITMASK_LTE = 4096L; // 0x1000L + field public static final long NETWORK_TYPE_BITMASK_LTE_CA = 262144L; // 0x40000L + field public static final long NETWORK_TYPE_BITMASK_NR = 524288L; // 0x80000L + field public static final long NETWORK_TYPE_BITMASK_TD_SCDMA = 65536L; // 0x10000L + field public static final long NETWORK_TYPE_BITMASK_UMTS = 4L; // 0x4L + field public static final long NETWORK_TYPE_BITMASK_UNKNOWN = 0L; // 0x0L + field public static final int RADIO_POWER_OFF = 0; // 0x0 + field public static final int RADIO_POWER_ON = 1; // 0x1 + field public static final int RADIO_POWER_UNAVAILABLE = 2; // 0x2 + field public static final int SET_CARRIER_RESTRICTION_ERROR = 2; // 0x2 + field public static final int SET_CARRIER_RESTRICTION_NOT_SUPPORTED = 1; // 0x1 + field public static final int SET_CARRIER_RESTRICTION_SUCCESS = 0; // 0x0 + field public static final int SIM_ACTIVATION_STATE_ACTIVATED = 2; // 0x2 + field public static final int SIM_ACTIVATION_STATE_ACTIVATING = 1; // 0x1 + field public static final int SIM_ACTIVATION_STATE_DEACTIVATED = 3; // 0x3 + field public static final int SIM_ACTIVATION_STATE_RESTRICTED = 4; // 0x4 + field public static final int SIM_ACTIVATION_STATE_UNKNOWN = 0; // 0x0 + field public static final int SIM_STATE_LOADED = 10; // 0xa + field public static final int SIM_STATE_PRESENT = 11; // 0xb + field public static final int SRVCC_STATE_HANDOVER_CANCELED = 3; // 0x3 + field public static final int SRVCC_STATE_HANDOVER_COMPLETED = 1; // 0x1 + field public static final int SRVCC_STATE_HANDOVER_FAILED = 2; // 0x2 + field public static final int SRVCC_STATE_HANDOVER_NONE = -1; // 0xffffffff + field public static final int SRVCC_STATE_HANDOVER_STARTED = 0; // 0x0 + } + + public static interface TelephonyManager.CallForwardingInfoCallback { + method public void onCallForwardingInfoAvailable(@NonNull android.telephony.CallForwardingInfo); + method public void onError(int); + field public static final int RESULT_ERROR_FDN_CHECK_FAILURE = 2; // 0x2 + field public static final int RESULT_ERROR_NOT_SUPPORTED = 3; // 0x3 + field public static final int RESULT_ERROR_UNKNOWN = 1; // 0x1 + field public static final int RESULT_SUCCESS = 0; // 0x0 + } + + public final class UiccAccessRule implements android.os.Parcelable { + ctor public UiccAccessRule(byte[], @Nullable String, long); + method public int describeContents(); + method public int getCarrierPrivilegeStatus(android.content.pm.PackageInfo); + method public int getCarrierPrivilegeStatus(android.content.pm.Signature, String); + method public String getCertificateHexString(); + method @Nullable public String getPackageName(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.UiccAccessRule> CREATOR; + } + + public class UiccSlotInfo implements android.os.Parcelable { + ctor @Deprecated public UiccSlotInfo(boolean, boolean, String, int, int, boolean); + method public int describeContents(); + method public String getCardId(); + method public int getCardStateInfo(); + method public boolean getIsActive(); + method public boolean getIsEuicc(); + method public boolean getIsExtendedApduSupported(); + method public int getLogicalSlotIdx(); + method public boolean isRemovable(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CARD_STATE_INFO_ABSENT = 1; // 0x1 + field public static final int CARD_STATE_INFO_ERROR = 3; // 0x3 + field public static final int CARD_STATE_INFO_PRESENT = 2; // 0x2 + field public static final int CARD_STATE_INFO_RESTRICTED = 4; // 0x4 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.UiccSlotInfo> CREATOR; + } + + public abstract class VisualVoicemailService extends android.app.Service { + method public static final void sendVisualVoicemailSms(android.content.Context, android.telecom.PhoneAccountHandle, String, short, String, android.app.PendingIntent); + method public static final void setSmsFilterSettings(android.content.Context, android.telecom.PhoneAccountHandle, android.telephony.VisualVoicemailSmsFilterSettings); + } + +} + +package android.telephony.cdma { + + public final class CdmaSmsCbProgramData implements android.os.Parcelable { + method public int describeContents(); + method public int getCategory(); + method public int getOperation(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CATEGORY_CMAS_CHILD_ABDUCTION_EMERGENCY = 4099; // 0x1003 + field public static final int CATEGORY_CMAS_EXTREME_THREAT = 4097; // 0x1001 + field public static final int CATEGORY_CMAS_LAST_RESERVED_VALUE = 4351; // 0x10ff + field public static final int CATEGORY_CMAS_PRESIDENTIAL_LEVEL_ALERT = 4096; // 0x1000 + field public static final int CATEGORY_CMAS_SEVERE_THREAT = 4098; // 0x1002 + field public static final int CATEGORY_CMAS_TEST_MESSAGE = 4100; // 0x1004 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.cdma.CdmaSmsCbProgramData> CREATOR; + field public static final int OPERATION_ADD_CATEGORY = 1; // 0x1 + field public static final int OPERATION_CLEAR_CATEGORIES = 2; // 0x2 + field public static final int OPERATION_DELETE_CATEGORY = 0; // 0x0 + } + +} + +package android.telephony.data { + + public final class DataCallResponse implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public java.util.List<android.net.LinkAddress> getAddresses(); + method public int getCause(); + method @NonNull public java.util.List<java.net.InetAddress> getDnsAddresses(); + method @NonNull public java.util.List<java.net.InetAddress> getGatewayAddresses(); + method public int getHandoverFailureMode(); + method public int getId(); + method @NonNull public String getInterfaceName(); + method public int getLinkStatus(); + method @Deprecated public int getMtu(); + method public int getMtuV4(); + method public int getMtuV6(); + method @NonNull public java.util.List<java.net.InetAddress> getPcscfAddresses(); + method public int getProtocolType(); + method public int getSuggestedRetryTime(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.DataCallResponse> CREATOR; + field public static final int HANDOVER_FAILURE_MODE_DO_FALLBACK = 1; // 0x1 + field public static final int HANDOVER_FAILURE_MODE_LEGACY = 0; // 0x0 + field public static final int HANDOVER_FAILURE_MODE_NO_FALLBACK_RETRY_HANDOVER = 2; // 0x2 + field public static final int HANDOVER_FAILURE_MODE_NO_FALLBACK_RETRY_SETUP_NORMAL = 3; // 0x3 + field public static final int HANDOVER_FAILURE_MODE_UNKNOWN = -1; // 0xffffffff + field public static final int LINK_STATUS_ACTIVE = 2; // 0x2 + field public static final int LINK_STATUS_DORMANT = 1; // 0x1 + field public static final int LINK_STATUS_INACTIVE = 0; // 0x0 + field public static final int LINK_STATUS_UNKNOWN = -1; // 0xffffffff + } + + public static final class DataCallResponse.Builder { + ctor public DataCallResponse.Builder(); + method @NonNull public android.telephony.data.DataCallResponse build(); + method @NonNull public android.telephony.data.DataCallResponse.Builder setAddresses(@NonNull java.util.List<android.net.LinkAddress>); + method @NonNull public android.telephony.data.DataCallResponse.Builder setCause(int); + method @NonNull public android.telephony.data.DataCallResponse.Builder setDnsAddresses(@NonNull java.util.List<java.net.InetAddress>); + method @NonNull public android.telephony.data.DataCallResponse.Builder setGatewayAddresses(@NonNull java.util.List<java.net.InetAddress>); + method @NonNull public android.telephony.data.DataCallResponse.Builder setHandoverFailureMode(int); + method @NonNull public android.telephony.data.DataCallResponse.Builder setId(int); + method @NonNull public android.telephony.data.DataCallResponse.Builder setInterfaceName(@NonNull String); + method @NonNull public android.telephony.data.DataCallResponse.Builder setLinkStatus(int); + method @Deprecated @NonNull public android.telephony.data.DataCallResponse.Builder setMtu(int); + method @NonNull public android.telephony.data.DataCallResponse.Builder setMtuV4(int); + method @NonNull public android.telephony.data.DataCallResponse.Builder setMtuV6(int); + method @NonNull public android.telephony.data.DataCallResponse.Builder setPcscfAddresses(@NonNull java.util.List<java.net.InetAddress>); + method @NonNull public android.telephony.data.DataCallResponse.Builder setProtocolType(int); + method @NonNull public android.telephony.data.DataCallResponse.Builder setSuggestedRetryTime(int); + } + + public final class DataProfile implements android.os.Parcelable { + method public int describeContents(); + method @NonNull public String getApn(); + method public int getAuthType(); + method public int getBearerBitmask(); + method @Deprecated public int getMtu(); + method public int getMtuV4(); + method public int getMtuV6(); + method @Nullable public String getPassword(); + method public int getProfileId(); + method public int getProtocolType(); + method public int getRoamingProtocolType(); + method public int getSupportedApnTypesBitmask(); + method public int getType(); + method @Nullable public String getUserName(); + method public boolean isEnabled(); + method public boolean isPersistent(); + method public boolean isPreferred(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.data.DataProfile> CREATOR; + field public static final int TYPE_3GPP = 1; // 0x1 + field public static final int TYPE_3GPP2 = 2; // 0x2 + field public static final int TYPE_COMMON = 0; // 0x0 + } + + public static final class DataProfile.Builder { + ctor public DataProfile.Builder(); + method @NonNull public android.telephony.data.DataProfile build(); + method @NonNull public android.telephony.data.DataProfile.Builder enable(boolean); + method @NonNull public android.telephony.data.DataProfile.Builder setApn(@NonNull String); + method @NonNull public android.telephony.data.DataProfile.Builder setAuthType(int); + method @NonNull public android.telephony.data.DataProfile.Builder setBearerBitmask(int); + method @Deprecated @NonNull public android.telephony.data.DataProfile.Builder setMtu(int); + method @NonNull public android.telephony.data.DataProfile.Builder setMtuV4(int); + method @NonNull public android.telephony.data.DataProfile.Builder setMtuV6(int); + method @NonNull public android.telephony.data.DataProfile.Builder setPassword(@NonNull String); + method @NonNull public android.telephony.data.DataProfile.Builder setPersistent(boolean); + method @NonNull public android.telephony.data.DataProfile.Builder setPreferred(boolean); + method @NonNull public android.telephony.data.DataProfile.Builder setProfileId(int); + method @NonNull public android.telephony.data.DataProfile.Builder setProtocolType(int); + method @NonNull public android.telephony.data.DataProfile.Builder setRoamingProtocolType(int); + method @NonNull public android.telephony.data.DataProfile.Builder setSupportedApnTypesBitmask(int); + method @NonNull public android.telephony.data.DataProfile.Builder setType(int); + method @NonNull public android.telephony.data.DataProfile.Builder setUserName(@NonNull String); + } + + public abstract class DataService extends android.app.Service { + ctor public DataService(); + method public android.os.IBinder onBind(android.content.Intent); + method @Nullable public abstract android.telephony.data.DataService.DataServiceProvider onCreateDataServiceProvider(int); + field public static final int REQUEST_REASON_HANDOVER = 3; // 0x3 + field public static final int REQUEST_REASON_NORMAL = 1; // 0x1 + field public static final int REQUEST_REASON_SHUTDOWN = 2; // 0x2 + field public static final int REQUEST_REASON_UNKNOWN = 0; // 0x0 + field public static final String SERVICE_INTERFACE = "android.telephony.data.DataService"; + } + + public abstract class DataService.DataServiceProvider implements java.lang.AutoCloseable { + ctor public DataService.DataServiceProvider(int); + method public abstract void close(); + method public void deactivateDataCall(int, int, @Nullable android.telephony.data.DataServiceCallback); + method public final int getSlotIndex(); + method public final void notifyDataCallListChanged(java.util.List<android.telephony.data.DataCallResponse>); + method public void requestDataCallList(@NonNull android.telephony.data.DataServiceCallback); + method public void setDataProfile(@NonNull java.util.List<android.telephony.data.DataProfile>, boolean, @NonNull android.telephony.data.DataServiceCallback); + method public void setInitialAttachApn(@NonNull android.telephony.data.DataProfile, boolean, @NonNull android.telephony.data.DataServiceCallback); + method public void setupDataCall(int, @NonNull android.telephony.data.DataProfile, boolean, boolean, int, @Nullable android.net.LinkProperties, @NonNull android.telephony.data.DataServiceCallback); + } + + public class DataServiceCallback { + method public void onDataCallListChanged(@NonNull java.util.List<android.telephony.data.DataCallResponse>); + method public void onDeactivateDataCallComplete(int); + method public void onRequestDataCallListComplete(int, @NonNull java.util.List<android.telephony.data.DataCallResponse>); + method public void onSetDataProfileComplete(int); + method public void onSetInitialAttachApnComplete(int); + method public void onSetupDataCallComplete(int, @Nullable android.telephony.data.DataCallResponse); + field public static final int RESULT_ERROR_BUSY = 3; // 0x3 + field public static final int RESULT_ERROR_ILLEGAL_STATE = 4; // 0x4 + field public static final int RESULT_ERROR_INVALID_ARG = 2; // 0x2 + field public static final int RESULT_ERROR_UNSUPPORTED = 1; // 0x1 + field public static final int RESULT_SUCCESS = 0; // 0x0 + } + + public abstract class QualifiedNetworksService extends android.app.Service { + ctor public QualifiedNetworksService(); + method @NonNull public abstract android.telephony.data.QualifiedNetworksService.NetworkAvailabilityProvider onCreateNetworkAvailabilityProvider(int); + field public static final String QUALIFIED_NETWORKS_SERVICE_INTERFACE = "android.telephony.data.QualifiedNetworksService"; + } + + public abstract class QualifiedNetworksService.NetworkAvailabilityProvider implements java.lang.AutoCloseable { + ctor public QualifiedNetworksService.NetworkAvailabilityProvider(int); + method public abstract void close(); + method public final int getSlotIndex(); + method public final void updateQualifiedNetworkTypes(int, @NonNull java.util.List<java.lang.Integer>); + } + +} + +package android.telephony.euicc { + + public final class DownloadableSubscription implements android.os.Parcelable { + method public java.util.List<android.telephony.UiccAccessRule> getAccessRules(); + method @Nullable public String getCarrierName(); + } + + public static final class DownloadableSubscription.Builder { + ctor public DownloadableSubscription.Builder(); + ctor public DownloadableSubscription.Builder(android.telephony.euicc.DownloadableSubscription); + method public android.telephony.euicc.DownloadableSubscription build(); + method public android.telephony.euicc.DownloadableSubscription.Builder setAccessRules(java.util.List<android.telephony.UiccAccessRule>); + method public android.telephony.euicc.DownloadableSubscription.Builder setCarrierName(String); + method public android.telephony.euicc.DownloadableSubscription.Builder setConfirmationCode(String); + method public android.telephony.euicc.DownloadableSubscription.Builder setEncodedActivationCode(String); + } + + public class EuiccCardManager { + method public void authenticateServer(String, String, byte[], byte[], byte[], byte[], java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>); + method public void cancelSession(String, byte[], @android.telephony.euicc.EuiccCardManager.CancelReason int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>); + method public void deleteProfile(String, String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>); + method public void disableProfile(String, String, boolean, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>); + method public void listNotifications(String, @android.telephony.euicc.EuiccNotification.Event int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.telephony.euicc.EuiccNotification[]>); + method public void loadBoundProfilePackage(String, byte[], java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>); + method public void prepareDownload(String, @Nullable byte[], byte[], byte[], byte[], java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>); + method public void removeNotificationFromList(String, int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>); + method public void requestAllProfiles(String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.service.euicc.EuiccProfileInfo[]>); + method public void requestDefaultSmdpAddress(String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.String>); + method public void requestEuiccChallenge(String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>); + method public void requestEuiccInfo1(String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>); + method public void requestEuiccInfo2(String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>); + method public void requestProfile(String, String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.service.euicc.EuiccProfileInfo>); + method public void requestRulesAuthTable(String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.telephony.euicc.EuiccRulesAuthTable>); + method public void requestSmdsAddress(String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.String>); + method public void resetMemory(String, @android.telephony.euicc.EuiccCardManager.ResetOption int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>); + method public void retrieveNotification(String, int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.telephony.euicc.EuiccNotification>); + method public void retrieveNotificationList(String, @android.telephony.euicc.EuiccNotification.Event int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.telephony.euicc.EuiccNotification[]>); + method public void setDefaultSmdpAddress(String, String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>); + method public void setNickname(String, String, String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>); + method public void switchToProfile(String, String, boolean, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.service.euicc.EuiccProfileInfo>); + field public static final int CANCEL_REASON_END_USER_REJECTED = 0; // 0x0 + field public static final int CANCEL_REASON_POSTPONED = 1; // 0x1 + field public static final int CANCEL_REASON_PPR_NOT_ALLOWED = 3; // 0x3 + field public static final int CANCEL_REASON_TIMEOUT = 2; // 0x2 + field public static final int RESET_OPTION_DELETE_FIELD_LOADED_TEST_PROFILES = 2; // 0x2 + field public static final int RESET_OPTION_DELETE_OPERATIONAL_PROFILES = 1; // 0x1 + field public static final int RESET_OPTION_RESET_DEFAULT_SMDP_ADDRESS = 4; // 0x4 + field public static final int RESULT_CALLER_NOT_ALLOWED = -3; // 0xfffffffd + field public static final int RESULT_EUICC_NOT_FOUND = -2; // 0xfffffffe + field public static final int RESULT_OK = 0; // 0x0 + field public static final int RESULT_UNKNOWN_ERROR = -1; // 0xffffffff + } + + @IntDef(prefix={"CANCEL_REASON_"}, value={android.telephony.euicc.EuiccCardManager.CANCEL_REASON_END_USER_REJECTED, android.telephony.euicc.EuiccCardManager.CANCEL_REASON_POSTPONED, android.telephony.euicc.EuiccCardManager.CANCEL_REASON_TIMEOUT, android.telephony.euicc.EuiccCardManager.CANCEL_REASON_PPR_NOT_ALLOWED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccCardManager.CancelReason { + } + + @IntDef(flag=true, prefix={"RESET_OPTION_"}, value={android.telephony.euicc.EuiccCardManager.RESET_OPTION_DELETE_OPERATIONAL_PROFILES, android.telephony.euicc.EuiccCardManager.RESET_OPTION_DELETE_FIELD_LOADED_TEST_PROFILES, android.telephony.euicc.EuiccCardManager.RESET_OPTION_RESET_DEFAULT_SMDP_ADDRESS}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccCardManager.ResetOption { + } + + public static interface EuiccCardManager.ResultCallback<T> { + method public void onComplete(int, T); + } + + public class EuiccManager { + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void continueOperation(android.content.Intent, android.os.Bundle); + method @Deprecated @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void eraseSubscriptions(@NonNull android.app.PendingIntent); + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void eraseSubscriptions(@android.telephony.euicc.EuiccCardManager.ResetOption int, @NonNull android.app.PendingIntent); + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void getDefaultDownloadableSubscriptionList(android.app.PendingIntent); + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void getDownloadableSubscriptionMetadata(android.telephony.euicc.DownloadableSubscription, android.app.PendingIntent); + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public int getOtaStatus(); + method @NonNull @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public java.util.List<java.lang.String> getSupportedCountries(); + method @NonNull @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public java.util.List<java.lang.String> getUnsupportedCountries(); + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public boolean isSupportedCountry(@NonNull String); + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void setSupportedCountries(@NonNull java.util.List<java.lang.String>); + method @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public void setUnsupportedCountries(@NonNull java.util.List<java.lang.String>); + field public static final String ACTION_DELETE_SUBSCRIPTION_PRIVILEGED = "android.telephony.euicc.action.DELETE_SUBSCRIPTION_PRIVILEGED"; + field @RequiresPermission(android.Manifest.permission.WRITE_EMBEDDED_SUBSCRIPTIONS) public static final String ACTION_OTA_STATUS_CHANGED = "android.telephony.euicc.action.OTA_STATUS_CHANGED"; + field public static final String ACTION_PROVISION_EMBEDDED_SUBSCRIPTION = "android.telephony.euicc.action.PROVISION_EMBEDDED_SUBSCRIPTION"; + field public static final String ACTION_RENAME_SUBSCRIPTION_PRIVILEGED = "android.telephony.euicc.action.RENAME_SUBSCRIPTION_PRIVILEGED"; + field public static final String ACTION_TOGGLE_SUBSCRIPTION_PRIVILEGED = "android.telephony.euicc.action.TOGGLE_SUBSCRIPTION_PRIVILEGED"; + field public static final int EUICC_ACTIVATION_TYPE_ACCOUNT_REQUIRED = 4; // 0x4 + field public static final int EUICC_ACTIVATION_TYPE_BACKUP = 2; // 0x2 + field public static final int EUICC_ACTIVATION_TYPE_DEFAULT = 1; // 0x1 + field public static final int EUICC_ACTIVATION_TYPE_TRANSFER = 3; // 0x3 + field public static final int EUICC_OTA_FAILED = 2; // 0x2 + field public static final int EUICC_OTA_IN_PROGRESS = 1; // 0x1 + field public static final int EUICC_OTA_NOT_NEEDED = 4; // 0x4 + field public static final int EUICC_OTA_STATUS_UNAVAILABLE = 5; // 0x5 + field public static final int EUICC_OTA_SUCCEEDED = 3; // 0x3 + field public static final String EXTRA_ACTIVATION_TYPE = "android.telephony.euicc.extra.ACTIVATION_TYPE"; + field public static final String EXTRA_EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTIONS = "android.telephony.euicc.extra.EMBEDDED_SUBSCRIPTION_DOWNLOADABLE_SUBSCRIPTIONS"; + field public static final String EXTRA_ENABLE_SUBSCRIPTION = "android.telephony.euicc.extra.ENABLE_SUBSCRIPTION"; + field public static final String EXTRA_FORCE_PROVISION = "android.telephony.euicc.extra.FORCE_PROVISION"; + field public static final String EXTRA_FROM_SUBSCRIPTION_ID = "android.telephony.euicc.extra.FROM_SUBSCRIPTION_ID"; + field public static final String EXTRA_PHYSICAL_SLOT_ID = "android.telephony.euicc.extra.PHYSICAL_SLOT_ID"; + field public static final String EXTRA_SUBSCRIPTION_ID = "android.telephony.euicc.extra.SUBSCRIPTION_ID"; + field public static final String EXTRA_SUBSCRIPTION_NICKNAME = "android.telephony.euicc.extra.SUBSCRIPTION_NICKNAME"; + } + + @IntDef(prefix={"EUICC_OTA_"}, value={android.telephony.euicc.EuiccManager.EUICC_OTA_IN_PROGRESS, android.telephony.euicc.EuiccManager.EUICC_OTA_FAILED, android.telephony.euicc.EuiccManager.EUICC_OTA_SUCCEEDED, android.telephony.euicc.EuiccManager.EUICC_OTA_NOT_NEEDED, android.telephony.euicc.EuiccManager.EUICC_OTA_STATUS_UNAVAILABLE}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccManager.OtaStatus { + } + + public final class EuiccNotification implements android.os.Parcelable { + ctor public EuiccNotification(int, String, @android.telephony.euicc.EuiccNotification.Event int, @Nullable byte[]); + method public int describeContents(); + method @Nullable public byte[] getData(); + method @android.telephony.euicc.EuiccNotification.Event public int getEvent(); + method public int getSeq(); + method public String getTargetAddr(); + method public void writeToParcel(android.os.Parcel, int); + field @android.telephony.euicc.EuiccNotification.Event public static final int ALL_EVENTS = 15; // 0xf + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.euicc.EuiccNotification> CREATOR; + field public static final int EVENT_DELETE = 8; // 0x8 + field public static final int EVENT_DISABLE = 4; // 0x4 + field public static final int EVENT_ENABLE = 2; // 0x2 + field public static final int EVENT_INSTALL = 1; // 0x1 + } + + @IntDef(flag=true, prefix={"EVENT_"}, value={android.telephony.euicc.EuiccNotification.EVENT_INSTALL, android.telephony.euicc.EuiccNotification.EVENT_ENABLE, android.telephony.euicc.EuiccNotification.EVENT_DISABLE, android.telephony.euicc.EuiccNotification.EVENT_DELETE}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccNotification.Event { + } + + public final class EuiccRulesAuthTable implements android.os.Parcelable { + method public int describeContents(); + method public int findIndex(@android.service.euicc.EuiccProfileInfo.PolicyRule int, android.service.carrier.CarrierIdentifier); + method public boolean hasPolicyRuleFlag(int, @android.telephony.euicc.EuiccRulesAuthTable.PolicyRuleFlag int); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.euicc.EuiccRulesAuthTable> CREATOR; + field public static final int POLICY_RULE_FLAG_CONSENT_REQUIRED = 1; // 0x1 + } + + public static final class EuiccRulesAuthTable.Builder { + ctor public EuiccRulesAuthTable.Builder(int); + method public android.telephony.euicc.EuiccRulesAuthTable.Builder add(int, java.util.List<android.service.carrier.CarrierIdentifier>, int); + method public android.telephony.euicc.EuiccRulesAuthTable build(); + } + + @IntDef(flag=true, prefix={"POLICY_RULE_FLAG_"}, value={android.telephony.euicc.EuiccRulesAuthTable.POLICY_RULE_FLAG_CONSENT_REQUIRED}) @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) public static @interface EuiccRulesAuthTable.PolicyRuleFlag { + } + +} + +package android.telephony.ims { + + public final class ImsCallForwardInfo implements android.os.Parcelable { + ctor public ImsCallForwardInfo(int, int, int, int, @NonNull String, int); + method public int describeContents(); + method public int getCondition(); + method public String getNumber(); + method public int getServiceClass(); + method public int getStatus(); + method public int getTimeSeconds(); + method public int getToA(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CDIV_CF_REASON_ALL = 4; // 0x4 + field public static final int CDIV_CF_REASON_ALL_CONDITIONAL = 5; // 0x5 + field public static final int CDIV_CF_REASON_BUSY = 1; // 0x1 + field public static final int CDIV_CF_REASON_NOT_LOGGED_IN = 6; // 0x6 + field public static final int CDIV_CF_REASON_NOT_REACHABLE = 3; // 0x3 + field public static final int CDIV_CF_REASON_NO_REPLY = 2; // 0x2 + field public static final int CDIV_CF_REASON_UNCONDITIONAL = 0; // 0x0 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsCallForwardInfo> CREATOR; + field public static final int STATUS_ACTIVE = 1; // 0x1 + field public static final int STATUS_NOT_ACTIVE = 0; // 0x0 + field public static final int TYPE_OF_ADDRESS_INTERNATIONAL = 145; // 0x91 + field public static final int TYPE_OF_ADDRESS_UNKNOWN = 129; // 0x81 + } + + public final class ImsCallProfile implements android.os.Parcelable { + ctor public ImsCallProfile(); + ctor public ImsCallProfile(int, int); + ctor public ImsCallProfile(int, int, android.os.Bundle, android.telephony.ims.ImsStreamMediaProfile); + method public int describeContents(); + method public String getCallExtra(String); + method public String getCallExtra(String, String); + method public boolean getCallExtraBoolean(String); + method public boolean getCallExtraBoolean(String, boolean); + method public int getCallExtraInt(String); + method public int getCallExtraInt(String, int); + method public android.os.Bundle getCallExtras(); + method public int getCallType(); + method public static int getCallTypeFromVideoState(int); + method public int getCallerNumberVerificationStatus(); + method public int getEmergencyCallRouting(); + method public int getEmergencyServiceCategories(); + method @NonNull public java.util.List<java.lang.String> getEmergencyUrns(); + method public android.telephony.ims.ImsStreamMediaProfile getMediaProfile(); + method @NonNull public android.os.Bundle getProprietaryCallExtras(); + method public int getRestrictCause(); + method public int getServiceType(); + method public static int getVideoStateFromCallType(int); + method public static int getVideoStateFromImsCallProfile(android.telephony.ims.ImsCallProfile); + method public boolean hasKnownUserIntentEmergency(); + method public boolean isEmergencyCallTesting(); + method public boolean isVideoCall(); + method public boolean isVideoPaused(); + method public static int presentationToOir(int); + method public void setCallExtra(String, String); + method public void setCallExtraBoolean(String, boolean); + method public void setCallExtraInt(String, int); + method public void setCallRestrictCause(int); + method public void setCallerNumberVerificationStatus(int); + method public void setEmergencyCallRouting(int); + method public void setEmergencyCallTesting(boolean); + method public void setEmergencyServiceCategories(int); + method public void setEmergencyUrns(@NonNull java.util.List<java.lang.String>); + method public void setHasKnownUserIntentEmergency(boolean); + method public void updateCallExtras(android.telephony.ims.ImsCallProfile); + method public void updateCallType(android.telephony.ims.ImsCallProfile); + method public void updateMediaProfile(android.telephony.ims.ImsCallProfile); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CALL_RESTRICT_CAUSE_DISABLED = 2; // 0x2 + field public static final int CALL_RESTRICT_CAUSE_HD = 3; // 0x3 + field public static final int CALL_RESTRICT_CAUSE_NONE = 0; // 0x0 + field public static final int CALL_RESTRICT_CAUSE_RAT = 1; // 0x1 + field public static final int CALL_TYPE_VIDEO_N_VOICE = 3; // 0x3 + field public static final int CALL_TYPE_VOICE = 2; // 0x2 + field public static final int CALL_TYPE_VOICE_N_VIDEO = 1; // 0x1 + field public static final int CALL_TYPE_VS = 8; // 0x8 + field public static final int CALL_TYPE_VS_RX = 10; // 0xa + field public static final int CALL_TYPE_VS_TX = 9; // 0x9 + field public static final int CALL_TYPE_VT = 4; // 0x4 + field public static final int CALL_TYPE_VT_NODIR = 7; // 0x7 + field public static final int CALL_TYPE_VT_RX = 6; // 0x6 + field public static final int CALL_TYPE_VT_TX = 5; // 0x5 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsCallProfile> CREATOR; + field public static final int DIALSTRING_NORMAL = 0; // 0x0 + field public static final int DIALSTRING_SS_CONF = 1; // 0x1 + field public static final int DIALSTRING_USSD = 2; // 0x2 + field public static final String EXTRA_ADDITIONAL_CALL_INFO = "AdditionalCallInfo"; + field public static final String EXTRA_ADDITIONAL_SIP_INVITE_FIELDS = "android.telephony.ims.extra.ADDITIONAL_SIP_INVITE_FIELDS"; + field public static final String EXTRA_CALL_DISCONNECT_CAUSE = "android.telephony.ims.extra.CALL_DISCONNECT_CAUSE"; + field public static final String EXTRA_CALL_NETWORK_TYPE = "android.telephony.ims.extra.CALL_NETWORK_TYPE"; + field @Deprecated public static final String EXTRA_CALL_RAT_TYPE = "CallRadioTech"; + field public static final String EXTRA_CHILD_NUMBER = "ChildNum"; + field public static final String EXTRA_CNA = "cna"; + field public static final String EXTRA_CNAP = "cnap"; + field public static final String EXTRA_CODEC = "Codec"; + field public static final String EXTRA_DIALSTRING = "dialstring"; + field public static final String EXTRA_DISPLAY_TEXT = "DisplayText"; + field public static final String EXTRA_EMERGENCY_CALL = "e_call"; + field public static final String EXTRA_FORWARDED_NUMBER = "android.telephony.ims.extra.FORWARDED_NUMBER"; + field public static final String EXTRA_IS_CALL_PULL = "CallPull"; + field public static final String EXTRA_OI = "oi"; + field public static final String EXTRA_OIR = "oir"; + field public static final String EXTRA_REMOTE_URI = "remote_uri"; + field public static final String EXTRA_USSD = "ussd"; + field public static final int OIR_DEFAULT = 0; // 0x0 + field public static final int OIR_PRESENTATION_NOT_RESTRICTED = 2; // 0x2 + field public static final int OIR_PRESENTATION_PAYPHONE = 4; // 0x4 + field public static final int OIR_PRESENTATION_RESTRICTED = 1; // 0x1 + field public static final int OIR_PRESENTATION_UNKNOWN = 3; // 0x3 + field public static final int SERVICE_TYPE_EMERGENCY = 2; // 0x2 + field public static final int SERVICE_TYPE_NONE = 0; // 0x0 + field public static final int SERVICE_TYPE_NORMAL = 1; // 0x1 + field public static final int VERIFICATION_STATUS_FAILED = 2; // 0x2 + field public static final int VERIFICATION_STATUS_NOT_VERIFIED = 0; // 0x0 + field public static final int VERIFICATION_STATUS_PASSED = 1; // 0x1 + } + + public class ImsCallSessionListener { + method public void callQualityChanged(@NonNull android.telephony.CallQuality); + method public void callSessionConferenceExtendFailed(android.telephony.ims.ImsReasonInfo); + method public void callSessionConferenceExtendReceived(android.telephony.ims.stub.ImsCallSessionImplBase, android.telephony.ims.ImsCallProfile); + method public void callSessionConferenceExtended(android.telephony.ims.stub.ImsCallSessionImplBase, android.telephony.ims.ImsCallProfile); + method public void callSessionConferenceStateUpdated(android.telephony.ims.ImsConferenceState); + method @Deprecated public void callSessionHandover(int, int, android.telephony.ims.ImsReasonInfo); + method @Deprecated public void callSessionHandoverFailed(int, int, android.telephony.ims.ImsReasonInfo); + method public void callSessionHeld(android.telephony.ims.ImsCallProfile); + method public void callSessionHoldFailed(android.telephony.ims.ImsReasonInfo); + method public void callSessionHoldReceived(android.telephony.ims.ImsCallProfile); + method public void callSessionInitiated(android.telephony.ims.ImsCallProfile); + method public void callSessionInitiatedFailed(android.telephony.ims.ImsReasonInfo); + method public void callSessionInviteParticipantsRequestDelivered(); + method public void callSessionInviteParticipantsRequestFailed(android.telephony.ims.ImsReasonInfo); + method @Deprecated public void callSessionMayHandover(int, int); + method public void callSessionMergeComplete(android.telephony.ims.stub.ImsCallSessionImplBase); + method public void callSessionMergeFailed(android.telephony.ims.ImsReasonInfo); + method public void callSessionMergeStarted(android.telephony.ims.stub.ImsCallSessionImplBase, android.telephony.ims.ImsCallProfile); + method public void callSessionMultipartyStateChanged(boolean); + method public void callSessionProgressing(android.telephony.ims.ImsStreamMediaProfile); + method public void callSessionRemoveParticipantsRequestDelivered(); + method public void callSessionRemoveParticipantsRequestFailed(android.telephony.ims.ImsReasonInfo); + method public void callSessionResumeFailed(android.telephony.ims.ImsReasonInfo); + method public void callSessionResumeReceived(android.telephony.ims.ImsCallProfile); + method public void callSessionResumed(android.telephony.ims.ImsCallProfile); + method public void callSessionRttAudioIndicatorChanged(@NonNull android.telephony.ims.ImsStreamMediaProfile); + method public void callSessionRttMessageReceived(String); + method public void callSessionRttModifyRequestReceived(android.telephony.ims.ImsCallProfile); + method public void callSessionRttModifyResponseReceived(int); + method public void callSessionSuppServiceReceived(android.telephony.ims.ImsSuppServiceNotification); + method public void callSessionTerminated(android.telephony.ims.ImsReasonInfo); + method public void callSessionTtyModeReceived(int); + method public void callSessionUpdateFailed(android.telephony.ims.ImsReasonInfo); + method public void callSessionUpdateReceived(android.telephony.ims.ImsCallProfile); + method public void callSessionUpdated(android.telephony.ims.ImsCallProfile); + method public void callSessionUssdMessageReceived(int, String); + method public void onHandover(int, int, @Nullable android.telephony.ims.ImsReasonInfo); + method public void onHandoverFailed(int, int, @NonNull android.telephony.ims.ImsReasonInfo); + method public void onMayHandover(int, int); + } + + public final class ImsConferenceState implements android.os.Parcelable { + method public int describeContents(); + method public static int getConnectionStateForStatus(String); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsConferenceState> CREATOR; + field public static final String DISPLAY_TEXT = "display-text"; + field public static final String ENDPOINT = "endpoint"; + field public static final String SIP_STATUS_CODE = "sipstatuscode"; + field public static final String STATUS = "status"; + field public static final String STATUS_ALERTING = "alerting"; + field public static final String STATUS_CONNECTED = "connected"; + field public static final String STATUS_CONNECT_FAIL = "connect-fail"; + field public static final String STATUS_DIALING_IN = "dialing-in"; + field public static final String STATUS_DIALING_OUT = "dialing-out"; + field public static final String STATUS_DISCONNECTED = "disconnected"; + field public static final String STATUS_DISCONNECTING = "disconnecting"; + field public static final String STATUS_MUTED_VIA_FOCUS = "muted-via-focus"; + field public static final String STATUS_ON_HOLD = "on-hold"; + field public static final String STATUS_PENDING = "pending"; + field public static final String STATUS_SEND_ONLY = "sendonly"; + field public static final String STATUS_SEND_RECV = "sendrecv"; + field public static final String USER = "user"; + field public final java.util.HashMap<java.lang.String,android.os.Bundle> mParticipants; + } + + public final class ImsException extends java.lang.Exception { + ctor public ImsException(@Nullable String); + ctor public ImsException(@Nullable String, int); + ctor public ImsException(@Nullable String, int, @Nullable Throwable); + } + + public final class ImsExternalCallState implements android.os.Parcelable { + ctor public ImsExternalCallState(@NonNull String, @NonNull android.net.Uri, @Nullable android.net.Uri, boolean, int, int, boolean); + method public int describeContents(); + method @NonNull public android.net.Uri getAddress(); + method public int getCallId(); + method public int getCallState(); + method public int getCallType(); + method @Nullable public android.net.Uri getLocalAddress(); + method public boolean isCallHeld(); + method public boolean isCallPullable(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CALL_STATE_CONFIRMED = 1; // 0x1 + field public static final int CALL_STATE_TERMINATED = 2; // 0x2 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsExternalCallState> CREATOR; + } + + public class ImsMmTelManager implements android.telephony.ims.RegistrationManager { + method @Deprecated @NonNull @RequiresPermission(anyOf={android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE, android.Manifest.permission.READ_PRECISE_PHONE_STATE}) public static android.telephony.ims.ImsMmTelManager createForSubscriptionId(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void getFeatureState(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>) throws android.telephony.ims.ImsException; + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void getRegistrationState(@NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Integer>); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getVoWiFiRoamingModeSetting(); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isAvailable(int, int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isCapable(int, int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void isSupported(int, int, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<java.lang.Boolean>) throws android.telephony.ims.ImsException; + method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void registerImsRegistrationCallback(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.ims.ImsMmTelManager.RegistrationCallback) throws android.telephony.ims.ImsException; + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setAdvancedCallingSettingEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setRttCapabilitySetting(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoWiFiModeSetting(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoWiFiNonPersistent(boolean, int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoWiFiRoamingModeSetting(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoWiFiRoamingSettingEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVoWiFiSettingEnabled(boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setVtSettingEnabled(boolean); + method @Deprecated @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void unregisterImsRegistrationCallback(@NonNull android.telephony.ims.ImsMmTelManager.RegistrationCallback); + } + + @Deprecated public static class ImsMmTelManager.RegistrationCallback extends android.telephony.ims.RegistrationManager.RegistrationCallback { + ctor @Deprecated public ImsMmTelManager.RegistrationCallback(); + } + + public final class ImsReasonInfo implements android.os.Parcelable { + field public static final String EXTRA_MSG_SERVICE_NOT_AUTHORIZED = "Forbidden. Not Authorized for Service"; + } + + public class ImsService extends android.app.Service { + ctor public ImsService(); + method public android.telephony.ims.feature.MmTelFeature createMmTelFeature(int); + method public android.telephony.ims.feature.RcsFeature createRcsFeature(int); + method public void disableIms(int); + method public void enableIms(int); + method public android.telephony.ims.stub.ImsConfigImplBase getConfig(int); + method public android.telephony.ims.stub.ImsRegistrationImplBase getRegistration(int); + method public final void onUpdateSupportedImsFeatures(android.telephony.ims.stub.ImsFeatureConfiguration) throws android.os.RemoteException; + method public android.telephony.ims.stub.ImsFeatureConfiguration querySupportedImsFeatures(); + method public void readyForFeatureCreation(); + } + + public final class ImsSsData implements android.os.Parcelable { + ctor public ImsSsData(int, int, int, int, int); + method public int describeContents(); + method @Nullable public java.util.List<android.telephony.ims.ImsCallForwardInfo> getCallForwardInfo(); + method public int getRequestType(); + method public int getResult(); + method public int getServiceClass(); + method public int getServiceType(); + method @NonNull public java.util.List<android.telephony.ims.ImsSsInfo> getSuppServiceInfo(); + method public int getTeleserviceType(); + method public boolean isTypeBarring(); + method public boolean isTypeCf(); + method public boolean isTypeClip(); + method public boolean isTypeClir(); + method public boolean isTypeColp(); + method public boolean isTypeColr(); + method public boolean isTypeCw(); + method public boolean isTypeIcb(); + method public boolean isTypeInterrogation(); + method public boolean isTypeUnConditional(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsSsData> CREATOR; + field public static final int RESULT_SUCCESS = 0; // 0x0 + field public static final int SERVICE_CLASS_DATA = 2; // 0x2 + field public static final int SERVICE_CLASS_DATA_CIRCUIT_ASYNC = 32; // 0x20 + field public static final int SERVICE_CLASS_DATA_CIRCUIT_SYNC = 16; // 0x10 + field public static final int SERVICE_CLASS_DATA_PACKET_ACCESS = 64; // 0x40 + field public static final int SERVICE_CLASS_DATA_PAD = 128; // 0x80 + field public static final int SERVICE_CLASS_FAX = 4; // 0x4 + field public static final int SERVICE_CLASS_NONE = 0; // 0x0 + field public static final int SERVICE_CLASS_SMS = 8; // 0x8 + field public static final int SERVICE_CLASS_VOICE = 1; // 0x1 + field public static final int SS_ACTIVATION = 0; // 0x0 + field public static final int SS_ALL_BARRING = 18; // 0x12 + field public static final int SS_ALL_DATA_TELESERVICES = 3; // 0x3 + field public static final int SS_ALL_TELESERVICES_EXCEPT_SMS = 5; // 0x5 + field public static final int SS_ALL_TELESEVICES = 1; // 0x1 + field public static final int SS_ALL_TELE_AND_BEARER_SERVICES = 0; // 0x0 + field public static final int SS_BAIC = 16; // 0x10 + field public static final int SS_BAIC_ROAMING = 17; // 0x11 + field public static final int SS_BAOC = 13; // 0xd + field public static final int SS_BAOIC = 14; // 0xe + field public static final int SS_BAOIC_EXC_HOME = 15; // 0xf + field public static final int SS_CFU = 0; // 0x0 + field public static final int SS_CFUT = 6; // 0x6 + field public static final int SS_CF_ALL = 4; // 0x4 + field public static final int SS_CF_ALL_CONDITIONAL = 5; // 0x5 + field public static final int SS_CF_BUSY = 1; // 0x1 + field public static final int SS_CF_NOT_REACHABLE = 3; // 0x3 + field public static final int SS_CF_NO_REPLY = 2; // 0x2 + field public static final int SS_CLIP = 7; // 0x7 + field public static final int SS_CLIR = 8; // 0x8 + field public static final int SS_CNAP = 11; // 0xb + field public static final int SS_COLP = 9; // 0x9 + field public static final int SS_COLR = 10; // 0xa + field public static final int SS_DEACTIVATION = 1; // 0x1 + field public static final int SS_ERASURE = 4; // 0x4 + field public static final int SS_INCOMING_BARRING = 20; // 0x14 + field public static final int SS_INCOMING_BARRING_ANONYMOUS = 22; // 0x16 + field public static final int SS_INCOMING_BARRING_DN = 21; // 0x15 + field public static final int SS_INTERROGATION = 2; // 0x2 + field public static final int SS_OUTGOING_BARRING = 19; // 0x13 + field public static final int SS_REGISTRATION = 3; // 0x3 + field public static final int SS_SMS_SERVICES = 4; // 0x4 + field public static final int SS_TELEPHONY = 2; // 0x2 + field public static final int SS_WAIT = 12; // 0xc + } + + public static final class ImsSsData.Builder { + ctor public ImsSsData.Builder(int, int, int, int, int); + method @NonNull public android.telephony.ims.ImsSsData build(); + method @NonNull public android.telephony.ims.ImsSsData.Builder setCallForwardingInfo(@NonNull java.util.List<android.telephony.ims.ImsCallForwardInfo>); + method @NonNull public android.telephony.ims.ImsSsData.Builder setSuppServiceInfo(@NonNull java.util.List<android.telephony.ims.ImsSsInfo>); + } + + public final class ImsSsInfo implements android.os.Parcelable { + ctor @Deprecated public ImsSsInfo(int, @Nullable String); + method public int describeContents(); + method public int getClirInterrogationStatus(); + method public int getClirOutgoingState(); + method @Deprecated public String getIcbNum(); + method @Nullable public String getIncomingCommunicationBarringNumber(); + method public int getProvisionStatus(); + method public int getStatus(); + method public void writeToParcel(android.os.Parcel, int); + field public static final int CLIR_OUTGOING_DEFAULT = 0; // 0x0 + field public static final int CLIR_OUTGOING_INVOCATION = 1; // 0x1 + field public static final int CLIR_OUTGOING_SUPPRESSION = 2; // 0x2 + field public static final int CLIR_STATUS_NOT_PROVISIONED = 0; // 0x0 + field public static final int CLIR_STATUS_PROVISIONED_PERMANENT = 1; // 0x1 + field public static final int CLIR_STATUS_TEMPORARILY_ALLOWED = 4; // 0x4 + field public static final int CLIR_STATUS_TEMPORARILY_RESTRICTED = 3; // 0x3 + field public static final int CLIR_STATUS_UNKNOWN = 2; // 0x2 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsSsInfo> CREATOR; + field public static final int DISABLED = 0; // 0x0 + field public static final int ENABLED = 1; // 0x1 + field public static final int NOT_REGISTERED = -1; // 0xffffffff + field public static final int SERVICE_NOT_PROVISIONED = 0; // 0x0 + field public static final int SERVICE_PROVISIONED = 1; // 0x1 + field public static final int SERVICE_PROVISIONING_UNKNOWN = -1; // 0xffffffff + } + + public static final class ImsSsInfo.Builder { + ctor public ImsSsInfo.Builder(int); + method @NonNull public android.telephony.ims.ImsSsInfo build(); + method @NonNull public android.telephony.ims.ImsSsInfo.Builder setClirInterrogationStatus(int); + method @NonNull public android.telephony.ims.ImsSsInfo.Builder setClirOutgoingState(int); + method @NonNull public android.telephony.ims.ImsSsInfo.Builder setIncomingCommunicationBarringNumber(@NonNull String); + method @NonNull public android.telephony.ims.ImsSsInfo.Builder setProvisionStatus(int); + } + + public final class ImsStreamMediaProfile implements android.os.Parcelable { + ctor public ImsStreamMediaProfile(int, int, int, int, int); + method public void copyFrom(android.telephony.ims.ImsStreamMediaProfile); + method public int describeContents(); + method public int getAudioDirection(); + method public int getAudioQuality(); + method public int getRttMode(); + method public int getVideoDirection(); + method public int getVideoQuality(); + method public boolean isReceivingRttAudio(); + method public boolean isRttCall(); + method public void setReceivingRttAudio(boolean); + method public void setRttMode(int); + method public void writeToParcel(android.os.Parcel, int); + field public static final int AUDIO_QUALITY_AMR = 1; // 0x1 + field public static final int AUDIO_QUALITY_AMR_WB = 2; // 0x2 + field public static final int AUDIO_QUALITY_EVRC = 4; // 0x4 + field public static final int AUDIO_QUALITY_EVRC_B = 5; // 0x5 + field public static final int AUDIO_QUALITY_EVRC_NW = 7; // 0x7 + field public static final int AUDIO_QUALITY_EVRC_WB = 6; // 0x6 + field public static final int AUDIO_QUALITY_EVS_FB = 20; // 0x14 + field public static final int AUDIO_QUALITY_EVS_NB = 17; // 0x11 + field public static final int AUDIO_QUALITY_EVS_SWB = 19; // 0x13 + field public static final int AUDIO_QUALITY_EVS_WB = 18; // 0x12 + field public static final int AUDIO_QUALITY_G711A = 13; // 0xd + field public static final int AUDIO_QUALITY_G711AB = 15; // 0xf + field public static final int AUDIO_QUALITY_G711U = 11; // 0xb + field public static final int AUDIO_QUALITY_G722 = 14; // 0xe + field public static final int AUDIO_QUALITY_G723 = 12; // 0xc + field public static final int AUDIO_QUALITY_G729 = 16; // 0x10 + field public static final int AUDIO_QUALITY_GSM_EFR = 8; // 0x8 + field public static final int AUDIO_QUALITY_GSM_FR = 9; // 0x9 + field public static final int AUDIO_QUALITY_GSM_HR = 10; // 0xa + field public static final int AUDIO_QUALITY_NONE = 0; // 0x0 + field public static final int AUDIO_QUALITY_QCELP13K = 3; // 0x3 + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsStreamMediaProfile> CREATOR; + field public static final int DIRECTION_INACTIVE = 0; // 0x0 + field public static final int DIRECTION_INVALID = -1; // 0xffffffff + field public static final int DIRECTION_RECEIVE = 1; // 0x1 + field public static final int DIRECTION_SEND = 2; // 0x2 + field public static final int DIRECTION_SEND_RECEIVE = 3; // 0x3 + field public static final int RTT_MODE_DISABLED = 0; // 0x0 + field public static final int RTT_MODE_FULL = 1; // 0x1 + field public static final int VIDEO_QUALITY_NONE = 0; // 0x0 + field public static final int VIDEO_QUALITY_QCIF = 1; // 0x1 + field public static final int VIDEO_QUALITY_QVGA_LANDSCAPE = 2; // 0x2 + field public static final int VIDEO_QUALITY_QVGA_PORTRAIT = 4; // 0x4 + field public static final int VIDEO_QUALITY_VGA_LANDSCAPE = 8; // 0x8 + field public static final int VIDEO_QUALITY_VGA_PORTRAIT = 16; // 0x10 + } + + public final class ImsSuppServiceNotification implements android.os.Parcelable { + ctor public ImsSuppServiceNotification(int, int, int, int, String, String[]); + method public int describeContents(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.ImsSuppServiceNotification> CREATOR; + field public final int code; + field public final String[] history; + field public final int index; + field public final int notificationType; + field public final String number; + field public final int type; + } + + public class ImsUtListener { + method public void onLineIdentificationSupplementaryServiceResponse(int, @NonNull android.telephony.ims.ImsSsInfo); + method public void onSupplementaryServiceIndication(android.telephony.ims.ImsSsData); + method public void onUtConfigurationCallBarringQueried(int, android.telephony.ims.ImsSsInfo[]); + method public void onUtConfigurationCallForwardQueried(int, android.telephony.ims.ImsCallForwardInfo[]); + method public void onUtConfigurationCallWaitingQueried(int, android.telephony.ims.ImsSsInfo[]); + method @Deprecated public void onUtConfigurationQueried(int, android.os.Bundle); + method public void onUtConfigurationQueryFailed(int, android.telephony.ims.ImsReasonInfo); + method public void onUtConfigurationUpdateFailed(int, android.telephony.ims.ImsReasonInfo); + method public void onUtConfigurationUpdated(int); + field @Deprecated public static final String BUNDLE_KEY_CLIR = "queryClir"; + field @Deprecated public static final String BUNDLE_KEY_SSINFO = "imsSsInfo"; + } + + public abstract class ImsVideoCallProvider { + ctor public ImsVideoCallProvider(); + method public void changeCallDataUsage(long); + 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 onRequestCallDataUsage(); + method public abstract void onRequestCameraCapabilities(); + method public abstract void onSendSessionModifyRequest(android.telecom.VideoProfile, android.telecom.VideoProfile); + method public abstract void onSendSessionModifyResponse(android.telecom.VideoProfile); + method public abstract void onSetCamera(String); + method public void onSetCamera(String, int); + 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); + } + + public class ProvisioningManager { + method @NonNull public static android.telephony.ims.ProvisioningManager createForSubscriptionId(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public int getProvisioningIntValue(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public boolean getProvisioningStatusForCapability(int, int); + method @Nullable @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public String getProvisioningStringValue(int); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @WorkerThread public boolean getRcsProvisioningStatusForCapability(int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void notifyRcsAutoConfigurationReceived(@NonNull byte[], boolean); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void registerProvisioningChangedCallback(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.ims.ProvisioningManager.Callback) throws android.telephony.ims.ImsException; + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public int setProvisioningIntValue(int, int); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void setProvisioningStatusForCapability(int, int, boolean); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public int setProvisioningStringValue(int, @NonNull String); + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @WorkerThread public void setRcsProvisioningStatusForCapability(int, boolean); + method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void unregisterProvisioningChangedCallback(@NonNull android.telephony.ims.ProvisioningManager.Callback); + field public static final int KEY_VOICE_OVER_WIFI_ENTITLEMENT_ID = 67; // 0x43 + field public static final int KEY_VOICE_OVER_WIFI_MODE_OVERRIDE = 27; // 0x1b + field public static final int KEY_VOICE_OVER_WIFI_ROAMING_ENABLED_OVERRIDE = 26; // 0x1a + field public static final int PROVISIONING_VALUE_DISABLED = 0; // 0x0 + field public static final int PROVISIONING_VALUE_ENABLED = 1; // 0x1 + field public static final String STRING_QUERY_RESULT_ERROR_GENERIC = "STRING_QUERY_RESULT_ERROR_GENERIC"; + field public static final String STRING_QUERY_RESULT_ERROR_NOT_READY = "STRING_QUERY_RESULT_ERROR_NOT_READY"; + } + + public static class ProvisioningManager.Callback { + ctor public ProvisioningManager.Callback(); + method public void onProvisioningIntChanged(int, int); + method public void onProvisioningStringChanged(int, @NonNull String); + } + + public class RcsUceAdapter { + method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setUceSettingEnabled(boolean) throws android.telephony.ims.ImsException; + } + +} + +package android.telephony.ims.feature { + + public final class CapabilityChangeRequest implements android.os.Parcelable { + method public void addCapabilitiesToDisableForTech(int, int); + method public void addCapabilitiesToEnableForTech(int, int); + method public int describeContents(); + method public java.util.List<android.telephony.ims.feature.CapabilityChangeRequest.CapabilityPair> getCapabilitiesToDisable(); + method public java.util.List<android.telephony.ims.feature.CapabilityChangeRequest.CapabilityPair> getCapabilitiesToEnable(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.feature.CapabilityChangeRequest> CREATOR; + } + + public static class CapabilityChangeRequest.CapabilityPair { + ctor public CapabilityChangeRequest.CapabilityPair(int, int); + method public int getCapability(); + method public int getRadioTech(); + } + + public abstract class ImsFeature { + ctor public ImsFeature(); + method public abstract void changeEnabledCapabilities(android.telephony.ims.feature.CapabilityChangeRequest, android.telephony.ims.feature.ImsFeature.CapabilityCallbackProxy); + method public int getFeatureState(); + method public final int getSlotIndex(); + method public abstract void onFeatureReady(); + method public abstract void onFeatureRemoved(); + method public final void setFeatureState(int); + field public static final int CAPABILITY_ERROR_GENERIC = -1; // 0xffffffff + field public static final int CAPABILITY_SUCCESS = 0; // 0x0 + field public static final int FEATURE_EMERGENCY_MMTEL = 0; // 0x0 + field public static final int FEATURE_MMTEL = 1; // 0x1 + field public static final int FEATURE_RCS = 2; // 0x2 + field public static final int STATE_INITIALIZING = 1; // 0x1 + field public static final int STATE_READY = 2; // 0x2 + field public static final int STATE_UNAVAILABLE = 0; // 0x0 + } + + @Deprecated public static class ImsFeature.Capabilities { + field @Deprecated protected int mCapabilities; + } + + protected static class ImsFeature.CapabilityCallbackProxy { + method public void onChangeCapabilityConfigurationError(int, int, int); + } + + public class MmTelFeature extends android.telephony.ims.feature.ImsFeature { + ctor public MmTelFeature(); + method public void changeEnabledCapabilities(@NonNull android.telephony.ims.feature.CapabilityChangeRequest, @NonNull android.telephony.ims.feature.ImsFeature.CapabilityCallbackProxy); + method @Nullable public android.telephony.ims.ImsCallProfile createCallProfile(int, int); + method @Nullable public android.telephony.ims.stub.ImsCallSessionImplBase createCallSession(@NonNull android.telephony.ims.ImsCallProfile); + method @NonNull public android.telephony.ims.stub.ImsEcbmImplBase getEcbm(); + method @NonNull public android.telephony.ims.stub.ImsMultiEndpointImplBase getMultiEndpoint(); + method @NonNull public android.telephony.ims.stub.ImsSmsImplBase getSmsImplementation(); + method @NonNull public android.telephony.ims.stub.ImsUtImplBase getUt(); + method public final void notifyCapabilitiesStatusChanged(@NonNull android.telephony.ims.feature.MmTelFeature.MmTelCapabilities); + method public final void notifyIncomingCall(@NonNull android.telephony.ims.stub.ImsCallSessionImplBase, @NonNull android.os.Bundle); + method public final void notifyRejectedCall(@NonNull android.telephony.ims.ImsCallProfile, @NonNull android.telephony.ims.ImsReasonInfo); + method public final void notifyVoiceMessageCountUpdate(int); + method public void onFeatureReady(); + method public void onFeatureRemoved(); + method public boolean queryCapabilityConfiguration(int, int); + method @NonNull public final android.telephony.ims.feature.MmTelFeature.MmTelCapabilities queryCapabilityStatus(); + method public void setUiTtyMode(int, @Nullable android.os.Message); + method public int shouldProcessCall(@NonNull String[]); + field public static final String EXTRA_IS_UNKNOWN_CALL = "android.telephony.ims.feature.extra.IS_UNKNOWN_CALL"; + field public static final String EXTRA_IS_USSD = "android.telephony.ims.feature.extra.IS_USSD"; + field public static final int PROCESS_CALL_CSFB = 1; // 0x1 + field public static final int PROCESS_CALL_IMS = 0; // 0x0 + } + + public static class MmTelFeature.MmTelCapabilities extends android.telephony.ims.feature.ImsFeature.Capabilities { + ctor public MmTelFeature.MmTelCapabilities(); + ctor @Deprecated public MmTelFeature.MmTelCapabilities(android.telephony.ims.feature.ImsFeature.Capabilities); + ctor public MmTelFeature.MmTelCapabilities(int); + method public final void addCapabilities(int); + method public final void removeCapabilities(int); + } + + public class RcsFeature extends android.telephony.ims.feature.ImsFeature { + ctor public RcsFeature(); + method public void changeEnabledCapabilities(@NonNull android.telephony.ims.feature.CapabilityChangeRequest, @NonNull android.telephony.ims.feature.ImsFeature.CapabilityCallbackProxy); + method public void onFeatureReady(); + method public void onFeatureRemoved(); + } + +} + +package android.telephony.ims.stub { + + public class ImsCallSessionImplBase implements java.lang.AutoCloseable { + ctor public ImsCallSessionImplBase(); + method public void accept(int, android.telephony.ims.ImsStreamMediaProfile); + method public void close(); + method public void deflect(String); + method public void extendToConference(String[]); + method public String getCallId(); + method public android.telephony.ims.ImsCallProfile getCallProfile(); + method public android.telephony.ims.ImsVideoCallProvider getImsVideoCallProvider(); + method public android.telephony.ims.ImsCallProfile getLocalCallProfile(); + method public String getProperty(String); + method public android.telephony.ims.ImsCallProfile getRemoteCallProfile(); + method public int getState(); + method public void hold(android.telephony.ims.ImsStreamMediaProfile); + method public void inviteParticipants(String[]); + method public boolean isInCall(); + method public boolean isMultiparty(); + method public void merge(); + method public void reject(int); + method public void removeParticipants(String[]); + method public void resume(android.telephony.ims.ImsStreamMediaProfile); + method public void sendDtmf(char, android.os.Message); + method public void sendRttMessage(String); + method public void sendRttModifyRequest(android.telephony.ims.ImsCallProfile); + method public void sendRttModifyResponse(boolean); + method public void sendUssd(String); + method public void setListener(android.telephony.ims.ImsCallSessionListener); + method public void setMute(boolean); + method public void start(String, android.telephony.ims.ImsCallProfile); + method public void startConference(String[], android.telephony.ims.ImsCallProfile); + method public void startDtmf(char); + method public void stopDtmf(); + method public void terminate(int); + method public void update(int, android.telephony.ims.ImsStreamMediaProfile); + field public static final int USSD_MODE_NOTIFY = 0; // 0x0 + field public static final int USSD_MODE_REQUEST = 1; // 0x1 + } + + public static class ImsCallSessionImplBase.State { + method public static String toString(int); + field public static final int ESTABLISHED = 4; // 0x4 + field public static final int ESTABLISHING = 3; // 0x3 + field public static final int IDLE = 0; // 0x0 + field public static final int INITIATED = 1; // 0x1 + field public static final int INVALID = -1; // 0xffffffff + field public static final int NEGOTIATING = 2; // 0x2 + field public static final int REESTABLISHING = 6; // 0x6 + field public static final int RENEGOTIATING = 5; // 0x5 + field public static final int TERMINATED = 8; // 0x8 + field public static final int TERMINATING = 7; // 0x7 + } + + public class ImsConfigImplBase { + ctor public ImsConfigImplBase(); + method public int getConfigInt(int); + method public String getConfigString(int); + method public final void notifyProvisionedValueChanged(int, int); + method public final void notifyProvisionedValueChanged(int, String); + method public void notifyRcsAutoConfigurationReceived(@NonNull byte[], boolean); + method public int setConfig(int, int); + method public int setConfig(int, String); + field public static final int CONFIG_RESULT_FAILED = 1; // 0x1 + field public static final int CONFIG_RESULT_SUCCESS = 0; // 0x0 + field public static final int CONFIG_RESULT_UNKNOWN = -1; // 0xffffffff + } + + public class ImsEcbmImplBase { + ctor public ImsEcbmImplBase(); + method public final void enteredEcbm(); + method public void exitEmergencyCallbackMode(); + method public final void exitedEcbm(); + } + + public final class ImsFeatureConfiguration implements android.os.Parcelable { + method public int describeContents(); + method public java.util.Set<android.telephony.ims.stub.ImsFeatureConfiguration.FeatureSlotPair> getServiceFeatures(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ims.stub.ImsFeatureConfiguration> CREATOR; + } + + public static class ImsFeatureConfiguration.Builder { + ctor public ImsFeatureConfiguration.Builder(); + method public android.telephony.ims.stub.ImsFeatureConfiguration.Builder addFeature(int, int); + method public android.telephony.ims.stub.ImsFeatureConfiguration build(); + } + + public static final class ImsFeatureConfiguration.FeatureSlotPair { + ctor public ImsFeatureConfiguration.FeatureSlotPair(int, int); + field public final int featureType; + field public final int slotId; + } + + public class ImsMultiEndpointImplBase { + ctor public ImsMultiEndpointImplBase(); + method public final void onImsExternalCallStateUpdate(java.util.List<android.telephony.ims.ImsExternalCallState>); + method public void requestImsExternalCallStateInfo(); + } + + public class ImsRegistrationImplBase { + ctor public ImsRegistrationImplBase(); + method public final void onDeregistered(android.telephony.ims.ImsReasonInfo); + method public final void onRegistered(int); + method public final void onRegistering(int); + method public final void onSubscriberAssociatedUriChanged(android.net.Uri[]); + method public final void onTechnologyChangeFailed(int, android.telephony.ims.ImsReasonInfo); + field public static final int REGISTRATION_TECH_IWLAN = 1; // 0x1 + field public static final int REGISTRATION_TECH_LTE = 0; // 0x0 + field public static final int REGISTRATION_TECH_NONE = -1; // 0xffffffff + } + + public class ImsSmsImplBase { + ctor public ImsSmsImplBase(); + method public void acknowledgeSms(int, @IntRange(from=0, to=65535) int, int); + method public void acknowledgeSmsReport(int, @IntRange(from=0, to=65535) int, int); + method public String getSmsFormat(); + method public void onReady(); + method @Deprecated public final void onSendSmsResult(int, @IntRange(from=0, to=65535) int, int, int) throws java.lang.RuntimeException; + method public final void onSendSmsResultError(int, @IntRange(from=0, to=65535) int, int, int, int) throws java.lang.RuntimeException; + method public final void onSendSmsResultSuccess(int, @IntRange(from=0, to=65535) int) throws java.lang.RuntimeException; + method public final void onSmsReceived(int, String, byte[]) throws java.lang.RuntimeException; + method @Deprecated public final void onSmsStatusReportReceived(int, @IntRange(from=0, to=65535) int, String, byte[]) throws java.lang.RuntimeException; + method public final void onSmsStatusReportReceived(int, String, byte[]) throws java.lang.RuntimeException; + method public void sendSms(int, @IntRange(from=0, to=65535) int, String, String, boolean, byte[]); + field public static final int DELIVER_STATUS_ERROR_GENERIC = 2; // 0x2 + field public static final int DELIVER_STATUS_ERROR_NO_MEMORY = 3; // 0x3 + field public static final int DELIVER_STATUS_ERROR_REQUEST_NOT_SUPPORTED = 4; // 0x4 + field public static final int DELIVER_STATUS_OK = 1; // 0x1 + field public static final int RESULT_NO_NETWORK_ERROR = -1; // 0xffffffff + field public static final int SEND_STATUS_ERROR = 2; // 0x2 + field public static final int SEND_STATUS_ERROR_FALLBACK = 4; // 0x4 + field public static final int SEND_STATUS_ERROR_RETRY = 3; // 0x3 + field public static final int SEND_STATUS_OK = 1; // 0x1 + field public static final int STATUS_REPORT_STATUS_ERROR = 2; // 0x2 + field public static final int STATUS_REPORT_STATUS_OK = 1; // 0x1 + } + + public class ImsUtImplBase { + ctor public ImsUtImplBase(); + method public void close(); + method public int queryCFForServiceClass(int, String, int); + method public int queryCallBarring(int); + method public int queryCallBarringForServiceClass(int, int); + method public int queryCallForward(int, String); + method public int queryCallWaiting(); + method public int queryClip(); + method public int queryClir(); + method public int queryColp(); + method public int queryColr(); + method public void setListener(android.telephony.ims.ImsUtListener); + method public int transact(android.os.Bundle); + method public int updateCallBarring(int, int, String[]); + method public int updateCallBarringForServiceClass(int, int, String[], int); + method public int updateCallForward(int, int, String, int, int); + method public int updateCallWaiting(boolean, int); + method public int updateClip(boolean); + method public int updateClir(int); + method public int updateColp(boolean); + method public int updateColr(int); + } + +} + +package android.telephony.mbms { + + public static class DownloadRequest.Builder { + method public android.telephony.mbms.DownloadRequest.Builder setServiceId(String); + } + + public final class FileInfo implements android.os.Parcelable { + ctor public FileInfo(android.net.Uri, String); + } + + public final class FileServiceInfo extends android.telephony.mbms.ServiceInfo implements android.os.Parcelable { + ctor public FileServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date, java.util.List<android.telephony.mbms.FileInfo>); + } + + public class MbmsDownloadReceiver extends android.content.BroadcastReceiver { + field public static final int RESULT_APP_NOTIFICATION_ERROR = 6; // 0x6 + field public static final int RESULT_BAD_TEMP_FILE_ROOT = 3; // 0x3 + field public static final int RESULT_DOWNLOAD_FINALIZATION_ERROR = 4; // 0x4 + field public static final int RESULT_INVALID_ACTION = 1; // 0x1 + field public static final int RESULT_MALFORMED_INTENT = 2; // 0x2 + field public static final int RESULT_OK = 0; // 0x0 + field public static final int RESULT_TEMP_FILE_GENERATION_ERROR = 5; // 0x5 + } + + public final class StreamingServiceInfo extends android.telephony.mbms.ServiceInfo implements android.os.Parcelable { + ctor public StreamingServiceInfo(java.util.Map<java.util.Locale,java.lang.String>, String, java.util.List<java.util.Locale>, String, java.util.Date, java.util.Date); + } + + public final class UriPathPair implements android.os.Parcelable { + method public int describeContents(); + method public android.net.Uri getContentUri(); + method public android.net.Uri getFilePathUri(); + method public void writeToParcel(android.os.Parcel, int); + field @NonNull public static final android.os.Parcelable.Creator<android.telephony.mbms.UriPathPair> CREATOR; + } + +} + +package android.telephony.mbms.vendor { + + public class MbmsDownloadServiceBase extends android.os.Binder implements android.os.IInterface { + ctor public MbmsDownloadServiceBase(); + method public int addProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) throws android.os.RemoteException; + method public int addServiceAnnouncement(int, @NonNull byte[]); + method public int addStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) throws android.os.RemoteException; + method public android.os.IBinder asBinder(); + method public int cancelDownload(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException; + method public void dispose(int) throws android.os.RemoteException; + method public int download(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException; + method public int initialize(int, android.telephony.mbms.MbmsDownloadSessionCallback) throws android.os.RemoteException; + method @NonNull public java.util.List<android.telephony.mbms.DownloadRequest> listPendingDownloads(int) throws android.os.RemoteException; + method public void onAppCallbackDied(int, int); + method public boolean onTransact(int, android.os.Parcel, android.os.Parcel, int) throws android.os.RemoteException; + method public int removeProgressListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadProgressListener) throws android.os.RemoteException; + method public int removeStatusListener(android.telephony.mbms.DownloadRequest, android.telephony.mbms.DownloadStatusListener) throws android.os.RemoteException; + method public int requestDownloadState(android.telephony.mbms.DownloadRequest, android.telephony.mbms.FileInfo) throws android.os.RemoteException; + method public int requestUpdateFileServices(int, java.util.List<java.lang.String>) throws android.os.RemoteException; + method public int resetDownloadKnowledge(android.telephony.mbms.DownloadRequest) throws android.os.RemoteException; + method public int setTempFileRootDirectory(int, String) throws android.os.RemoteException; + } + + public class MbmsGroupCallServiceBase extends android.app.Service { + ctor public MbmsGroupCallServiceBase(); + method public void dispose(int) throws android.os.RemoteException; + method public int initialize(@NonNull android.telephony.mbms.MbmsGroupCallSessionCallback, int) throws android.os.RemoteException; + method public void onAppCallbackDied(int, int); + method public android.os.IBinder onBind(android.content.Intent); + method public int startGroupCall(int, long, @NonNull java.util.List<java.lang.Integer>, @NonNull java.util.List<java.lang.Integer>, @NonNull android.telephony.mbms.GroupCallCallback); + method public void stopGroupCall(int, long); + method public void updateGroupCall(int, long, @NonNull java.util.List<java.lang.Integer>, @NonNull java.util.List<java.lang.Integer>); + } + + public class MbmsStreamingServiceBase extends android.os.Binder implements android.os.IInterface { + ctor public MbmsStreamingServiceBase(); + method public android.os.IBinder asBinder(); + method public void dispose(int) throws android.os.RemoteException; + method @Nullable public android.net.Uri getPlaybackUri(int, String) throws android.os.RemoteException; + method public int initialize(android.telephony.mbms.MbmsStreamingSessionCallback, int) throws android.os.RemoteException; + method public void onAppCallbackDied(int, int); + method public boolean onTransact(int, android.os.Parcel, android.os.Parcel, int) throws android.os.RemoteException; + method public int requestUpdateStreamingServices(int, java.util.List<java.lang.String>) throws android.os.RemoteException; + method public int startStreaming(int, String, android.telephony.mbms.StreamingServiceCallback) throws android.os.RemoteException; + method public void stopStreaming(int, String) throws android.os.RemoteException; + } + + public class VendorUtils { + ctor public VendorUtils(); + method public static android.content.ComponentName getAppReceiverFromPackageName(android.content.Context, String); + field public static final String ACTION_CLEANUP = "android.telephony.mbms.action.CLEANUP"; + field public static final String ACTION_DOWNLOAD_RESULT_INTERNAL = "android.telephony.mbms.action.DOWNLOAD_RESULT_INTERNAL"; + field public static final String ACTION_FILE_DESCRIPTOR_REQUEST = "android.telephony.mbms.action.FILE_DESCRIPTOR_REQUEST"; + field public static final String EXTRA_FD_COUNT = "android.telephony.mbms.extra.FD_COUNT"; + field public static final String EXTRA_FINAL_URI = "android.telephony.mbms.extra.FINAL_URI"; + field public static final String EXTRA_FREE_URI_LIST = "android.telephony.mbms.extra.FREE_URI_LIST"; + field public static final String EXTRA_PAUSED_LIST = "android.telephony.mbms.extra.PAUSED_LIST"; + field public static final String EXTRA_PAUSED_URI_LIST = "android.telephony.mbms.extra.PAUSED_URI_LIST"; + field public static final String EXTRA_SERVICE_ID = "android.telephony.mbms.extra.SERVICE_ID"; + field public static final String EXTRA_TEMP_FILES_IN_USE = "android.telephony.mbms.extra.TEMP_FILES_IN_USE"; + field public static final String EXTRA_TEMP_FILE_ROOT = "android.telephony.mbms.extra.TEMP_FILE_ROOT"; + field public static final String EXTRA_TEMP_LIST = "android.telephony.mbms.extra.TEMP_LIST"; + } + +} + diff --git a/telephony/java/android/service/carrier/CarrierIdentifier.java b/telephony/java/android/service/carrier/CarrierIdentifier.java index bc0f909e1331..c6b9ea200382 100644 --- a/telephony/java/android/service/carrier/CarrierIdentifier.java +++ b/telephony/java/android/service/carrier/CarrierIdentifier.java @@ -55,12 +55,13 @@ public class CarrierIdentifier implements Parcelable { private @Nullable String mImsi; private @Nullable String mGid1; private @Nullable String mGid2; + private @Nullable String mIccid; private int mCarrierId = TelephonyManager.UNKNOWN_CARRIER_ID; private int mSpecificCarrierId = TelephonyManager.UNKNOWN_CARRIER_ID; public CarrierIdentifier(String mcc, String mnc, @Nullable String spn, @Nullable String imsi, @Nullable String gid1, @Nullable String gid2) { - this(mcc, mnc, spn, imsi, gid1, gid2, TelephonyManager.UNKNOWN_CARRIER_ID, + this(mcc, mnc, spn, imsi, gid1, gid2, null, TelephonyManager.UNKNOWN_CARRIER_ID, TelephonyManager.UNKNOWN_CARRIER_ID); } @@ -79,16 +80,31 @@ public class CarrierIdentifier implements Parcelable { public CarrierIdentifier(@NonNull String mcc, @NonNull String mnc, @Nullable String spn, @Nullable String imsi, @Nullable String gid1, @Nullable String gid2, int carrierid, int specificCarrierId) { + this(mcc, mnc, spn, imsi, gid1, gid2, null, carrierid, specificCarrierId); + } + + /** @hide */ + public CarrierIdentifier(String mcc, String mnc, @Nullable String spn, + @Nullable String imsi, @Nullable String gid1, @Nullable String gid2, + @Nullable String iccid, int carrierid, int specificCarrierId) { mMcc = mcc; mMnc = mnc; mSpn = spn; mImsi = imsi; mGid1 = gid1; mGid2 = gid2; + mIccid = iccid; mCarrierId = carrierid; mSpecificCarrierId = specificCarrierId; } + /** @hide */ + public CarrierIdentifier(String mcc, String mnc, @Nullable String spn, @Nullable String imsi, + @Nullable String gid1, @Nullable String gid2I, @Nullable String iccid) { + this(mcc, mnc, spn, imsi, gid1, gid2I); + mIccid = iccid; + } + /** * Creates a carrier identifier instance. * @@ -113,6 +129,7 @@ public class CarrierIdentifier implements Parcelable { mGid2 = gid2; mSpn = null; mImsi = null; + mIccid = null; } /** @hide */ @@ -154,6 +171,13 @@ public class CarrierIdentifier implements Parcelable { return mGid2; } + /** Get the ICCID. + * @hide */ + @Nullable + public String getIccid() { + return mIccid; + } + /** * Returns the carrier id. * @see TelephonyManager#getSimCarrierId() @@ -192,13 +216,14 @@ public class CarrierIdentifier implements Parcelable { && Objects.equals(mImsi, that.mImsi) && Objects.equals(mGid1, that.mGid1) && Objects.equals(mGid2, that.mGid2) + && Objects.equals(mIccid, that.mIccid) && Objects.equals(mCarrierId, that.mCarrierId) && Objects.equals(mSpecificCarrierId, that.mSpecificCarrierId); } @Override public int hashCode(){ - return Objects.hash(mMcc, mMnc, mSpn, mImsi, mGid1, mGid2, mCarrierId, mSpecificCarrierId); + return Objects.hash(mMcc, mMnc, mSpn, mImsi, mGid1, mGid2, mIccid, mCarrierId, mSpecificCarrierId); } @Override @@ -214,6 +239,7 @@ public class CarrierIdentifier implements Parcelable { out.writeString(mImsi); out.writeString(mGid1); out.writeString(mGid2); + out.writeString(mIccid); out.writeInt(mCarrierId); out.writeInt(mSpecificCarrierId); } @@ -227,6 +253,7 @@ public class CarrierIdentifier implements Parcelable { + ",imsi=" + Rlog.pii(false, mImsi) + ",gid1=" + mGid1 + ",gid2=" + mGid2 + + ",iccid=" + mIccid + ",carrierid=" + mCarrierId + ",specificCarrierId=" + mSpecificCarrierId + "}"; @@ -240,6 +267,7 @@ public class CarrierIdentifier implements Parcelable { mImsi = in.readString(); mGid1 = in.readString(); mGid2 = in.readString(); + mIccid = in.readString(); mCarrierId = in.readInt(); mSpecificCarrierId = in.readInt(); } @@ -251,5 +279,6 @@ public class CarrierIdentifier implements Parcelable { int IMSI_PREFIX = 2; int GID1 = 3; int GID2 = 4; + int ICCID = 5; } } diff --git a/telephony/java/android/telephony/AccessNetworkConstants.java b/telephony/java/android/telephony/AccessNetworkConstants.java index 27ba67667d92..67e5feec1104 100644 --- a/telephony/java/android/telephony/AccessNetworkConstants.java +++ b/telephony/java/android/telephony/AccessNetworkConstants.java @@ -20,6 +20,7 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.SystemApi; import android.hardware.radio.V1_5.AccessNetwork; +import android.hardware.radio.V1_5.RadioAccessNetworks; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -127,6 +128,28 @@ public final class AccessNetworkConstants { throw new IllegalArgumentException("Invalid access network type " + str); } } + + /** + * Converts from RadioAccessNetworks in HAL to AccessNetworkType in frameworks. + * @hide + */ + public static int convertRanToAnt(int ran) { + switch (ran) { + case RadioAccessNetworks.GERAN: + return AccessNetworkType.GERAN; + case RadioAccessNetworks.UTRAN: + return AccessNetworkType.UTRAN; + case RadioAccessNetworks.EUTRAN: + return AccessNetworkType.EUTRAN; + case RadioAccessNetworks.NGRAN: + return AccessNetworkType.NGRAN; + case RadioAccessNetworks.CDMA2000: + return AccessNetworkType.CDMA2000; + case RadioAccessNetworks.UNKNOWN: + default: + return AccessNetworkType.UNKNOWN; + } + } } /** diff --git a/telephony/java/android/telephony/CagInfo.aidl b/telephony/java/android/telephony/CagInfo.aidl new file mode 100644 index 000000000000..997cd603dd12 --- /dev/null +++ b/telephony/java/android/telephony/CagInfo.aidl @@ -0,0 +1,8 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + +package android.telephony; + +parcelable CagInfo; diff --git a/telephony/java/android/telephony/CagInfo.java b/telephony/java/android/telephony/CagInfo.java new file mode 100644 index 000000000000..7c9580cb3ce5 --- /dev/null +++ b/telephony/java/android/telephony/CagInfo.java @@ -0,0 +1,168 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + +package android.telephony; + +import android.annotation.NonNull; +import android.os.Parcel; +import android.os.Parcelable; +import android.text.TextUtils; + +import java.util.Objects; + +/** + * Holds the CAG information. + * @hide + */ +public final class CagInfo implements Parcelable { + + /** + * This value indicates that the long field is unreported. + */ + + public static final long UNAVAILABLE_LONG = Long.MAX_VALUE; + /** Defines the name of CAG Cell. */ + private String mCagName; + + /** Defines the CAG ID of CAG Cell. */ + private long mCagId; + + /** Indicates if PLMN is CAG only access. */ + private boolean mCagOnlyAccess; + + /** Indicates the presence of [PLMN, CAG_ID] combination. */ + private boolean mCagInAllowedList; + + /** + * Returns the name of CAG cell. + * @hide + */ + public String getCagName() { + return mCagName; + } + + /** + * Returns the CAG ID of CAG cell. + * @hide + */ + public long getCagId() { + return mCagId; + } + + /** + * Returns whether PLMN is CAG only access. + * FALSE – PLMN is not CAG only access. + * TRUE – PLMN is CAG only access. + * @hide + */ + public boolean getCagOnlyAccess() { + return mCagOnlyAccess; + } + + /** + * Returns whether [PLMN, CAG_ID] combination is present. + * FALSE – [PLMN, CAG_ID] combination is not present. + * TRUE – [PLMN, CAG_ID] combination is present. + * @hide + */ + public boolean getCagInAllowedList() { + return mCagInAllowedList; + } + + /** @hide */ + public CagInfo() { + mCagName = new String(); + mCagId = UNAVAILABLE_LONG; + mCagOnlyAccess = false; + mCagInAllowedList = false; + } + + /** + * CagInfo constructor. + * + * @param mCagName Name of CAG cell. + * @param mCagId CAG ID of CAG cell. + * @param mCagOnlyAccess Indicates if PLMN is CAG only access. + * @param mCagInAllowedList Indicates the presence of [PLMN, CAG_ID] combination. + * @hide + */ + public CagInfo(String cagName, long cagId, boolean cagOnlyAccess, boolean cagInAllowedList) { + mCagName = cagName; + mCagId = cagId; + mCagOnlyAccess = cagOnlyAccess; + mCagInAllowedList = cagInAllowedList; + } + + /** + * Construct a CagInfo object from the given parcel. + * @hide + */ + private CagInfo(Parcel in) { + mCagName = in.readString(); + mCagId = in.readLong(); + mCagOnlyAccess = in.readBoolean(); + mCagInAllowedList = in.readBoolean(); + } + + /** + * String representation of the CagInfo. + */ + @Override + public String toString() { + return "mCagName: " + getCagName() + ", mCagId: " + getCagId() + "mCagOnlyAccess: " + + getCagOnlyAccess() + "mCagInAllowedList: " + getCagInAllowedList(); + } + + /** + * Describe the contents of this object. + */ + @Override + public int describeContents() { + return 0; + } + + /** + * Write this object to a Parcel. + */ + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeString(mCagName); + out.writeLong(mCagId); + out.writeBoolean(mCagOnlyAccess); + out.writeBoolean(mCagInAllowedList); + } + + /** + * Parcel creator class. + */ + public static final @NonNull Parcelable.Creator<CagInfo> CREATOR = new Creator<CagInfo>() { + public CagInfo createFromParcel(Parcel in) { + return new CagInfo(in); + } + public CagInfo[] newArray(int size) { + return new CagInfo[size]; + } + }; + + @Override + public int hashCode() { + return Objects.hash(mCagName, mCagId, mCagOnlyAccess, mCagInAllowedList); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + CagInfo other = (CagInfo) obj; + return (TextUtils.equals(mCagName, other.mCagName) + && mCagId == other.mCagId + && mCagOnlyAccess == other.mCagOnlyAccess + && mCagInAllowedList == other.mCagInAllowedList); + } +} diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index 5b1c6b1c88b8..06fca116a185 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -166,6 +166,15 @@ public class CarrierConfigManager { public static final String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED"; + /** + * Intent action broadcasted when essential records are loaded. + * requires permission "com.qti.permission.RECEIVE_ESSENTIAL_RECORDS_LOADED". + * + * @hide + */ + public static final String ACTION_ESSENTIAL_RECORDS_LOADED = + "org.codeaurora.intent.action.ESSENTIAL_RECORDS_LOADED"; + // Below are the keys used in carrier config bundles. To add a new variable, define the key and // give it a default value in sDefaults. If you need to ship a per-network override in the // system image, that can be added in packages/apps/CarrierConfig. @@ -246,6 +255,19 @@ public class CarrierConfigManager { "call_forwarding_when_busy_supported_bool"; /** + * Boolean indicating if carrier supports call forwarding option "When not logged in". + * + * {@code true}: Call forwarding option "When not logged in" is supported. + * {@code false}: Call forwarding option "When not logged in" is not supported. Option will be + * removed in the UI. + * + * By default this value is true. + * @hide + */ + public static final String KEY_CALL_FORWARDING_WHEN_NOT_LOGGED_IN_SUPPORTED_BOOL = + "call_forwarding_when_not_logged_in_supported_bool"; + + /** * Boolean indicating if the "Caller ID" item is visible in the Additional Settings menu. * true means visible. false means gone. * @@ -820,6 +842,14 @@ public class CarrierConfigManager { public static final String KEY_VILTE_DATA_IS_METERED_BOOL = "vilte_data_is_metered_bool"; /** + * Flag indicating whether we should reset UT capability or not for IMS deregistration + * and for IMS feature state not ready + * @hide + */ + public static final String KEY_IGNORE_RESET_UT_CAPABILITY_BOOL = + "ignore_reset_ut_capability_bool"; + + /** * Flag specifying whether WFC over IMS should be available for carrier: independent of * carrier provisioning. If false: hard disabled. If true: then depends on carrier * provisioning, availability etc. @@ -875,6 +905,18 @@ public class CarrierConfigManager { "carrier_wfc_supports_wifi_only_bool"; /** + * Flag specifying whether WFC over IMS supports the "ims preferred" option. If false, the wifi + * calling settings will not include an option for "ims preferred". If true, the wifi calling + * settings will include an option for "ims preferred" + * <p> + * By default, it is assumed that WFC does not support "ims preferred". + * @hide + */ + public static final String KEY_CARRIER_WFC_SUPPORTS_IMS_PREFERRED_BOOL = + "carrier_wfc_supports_ims_preferred_bool"; + + + /** * Default mode for WFC over IMS on home network: * <ul> * <li>0: Wi-Fi only @@ -1016,6 +1058,13 @@ public class CarrierConfigManager { public static final String KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL = "carrier_volte_tty_supported_bool"; + /** + * Flag indicating whether VT tty is supported + * @hide + */ + public static final String KEY_CARRIER_VT_TTY_SUPPORT_BOOL = + "carrier_vt_tty_support_bool"; + /** Flag specifying whether VoWIFI TTY is supported. * @hide */ @@ -1556,6 +1605,15 @@ public class CarrierConfigManager { public static final String KEY_HIDE_ENHANCED_4G_LTE_BOOL = "hide_enhanced_4g_lte_bool"; /** + * Determines whether the Enabled 5G toggle will be shown in the settings. When this + * option is {@code true}, the toggle will be hidden regardless of whether the device and + * carrier supports 5G or not. + * + * @hide + */ + public static final String KEY_HIDE_ENABLED_5G_BOOL = "hide_enabled_5g_bool"; + + /** * Sets the default state for the "Enhanced 4G LTE" or "Advanced Calling" mode toggle set by the * user. When this is {@code true}, this mode by default is on, otherwise if {@code false}, * this mode by default is off. @@ -2059,6 +2117,7 @@ public class CarrierConfigManager { public static final String KEY_SHOW_PRECISE_FAILED_CAUSE_BOOL = "show_precise_failed_cause_bool"; + /** * A list of carrier nr availability is used to determine whether the carrier enable the * non-standalone (NSA) mode of 5G NR, standalone (SA) mode of 5G NR @@ -2076,6 +2135,12 @@ public class CarrierConfigManager { "carrier_nr_availabilities_int_array"; /** + * Flag specifying whether CDMA call waiting and call forwarding are enabled + * @hide + */ + public static final String KEY_CDMA_CW_CF_ENABLED_BOOL = "cdma_cw_cf_enabled_bool"; + + /** * Boolean to decide whether LTE is enabled. */ public static final String KEY_LTE_ENABLED_BOOL = "lte_enabled_bool"; @@ -2102,8 +2167,8 @@ public class CarrierConfigManager { public static final String KEY_CARRIER_SETTINGS_ACTIVITY_COMPONENT_NAME_STRING = "carrier_settings_activity_component_name_string"; - // These variables are used by the MMS service and exposed through another API, - // SmsManager. The variable names and string values are copied from there. + // These variables are used by the MMS service and exposed through another API, {@link + // SmsManager}. The variable names and string values are copied from there. public static final String KEY_MMS_ALIAS_ENABLED_BOOL = "aliasEnabled"; public static final String KEY_MMS_ALLOW_ATTACH_AUDIO_BOOL = "allowAttachAudio"; public static final String KEY_MMS_APPEND_TRANSACTION_ID_BOOL = "enabledTransID"; @@ -2561,6 +2626,13 @@ public class CarrierConfigManager { public static final String KEY_ALLOW_HOLD_VIDEO_CALL_BOOL = "allow_hold_video_call_bool"; /** + * When true, indicates that concurrent call is allowed when there is an ongoing video call. + * @hide + */ + public static final String KEY_ALLOW_CONCURRENT_CALL_DURING_VIDEO_CALL_BOOL = + "allow_concurrent_call_during_video_call"; + + /** * When true, indicates that the HD audio icon in the in-call screen should not be shown for * VoWifi calls. * @hide @@ -9730,6 +9802,127 @@ public class CarrierConfigManager { public static final String KEY_IWLAN_HANDOVER_POLICY_STRING_ARRAY = "iwlan_handover_policy_string_array"; + /** + * Flag indicating whether carrier supports multianchor conference. + * In multianchor conference, a participant of a conference can add + * other participants to the call using merge button thereby resulting + * in a conference with multi anchors. + * @hide + */ + public static final String KEY_CARRIER_SUPPORTS_MULTIANCHOR_CONFERENCE = + "carrier_supports_multianchor_conference"; + + /** + * String array of APN configurations of same MVNO type GID. + * The entries should be of form "GID data:all supported apn types:devicecapability:apnname". + * example: 52FF:default,mms:SA:nrphone + * + * @hide + */ + public static final String KEY_MULTI_APN_ARRAY_FOR_SAME_GID = "multi_apn_array_for_same_gid"; + + /** + * Flag indicating if APN filtering required. + * + * @hide + */ + public static final String KEY_REQUIRE_APN_FILTERING_WITH_RADIO_CAPABILITY = + "require_apn_filtering_with_radio_capability_bool"; + + /** + * Determines whether carrier supports Sms Callback Mode. + * When {@code true}, modem can enter/exit SMS callback mode (SCBM) after sending e911 SMS. + * When user tries to make a following e911 call and modem is in SCBM, the same sub will be + * selected to place the e911 call over IMS. + * When {@code false}, follows the current slot selection logic to place the e911 call. + * + * @hide + */ + public static final String KEY_USE_SMS_CALLBACK_MODE_BOOL = + "use_sms_callback_mode_bool"; + + /** + * Determines the SIB2 value for showing the 5G Ultra Wideband icon. + * The rest of the NR Ultra Wideband configs will be considere only if this value is 1. A value + * of 0 means the other NR Ultra Wideband configs will not be considered. + * + * @hide + */ + public static final String KEY_NR_ULTRA_WIDEBAND_ICON_SIB2_VALUE = + "5g_ultra_wideband_icon_sib2_value"; + + /** + * Determines the minimum aggregate bandwidth for showing the 5G Ultra Wideband icon. + * + * @hide + */ + public static final String KEY_NR_ULTRA_WIDEBAND_ICON_MIN_BANDWIDTH_VALUE = + "5g_ultra_wideband_icon_min_bandwidth_value"; + + /** + * Determines the minimum aggregate bandwidth mode for which the 5G Ultra Wideband icon will be + * shown. The following modes are allowed: NONE, CONNECTED, IDLE, CONNECTED_AND_IDLE + * + * @hide + */ + public static final String KEY_NR_ULTRA_WIDEBAND_ICON_MIN_BANDWIDTH_MODE = + "5g_ultra_wideband_icon_min_bandwidth_mode"; + + /** + * Determines the 5G Ultra Wideband icon refresh timer type (key) and the refresh timer value + * (value) in seconds. + * The following types are allowed for the type: SCG_TO_MCG, IDLE_TO_CONNECT, IDLE + * + * @hide + */ + public static final String KEY_NR_ULTRA_WIDEBAND_ICON_REFRESH_TIMER_MAP = + "5g_ultra_wideband_icon_refresh_timer_map"; + + /** + * Determines the mode in which the 5G Ultra Wideband icon will be shown for 5G NSA bands. + * The following modes are allowed: NONE, CONNECTED, IDLE, CONNECTED_AND_IDLE + * + * @hide + */ + public static final String KEY_NR_ULTRA_WIDEBAND_ICON_NSA_BAND_MODE = + "5g_ultra_wideband_icon_nsa_band_mode"; + + /** + * Determines the list of 5G NSA bands for which 5G Ultra Wideband icons must be shown. + * For each list entry, the allowed values are either enabled (show the 5G Ultra Wideband icon) + * or disabled (do not show the 5G Ultra Wideband icon). + * + * @hide + */ + public static final String KEY_NR_ULTRA_WIDEBAND_ICON_NSA_BAND_ARRAY = + "5g_ultra_wideband_icon_nsa_band_array"; + + /** + * Determines the mode in which the 5G Ultra Wideband icon will be shown for 5G SA bands. + * The following modes are allowed: NONE, CONNECTED, IDLE, CONNECTED_AND_IDLE + * + * @hide + */ + public static final String KEY_NR_ULTRA_WIDEBAND_ICON_SA_BAND_MODE = + "5g_ultra_wideband_icon_sa_band_mode"; + + /** + * Determines the list of 5G SA bands for which 5G Ultra Wideband icons must be shown. + * For each list entry, the allowed values are either enabled (show the 5G Ultra Wideband icon) + * or disabled (do not show the 5G Ultra Wideband icon). + * + * @hide + */ + public static final String KEY_NR_ULTRA_WIDEBAND_ICON_SA_BAND_ARRAY = + "5g_ultra_wideband_icon_sa_band_array"; + + /** + * Determines if CS SMS is allowed in C_IWLAN-only mode. True is allowed. False is disallowed. + * + * @hide + */ + public static final String KEY_CS_SMS_IN_CIWLAN_ONLY_MODE = "cs_sms_in_ciwlan_only_mode"; + /** The default value for every variable. */ private static final PersistableBundle sDefaults; @@ -9763,10 +9956,12 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_CONFIG_TELEPHONY_USE_OWN_NUMBER_FOR_VOICEMAIL_BOOL, false); sDefaults.putBoolean(KEY_IGNORE_DATA_ENABLED_CHANGED_FOR_VIDEO_CALLS, true); sDefaults.putBoolean(KEY_VILTE_DATA_IS_METERED_BOOL, true); + sDefaults.putBoolean(KEY_IGNORE_RESET_UT_CAPABILITY_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_WFC_IMS_AVAILABLE_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_CROSS_SIM_IMS_AVAILABLE_BOOL, false); sDefaults.putBoolean(KEY_ENABLE_CROSS_SIM_CALLING_ON_OPPORTUNISTIC_DATA_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_WFC_SUPPORTS_WIFI_ONLY_BOOL, false); + sDefaults.putBoolean(KEY_CARRIER_WFC_SUPPORTS_IMS_PREFERRED_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_DEFAULT_WFC_IMS_ENABLED_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_ENABLED_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_PROMOTE_WFC_ON_CALL_FAIL_BOOL, false); @@ -9779,6 +9974,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_CARRIER_SUPPORTS_SS_OVER_UT_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_VOLTE_OVERRIDE_WFC_PROVISIONING_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_VOLTE_TTY_SUPPORTED_BOOL, true); + sDefaults.putBoolean(KEY_CARRIER_VT_TTY_SUPPORT_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_VOWIFI_TTY_SUPPORTED_BOOL, true); sDefaults.putBoolean(KEY_CARRIER_ALLOW_TURNOFF_IMS_BOOL, true); sDefaults.putBoolean(KEY_CARRIER_IMS_GBA_REQUIRED_BOOL, false); @@ -9806,7 +10002,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_HIDE_SIM_LOCK_SETTINGS_BOOL, false); sDefaults.putBoolean(KEY_CARRIER_VOLTE_PROVISIONED_BOOL, false); - sDefaults.putBoolean(KEY_CALL_BARRING_VISIBILITY_BOOL, false); + sDefaults.putBoolean(KEY_CALL_BARRING_VISIBILITY_BOOL, true); sDefaults.putBoolean(KEY_CALL_BARRING_SUPPORTS_PASSWORD_CHANGE_BOOL, true); sDefaults.putBoolean(KEY_CALL_BARRING_SUPPORTS_DEACTIVATE_ALL_BOOL, true); sDefaults.putInt(KEY_CALL_BARRING_DEFAULT_SERVICE_CLASS_INT, SERVICE_CLASS_VOICE); @@ -9815,6 +10011,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_CALL_FORWARDING_WHEN_UNREACHABLE_SUPPORTED_BOOL, true); sDefaults.putBoolean(KEY_CALL_FORWARDING_WHEN_UNANSWERED_SUPPORTED_BOOL, true); sDefaults.putBoolean(KEY_CALL_FORWARDING_WHEN_BUSY_SUPPORTED_BOOL, true); + sDefaults.putBoolean(KEY_CALL_FORWARDING_WHEN_NOT_LOGGED_IN_SUPPORTED_BOOL, false); sDefaults.putBoolean(KEY_ADDITIONAL_SETTINGS_CALLER_ID_VISIBILITY_BOOL, true); sDefaults.putBoolean(KEY_ADDITIONAL_SETTINGS_CALL_WAITING_VISIBILITY_BOOL, true); sDefaults.putBoolean(KEY_DISABLE_SUPPLEMENTARY_SERVICES_IN_AIRPLANE_MODE_BOOL, false); @@ -9879,6 +10076,7 @@ public class CarrierConfigManager { new String[]{"default", "mms", "dun", "supl"}); sDefaults.putStringArray(KEY_CARRIER_METERED_ROAMING_APN_TYPES_STRINGS, new String[]{"default", "mms", "dun", "supl"}); + sDefaults.putBoolean(KEY_CDMA_CW_CF_ENABLED_BOOL, false); sDefaults.putIntArray(KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY, new int[] {TelephonyManager.NETWORK_TYPE_CDMA, TelephonyManager.NETWORK_TYPE_1xRTT, TelephonyManager.NETWORK_TYPE_EVDO_0, TelephonyManager.NETWORK_TYPE_EVDO_A, @@ -9918,6 +10116,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_DISPLAY_HD_AUDIO_PROPERTY_BOOL, true); sDefaults.putBoolean(KEY_EDITABLE_ENHANCED_4G_LTE_BOOL, true); sDefaults.putBoolean(KEY_HIDE_ENHANCED_4G_LTE_BOOL, false); + sDefaults.putBoolean(KEY_HIDE_ENABLED_5G_BOOL, true); sDefaults.putBoolean(KEY_ENHANCED_4G_LTE_ON_BY_DEFAULT_BOOL, true); sDefaults.putBoolean(KEY_HIDE_IMS_APN_BOOL, false); sDefaults.putBoolean(KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL, false); @@ -10046,6 +10245,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_ALLOW_MERGE_WIFI_CALLS_WHEN_VOWIFI_OFF_BOOL, true); sDefaults.putBoolean(KEY_ALLOW_ADD_CALL_DURING_VIDEO_CALL_BOOL, true); sDefaults.putBoolean(KEY_ALLOW_HOLD_VIDEO_CALL_BOOL, true); + sDefaults.putBoolean(KEY_ALLOW_CONCURRENT_CALL_DURING_VIDEO_CALL_BOOL, true); sDefaults.putBoolean(KEY_WIFI_CALLS_CAN_BE_HD_AUDIO, true); sDefaults.putBoolean(KEY_VIDEO_CALLS_CAN_BE_HD_AUDIO, true); sDefaults.putBoolean(KEY_GSM_CDMA_CALLS_CAN_BE_HD_AUDIO, false); @@ -10338,6 +10538,16 @@ public class CarrierConfigManager { "enterprise:0", "default:1", "mms:2", "supl:2", "dun:2", "hipri:3", "fota:2", "ims:2", "cbs:2", "ia:2", "emergency:2", "mcx:3", "xcap:3" }); + sDefaults.putInt(KEY_NR_ULTRA_WIDEBAND_ICON_SIB2_VALUE, Integer.MAX_VALUE); + sDefaults.putInt(KEY_NR_ULTRA_WIDEBAND_ICON_MIN_BANDWIDTH_VALUE, Integer.MAX_VALUE); + sDefaults.putInt(KEY_NR_ULTRA_WIDEBAND_ICON_MIN_BANDWIDTH_MODE, Integer.MAX_VALUE); + sDefaults.putPersistableBundle(KEY_NR_ULTRA_WIDEBAND_ICON_REFRESH_TIMER_MAP, + PersistableBundle.EMPTY); + sDefaults.putInt(KEY_NR_ULTRA_WIDEBAND_ICON_NSA_BAND_MODE, Integer.MAX_VALUE); + sDefaults.putIntArray(KEY_NR_ULTRA_WIDEBAND_ICON_SA_BAND_ARRAY, new int[]{}); + sDefaults.putInt(KEY_NR_ULTRA_WIDEBAND_ICON_SA_BAND_MODE, Integer.MAX_VALUE); + sDefaults.putIntArray(KEY_NR_ULTRA_WIDEBAND_ICON_NSA_BAND_ARRAY, new int[]{}); + sDefaults.putBoolean(KEY_CS_SMS_IN_CIWLAN_ONLY_MODE, false); // Do not modify the priority unless you know what you are doing. This will have significant // impacts on the order of data network setup. @@ -10384,6 +10594,27 @@ public class CarrierConfigManager { sDefaults.putString(KEY_CARRIER_PROVISIONING_APP_STRING, ""); sDefaults.putBoolean(KEY_DISPLAY_NO_DATA_NOTIFICATION_ON_PERMANENT_FAILURE_BOOL, false); sDefaults.putBoolean(KEY_UNTHROTTLE_DATA_RETRY_WHEN_TAC_CHANGES_BOOL, false); + sDefaults.putBoolean(KEY_CARRIER_SUPPORTS_MULTIANCHOR_CONFERENCE, false); + sDefaults.putStringArray(KEY_MULTI_APN_ARRAY_FOR_SAME_GID, new String[] { + "52FF:mms,supl,hipri,default,fota:SA:nrphone", + "52FF:mms,supl,hipri,default,fota:NSA:nxtgenphone", + "52FF:mms,supl,hipri,default,fota:LTE:nxtgenphone", + "52FF:mms,supl,hipri,default,fota:TD_SCDMA:nxtgenphone", + "52FF:mms,supl,hipri,default,fota:UMTS:nxtgenphone", + "52FF:mms,supl,hipri,default,fota:GSM:nxtgenphone", + "52FF:mms,supl,hipri,default,fota:HDR:nxtgenphone", + "52FF:mms,supl,hipri,default,fota:1xRTT:nxtgenphone", + "53FF:mms,supl,hipri,default,fota:SA:enhancedphone", + "53FF:mms,supl,hipri,default,fota:NSA:enhancedphone", + "53FF:mms,supl,hipri,default,fota:LTE:nxtgenphone", + "53FF:mms,supl,hipri,default,fota:TD_SCDMA:nxtgenphone", + "53FF:mms,supl,hipri,default,fota:UMTS:nxtgenphone", + "53FF:mms,supl,hipri,default,fota:GSM:nxtgenphone", + "53FF:mms,supl,hipri,default,fota:HDR:nxtgenphone", + "53FF:mms,supl,hipri,default,fota:1xRTT:nxtgenphone", + }); + sDefaults.putBoolean(KEY_REQUIRE_APN_FILTERING_WITH_RADIO_CAPABILITY, false); + sDefaults.putBoolean(KEY_USE_SMS_CALLBACK_MODE_BOOL, false); sDefaults.putBoolean(KEY_VONR_SETTING_VISIBILITY_BOOL, true); sDefaults.putBoolean(KEY_VONR_ENABLED_BOOL, false); sDefaults.putBoolean(KEY_VONR_ON_BY_DEFAULT_BOOL, true); @@ -10757,7 +10988,7 @@ public class CarrierConfigManager { return; } loader.updateConfigForPhoneId(phoneId, simState); - } catch (RemoteException ex) { + } catch (RemoteException | IllegalArgumentException ex) { Rlog.e(TAG, "Error updating config for phoneId=" + phoneId + ": " + ex); } } diff --git a/telephony/java/android/telephony/CellIdentityNr.java b/telephony/java/android/telephony/CellIdentityNr.java index 6aeb482fb236..8e7850f8a454 100644 --- a/telephony/java/android/telephony/CellIdentityNr.java +++ b/telephony/java/android/telephony/CellIdentityNr.java @@ -14,6 +14,13 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package android.telephony; import static android.text.TextUtils.formatSimple; @@ -48,6 +55,8 @@ public final class CellIdentityNr extends CellIdentity { private final int mTac; private final long mNci; private final int[] mBands; + private SnpnInfo mSnpnInfo; + private CagInfo mCagInfo; // a list of additional PLMN-IDs reported for this cell private final ArraySet<String> mAdditionalPlmns; @@ -62,6 +71,8 @@ public final class CellIdentityNr extends CellIdentity { mBands = new int[] {}; mAdditionalPlmns = new ArraySet(); mGlobalCellId = null; + mSnpnInfo = new SnpnInfo(); + mCagInfo = new CagInfo(); } /** @@ -99,11 +110,22 @@ public final class CellIdentityNr extends CellIdentity { } /** @hide */ + public CellIdentityNr(int pci, int tac, int nrArfcn, @NonNull @NgranBand int[] bands, + @Nullable String mccStr, @Nullable String mncStr, long nci, + @Nullable String alphal, @Nullable String alphas, + @NonNull Collection<String> additionalPlmns, + SnpnInfo snpnInfo,CagInfo cagInfo) { + this(pci, tac, nrArfcn, bands, mccStr, mncStr, nci, alphal, alphas, additionalPlmns); + mSnpnInfo = snpnInfo; + mCagInfo = cagInfo; + } + + /** @hide */ @Override public @NonNull CellIdentityNr sanitizeLocationInfo() { return new CellIdentityNr(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, mNrArfcn, mBands, mMccStr, mMncStr, CellInfo.UNAVAILABLE_LONG, mAlphaLong, mAlphaShort, - mAdditionalPlmns); + mAdditionalPlmns, mSnpnInfo, mCagInfo); } /** @hide */ @@ -134,7 +156,8 @@ public final class CellIdentityNr extends CellIdentity { @Override public int hashCode() { return Objects.hash(super.hashCode(), mPci, mTac, - mNrArfcn, Arrays.hashCode(mBands), mNci, mAdditionalPlmns.hashCode()); + mNrArfcn, Arrays.hashCode(mBands), mNci, mAdditionalPlmns.hashCode(), + mSnpnInfo, mCagInfo); } @Override @@ -150,7 +173,20 @@ public final class CellIdentityNr extends CellIdentity { CellIdentityNr o = (CellIdentityNr) other; return super.equals(o) && mPci == o.mPci && mTac == o.mTac && mNrArfcn == o.mNrArfcn && Arrays.equals(mBands, o.mBands) && mNci == o.mNci - && mAdditionalPlmns.equals(o.mAdditionalPlmns); + && mAdditionalPlmns.equals(o.mAdditionalPlmns) + && equalsHandlesNulls(mSnpnInfo, o.mSnpnInfo) + && equalsHandlesNulls(mCagInfo, o.mCagInfo); + } + + /** + * Test whether two objects hold the same data values or both are null. + * + * @param a first obj + * @param b second obj + * @return true if two objects equal or both are null + */ + private static boolean equalsHandlesNulls (Object a, Object b) { + return (a == null) ? (b == null) : a.equals (b); } /** @@ -238,6 +274,22 @@ public final class CellIdentityNr extends CellIdentity { return Collections.unmodifiableSet(mAdditionalPlmns); } + /** + * Returns the SNPN information. + * @hide + */ + public SnpnInfo getSnpnInfo() { + return mSnpnInfo; + } + + /** + * Returns the CAG information. + * @hide + */ + public CagInfo getCagInfo() { + return mCagInfo; + } + @Override public String toString() { return new StringBuilder(TAG + ":{") @@ -251,6 +303,8 @@ public final class CellIdentityNr extends CellIdentity { .append(" mAlphaLong = ").append(mAlphaLong) .append(" mAlphaShort = ").append(mAlphaShort) .append(" mAdditionalPlmns = ").append(mAdditionalPlmns) + .append(" mSnpnInfo = ").append(mSnpnInfo) + .append(" mCagInfo = ").append(mCagInfo) .append(" }") .toString(); } @@ -264,6 +318,8 @@ public final class CellIdentityNr extends CellIdentity { dest.writeIntArray(mBands); dest.writeLong(mNci); dest.writeArraySet(mAdditionalPlmns); + dest.writeParcelable(mSnpnInfo, 0); + dest.writeParcelable(mCagInfo, 0); } /** Construct from Parcel, type has already been processed */ @@ -275,7 +331,8 @@ public final class CellIdentityNr extends CellIdentity { mBands = in.createIntArray(); mNci = in.readLong(); mAdditionalPlmns = (ArraySet<String>) in.readArraySet(null); - + mSnpnInfo = in.readParcelable(SnpnInfo.class.getClassLoader(), SnpnInfo.class); + mCagInfo = in.readParcelable(CagInfo.class.getClassLoader(), CagInfo.class); updateGlobalCellId(); } diff --git a/telephony/java/android/telephony/DisconnectCause.java b/telephony/java/android/telephony/DisconnectCause.java index 6997f3c79bc3..49f5af56fe3f 100644 --- a/telephony/java/android/telephony/DisconnectCause.java +++ b/telephony/java/android/telephony/DisconnectCause.java @@ -360,18 +360,138 @@ public final class DisconnectCause { */ public static final int INCOMING_AUTO_REJECTED = 81; + /** @hide */ + public static final int INCOMING_CALLS_BARRED_WITHIN_CUG = 82; + /** @hide */ + public static final int BEARER_CAPABILITY_UNAVAILABLE = 83; + /** @hide */ + public static final int SERVICE_OPTION_NOT_AVAILABLE = 84; + /** @hide */ + public static final int BEARER_SERVICE_NOT_IMPLEMENTED = 85; + /** @hide */ + public static final int REQUESTED_FACILITY_NOT_IMPLEMENTED = 86; + /** @hide */ + public static final int ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 87; + /** @hide */ + public static final int SERVICE_OR_OPTION_NOT_IMPLEMENTED = 88; + /** @hide */ + public static final int INVALID_TRANSACTION_IDENTIFIER = 89; + /** @hide */ + public static final int USER_NOT_MEMBER_OF_CUG = 90; + /** @hide */ + public static final int INCOMPATIBLE_DESTINATION = 91; + /** @hide */ + public static final int INVALID_TRANSIT_NW_SELECTION = 92; + /** @hide */ + public static final int SEMANTICALLY_INCORRECT_MESSAGE = 93; + /** @hide */ + public static final int INVALID_MANDATORY_INFORMATION = 94; + /** @hide */ + public static final int MESSAGE_TYPE_NON_IMPLEMENTED = 95; + /** @hide */ + public static final int MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 96; + /** @hide */ + public static final int INFORMATION_ELEMENT_NON_EXISTENT = 97; + /** @hide */ + public static final int CONDITIONAL_IE_ERROR = 98; + /** @hide */ + public static final int MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 99; + /** @hide */ + public static final int RECOVERY_ON_TIMER_EXPIRED = 100; + /** @hide */ + public static final int PROTOCOL_ERROR_UNSPECIFIED = 101; + /** @hide */ + public static final int INTERWORKING_UNSPECIFIED = 102; + /** @hide */ + public static final int LOCAL_LOW_BATTERY = 103; + /** @hide */ + public static final int NO_CIRCUIT_AVAIL = 104; + /** @hide */ + public static final int NO_ROUTE_TO_DESTINATION = 105; + /** @hide */ + public static final int OPERATOR_DETERMINED_BARRING = 106; + /** @hide */ + public static final int CALL_FAIL_NO_USER_RESPONDING = 107; + /** @hide */ + public static final int CALL_FAIL_NO_ANSWER_FROM_USER = 108; + /** @hide */ + public static final int CALL_FAIL_DESTINATION_OUT_OF_ORDER = 109; + /** @hide */ + public static final int BEARER_CAPABILITY_NOT_AUTHORIZED = 110; + /** @hide */ + public static final int CHANNEL_UNACCEPTABLE = 111; + /** @hide */ + public static final int CALL_REJECTED = 112; + /** @hide */ + public static final int NUMBER_CHANGED = 113; + /** @hide */ + public static final int PREEMPTION = 114; + /** @hide */ + public static final int FACILITY_REJECTED = 115; + /** @hide */ + public static final int RESP_TO_STATUS_ENQUIRY = 116; + /** @hide */ + public static final int NETWORK_OUT_OF_ORDER = 117; + /** @hide */ + public static final int TEMPORARY_FAILURE = 118; + /** @hide */ + public static final int SWITCHING_EQUIPMENT_CONGESTION = 119; + /** @hide */ + public static final int ACCESS_INFORMATION_DISCARDED = 120; + /** @hide */ + public static final int REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 121; + /** @hide */ + public static final int RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 122; + /** @hide */ + public static final int QOS_UNAVAILABLE = 123; + /** @hide */ + public static final int REQUESTED_FACILITY_NOT_SUBSCRIBED = 124; + + /** + * call failed due to LTE to 3G/2G handover not feasible + * @hide + */ + public static final int HO_NOT_FEASIBLE = 125; + /** @hide */ + public static final int NON_SELECTED_USER_CLEARING = 126; + /** @hide */ + public static final int CONCURRENT_CALLS_NOT_POSSIBLE = 127; + + /** + * Call failed due to device being in Secure Mode + */ + /** @hide */ + public static final int SECURE_MODE = 128; + /** * Indicates that the call was unable to be made because the satellite modem is enabled. * @hide */ - public static final int SATELLITE_ENABLED = 82; + public static final int SATELLITE_ENABLED = 129; //********************************************************************************************* // When adding a disconnect type: - // 1) Update toString() with the newly added disconnect type. - // 2) Update android.telecom.DisconnectCauseUtil with any mappings to a telecom.DisconnectCause. + // 1) Please assign the new type the next id value below. + // 2) Increment the next id value below to a new value. + // 3) Update MAXIMUM_VALID_VALUE to the new disconnect type. + // 4) Update toString() with the newly added disconnect type. + // 5) Update android.telecom.DisconnectCauseUtil with any mappings to a telecom.DisconnectCause. + // + // NextId: 130 //********************************************************************************************* + /** + * Smallest valid value for call disconnect codes. + * @hide + */ + public static final int MINIMUM_VALID_VALUE = NOT_DISCONNECTED; + + /** + * Largest valid value for call disconnect codes. + * @hide + */ + public static final int MAXIMUM_VALID_VALUE = SATELLITE_ENABLED; + /** Private constructor to avoid class instantiation. */ private DisconnectCause() { // Do nothing. @@ -520,6 +640,32 @@ public final class DisconnectCause { return "EMERGENCY_TEMP_FAILURE"; case EMERGENCY_PERM_FAILURE: return "EMERGENCY_PERM_FAILURE"; + case NO_CIRCUIT_AVAIL: + return "NO_CIRCUIT_AVAIL"; + case NO_ROUTE_TO_DESTINATION: + return "NO_ROUTE_TO_DESTINATION"; + case OPERATOR_DETERMINED_BARRING: + return "OPERATOR_DETERMINED_BARRING"; + case CALL_FAIL_NO_USER_RESPONDING: + return "CALL_FAIL_NO_USER_RESPONDING"; + case CALL_FAIL_NO_ANSWER_FROM_USER: + return "CALL_FAIL_NO_ANSWER_FROM_USER"; + case CALL_FAIL_DESTINATION_OUT_OF_ORDER: + return "CALL_FAIL_DESTINATION_OUT_OF_ORDER"; + case BEARER_CAPABILITY_NOT_AUTHORIZED: + return "BEARER_CAPABILITY_NOT_AUTHORIZED"; + case CHANNEL_UNACCEPTABLE: + return "CHANNEL_UNACCEPTABLE"; + case CALL_REJECTED: + return "CALL_REJECTED"; + case NUMBER_CHANGED: + return "NUMBER_CHANGED"; + case PREEMPTION: + return "PREEMPTION"; + case FACILITY_REJECTED: + return "FACILITY_REJECTED"; + case RESP_TO_STATUS_ENQUIRY: + return "RESP_TO_STATUS_ENQUIRY"; case NORMAL_UNSPECIFIED: return "NORMAL_UNSPECIFIED"; case IMS_SIP_ALTERNATE_EMERGENCY_CALL: @@ -544,6 +690,74 @@ public final class DisconnectCause { return "OUTGOING_EMERGENCY_CALL_PLACED"; case INCOMING_AUTO_REJECTED: return "INCOMING_AUTO_REJECTED"; + case NETWORK_OUT_OF_ORDER: + return "NETWORK_OUT_OF_ORDER"; + case TEMPORARY_FAILURE: + return "TEMPORARY_FAILURE"; + case SWITCHING_EQUIPMENT_CONGESTION: + return "SWITCHING_EQUIPMENT_CONGESTION"; + case ACCESS_INFORMATION_DISCARDED: + return "ACCESS_INFORMATION_DISCARDED"; + case REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE: + return "REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE"; + case RESOURCES_UNAVAILABLE_OR_UNSPECIFIED: + return "RESOURCES_UNAVAILABLE_OR_UNSPECIFIED"; + case QOS_UNAVAILABLE: + return "QOS_UNAVAILABLE"; + case REQUESTED_FACILITY_NOT_SUBSCRIBED: + return "REQUESTED_FACILITY_NOT_SUBSCRIBED"; + case INCOMING_CALLS_BARRED_WITHIN_CUG: + return "INCOMING_CALLS_BARRED_WITHIN_CUG"; + case BEARER_CAPABILITY_UNAVAILABLE: + return "BEARER_CAPABILITY_UNAVAILABLE"; + case SERVICE_OPTION_NOT_AVAILABLE: + return "SERVICE_OPTION_NOT_AVAILABLE"; + case BEARER_SERVICE_NOT_IMPLEMENTED: + return "BEARER_SERVICE_NOT_IMPLEMENTED"; + case REQUESTED_FACILITY_NOT_IMPLEMENTED: + return "REQUESTED_FACILITY_NOT_IMPLEMENTED"; + case ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE: + return "ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE"; + case SERVICE_OR_OPTION_NOT_IMPLEMENTED: + return "SERVICE_OR_OPTION_NOT_IMPLEMENTED"; + case INVALID_TRANSACTION_IDENTIFIER: + return "INVALID_TRANSACTION_IDENTIFIER"; + case USER_NOT_MEMBER_OF_CUG: + return "USER_NOT_MEMBER_OF_CUG"; + case INCOMPATIBLE_DESTINATION: + return "INCOMPATIBLE_DESTINATION"; + case INVALID_TRANSIT_NW_SELECTION: + return "INVALID_TRANSIT_NW_SELECTION"; + case SEMANTICALLY_INCORRECT_MESSAGE: + return "SEMANTICALLY_INCORRECT_MESSAGE"; + case INVALID_MANDATORY_INFORMATION: + return "INVALID_MANDATORY_INFORMATION"; + case MESSAGE_TYPE_NON_IMPLEMENTED: + return "MESSAGE_TYPE_NON_IMPLEMENTED"; + case MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE: + return "MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE"; + case INFORMATION_ELEMENT_NON_EXISTENT: + return "INFORMATION_ELEMENT_NON_EXISTENT"; + case CONDITIONAL_IE_ERROR: + return "CONDITIONAL_IE_ERROR"; + case MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE: + return "MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE"; + case RECOVERY_ON_TIMER_EXPIRED: + return "RECOVERY_ON_TIMER_EXPIRED"; + case PROTOCOL_ERROR_UNSPECIFIED: + return "PROTOCOL_ERROR_UNSPECIFIED"; + case INTERWORKING_UNSPECIFIED: + return "INTERWORKING_UNSPECIFIED"; + case LOCAL_LOW_BATTERY: + return "LOCAL_LOW_BATTERY"; + case HO_NOT_FEASIBLE: + return "HO_NOT_FEASIBLE"; + case NON_SELECTED_USER_CLEARING: + return "NON_SELECTED_USER_CLEARING"; + case CONCURRENT_CALLS_NOT_POSSIBLE: + return "CONCURRENT_CALLS_NOT_POSSIBLE"; + case SECURE_MODE: + return "SECURE_MODE"; case SATELLITE_ENABLED: return "SATELLITE_ENABLED"; default: diff --git a/telephony/java/android/telephony/ModemActivityInfo.java b/telephony/java/android/telephony/ModemActivityInfo.java index 64b3c0a203e3..b8edca1a2d61 100644 --- a/telephony/java/android/telephony/ModemActivityInfo.java +++ b/telephony/java/android/telephony/ModemActivityInfo.java @@ -560,7 +560,7 @@ public final class ModemActivityInfo implements Parcelable { } return isTxPowerValid && isRxPowerValid - && ((getIdleTimeMillis() >= 0) && (getSleepTimeMillis() >= 0) && !isEmpty()); + && ((getIdleTimeMillis() >= 0) && (getSleepTimeMillis() >= 0)); } } diff --git a/telephony/java/android/telephony/NetworkScanRequest.java b/telephony/java/android/telephony/NetworkScanRequest.java index 65c2146b4819..f3877ac0a874 100644 --- a/telephony/java/android/telephony/NetworkScanRequest.java +++ b/telephony/java/android/telephony/NetworkScanRequest.java @@ -14,6 +14,13 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package android.telephony; import android.annotation.IntDef; @@ -74,6 +81,26 @@ public final class NetworkScanRequest implements Parcelable { */ public static final int SCAN_TYPE_PERIODIC = 1; + /** Invalid access mode */ + /** @hide */ + public static final int ACCESS_MODE_INVALID = 0; + + /** PLMN access mode */ + /** @hide */ + public static final int ACCESS_MODE_PLMN = 1; + + /** SNPN access mode */ + /** @hide */ + public static final int ACCESS_MODE_SNPN = 2; + + /** PLMN and CAG search */ + /** @hide */ + public static final int SEARCH_TYPE_PLMN_AND_CAG = 0; + + /** PLMN search*/ + /** @hide */ + public static final int SEARCH_TYPE_PLMN_ONLY = 1; + /** Defines the type of the scan. */ private int mScanType; @@ -120,6 +147,16 @@ public final class NetworkScanRequest implements Parcelable { private ArrayList<String> mMccMncs; /** + * Describes the access mode + */ + private int mAccessMode; + + /** + * Describes the search type + */ + private int mSearchType; + + /** * Creates a new NetworkScanRequest with mScanType and network mSpecifiers * * @param scanType The type of the scan, can be either one shot or periodic @@ -159,6 +196,21 @@ public final class NetworkScanRequest implements Parcelable { } } + /** @hide */ + public NetworkScanRequest(int scanType, RadioAccessSpecifier[] specifiers, + int searchPeriodicity, + int maxSearchTime, + boolean incrementalResults, + int incrementalResultsPeriodicity, + ArrayList<String> mccMncs, + int accessMode, + int searchType) { + this(scanType, specifiers, searchPeriodicity, maxSearchTime, + incrementalResults, incrementalResultsPeriodicity, mccMncs); + this.mAccessMode = accessMode; + this.mSearchType = searchType; + } + /** Returns the type of the scan. */ @ScanType public int getScanType() { @@ -203,6 +255,18 @@ public final class NetworkScanRequest implements Parcelable { return (ArrayList<String>) mMccMncs.clone(); } + /** Returns the access mode */ + /** @hide */ + public int getAccessMode() { + return mAccessMode; + } + + /** Returns the search type */ + /** @hide */ + public int getSearchType() { + return mSearchType; + } + @Override public int describeContents() { return 0; @@ -217,6 +281,8 @@ public final class NetworkScanRequest implements Parcelable { dest.writeBoolean(mIncrementalResults); dest.writeInt(mIncrementalResultsPeriodicity); dest.writeStringList(mMccMncs); + dest.writeInt(mAccessMode); + dest.writeInt(mSearchType); } private NetworkScanRequest(Parcel in) { @@ -237,6 +303,8 @@ public final class NetworkScanRequest implements Parcelable { mIncrementalResultsPeriodicity = in.readInt(); mMccMncs = new ArrayList<>(); in.readStringList(mMccMncs); + mAccessMode = in.readInt(); + mSearchType = in.readInt(); } @Override @@ -260,7 +328,9 @@ public final class NetworkScanRequest implements Parcelable { && mIncrementalResults == nsr.mIncrementalResults && mIncrementalResultsPeriodicity == nsr.mIncrementalResultsPeriodicity && (((mMccMncs != null) - && mMccMncs.equals(nsr.mMccMncs)))); + && mMccMncs.equals(nsr.mMccMncs))) + && mAccessMode == nsr.mAccessMode + && mSearchType == nsr.mSearchType); } @Override @@ -271,7 +341,9 @@ public final class NetworkScanRequest implements Parcelable { + (mMaxSearchTime * 43) + ((mIncrementalResults == true? 1 : 0) * 47) + (mIncrementalResultsPeriodicity * 53) - + (mMccMncs.hashCode() * 59)); + + (mMccMncs.hashCode() * 59) + + (mAccessMode * 61) + + (mSearchType * 63)); } public static final @android.annotation.NonNull Creator<NetworkScanRequest> CREATOR = diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java index 523d0b0e55f4..a1e8b70a67f4 100644 --- a/telephony/java/android/telephony/ServiceState.java +++ b/telephony/java/android/telephony/ServiceState.java @@ -1213,8 +1213,13 @@ public class ServiceState implements Parcelable { /** * Initialize the service state. Set everything to the default value. + * + * @param legacyMode {@code true} if the device is on IWLAN legacy mode, where IWLAN is + * considered as a RAT on WWAN {@link NetworkRegistrationInfo}. {@code false} if the device + * is on AP-assisted mode, where IWLAN should be reported through WLAN. + * {@link NetworkRegistrationInfo}. */ - private void init() { + private void init(boolean legacyMode) { if (DBG) Rlog.d(LOG_TAG, "init"); mVoiceRegState = STATE_OUT_OF_SERVICE; mDataRegState = STATE_OUT_OF_SERVICE; @@ -1246,11 +1251,13 @@ public class ServiceState implements Parcelable { .setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WWAN) .setRegistrationState(NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN) .build()); - addNetworkRegistrationInfo(new NetworkRegistrationInfo.Builder() - .setDomain(NetworkRegistrationInfo.DOMAIN_PS) - .setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WLAN) - .setRegistrationState(NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN) - .build()); + if (!legacyMode) { + addNetworkRegistrationInfo(new NetworkRegistrationInfo.Builder() + .setDomain(NetworkRegistrationInfo.DOMAIN_PS) + .setTransportType(AccessNetworkConstants.TRANSPORT_TYPE_WLAN) + .setRegistrationState(NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN) + .build()); + } } mOperatorAlphaLongRaw = null; mOperatorAlphaShortRaw = null; @@ -1259,11 +1266,11 @@ public class ServiceState implements Parcelable { } public void setStateOutOfService() { - init(); + init(true); } public void setStateOff() { - init(); + init(true); mVoiceRegState = STATE_POWER_OFF; mDataRegState = STATE_POWER_OFF; } @@ -1271,11 +1278,14 @@ public class ServiceState implements Parcelable { /** * Set the service state to out-of-service * + * @param legacyMode {@code true} if the device is on IWLAN legacy mode, where IWLAN is + * considered as a RAT on WWAN {@link NetworkRegistrationInfo}. {@code false} if the device + * is on AP-assisted mode, where IWLAN should be reported through WLAN. * @param powerOff {@code true} if this is a power off case (i.e. Airplane mode on). * @hide */ - public void setOutOfService(boolean powerOff) { - init(); + public void setOutOfService(boolean legacyMode, boolean powerOff) { + init(legacyMode); if (powerOff) { mVoiceRegState = STATE_POWER_OFF; mDataRegState = STATE_POWER_OFF; @@ -1884,6 +1894,13 @@ public class ServiceState implements Parcelable { } /** @hide */ + public static boolean isPsTech(int radioTechnology) { + return radioTechnology == RIL_RADIO_TECHNOLOGY_LTE || + radioTechnology == RIL_RADIO_TECHNOLOGY_LTE_CA || + radioTechnology == RIL_RADIO_TECHNOLOGY_NR; + } + + /** @hide */ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public static boolean bearerBitmapHasCdma(int networkTypeBitmask) { return (RIL_RADIO_CDMA_TECHNOLOGY_BITMASK diff --git a/telephony/java/android/telephony/SmsManager.java b/telephony/java/android/telephony/SmsManager.java index 40488b15a37c..1ff86af52643 100644 --- a/telephony/java/android/telephony/SmsManager.java +++ b/telephony/java/android/telephony/SmsManager.java @@ -565,6 +565,7 @@ public final class SmsManager { public void sendTextMessage( String destinationAddress, String scAddress, String text, PendingIntent sentIntent, PendingIntent deliveryIntent) { + android.util.SeempLog.record_str(75, destinationAddress); sendTextMessageInternal(destinationAddress, scAddress, text, sentIntent, deliveryIntent, true /* persistMessage*/, getOpPackageName(), getAttributionTag(), 0L /* messageId */); @@ -1500,6 +1501,7 @@ public final class SmsManager { public void sendDataMessage( String destinationAddress, String scAddress, short destinationPort, byte[] data, PendingIntent sentIntent, PendingIntent deliveryIntent) { + android.util.SeempLog.record_str(73, destinationAddress); if (TextUtils.isEmpty(destinationAddress)) { throw new IllegalArgumentException("Invalid destinationAddress"); } @@ -1830,6 +1832,7 @@ public final class SmsManager { @RequiresPermission(Manifest.permission.ACCESS_MESSAGES_ON_ICC) public boolean copyMessageToIcc( @Nullable byte[] smsc, @NonNull byte[] pdu, @StatusOnIcc int status) { + android.util.SeempLog.record(79); boolean success = false; if (pdu == null) { @@ -1873,6 +1876,7 @@ public final class SmsManager { @UnsupportedAppUsage @RequiresPermission(Manifest.permission.ACCESS_MESSAGES_ON_ICC) public boolean deleteMessageFromIcc(int messageIndex) { + android.util.SeempLog.record(80); boolean success = false; try { @@ -1916,6 +1920,7 @@ public final class SmsManager { @UnsupportedAppUsage @RequiresPermission(Manifest.permission.ACCESS_MESSAGES_ON_ICC) public boolean updateMessageOnIcc(int messageIndex, int newStatus, byte[] pdu) { + android.util.SeempLog.record(81); boolean success = false; try { diff --git a/telephony/java/android/telephony/SnpnInfo.aidl b/telephony/java/android/telephony/SnpnInfo.aidl new file mode 100644 index 000000000000..aad8fcbe955e --- /dev/null +++ b/telephony/java/android/telephony/SnpnInfo.aidl @@ -0,0 +1,8 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + +package android.telephony; + +parcelable SnpnInfo; diff --git a/telephony/java/android/telephony/SnpnInfo.java b/telephony/java/android/telephony/SnpnInfo.java new file mode 100644 index 000000000000..265ebc60ce03 --- /dev/null +++ b/telephony/java/android/telephony/SnpnInfo.java @@ -0,0 +1,290 @@ +/* + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + +package android.telephony; + +import android.annotation.NonNull; +import android.os.Parcel; +import android.os.Parcelable; +import android.text.TextUtils; + +import java.util.Arrays; +import java.util.Objects; + +/** + * Holds the SNPN information. + * @hide + */ +public final class SnpnInfo implements Parcelable { + + /** + * This value indicates that the integer field is unreported. + */ + public static final int UNAVAILABLE = Integer.MAX_VALUE; + + // Lifted from Default carrier configs and max range of SSRSRP + // Boundaries: [-140 dB, -44 dB] + private int[] mSsRsrpThresholds = new int[] { + -110, /* SIGNAL_STRENGTH_POOR */ + -90, /* SIGNAL_STRENGTH_MODERATE */ + -80, /* SIGNAL_STRENGTH_GOOD */ + -65, /* SIGNAL_STRENGTH_GREAT */ + }; + + /** Defines the SNPN network ID. + * This field has six bytes: + * mNid[0] is the most significant byte + * mNid[5] is the least significant byte + */ + private byte[] mNid; + + /** Defines the mobile country code. */ + private String mMcc; + + /** Defines the mobile network code. */ + private String mMnc; + + /** 5 or 6 digit numeric code (MCC + MNC) */ + private String mOperatorNumeric; + + /** Defines the SNPN signal strength. */ + private int mSignalStrength; + + /** Defines the SNPN signal quality. */ + private int mSignalQuality; + + private int mLevel; + + /** + * Returns the SNPN network ID. + * @hide + */ + public byte[] getNid() { + return mNid; + } + + /** + * Returns the mobile country code. + * @hide + */ + public String getMcc() { + return mMcc; + } + + /** + * Returns the mobile network code. + * @hide + */ + public String getMnc() { + return mMnc; + } + + /** + * Returns the operator numeric code (MCC + MNC) + * @hide + */ + public String getOperatorNumeric() { + return mOperatorNumeric; + } + + /** + * Returns the SNPN signal strength. + * @hide + */ + public int getSignalStrength() { + return mSignalStrength; + } + + /** + * Returns the SNPN signal quality. + * @hide + */ + public int getSignalQuality() { + return mSignalQuality; + } + + /** + * Returns the SNPN signal strength level. + * @hide + */ + public int getLevel() { + return mLevel; + } + + /** @hide */ + public SnpnInfo() { + mNid = null; + mMcc = null; + mMnc = null; + mOperatorNumeric = null; + mSignalStrength = UNAVAILABLE; + mSignalQuality = UNAVAILABLE; + mLevel = CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; + } + + /** + * SnpnInfo constructor. + * + * @param mNid SNPN network ID. + * @param mMcc Mobile country code. + * @param mMnc Mobile network code. + * @param operatorNumeric operator numeric code. + * @param mSignalStrength Indicates the SNPN signal strength. + * @param mSignalQuality Indicates the SNPN signal quality. + * @hide + */ + public SnpnInfo(byte[] nid, String mcc, String mnc, String operatorNumeric, int signalStrength, + int signalQuality) { + mNid = nid; + mMcc = mcc; + mMnc = mnc; + mOperatorNumeric = operatorNumeric; + mSignalStrength = signalStrength; + mSignalQuality = signalQuality; + updateLevel(); + } + + /** + * Construct a SnpnInfo object from the given SnpnInfo object. + * @hide + */ + public SnpnInfo(SnpnInfo s) { + mNid = s.mNid; + mMcc = s.mMcc; + mMnc = s.mMnc; + mOperatorNumeric = s.mOperatorNumeric; + mSignalStrength = s.mSignalStrength; + mSignalQuality = s.mSignalQuality; + mLevel = s.mLevel; + } + + /** + * Construct a SnpnInfo object from the given parcel. + * @hide + */ + private SnpnInfo(Parcel in) { + int arrayLength = in.readInt(); + if (arrayLength > 0) { + mNid = new byte[arrayLength]; + in.readByteArray(mNid); + } else { + mNid = null; + } + mMcc = in.readString(); + mMnc = in.readString(); + mOperatorNumeric = in.readString(); + mSignalStrength = in.readInt(); + mSignalQuality = in.readInt(); + mLevel = in.readInt(); + } + + /** @hide */ + public void updateLevel() { + int ssRsrpLevel = SignalStrength.INVALID; + ssRsrpLevel = updateLevelWithMeasure(mSignalStrength, mSsRsrpThresholds); + mLevel = ssRsrpLevel; + } + + /** + * Update level with corresponding measure and thresholds. + * + * @param measure corresponding signal measure + * @param thresholds corresponding signal thresholds + * @return level of the signal strength + */ + private int updateLevelWithMeasure(int measure, int[] thresholds) { + int level; + if (measure == CellInfo.UNAVAILABLE) { + level = CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; + } else if (measure >= thresholds[3]) { + level = CellSignalStrength.SIGNAL_STRENGTH_GREAT; + } else if (measure >= thresholds[2]) { + level = CellSignalStrength.SIGNAL_STRENGTH_GOOD; + } else if (measure >= thresholds[1]) { + level = CellSignalStrength.SIGNAL_STRENGTH_MODERATE; + } else if (measure >= thresholds[0]) { + level = CellSignalStrength.SIGNAL_STRENGTH_POOR; + } else { + level = CellSignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN; + } + return level; + } + + /** + * String representation of the SnpnInfo. + */ + @Override + public String toString() { + return "mNid: " + getNid() + ", mMcc: " + getMcc() + "mMnc: " + getMnc() + + "mOperatorNumeric: " + getOperatorNumeric() + "mSignalStrength: " + + getSignalStrength() + "mSignalQuality: " + getSignalQuality() + + "mLevel: " + mLevel; + } + + /** + * Describe the contents of this object. + */ + @Override + public int describeContents() { + return 0; + } + + /** + * Write this object to a Parcel. + */ + @Override + public void writeToParcel(Parcel out, int flags) { + if (mNid != null && mNid.length > 0) { + out.writeInt(mNid.length); + out.writeByteArray(mNid); + } else { + out.writeInt(0); + } + out.writeString(mMcc); + out.writeString(mMnc); + out.writeString(mOperatorNumeric); + out.writeInt(mSignalStrength); + out.writeInt(mSignalQuality); + out.writeInt(mLevel); + } + + /** + * Parcel creator class. + */ + public static final @NonNull Parcelable.Creator<SnpnInfo> CREATOR = new Creator<SnpnInfo>() { + public SnpnInfo createFromParcel(Parcel in) { + return new SnpnInfo(in); + } + public SnpnInfo[] newArray(int size) { + return new SnpnInfo[size]; + } + }; + + @Override + public int hashCode() { + int result = Objects.hash(mMcc, mMnc, mOperatorNumeric, mSignalStrength, mSignalQuality, + mLevel); + result = 31 * result + Arrays.hashCode(mNid); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + SnpnInfo other = (SnpnInfo) obj; + return (Arrays.equals(mNid, other.mNid) + && TextUtils.equals(mMcc, other.mMcc) + && TextUtils.equals(mMnc, other.mMnc) + && TextUtils.equals(mOperatorNumeric, other.mOperatorNumeric) + && mSignalStrength == other.mSignalStrength + && mSignalQuality == other.mSignalQuality + && mLevel == other.mLevel); + } +} diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 2a6099a18fab..99b432ac6f1d 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -639,6 +639,98 @@ public class TelephonyManager { } /** + * The allowed values for multi sim voice capability + * + * @hide + */ + public interface MultiSimVoiceCapability { + /** default */ + static final int UNKNOWN = 0; + /** Concurrent calls on both subscriptions are not possbile. */ + static final int DSDS = 1; + /** Concurrent calls on both subscriptions are not possible but user will have option to + * accept MT call on one subscription when there is an ongoing call on another subscription. + */ + static final int PSEUDO_DSDA = 2; + /** Concurrent calls on both subscriptions are possible */ + static final int DSDA = 3; + } + + /** + * Returns true if concurrent calls on both subscriptions are possible (ex: DSDA). + * Returns false for other cases. + */ + /** {@hide} */ + public static boolean isConcurrentCallsPossible() { + int mSimVoiceConfig = TelephonyProperties.multi_sim_voice_capability().orElse( + MultiSimVoiceCapability.UNKNOWN); + return mSimVoiceConfig == MultiSimVoiceCapability.DSDA; + } + + + /** + * Returns true if device is in DSDA mode where concurrent calls on both subscriptions are + * possible or if device is in a mode that supports DSDA features ex.DSDS Transition mode + * Returns false for other cases. + */ + /** {@hide} */ + public boolean isDsdaOrDsdsTransitionMode() { + return isConcurrentCallsPossible() || isDsdsTransitionMode(); + } + + /** + * DSDS Transition mode is a mode when the device in DSDA transitions into DSDS mode due + * to temporary RAT changes while still retaining the calls on both subscriptions. + * In this mode, incoming calls and call swap work like DSDA mode but outgoing concurrent + * calls are only allowed on the subscription that has a call in ACTIVE state. Outgoing + * calls made on the subscription with call(s) in non-ACTIVE state will result in framework + * disconnecting calls on the other subscription. + * This API is not guaranteed to work when invoked from ImsPhoneCallTracker as the call states + * might not be updated at the time of invocation. + * + * Returns true if there are calls on both subscriptions in DSDS mode + * Returns false otherwise + */ + /** {@hide} */ + public boolean isDsdsTransitionMode() { + if (!isDsdsTransitionSupported()) { + return false; + } + + if (TelephonyProperties.multi_sim_voice_capability().orElse( + MultiSimVoiceCapability.UNKNOWN) != MultiSimVoiceCapability.DSDS) { + return false; + } + + for (int i = 0; i < getActiveModemCount(); i++) { + if (getCallState(SubscriptionManager.getSubscriptionId(i))== CALL_STATE_IDLE) { + return false; + } + } + return true; + } + + /** + * Returns true if on multisim devices, DSDA features are supported in non-DSDA modes + * Returns false otherwise + */ + /** {@hide} */ + public static boolean isDsdsTransitionSupported() { + return TelephonyProperties.dsds_transition_supported().orElse(false); + } + + /** + * Returns true if Multi SIM voice capability is DSDS. + * Returns false for other cases. + */ + /** {@hide} */ + public static boolean isDsdsMode() { + int mSimVoiceConfig = TelephonyProperties.multi_sim_voice_capability().orElse( + MultiSimVoiceCapability.UNKNOWN); + return mSimVoiceConfig == MultiSimVoiceCapability.DSDS; + } + + /** * Returns the number of phones available. * Returns 0 if none of voice, sms, data is not supported * Returns 1 for Single standby mode (Single SIM functionality). @@ -2185,6 +2277,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public String getDeviceId(int slotIndex) { // FIXME this assumes phoneId == slotIndex + android.util.SeempLog.record_str(8, ""+slotIndex); try { IPhoneSubInfo info = getSubscriberInfoService(); if (info == null) @@ -2484,6 +2577,7 @@ public class TelephonyManager { @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public CellLocation getCellLocation() { + android.util.SeempLog.record(49); try { ITelephony telephony = getITelephony(); if (telephony == null) { @@ -2519,6 +2613,7 @@ public class TelephonyManager { @Deprecated @RequiresPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION) public List<NeighboringCellInfo> getNeighboringCellInfo() { + android.util.SeempLog.record(50); try { ITelephony telephony = getITelephony(); if (telephony == null) @@ -4072,6 +4167,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @UnsupportedAppUsage public String getSimSerialNumber(int subId) { + android.util.SeempLog.record_str(388, ""+subId); try { IPhoneSubInfo info = getSubscriberInfoService(); if (info == null) @@ -4486,6 +4582,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P) public String getSubscriberId(int subId) { + android.util.SeempLog.record_str(389, ""+subId); try { IPhoneSubInfo info = getSubscriberInfoService(); if (info == null) @@ -5100,6 +5197,7 @@ public class TelephonyManager { }) @UnsupportedAppUsage public String getLine1Number(int subId) { + android.util.SeempLog.record_str(9, ""+subId); String number = null; try { ITelephony telephony = getITelephony(); diff --git a/telephony/java/android/telephony/ims/ImsCallProfile.java b/telephony/java/android/telephony/ims/ImsCallProfile.java index d07edeb971ea..7d57f915a02f 100644 --- a/telephony/java/android/telephony/ims/ImsCallProfile.java +++ b/telephony/java/android/telephony/ims/ImsCallProfile.java @@ -124,6 +124,11 @@ public final class ImsCallProfile implements Parcelable { * VideoShare (video RX one way) */ public static final int CALL_TYPE_VS_RX = 10; + /** + * Unknown (audio / video inactive) + * @hide + */ + public static final int CALL_TYPE_UNKNOWN = (-1); /** * Extra properties for IMS call. diff --git a/telephony/java/android/telephony/ims/ImsCallSession.java b/telephony/java/android/telephony/ims/ImsCallSession.java index ecd703960d08..eba608d98e88 100755..100644 --- a/telephony/java/android/telephony/ims/ImsCallSession.java +++ b/telephony/java/android/telephony/ims/ImsCallSession.java @@ -1398,10 +1398,12 @@ public class ImsCallSession { if (mListener != null) { if (newSession != null) { // New session created after conference - mListener.callSessionMergeComplete(new ImsCallSession(newSession)); + ImsCallSession confSession = new ImsCallSession(newSession); + confSession.mListener = mListener; + mListener.callSessionMergeComplete(confSession); } else { - // Session already exists. Hence no need to pass - mListener.callSessionMergeComplete(null); + // Session already exists. Hence no need to pass + mListener.callSessionMergeComplete(null); } } }, mListenerExecutor); diff --git a/telephony/java/android/telephony/ims/ImsReasonInfo.java b/telephony/java/android/telephony/ims/ImsReasonInfo.java index dda021e6172f..31ede00955da 100644 --- a/telephony/java/android/telephony/ims/ImsReasonInfo.java +++ b/telephony/java/android/telephony/ims/ImsReasonInfo.java @@ -902,6 +902,14 @@ public final class ImsReasonInfo implements Parcelable { */ public static final int CODE_RETRY_ON_IMS_WITHOUT_RTT = 3001; + /** + * Call failed due to concurrent calls not possible, this value should be in sync with {link@ + * QtiCallConstants.CODE_CONCURRENT_CALLS_NOT_POSSIBLE}. + * + * @hide + */ + public static final int CODE_CONCURRENT_CALLS_NOT_POSSIBLE = 3002; + /* * OEM specific error codes. To be used by OEMs when they don't want to reveal error code which * would be replaced by ERROR_UNSPECIFIED. @@ -1084,6 +1092,7 @@ public final class ImsReasonInfo implements Parcelable { CODE_REJECT_ONGOING_CS_CALL, CODE_NETWORK_CONGESTION, CODE_RETRY_ON_IMS_WITHOUT_RTT, + CODE_CONCURRENT_CALLS_NOT_POSSIBLE, CODE_OEM_CAUSE_1, CODE_OEM_CAUSE_2, CODE_OEM_CAUSE_3, @@ -1277,6 +1286,7 @@ public final class ImsReasonInfo implements Parcelable { sImsCodeMap.put(CODE_REJECT_ONGOING_CS_CALL, "CODE_REJECT_ONGOING_CS_CALL"); sImsCodeMap.put(CODE_NETWORK_CONGESTION, "CODE_NETWORK_CONGESTION"); sImsCodeMap.put(CODE_RETRY_ON_IMS_WITHOUT_RTT, "CODE_RETRY_ON_IMS_WITHOUT_RTT"); + sImsCodeMap.put(CODE_CONCURRENT_CALLS_NOT_POSSIBLE, "CODE_CONCURRENT_CALLS_NOT_POSSIBLE"); sImsCodeMap.put(CODE_OEM_CAUSE_1, "CODE_OEM_CAUSE_1"); sImsCodeMap.put(CODE_OEM_CAUSE_2, "CODE_OEM_CAUSE_2"); sImsCodeMap.put(CODE_OEM_CAUSE_3, "CODE_OEM_CAUSE_3"); diff --git a/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java b/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java index 11cdeed10c5a..7144c9d1a030 100644 --- a/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java +++ b/telephony/java/android/telephony/ims/stub/ImsUtImplBase.java @@ -19,6 +19,7 @@ package android.telephony.ims.stub; import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; +import android.annotation.SuppressLint; import android.annotation.SystemApi; import android.os.Bundle; import android.os.RemoteException; @@ -150,6 +151,13 @@ public class ImsUtImplBase { } @Override + public int queryCFForServiceClass(int condition, String number, int serviceClass) throws + RemoteException { + return executeMethodAsyncForResult(() -> ImsUtImplBase.this.queryCFForServiceClass( + condition, number, serviceClass), "queryCFForServiceClass"); + } + + @Override public int queryCallWaiting() throws RemoteException { return executeMethodAsyncForResult(() -> ImsUtImplBase.this.queryCallWaiting(), "queryCallWaiting"); @@ -335,6 +343,15 @@ public class ImsUtImplBase { } /** + * Retrieves the configuration of the call forward for specified service class. + */ + @SuppressLint("AcronymName") + public int queryCFForServiceClass(int condition, String number, + int serviceClass) { + return -1; + } + + /** * Retrieves the configuration of the call waiting. */ public int queryCallWaiting() { diff --git a/telephony/java/com/android/ims/ImsConfig.java b/telephony/java/com/android/ims/ImsConfig.java index 487786045b8e..314ea6a6f44c 100644 --- a/telephony/java/com/android/ims/ImsConfig.java +++ b/telephony/java/com/android/ims/ImsConfig.java @@ -783,6 +783,7 @@ public class ImsConfig { public static final int WIFI_ONLY = 0; public static final int CELLULAR_PREFERRED = 1; public static final int WIFI_PREFERRED = 2; + public static final int IMS_PREFERRED = 10; } public ImsConfig(IImsConfig iconfig) { diff --git a/telephony/java/com/android/ims/ImsUtInterface.java b/telephony/java/com/android/ims/ImsUtInterface.java index 5dfbce3dd65f..417f18788e94 100644 --- a/telephony/java/com/android/ims/ImsUtInterface.java +++ b/telephony/java/com/android/ims/ImsUtInterface.java @@ -129,6 +129,12 @@ public interface ImsUtInterface { public void queryCallForward(int condition, String number, Message result); /** + * Retrieves the configuration of the call forward for the specified service class. + * The return value of ((AsyncResult)result.obj) is an array of {@link ImsCallForwardInfo}. + */ + public void queryCallForward(int condition, String number, + int serviceClass, Message result); + /** * Retrieves the configuration of the call waiting. * The return value of ((AsyncResult)result.obj) is an array of {@link ImsSsInfo}. */ diff --git a/telephony/java/com/android/ims/internal/IImsUt.aidl b/telephony/java/com/android/ims/internal/IImsUt.aidl index 302be65070f7..51729b78b0b8 100644 --- a/telephony/java/com/android/ims/internal/IImsUt.aidl +++ b/telephony/java/com/android/ims/internal/IImsUt.aidl @@ -128,4 +128,12 @@ interface IImsUt { */ int updateCallBarringWithPassword(int cbType, int action, in String[] barrList, int serviceClass, String password); + + /** + * Retrieves the configuration of the call forward for specified service class. + * Returns an integer value to indicate the requestId of the UT request. + * -1 is returned if the "condition" is invalid for the queryCallForward, + * otherwise, integer greater than -1 will be returned. + */ + int queryCFForServiceClass(int condition, String number, int serviceClass); } diff --git a/telephony/java/com/android/internal/telephony/DctConstants.java b/telephony/java/com/android/internal/telephony/DctConstants.java index 24708873986c..675c32e19054 100644 --- a/telephony/java/com/android/internal/telephony/DctConstants.java +++ b/telephony/java/com/android/internal/telephony/DctConstants.java @@ -115,6 +115,10 @@ public class DctConstants { public static final int EVENT_SIM_STATE_UPDATED = BASE + 55; public static final int EVENT_APN_UNTHROTTLED = BASE + 56; public static final int EVENT_TRAFFIC_DESCRIPTORS_UPDATED = BASE + 57; + public static final int EVENT_AIRPLANE_MODE_CHANGED = BASE + 58; + public static final int EVENT_GET_ENHANCED_RADIO_CAPABILITY = BASE + 59; + public static final int EVENT_GET_ENHANCED_RADIO_CAPABILITY_RETRY = BASE + 60; + public static final int EVENT_RECONNECT_EXT_TELEPHONY_SERVICE = BASE + 61; /***** Constants *****/ diff --git a/telephony/java/com/android/internal/telephony/ISmsSecurityAgent.aidl b/telephony/java/com/android/internal/telephony/ISmsSecurityAgent.aidl new file mode 100644 index 000000000000..3b525292cb2d --- /dev/null +++ b/telephony/java/com/android/internal/telephony/ISmsSecurityAgent.aidl @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2016, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package com.android.internal.telephony; + +import com.android.internal.telephony.SmsAuthorizationRequest; + +/** + * ISmsSecurityAgent enhances the security of outgoing SMS messages by allowing trusted system + * components to inspect and authorize or reject outgoing SMS messages. + * + * @hide + **/ +interface ISmsSecurityAgent { + /** + * Called when a SMS message is queued for dispatch allowing a registered + * agent to decide on whether to accept/reject the request to send an SMS message. + * <b>Unless the agent rejects the request within the OEM specific timeout, the SMS + * will be sent.</b> + * @param request the object containing information regarding the message and + * through which the agent can accept/reject the request. + */ + void onAuthorize(in SmsAuthorizationRequest request); + +} diff --git a/telephony/java/com/android/internal/telephony/ISmsSecurityService.aidl b/telephony/java/com/android/internal/telephony/ISmsSecurityService.aidl new file mode 100644 index 000000000000..e479f0c1f678 --- /dev/null +++ b/telephony/java/com/android/internal/telephony/ISmsSecurityService.aidl @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2016, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package com.android.internal.telephony; + +import com.android.internal.telephony.ISmsSecurityAgent; +import com.android.internal.telephony.SmsAuthorizationRequest; + +/** + * ISmsSecurityService exposes a service that monitors the dispatch of outgoing SMS messages + * and notifies a registered ISmsSecurityAgent in order to authorize or reject the dispatch + * of each outgoing SMS message. + * + * @hide + */ +interface ISmsSecurityService { + /** + * Registers an agent in order to receive requests for outgoing SMS messages on which + * it can accept or reject the request for the dispatch of each SMS message. + * <b>Only one agent can be registered at one time.</b> + * @param agent the agent to be registered. + * @return true if the registration succeeds, false otherwise. + */ + boolean register(in ISmsSecurityAgent agent); + + /** + * Unregisters the previously registered agent and causes the security + * service to no longer rely on the agent for a decision regarding + * successive SMS messages being dispatched allowing all successive messages to be dispatched. + * + * @param agent the agent to be unregistered. + * @return true if the unregistration succeeds, false otherwise. + */ + boolean unregister(in ISmsSecurityAgent agent); + + /** + * Allows the registered ISmsSecurityAgent implementation to asynchronously send a response + * on whether it will accept/reject the dispatch of the SMS message. + * <b>If the agent responds after the OEM defined timeout it may not be able to + * interfere on whether the SMS was sent or not.</b> + * @param request the request related to an outgoing SMS message to accept/reject. + * @param accepted true to accept, false to reject. + * return true if the response took effect, false if a response has already been sent for this + * request or an OEM specific timeout already happened. + */ + boolean sendResponse(in SmsAuthorizationRequest request, boolean authorized); +} diff --git a/telephony/java/com/android/internal/telephony/OperatorInfo.java b/telephony/java/com/android/internal/telephony/OperatorInfo.java index 1820a1dc4d6c..1cdc9ddcf842 100644 --- a/telephony/java/com/android/internal/telephony/OperatorInfo.java +++ b/telephony/java/com/android/internal/telephony/OperatorInfo.java @@ -14,6 +14,13 @@ * limitations under the License. */ +/* + * Changes from Qualcomm Innovation Center are provided under the following license: + * + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause-Clear + */ + package com.android.internal.telephony; import android.compat.annotation.UnsupportedAppUsage; @@ -21,11 +28,25 @@ import android.os.Build; import android.os.Parcel; import android.os.Parcelable; import android.telephony.AccessNetworkConstants.AccessNetworkType; +import android.telephony.CagInfo; +import android.telephony.SnpnInfo; /** * @hide */ public class OperatorInfo implements Parcelable { + /** Invalid access mode */ + /** @hide */ + public static final int ACCESS_MODE_INVALID = 0; + + /** PLMN access mode */ + /** @hide */ + public static final int ACCESS_MODE_PLMN = 1; + + /** SNPN access mode */ + /** @hide */ + public static final int ACCESS_MODE_SNPN = 2; + public enum State { UNKNOWN, AVAILABLE, @@ -45,6 +66,16 @@ public class OperatorInfo implements Parcelable { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) private State mState = State.UNKNOWN; private int mRan = AccessNetworkType.UNKNOWN; + /** + * Describes the access mode + */ + private int mAccessMode = ACCESS_MODE_PLMN; + + /** Defines the CAG information. */ + private CagInfo mCagInfo; + + /** Defines the SNPN information. */ + private SnpnInfo mSnpnInfo; @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) @@ -75,6 +106,28 @@ public class OperatorInfo implements Parcelable { return mRan; } + /** Returns the access mode */ + /** @hide */ + public int getAccessMode() { + return mAccessMode; + } + + /** + * Returns the CAG information. + * @hide + */ + public CagInfo getCagInfo() { + return mCagInfo; + } + + /** + * Returns the SNPN information. + * @hide + */ + public SnpnInfo getSnpnInfo() { + return mSnpnInfo; + } + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) OperatorInfo(String operatorAlphaLong, String operatorAlphaShort, @@ -121,6 +174,48 @@ public class OperatorInfo implements Parcelable { this(operatorAlphaLong, operatorAlphaShort, operatorNumeric, State.UNKNOWN); } + /** @hide */ + public OperatorInfo(String operatorAlphaLong, + String operatorAlphaShort, + String operatorNumeric, + int ran, int accessMode, + CagInfo cagInfo, SnpnInfo snpnInfo) { + this(operatorAlphaLong, operatorAlphaShort, operatorNumeric, ran); + mAccessMode = accessMode; + mCagInfo = cagInfo; + mSnpnInfo = snpnInfo; + } + + /** @hide */ + public OperatorInfo(String operatorAlphaLong, + String operatorAlphaShort, + String operatorNumeric, + State state, + int ran, int accessMode, + CagInfo cagInfo, SnpnInfo snpnInfo) { + this (operatorAlphaLong, operatorAlphaShort, operatorNumeric, state, ran); + mAccessMode = accessMode; + mCagInfo = cagInfo; + mSnpnInfo = snpnInfo; + } + + /** + * Construct a SnpnInfo object from the given parcel. + * @hide + */ + private OperatorInfo(Parcel in) { + mOperatorAlphaLong = in.readString(); + mOperatorAlphaShort = in.readString(); + mOperatorNumeric = in.readString(); + mState = (State) in.readSerializable( + com.android.internal.telephony.OperatorInfo.State.class.getClassLoader(), + com.android.internal.telephony.OperatorInfo.State.class); + mRan = in.readInt(); + mAccessMode = in.readInt(); + mCagInfo = in.readParcelable(CagInfo.class.getClassLoader(), CagInfo.class); + mSnpnInfo = in.readParcelable(SnpnInfo.class.getClassLoader(), SnpnInfo.class); + } + /** * See state strings defined in ril.h RIL_REQUEST_QUERY_AVAILABLE_NETWORKS */ @@ -147,7 +242,10 @@ public class OperatorInfo implements Parcelable { + "/" + mOperatorAlphaShort + "/" + mOperatorNumeric + "/" + mState - + "/" + mRan; + + "/" + mRan + + "/" + mAccessMode + + "/" + mCagInfo + + "/" + mSnpnInfo; } /** @@ -174,6 +272,9 @@ public class OperatorInfo implements Parcelable { dest.writeString(mOperatorNumeric); dest.writeSerializable(mState); dest.writeInt(mRan); + dest.writeInt(mAccessMode); + dest.writeParcelable(mCagInfo, 0); + dest.writeParcelable(mSnpnInfo, 0); } /** @@ -185,13 +286,7 @@ public class OperatorInfo implements Parcelable { new Creator<OperatorInfo>() { @Override public OperatorInfo createFromParcel(Parcel in) { - OperatorInfo opInfo = new OperatorInfo( - in.readString(), /*operatorAlphaLong*/ - in.readString(), /*operatorAlphaShort*/ - in.readString(), /*operatorNumeric*/ - (State) in.readSerializable(com.android.internal.telephony.OperatorInfo.State.class.getClassLoader(), com.android.internal.telephony.OperatorInfo.State.class), /*state*/ - in.readInt()); /*ran*/ - return opInfo; + return new OperatorInfo(in); } @Override diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java index b273ba2e9f11..cbe3be0a7d48 100644 --- a/telephony/java/com/android/internal/telephony/RILConstants.java +++ b/telephony/java/com/android/internal/telephony/RILConstants.java @@ -573,6 +573,9 @@ public interface RILConstants { int RIL_REQUEST_IS_N1_MODE_ENABLED = 242; int RIL_REQUEST_IS_NULL_CIPHER_AND_INTEGRITY_ENABLED = 259; + /* RIL Request to get newly supported radio + capabilities include 5G SA*/ + int RIL_REQUEST_GET_ENHANCED_RADIO_CAPABILITY = 600; /* Responses begin */ int RIL_RESPONSE_ACKNOWLEDGEMENT = 800; diff --git a/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.aidl b/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.aidl new file mode 100644 index 000000000000..a2f7020f9b90 --- /dev/null +++ b/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.aidl @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2016, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package com.android.internal.telephony; + +/** @hide */ +parcelable SmsAuthorizationRequest; diff --git a/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.java b/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.java new file mode 100644 index 000000000000..bc64fa802903 --- /dev/null +++ b/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2016, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package com.android.internal.telephony; + +import android.os.IBinder; +import android.os.Parcel; +import android.os.Parcelable; +import android.os.RemoteException; + +/** + * This class represents a request from the {@link ISmsSecurityService} to trusted parties + * in order to allow third party components to participate in the decision process to accept + * or reject a request to send an SMS message. + * + * @hide + */ +public class SmsAuthorizationRequest implements Parcelable { + + private final ISmsSecurityService service; + + private final IBinder token; + + public final String packageName; + + public final String destinationAddress; + + public final String message; + + public SmsAuthorizationRequest(final Parcel source) { + this.service = ISmsSecurityService.Stub.asInterface(source.readStrongBinder()); + this.token = source.readStrongBinder(); + this.packageName = source.readString(); + this.destinationAddress = source.readString(); + this.message = source.readString(); + } + + public SmsAuthorizationRequest(final ISmsSecurityService service, + final IBinder binderToken, + final String packageName, + final String destinationAddress, + final String message) { + this.service = service; + this.token = binderToken; + this.packageName = packageName; + this.destinationAddress = destinationAddress; + this.message = message; + } + + @Override + public void writeToParcel(final Parcel dest, final int flags) { + dest.writeStrongBinder(service.asBinder()); + dest.writeStrongBinder(token); + dest.writeString(packageName); + dest.writeString(destinationAddress); + dest.writeString(message); + } + + @Override + public int describeContents() { + return 0; + } + + public static Parcelable.Creator<SmsAuthorizationRequest> CREATOR = + new Creator<SmsAuthorizationRequest>() { + @Override + public SmsAuthorizationRequest[] newArray(final int size) { + return new SmsAuthorizationRequest[size]; + } + + @Override + public SmsAuthorizationRequest createFromParcel(final Parcel source) { + return new SmsAuthorizationRequest(source); + } + }; + + public void accept() throws RemoteException{ + service.sendResponse(this, true); + } + + public void reject() throws RemoteException { + service.sendResponse(this, false); + } + + public IBinder getToken() { + return token; + } + + @Override + public String toString() { + return String.format("[%s] (%s) # %s", + this.packageName, + this.destinationAddress, + this.message); + } +} diff --git a/telephony/java/com/android/internal/telephony/TelephonyProperties.java b/telephony/java/com/android/internal/telephony/TelephonyProperties.java index 29286e8f429e..4a8d414ae446 100644 --- a/telephony/java/com/android/internal/telephony/TelephonyProperties.java +++ b/telephony/java/com/android/internal/telephony/TelephonyProperties.java @@ -241,4 +241,10 @@ public interface TelephonyProperties * Type: int */ static final String PROPERTY_MAX_ACTIVE_MODEMS = "telephony.active_modems.max_count"; + + /** + * Property to store multi sim voice capability configuration. + * Type: int posssible values are @link TelephonyManager#MultiSimVoiceCapability. + */ + static final String PROPERTY_MULTISIM_VOICE_CAPABILITY = "ril.multisim.voice_capability"; } diff --git a/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java b/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java index b51ba31b4eed..b51ba31b4eed 100644..100755 --- a/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java +++ b/telephony/java/com/android/internal/telephony/cdma/SmsMessage.java diff --git a/telephony/java/com/android/internal/telephony/cdma/sms/SmsEnvelope.java b/telephony/java/com/android/internal/telephony/cdma/sms/SmsEnvelope.java index 9e2d29cd12e9..c6db36c45d87 100644 --- a/telephony/java/com/android/internal/telephony/cdma/sms/SmsEnvelope.java +++ b/telephony/java/com/android/internal/telephony/cdma/sms/SmsEnvelope.java @@ -38,6 +38,7 @@ public final class SmsEnvelope { static public final int TELESERVICE_WAP = 0x1004; static public final int TELESERVICE_WEMT = 0x1005; static public final int TELESERVICE_SCPT = 0x1006; + static public final int TELESERVICE_CT_WAP = 0xFDEA; /** Carriers specific Teleservice IDs. */ public static final int TELESERVICE_FDEA_WAP = 0xFDEA; // 65002 diff --git a/telephony/java/com/android/internal/telephony/uicc/IccUtils.java b/telephony/java/com/android/internal/telephony/uicc/IccUtils.java index f518d53fa517..97af1c2c7544 100644 --- a/telephony/java/com/android/internal/telephony/uicc/IccUtils.java +++ b/telephony/java/com/android/internal/telephony/uicc/IccUtils.java @@ -27,10 +27,12 @@ import android.telephony.UiccPortInfo; import android.text.TextUtils; import com.android.internal.annotations.VisibleForTesting; +import com.android.internal.telephony.EncodeException; import com.android.internal.telephony.GsmAlphabet; import com.android.telephony.Rlog; import java.io.UnsupportedEncodingException; +import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.util.List; @@ -977,5 +979,6 @@ public class IccUtils { serializedFplmns[offset++] = (byte) 0xff; } return serializedFplmns; + } } diff --git a/tests/net/java/android/net/NetworkStatsHistoryTest.java b/tests/net/java/android/net/NetworkStatsHistoryTest.java new file mode 100644 index 000000000000..96529a681cb4 --- /dev/null +++ b/tests/net/java/android/net/NetworkStatsHistoryTest.java @@ -0,0 +1,620 @@ +/* + * Copyright (C) 2011 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.net; + +import static android.net.NetworkStatsHistory.DataStreamUtils.readVarLong; +import static android.net.NetworkStatsHistory.DataStreamUtils.writeVarLong; +import static android.net.NetworkStatsHistory.Entry.UNKNOWN; +import static android.net.NetworkStatsHistory.FIELD_ALL; +import static android.net.NetworkStatsHistory.FIELD_OPERATIONS; +import static android.net.NetworkStatsHistory.FIELD_RX_BYTES; +import static android.net.NetworkStatsHistory.FIELD_RX_PACKETS; +import static android.net.NetworkStatsHistory.FIELD_TX_BYTES; +import static android.net.NetworkStatsHistory.multiplySafe; +import static android.net.TrafficStats.GB_IN_BYTES; +import static android.net.TrafficStats.MB_IN_BYTES; +import static android.text.format.DateUtils.DAY_IN_MILLIS; +import static android.text.format.DateUtils.HOUR_IN_MILLIS; +import static android.text.format.DateUtils.MINUTE_IN_MILLIS; +import static android.text.format.DateUtils.SECOND_IN_MILLIS; +import static android.text.format.DateUtils.WEEK_IN_MILLIS; +import static android.text.format.DateUtils.YEAR_IN_MILLIS; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import android.content.Context; +import android.util.Log; + +import androidx.test.InstrumentationRegistry; +import androidx.test.filters.SmallTest; +import androidx.test.runner.AndroidJUnit4; + +import com.android.frameworks.tests.net.R; + +import org.junit.After; +import org.junit.Test; +import org.junit.runner.RunWith; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.util.Random; + +@RunWith(AndroidJUnit4.class) +@SmallTest +public class NetworkStatsHistoryTest { + private static final String TAG = "NetworkStatsHistoryTest"; + + private static final long TEST_START = 1194220800000L; + + private NetworkStatsHistory stats; + + @After + public void tearDown() throws Exception { + if (stats != null) { + assertConsistent(stats); + } + } + + @Test + public void testReadOriginalVersion() throws Exception { + final Context context = InstrumentationRegistry.getContext(); + final DataInputStream in = + new DataInputStream(context.getResources().openRawResource(R.raw.history_v1)); + + NetworkStatsHistory.Entry entry = null; + try { + final NetworkStatsHistory history = new NetworkStatsHistory(in); + assertEquals(15 * SECOND_IN_MILLIS, history.getBucketDuration()); + + entry = history.getValues(0, entry); + assertEquals(29143L, entry.rxBytes); + assertEquals(6223L, entry.txBytes); + + entry = history.getValues(history.size() - 1, entry); + assertEquals(1476L, entry.rxBytes); + assertEquals(838L, entry.txBytes); + + entry = history.getValues(Long.MIN_VALUE, Long.MAX_VALUE, entry); + assertEquals(332401L, entry.rxBytes); + assertEquals(64314L, entry.txBytes); + + } finally { + in.close(); + } + } + + @Test + public void testRecordSingleBucket() throws Exception { + final long BUCKET_SIZE = HOUR_IN_MILLIS; + stats = new NetworkStatsHistory(BUCKET_SIZE); + + // record data into narrow window to get single bucket + stats.recordData(TEST_START, TEST_START + SECOND_IN_MILLIS, + new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 2L)); + + assertEquals(1, stats.size()); + assertValues(stats, 0, SECOND_IN_MILLIS, 1024L, 10L, 2048L, 20L, 2L); + } + + @Test + public void testRecordEqualBuckets() throws Exception { + final long bucketDuration = HOUR_IN_MILLIS; + stats = new NetworkStatsHistory(bucketDuration); + + // split equally across two buckets + final long recordStart = TEST_START + (bucketDuration / 2); + stats.recordData(recordStart, recordStart + bucketDuration, + new NetworkStats.Entry(1024L, 10L, 128L, 2L, 2L)); + + assertEquals(2, stats.size()); + assertValues(stats, 0, HOUR_IN_MILLIS / 2, 512L, 5L, 64L, 1L, 1L); + assertValues(stats, 1, HOUR_IN_MILLIS / 2, 512L, 5L, 64L, 1L, 1L); + } + + @Test + public void testRecordTouchingBuckets() throws Exception { + final long BUCKET_SIZE = 15 * MINUTE_IN_MILLIS; + stats = new NetworkStatsHistory(BUCKET_SIZE); + + // split almost completely into middle bucket, but with a few minutes + // overlap into neighboring buckets. total record is 20 minutes. + final long recordStart = (TEST_START + BUCKET_SIZE) - MINUTE_IN_MILLIS; + final long recordEnd = (TEST_START + (BUCKET_SIZE * 2)) + (MINUTE_IN_MILLIS * 4); + stats.recordData(recordStart, recordEnd, + new NetworkStats.Entry(1000L, 2000L, 5000L, 10000L, 100L)); + + assertEquals(3, stats.size()); + // first bucket should have (1/20 of value) + assertValues(stats, 0, MINUTE_IN_MILLIS, 50L, 100L, 250L, 500L, 5L); + // second bucket should have (15/20 of value) + assertValues(stats, 1, 15 * MINUTE_IN_MILLIS, 750L, 1500L, 3750L, 7500L, 75L); + // final bucket should have (4/20 of value) + assertValues(stats, 2, 4 * MINUTE_IN_MILLIS, 200L, 400L, 1000L, 2000L, 20L); + } + + @Test + public void testRecordGapBuckets() throws Exception { + final long BUCKET_SIZE = HOUR_IN_MILLIS; + stats = new NetworkStatsHistory(BUCKET_SIZE); + + // record some data today and next week with large gap + final long firstStart = TEST_START; + final long lastStart = TEST_START + WEEK_IN_MILLIS; + stats.recordData(firstStart, firstStart + SECOND_IN_MILLIS, + new NetworkStats.Entry(128L, 2L, 256L, 4L, 1L)); + stats.recordData(lastStart, lastStart + SECOND_IN_MILLIS, + new NetworkStats.Entry(64L, 1L, 512L, 8L, 2L)); + + // we should have two buckets, far apart from each other + assertEquals(2, stats.size()); + assertValues(stats, 0, SECOND_IN_MILLIS, 128L, 2L, 256L, 4L, 1L); + assertValues(stats, 1, SECOND_IN_MILLIS, 64L, 1L, 512L, 8L, 2L); + + // now record something in middle, spread across two buckets + final long middleStart = TEST_START + DAY_IN_MILLIS; + final long middleEnd = middleStart + (HOUR_IN_MILLIS * 2); + stats.recordData(middleStart, middleEnd, + new NetworkStats.Entry(2048L, 4L, 2048L, 4L, 2L)); + + // now should have four buckets, with new record in middle two buckets + assertEquals(4, stats.size()); + assertValues(stats, 0, SECOND_IN_MILLIS, 128L, 2L, 256L, 4L, 1L); + assertValues(stats, 1, HOUR_IN_MILLIS, 1024L, 2L, 1024L, 2L, 1L); + assertValues(stats, 2, HOUR_IN_MILLIS, 1024L, 2L, 1024L, 2L, 1L); + assertValues(stats, 3, SECOND_IN_MILLIS, 64L, 1L, 512L, 8L, 2L); + } + + @Test + public void testRecordOverlapBuckets() throws Exception { + final long BUCKET_SIZE = HOUR_IN_MILLIS; + stats = new NetworkStatsHistory(BUCKET_SIZE); + + // record some data in one bucket, and another overlapping buckets + stats.recordData(TEST_START, TEST_START + SECOND_IN_MILLIS, + new NetworkStats.Entry(256L, 2L, 256L, 2L, 1L)); + final long midStart = TEST_START + (HOUR_IN_MILLIS / 2); + stats.recordData(midStart, midStart + HOUR_IN_MILLIS, + new NetworkStats.Entry(1024L, 10L, 1024L, 10L, 10L)); + + // should have two buckets, with some data mixed together + assertEquals(2, stats.size()); + assertValues(stats, 0, SECOND_IN_MILLIS + (HOUR_IN_MILLIS / 2), 768L, 7L, 768L, 7L, 6L); + assertValues(stats, 1, (HOUR_IN_MILLIS / 2), 512L, 5L, 512L, 5L, 5L); + } + + @Test + public void testRecordEntireGapIdentical() throws Exception { + // first, create two separate histories far apart + final NetworkStatsHistory stats1 = new NetworkStatsHistory(HOUR_IN_MILLIS); + stats1.recordData(TEST_START, TEST_START + 2 * HOUR_IN_MILLIS, 2000L, 1000L); + + final long TEST_START_2 = TEST_START + DAY_IN_MILLIS; + final NetworkStatsHistory stats2 = new NetworkStatsHistory(HOUR_IN_MILLIS); + stats2.recordData(TEST_START_2, TEST_START_2 + 2 * HOUR_IN_MILLIS, 1000L, 500L); + + // combine together with identical bucket size + stats = new NetworkStatsHistory(HOUR_IN_MILLIS); + stats.recordEntireHistory(stats1); + stats.recordEntireHistory(stats2); + + // first verify that totals match up + assertValues(stats, TEST_START - WEEK_IN_MILLIS, TEST_START + WEEK_IN_MILLIS, 3000L, 1500L); + + // now inspect internal buckets + assertValues(stats, 0, 1000L, 500L); + assertValues(stats, 1, 1000L, 500L); + assertValues(stats, 2, 500L, 250L); + assertValues(stats, 3, 500L, 250L); + } + + @Test + public void testRecordEntireOverlapVaryingBuckets() throws Exception { + // create history just over hour bucket boundary + final NetworkStatsHistory stats1 = new NetworkStatsHistory(HOUR_IN_MILLIS); + stats1.recordData(TEST_START, TEST_START + MINUTE_IN_MILLIS * 60, 600L, 600L); + + final long TEST_START_2 = TEST_START + MINUTE_IN_MILLIS; + final NetworkStatsHistory stats2 = new NetworkStatsHistory(MINUTE_IN_MILLIS); + stats2.recordData(TEST_START_2, TEST_START_2 + MINUTE_IN_MILLIS * 5, 50L, 50L); + + // combine together with minute bucket size + stats = new NetworkStatsHistory(MINUTE_IN_MILLIS); + stats.recordEntireHistory(stats1); + stats.recordEntireHistory(stats2); + + // first verify that totals match up + assertValues(stats, TEST_START - WEEK_IN_MILLIS, TEST_START + WEEK_IN_MILLIS, 650L, 650L); + + // now inspect internal buckets + assertValues(stats, 0, 10L, 10L); + assertValues(stats, 1, 20L, 20L); + assertValues(stats, 2, 20L, 20L); + assertValues(stats, 3, 20L, 20L); + assertValues(stats, 4, 20L, 20L); + assertValues(stats, 5, 20L, 20L); + assertValues(stats, 6, 10L, 10L); + + // now combine using 15min buckets + stats = new NetworkStatsHistory(HOUR_IN_MILLIS / 4); + stats.recordEntireHistory(stats1); + stats.recordEntireHistory(stats2); + + // first verify that totals match up + assertValues(stats, TEST_START - WEEK_IN_MILLIS, TEST_START + WEEK_IN_MILLIS, 650L, 650L); + + // and inspect buckets + assertValues(stats, 0, 200L, 200L); + assertValues(stats, 1, 150L, 150L); + assertValues(stats, 2, 150L, 150L); + assertValues(stats, 3, 150L, 150L); + } + + @Test + public void testRemove() throws Exception { + stats = new NetworkStatsHistory(HOUR_IN_MILLIS); + + // record some data across 24 buckets + stats.recordData(TEST_START, TEST_START + DAY_IN_MILLIS, 24L, 24L); + assertEquals(24, stats.size()); + + // try removing invalid data; should be no change + stats.removeBucketsBefore(0 - DAY_IN_MILLIS); + assertEquals(24, stats.size()); + + // try removing far before buckets; should be no change + stats.removeBucketsBefore(TEST_START - YEAR_IN_MILLIS); + assertEquals(24, stats.size()); + + // try removing just moments into first bucket; should be no change + // since that bucket contains data beyond the cutoff + stats.removeBucketsBefore(TEST_START + SECOND_IN_MILLIS); + assertEquals(24, stats.size()); + + // try removing single bucket + stats.removeBucketsBefore(TEST_START + HOUR_IN_MILLIS); + assertEquals(23, stats.size()); + + // try removing multiple buckets + stats.removeBucketsBefore(TEST_START + (4 * HOUR_IN_MILLIS)); + assertEquals(20, stats.size()); + + // try removing all buckets + stats.removeBucketsBefore(TEST_START + YEAR_IN_MILLIS); + assertEquals(0, stats.size()); + } + + @Test + public void testTotalData() throws Exception { + final long BUCKET_SIZE = HOUR_IN_MILLIS; + stats = new NetworkStatsHistory(BUCKET_SIZE); + + // record uniform data across day + stats.recordData(TEST_START, TEST_START + DAY_IN_MILLIS, 2400L, 4800L); + + // verify that total outside range is 0 + assertValues(stats, TEST_START - WEEK_IN_MILLIS, TEST_START - DAY_IN_MILLIS, 0L, 0L); + + // verify total in first hour + assertValues(stats, TEST_START, TEST_START + HOUR_IN_MILLIS, 100L, 200L); + + // verify total across 1.5 hours + assertValues(stats, TEST_START, TEST_START + (long) (1.5 * HOUR_IN_MILLIS), 150L, 300L); + + // verify total beyond end + assertValues(stats, TEST_START + (23 * HOUR_IN_MILLIS), TEST_START + WEEK_IN_MILLIS, 100L, 200L); + + // verify everything total + assertValues(stats, TEST_START - WEEK_IN_MILLIS, TEST_START + WEEK_IN_MILLIS, 2400L, 4800L); + + } + + @Test + public void testFuzzing() throws Exception { + try { + // fuzzing with random events, looking for crashes + final NetworkStats.Entry entry = new NetworkStats.Entry(); + final Random r = new Random(); + for (int i = 0; i < 500; i++) { + stats = new NetworkStatsHistory(r.nextLong()); + for (int j = 0; j < 10000; j++) { + if (r.nextBoolean()) { + // add range + final long start = r.nextLong(); + final long end = start + r.nextInt(); + entry.rxBytes = nextPositiveLong(r); + entry.rxPackets = nextPositiveLong(r); + entry.txBytes = nextPositiveLong(r); + entry.txPackets = nextPositiveLong(r); + entry.operations = nextPositiveLong(r); + stats.recordData(start, end, entry); + } else { + // trim something + stats.removeBucketsBefore(r.nextLong()); + } + } + assertConsistent(stats); + } + } catch (Throwable e) { + Log.e(TAG, String.valueOf(stats)); + throw new RuntimeException(e); + } + } + + private static long nextPositiveLong(Random r) { + final long value = r.nextLong(); + return value < 0 ? -value : value; + } + + @Test + public void testIgnoreFields() throws Exception { + final NetworkStatsHistory history = new NetworkStatsHistory( + MINUTE_IN_MILLIS, 0, FIELD_RX_BYTES | FIELD_TX_BYTES); + + history.recordData(0, MINUTE_IN_MILLIS, + new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 4L)); + history.recordData(0, 2 * MINUTE_IN_MILLIS, + new NetworkStats.Entry(2L, 2L, 2L, 2L, 2L)); + + assertFullValues(history, UNKNOWN, 1026L, UNKNOWN, 2050L, UNKNOWN, UNKNOWN); + } + + @Test + public void testIgnoreFieldsRecordIn() throws Exception { + final NetworkStatsHistory full = new NetworkStatsHistory(MINUTE_IN_MILLIS, 0, FIELD_ALL); + final NetworkStatsHistory partial = new NetworkStatsHistory( + MINUTE_IN_MILLIS, 0, FIELD_RX_PACKETS | FIELD_OPERATIONS); + + full.recordData(0, MINUTE_IN_MILLIS, + new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 4L)); + partial.recordEntireHistory(full); + + assertFullValues(partial, UNKNOWN, UNKNOWN, 10L, UNKNOWN, UNKNOWN, 4L); + } + + @Test + public void testIgnoreFieldsRecordOut() throws Exception { + final NetworkStatsHistory full = new NetworkStatsHistory(MINUTE_IN_MILLIS, 0, FIELD_ALL); + final NetworkStatsHistory partial = new NetworkStatsHistory( + MINUTE_IN_MILLIS, 0, FIELD_RX_PACKETS | FIELD_OPERATIONS); + + partial.recordData(0, MINUTE_IN_MILLIS, + new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 4L)); + full.recordEntireHistory(partial); + + assertFullValues(full, MINUTE_IN_MILLIS, 0L, 10L, 0L, 0L, 4L); + } + + @Test + public void testSerialize() throws Exception { + final NetworkStatsHistory before = new NetworkStatsHistory(MINUTE_IN_MILLIS, 40, FIELD_ALL); + before.recordData(0, 4 * MINUTE_IN_MILLIS, + new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 4L)); + before.recordData(DAY_IN_MILLIS, DAY_IN_MILLIS + MINUTE_IN_MILLIS, + new NetworkStats.Entry(10L, 20L, 30L, 40L, 50L)); + + final ByteArrayOutputStream out = new ByteArrayOutputStream(); + before.writeToStream(new DataOutputStream(out)); + out.close(); + + final ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); + final NetworkStatsHistory after = new NetworkStatsHistory(new DataInputStream(in)); + + // must have identical totals before and after + assertFullValues(before, 5 * MINUTE_IN_MILLIS, 1034L, 30L, 2078L, 60L, 54L); + assertFullValues(after, 5 * MINUTE_IN_MILLIS, 1034L, 30L, 2078L, 60L, 54L); + } + + @Test + public void testVarLong() throws Exception { + assertEquals(0L, performVarLong(0L)); + assertEquals(-1L, performVarLong(-1L)); + assertEquals(1024L, performVarLong(1024L)); + assertEquals(-1024L, performVarLong(-1024L)); + assertEquals(40 * MB_IN_BYTES, performVarLong(40 * MB_IN_BYTES)); + assertEquals(512 * GB_IN_BYTES, performVarLong(512 * GB_IN_BYTES)); + assertEquals(Long.MIN_VALUE, performVarLong(Long.MIN_VALUE)); + assertEquals(Long.MAX_VALUE, performVarLong(Long.MAX_VALUE)); + assertEquals(Long.MIN_VALUE + 40, performVarLong(Long.MIN_VALUE + 40)); + assertEquals(Long.MAX_VALUE - 40, performVarLong(Long.MAX_VALUE - 40)); + } + + @Test + public void testIndexBeforeAfter() throws Exception { + final long BUCKET_SIZE = HOUR_IN_MILLIS; + stats = new NetworkStatsHistory(BUCKET_SIZE); + + final long FIRST_START = TEST_START; + final long FIRST_END = FIRST_START + (2 * HOUR_IN_MILLIS); + final long SECOND_START = TEST_START + WEEK_IN_MILLIS; + final long SECOND_END = SECOND_START + HOUR_IN_MILLIS; + final long THIRD_START = TEST_START + (2 * WEEK_IN_MILLIS); + final long THIRD_END = THIRD_START + (2 * HOUR_IN_MILLIS); + + stats.recordData(FIRST_START, FIRST_END, + new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 2L)); + stats.recordData(SECOND_START, SECOND_END, + new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 2L)); + stats.recordData(THIRD_START, THIRD_END, + new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 2L)); + + // should have buckets: 2+1+2 + assertEquals(5, stats.size()); + + assertIndexBeforeAfter(stats, 0, 0, Long.MIN_VALUE); + assertIndexBeforeAfter(stats, 0, 1, FIRST_START); + assertIndexBeforeAfter(stats, 0, 1, FIRST_START + MINUTE_IN_MILLIS); + assertIndexBeforeAfter(stats, 0, 2, FIRST_START + HOUR_IN_MILLIS); + assertIndexBeforeAfter(stats, 1, 2, FIRST_START + HOUR_IN_MILLIS + MINUTE_IN_MILLIS); + assertIndexBeforeAfter(stats, 1, 2, FIRST_END - MINUTE_IN_MILLIS); + assertIndexBeforeAfter(stats, 1, 2, FIRST_END); + assertIndexBeforeAfter(stats, 1, 2, FIRST_END + MINUTE_IN_MILLIS); + assertIndexBeforeAfter(stats, 1, 2, SECOND_START - MINUTE_IN_MILLIS); + assertIndexBeforeAfter(stats, 1, 3, SECOND_START); + assertIndexBeforeAfter(stats, 2, 3, SECOND_END); + assertIndexBeforeAfter(stats, 2, 3, SECOND_END + MINUTE_IN_MILLIS); + assertIndexBeforeAfter(stats, 2, 3, THIRD_START - MINUTE_IN_MILLIS); + assertIndexBeforeAfter(stats, 2, 4, THIRD_START); + assertIndexBeforeAfter(stats, 3, 4, THIRD_START + MINUTE_IN_MILLIS); + assertIndexBeforeAfter(stats, 3, 4, THIRD_START + HOUR_IN_MILLIS); + assertIndexBeforeAfter(stats, 4, 4, THIRD_END); + assertIndexBeforeAfter(stats, 4, 4, THIRD_END + MINUTE_IN_MILLIS); + assertIndexBeforeAfter(stats, 4, 4, Long.MAX_VALUE); + } + + @Test + public void testIntersects() throws Exception { + final long BUCKET_SIZE = HOUR_IN_MILLIS; + stats = new NetworkStatsHistory(BUCKET_SIZE); + + final long FIRST_START = TEST_START; + final long FIRST_END = FIRST_START + (2 * HOUR_IN_MILLIS); + final long SECOND_START = TEST_START + WEEK_IN_MILLIS; + final long SECOND_END = SECOND_START + HOUR_IN_MILLIS; + final long THIRD_START = TEST_START + (2 * WEEK_IN_MILLIS); + final long THIRD_END = THIRD_START + (2 * HOUR_IN_MILLIS); + + stats.recordData(FIRST_START, FIRST_END, + new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 2L)); + stats.recordData(SECOND_START, SECOND_END, + new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 2L)); + stats.recordData(THIRD_START, THIRD_END, + new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 2L)); + + assertFalse(stats.intersects(10, 20)); + assertFalse(stats.intersects(TEST_START + YEAR_IN_MILLIS, TEST_START + YEAR_IN_MILLIS + 1)); + assertFalse(stats.intersects(Long.MAX_VALUE, Long.MIN_VALUE)); + + assertTrue(stats.intersects(Long.MIN_VALUE, Long.MAX_VALUE)); + assertTrue(stats.intersects(10, TEST_START + YEAR_IN_MILLIS)); + assertTrue(stats.intersects(TEST_START, TEST_START)); + assertTrue(stats.intersects(TEST_START + DAY_IN_MILLIS, TEST_START + DAY_IN_MILLIS + 1)); + assertTrue(stats.intersects(TEST_START + DAY_IN_MILLIS, Long.MAX_VALUE)); + assertTrue(stats.intersects(TEST_START + 1, Long.MAX_VALUE)); + + assertFalse(stats.intersects(Long.MIN_VALUE, TEST_START - 1)); + assertTrue(stats.intersects(Long.MIN_VALUE, TEST_START)); + assertTrue(stats.intersects(Long.MIN_VALUE, TEST_START + 1)); + } + + @Test + public void testSetValues() throws Exception { + stats = new NetworkStatsHistory(HOUR_IN_MILLIS); + stats.recordData(TEST_START, TEST_START + 1, + new NetworkStats.Entry(1024L, 10L, 2048L, 20L, 2L)); + + assertEquals(1024L + 2048L, stats.getTotalBytes()); + + final NetworkStatsHistory.Entry entry = stats.getValues(0, null); + entry.rxBytes /= 2; + entry.txBytes *= 2; + stats.setValues(0, entry); + + assertEquals(512L + 4096L, stats.getTotalBytes()); + } + + @Test + public void testMultiplySafe() { + assertEquals(25, multiplySafe(50, 1, 2)); + assertEquals(100, multiplySafe(50, 2, 1)); + + assertEquals(-10, multiplySafe(30, -1, 3)); + assertEquals(0, multiplySafe(30, 0, 3)); + assertEquals(10, multiplySafe(30, 1, 3)); + assertEquals(20, multiplySafe(30, 2, 3)); + assertEquals(30, multiplySafe(30, 3, 3)); + assertEquals(40, multiplySafe(30, 4, 3)); + + assertEquals(100_000_000_000L, + multiplySafe(300_000_000_000L, 10_000_000_000L, 30_000_000_000L)); + assertEquals(100_000_000_010L, + multiplySafe(300_000_000_000L, 10_000_000_001L, 30_000_000_000L)); + assertEquals(823_202_048L, + multiplySafe(4_939_212_288L, 2_121_815_528L, 12_730_893_165L)); + } + + private static void assertIndexBeforeAfter( + NetworkStatsHistory stats, int before, int after, long time) { + assertEquals("unexpected before", before, stats.getIndexBefore(time)); + assertEquals("unexpected after", after, stats.getIndexAfter(time)); + } + + private static long performVarLong(long before) throws Exception { + final ByteArrayOutputStream out = new ByteArrayOutputStream(); + writeVarLong(new DataOutputStream(out), before); + + final ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); + return readVarLong(new DataInputStream(in)); + } + + private static void assertConsistent(NetworkStatsHistory stats) { + // verify timestamps are monotonic + long lastStart = Long.MIN_VALUE; + NetworkStatsHistory.Entry entry = null; + for (int i = 0; i < stats.size(); i++) { + entry = stats.getValues(i, entry); + assertTrue(lastStart < entry.bucketStart); + lastStart = entry.bucketStart; + } + } + + private static void assertValues( + NetworkStatsHistory stats, int index, long rxBytes, long txBytes) { + final NetworkStatsHistory.Entry entry = stats.getValues(index, null); + assertEquals("unexpected rxBytes", rxBytes, entry.rxBytes); + assertEquals("unexpected txBytes", txBytes, entry.txBytes); + } + + private static void assertValues( + NetworkStatsHistory stats, long start, long end, long rxBytes, long txBytes) { + final NetworkStatsHistory.Entry entry = stats.getValues(start, end, null); + assertEquals("unexpected rxBytes", rxBytes, entry.rxBytes); + assertEquals("unexpected txBytes", txBytes, entry.txBytes); + } + + private static void assertValues(NetworkStatsHistory stats, int index, long activeTime, + long rxBytes, long rxPackets, long txBytes, long txPackets, long operations) { + final NetworkStatsHistory.Entry entry = stats.getValues(index, null); + assertEquals("unexpected activeTime", activeTime, entry.activeTime); + assertEquals("unexpected rxBytes", rxBytes, entry.rxBytes); + assertEquals("unexpected rxPackets", rxPackets, entry.rxPackets); + assertEquals("unexpected txBytes", txBytes, entry.txBytes); + assertEquals("unexpected txPackets", txPackets, entry.txPackets); + assertEquals("unexpected operations", operations, entry.operations); + } + + private static void assertFullValues(NetworkStatsHistory stats, long activeTime, long rxBytes, + long rxPackets, long txBytes, long txPackets, long operations) { + assertValues(stats, Long.MIN_VALUE, Long.MAX_VALUE, activeTime, rxBytes, rxPackets, txBytes, + txPackets, operations); + } + + private static void assertValues(NetworkStatsHistory stats, long start, long end, + long activeTime, long rxBytes, long rxPackets, long txBytes, long txPackets, + long operations) { + final NetworkStatsHistory.Entry entry = stats.getValues(start, end, null); + assertEquals("unexpected activeTime", activeTime, entry.activeTime); + assertEquals("unexpected rxBytes", rxBytes, entry.rxBytes); + assertEquals("unexpected rxPackets", rxPackets, entry.rxPackets); + assertEquals("unexpected txBytes", txBytes, entry.txBytes); + assertEquals("unexpected txPackets", txPackets, entry.txPackets); + assertEquals("unexpected operations", operations, entry.operations); + } +} diff --git a/wifi/java/src/android/net/wifi/nl80211/WifiNl80211Manager.java b/wifi/java/src/android/net/wifi/nl80211/WifiNl80211Manager.java index 2a199d27a60e..614f2a16dfad 100644 --- a/wifi/java/src/android/net/wifi/nl80211/WifiNl80211Manager.java +++ b/wifi/java/src/android/net/wifi/nl80211/WifiNl80211Manager.java @@ -495,18 +495,7 @@ public class WifiNl80211Manager { @Override public void onConnectedClientsChanged(NativeWifiClient client, boolean isConnected) { - if (mVerboseLoggingEnabled) { - Log.d(TAG, "onConnectedClientsChanged called with " - + client.getMacAddress() + " isConnected: " + isConnected); - } - - final long token = Binder.clearCallingIdentity(); - try { - mExecutor.execute( - () -> mSoftApListener.onConnectedClientsChanged(client, isConnected)); - } finally { - Binder.restoreCallingIdentity(token); - } + // Ignore event from wificond. This is handled from hostapd now. } @Override |