1# Copyright (C) 2023 The Android Open Source Project 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14"""Constants class contains final variables using by other classes.""" 15 16APS_PACKAGE = 'android.platform.snippets' 17DIAL_A_NUMBER = 'Dial a number' 18DEFAULT_WAIT_TIME_FIVE_SECS = 5 19WAIT_FOR_LOAD = 2 20BT_DEFAULT_TIMEOUT = 15 21WAIT_ONE_SEC = 1 22WAIT_TWO_SECONDS = 2 23SYNC_WAIT_TIME = 10 # Sometimes syncing between devices can take a while 24DEVICE_CONNECT_WAIT_TIME = 20 # Waiting for device pairing to complete. 25 26# The word or phrase present in a device summary that is connected. 27CONNECTED_SUMMARY_STATUS = "Connected" 28DISCONNECTED_SUMMARY_STATUS = "Disconnected" 29 30BTSNOOP_LOG_PATH_ON_DEVICE = '/data/misc/bluetooth/logs/btsnoop_hci.log' 31BTSNOOP_LAST_LOG_PATH_ON_DEVICE = ( 32 '/data/misc/bluetooth/logs/btsnoop_hci.log.last' 33) 34PHONE_CONTACTS_DESTINATION_PATH = ( 35 '/data/data/com.google.android.contacts/cache/contacts.vcf' 36) 37IMPOST_CONTACTS_SHELL_COMAND = ( 38 'am start-activity -W -t "text/x-vcard" -d file://' 39 + PHONE_CONTACTS_DESTINATION_PATH 40 + ' -a android.intent.action.VIEW com.google.android.contacts' 41) 42PATH_TO_CONTACTS_VCF_FILE = 'platform_testing/tests/automotive/mobly_tests/utils/contacts_test.vcf' 43 44# Should be kept in sync with BluetoothProfile.java 45BT_PROFILE_CONSTANTS = { 46 'headset': 1, 47 'a2dp': 2, 48 'health': 3, 49 'input_device': 4, 50 'pan': 5, 51 'pbap_server': 6, 52 'gatt': 7, 53 'gatt_server': 8, 54 'map': 9, 55 'sap': 10, 56 'a2dp_sink': 11, 57 'avrcp_controller': 12, 58 'headset_client': 16, 59 'pbap_client': 17, 60 'map_mce': 18, 61} 62 63BLUETOOTH_PROFILE_CONNECTION_STATE_CHANGED = ( 64 'BluetoothProfileConnectionStateChanged' 65) 66 67BT_PROFILE_STATES = { 68 'disconnected': 0, 69 'connecting': 1, 70 'connected': 2, 71 'disconnecting': 3, 72} 73PATH_TO_CONTACTS_VCF_FILE = 'platform_testing/tests/automotive/mobly_tests/utilities/contacts_test.vcf' 74 75PHONE_CONTACTS_DESTINATION_PATH = ( 76 '/data/data/com.google.android.contacts/cache/contacts.vcf' 77) 78 79IMPOST_CONTACTS_SHELL_COMAND = ( 80 'am start-activity -W -t "text/x-vcard" -d file://' 81 + PHONE_CONTACTS_DESTINATION_PATH 82 + ' -a android.intent.action.VIEW com.google.android.contacts' 83) 84 85ONE_SEC = 1