def __init__(self, phone): """ Constructor. """ BaseV2.__init__(self, phone) ISipCall.__init__(self, phone) self._logger = phone.get_logger() # self._phone_system = PhoneSystem(phone) self._call_setup_timeout = phone.get_call_setup_timeout() self._sipcall_module = "acscmd.telephony.sipcall.SipCallModule" # pylint: disable=E1101 self._sip_state = { "deregistering": SIP_CALL_STATE.DEREGISTERING, "in_call": SIP_CALL_STATE.IN_CALL, "incoming_call": SIP_CALL_STATE.INCOMING_CALL, "incoming_call_answering": SIP_CALL_STATE.INCOMING_CALL_ANSWERING, "not_defined": SIP_CALL_STATE.NOT_DEFINED, "outgoing_call": SIP_CALL_STATE.OUTGOING_CALL, "outgoing_call_canceling": SIP_CALL_STATE.OUTGOING_CALL_CANCELING, "outgoing_call_ring_back": SIP_CALL_STATE.OUTGOING_CALL_RING_BACK, "pinging": SIP_CALL_STATE.PINGING, "ready_to_call": SIP_CALL_STATE.READY_TO_CALL, "registering": SIP_CALL_STATE.REGISTERING}
def __init__(self, device): """ Constructor """ BaseV2.__init__(self, device) IMultimedia.__init__(self, device) self._system = device.get_uecmd("System") self._app_api = device.get_uecmd("AppMgmt") # Get path to multimedia files self._multimedia_path = device.multimedia_path # Initialize common intents self.android_action_view = "android.intent.action.VIEW" self.video_package = "com.android.gallery3d" self.audio_package = "com.android.music" self.video_component = self.video_package + "/.app.MovieActivity" self.audio_component = self.audio_package + "/.AudioPreview" self.gallery_component = self.video_package + "/.app.Gallery" self.__display_image_gallery3d_module = "acscmd.multimedia.ImageDisplayModuleActivity" self._target_class = "acscmd.multimedia.MediaModule" self.__image_api = self._device.get_uecmd("Image") # Instantiate Display UECmd for display self.__display = self._device.get_uecmd("Display")
def __init__(self, device): """ Constructor """ BaseV2.__init__(self, device) IPyUiAutomator.__init__(self, device) self.d = Device(device.retrieve_serial_number())
def __init__(self, phone): """ Constructor. """ BaseV2.__init__(self, phone) IVideoCallSkype.__init__(self, phone) self._logger = phone.get_logger() self._phone_system = PhoneSystem(phone) phone_resolution = self._phone_system.get_screen_resolution() y_resolution = phone_resolution.split('x', 1)[0] if y_resolution == '720': # Skype vertical_resolution command dictionary for the 720p" display self.touchCmds = VideoCallSkype.touchCmds_720P elif y_resolution == '1080': # Skype touch command dictionary for the 1080p display self.touchCmds = VideoCallSkype.touchCmds_1080P elif y_resolution == '1600': # Skype vertical_resolution command dictionary for the 720p" display self.touchCmds = VideoCallSkype.touchCmds_25x16 else: self._logger.error( 'No supported display resolution {0}'.format(y_resolution))
def __init__(self, device): """ Constructor. """ BaseV2.__init__(self, device) IAppMgmt.__init__(self, device) self._logger = device.get_logger()
def __init__(self, device): """ Constructor """ BaseV2.__init__(self, device) IAudioRecorderHost.__init__(self, device) self.pc_recorder = None
def __init__(self, device): """ Constructor """ BaseV2.__init__(self, device) IAudioHost.__init__(self, device) self.pc_hostplayer = None
def __init__(self, device): """ Constructor """ BaseV2.__init__(self, device) IVideoRecorder.__init__(self, device) self.__camera_packages = self.camera_packages
def __init__(self, device): """ Constructor """ BaseV2.__init__(self, device) IAudioRecorder.__init__(self, device) self._target_recorder_class = 'acscmd.audio.AudioRecorderModule' self._multimedia_path = device.multimedia_path
def __init__(self, device): """ Constructor """ BaseV2.__init__(self, device) self._logger = device.get_logger() self._p2psupplicant_ongoing = False self._wpa_supp_checked = False
def __init__(self, device): """ Constructor. """ BaseV2.__init__(self, device) ISmsMessaging.__init__(self, device) self._logger = device.get_logger() self._sms_module = "acscmd.telephony.messaging.SmsModule"
def __init__(self, device): """ Constructor """ BaseV2.__init__(self, device) # related to PSI recorder self.psi_recorder_audio_component = "com.intel.psi_recorder/com.intel.psi_recorder.PSI_Recorder" self.psi_recorder_command_receiver = "com.intel.psi_recorder.PSI_CommandReceiver"
def __init__(self, device): """ Initializes this instance. Nothing to be done in interface. """ BaseV2.__init__(self, device) ISimCard.__init__(self, device) self._logger = device.get_logger() self.__module_name = "acscmd.telephony.SimCardModule"
def __init__(self, device): """ Constructor """ BaseV2.__init__(self, device) IVideo.__init__(self, device) self._target_video_class = 'acscmd.multimedia.VideoModuleActivity' self._multimedia_path = device.multimedia_path self._native_player = None
def __init__(self, device): """ Constructor. """ BaseV2.__init__(self, device) ICellBroadcastMessaging.__init__(self, device) self._logger = device.get_logger() self.component = "com.intel.acs.agent/.CellBroadcastMessaging" self.iaction = "intel.intents.action.CB_SMS" self._module = "acscmd.telephony.messaging.SmsCbModule"
def __init__(self, device): """ Constructor """ BaseV2.__init__(self, device) # ILocalization.__init__(self, device) self._logger = device.get_logger() self._uecmd_default_timeout = device.get_uecmd_timeout() self._gps_module = "acscmd.location.GpsModule"
def __init__(self, device): """ Constructor. """ BaseV2.__init__(self, device) ISensor.__init__(self, device) self._logger = device.get_logger() self._target_class = "acscmd.sensor.SensorInfoModule"
def __init__(self, device): """ Constructor. """ BaseV2.__init__(self, device) IFile.__init__(self, device) self._logger = device.get_logger() self._phone_system = device.get_uecmd("PhoneSystem") # this is a folder where script in cos or mos could be stored self.__sysfs_folder = "/data/"
def __init__(self, device): """ Constructor """ BaseV2.__init__(self, device) IFtp.__init__(self, device) self._logger = device.get_logger() self._phone_system = device.get_uecmd("PhoneSystem") self.__file_uecmds = device.get_uecmd("File") self.ftp_module = "acscmd.transfer.FtpModule" self.ftp_threaded_module = "acscmd.transfer.FtpThreadedModule"
def __init__(self, device): """ Initializes this instance. Nothing to be done in abstract class. :type device: DeviceBase :param device: The DUT """ BaseV2.__init__(self, device) IContacts.__init__(self, device) self.__contacts_module = "acscmd.contacts.ContactsModule"
def __init__(self, device): """ Initializes this instance. Nothing to be done in abstract class. :type device: DeviceBase :param device: The DUT """ BaseV2.__init__(self, device) IDisplay.__init__(self, device) self.__rotation_module = "acscmd.display.RotationModule" self.__display_module = "acscmd.display.DisplayModule"
def __init__(self, device): """ Constructor. """ BaseV2.__init__(self, device) IAplog.__init__(self, device) self._logger = device.get_logger() # Get system module to get hardware specific config self._system_module = self._device.get_device_module("SystemModule") self._system_module.init() self._aplog_folder = self._system_module.system_properties.aplog_folder self.PUPDR_SHUTDOWN_REASON = self._system_module.system_properties.PUPDR_SHUTDOWN_REASON self.PUPDR_MISC_TAG = self._system_module.system_properties.PUPDR_MISC_TAG self.EM_TAG = self._system_module.system_properties.EM_TAG self.THERMAL_TAG = self._system_module.system_properties.THERMAL_TAG
def __init__(self, phone): """ Constructor. """ BaseV2.__init__(self, phone) IVoiceCall.__init__(self, phone) self._logger = phone.get_logger() self._phone_system = PhoneSystem(phone) self._call_setup_timeout = phone.get_call_setup_timeout() self.component = "com.intel.acs.agent/.VoiceCall" # pylint: disable=E1101 self._vc_state = { "no_call": VOICE_CALL_STATE.NOCALL, "ringing": VOICE_CALL_STATE.INCOMING, "active": VOICE_CALL_STATE.ACTIVE} # pylint: disable=E1101 self._audio_state = { "invalid": AUDIO_STATE.INVALID, "current": AUDIO_STATE.CURRENT, "in_call": AUDIO_STATE.IN_CALL, "in_sip_call": AUDIO_STATE.IN_COMMUNICATION, "no_call": AUDIO_STATE.NORMAL, "ringing": AUDIO_STATE.RINGTONE} # pylint: enable=E1101 self.KEYCODE_DIAL_PAD = {"0": "7", "1": "8", "2": "9", "3": "10", "4": "11", "5": "12", "6": "13", "7": "14", "8": "15", "9": "16", "*": "17", "#": "18"} self._ir94_extras = { "IR94_AUDIO": 0, "IR94_RX": 1, "IR94_TX": 2, "IR94_BIDIRECTIONAL": 3} self._voicecall_module = "acscmd.telephony.voicecall.VoiceCallModule" self._audio_module = "acscmd.audio.AudioOutputModule" self._callcommand_module = "acscmd.telephony.TelephonyModule"
def __init__(self, device): """ Constructor """ IModem.__init__(self, device) BaseV2.__init__(self, device) self._logger = device.get_logger() self._call_setup_timeout = device.get_call_setup_timeout() # Use device getter to ensure usage of inheritance of variables and methods self._phone_system = device.get_uecmd("PhoneSystem") self._networking = Networking(device) self.icategory = "intel.intents.category.MODEM" self.component = "com.intel.acs.agent/.Modem" self.__telephony_module = "acscmd.telephony.TelephonyModule" self._bplog_location = None
def __init__(self, device): """ Constructor """ BaseV2.__init__(self, device) self._p2pclient_ongoing = False self._wpa_cli_checked = False self._p2p_interface = "" self._cli_process = None self._cli_queue = None self._old_reg = "" self.init()
def __init__(self, device): """ Constructor """ BaseV2.__init__(self, device) ICamera.__init__(self, device) self._logger = device.get_logger() self._camera_module = "acscmd.multimedia.CameraModuleActivity" self.camera_package = "com.android.camera2" self.camera_component = "com.android.camera.CameraLauncher" self._keyevent_api = self._device.get_uecmd("KeyEvent") self._phone_system = self._device.get_uecmd("PhoneSystem") phone_resolution = self._phone_system.get_screen_resolution() self.disp_width = phone_resolution.split('x', 1)[0] self.disp_height = phone_resolution.split('x', 1)[1] self.touchCmds = None if self.disp_width == '720': self.touchCmds = Camera.touchCmds_720P elif self.disp_width == '1080': self.touchCmds = Camera.touchCmds_1080P elif self.disp_width == '2560': self.touchCmds = Camera.touchCmds_25x16 elif self.disp_width == '1200': self._logger.info( 'touch commands for display resolution {0} are included in device model and will be setup in camera API camera_app_setup.' .format(self.disp_width)) else: self._logger.error( 'Camera API: Display resolution {0} is not supported. Some UECmds might not work.' .format(self.disp_width)) self.backup_dir = None self.device_save_directory = None self.error_dir = None self.device_save_directory = None self.camera_app = None #Legacy attributes self.__flash_mode = None self.__screen_mode = None self.__camera_name = None self.__camera_started = 0
def __init__(self, device): """ Constructor. """ BaseV2.__init__(self, device) IMmsMessaging.__init__(self, device) self._logger = device.get_logger() self._mms_module = "acscmd.telephony.messaging.MmsModule" #Instanting Phone System API self._phonesystem_api = self._device.get_uecmd("PhoneSystem") self.phone_time = 0 self.time_to_send_mms = 0 self.start_date = 0 self.sent_thread_id = 0 self.sent_msg_id = 0 self.received_thread_id = 0 self.received_msg_id = 0
def __init__(self, device): """ Constructor """ BaseV2.__init__(self, device) self.audio_arch = 'VOID' self.version = 'VOID' self.product = 'VOID' self.device = 'VOID' self.algoID = 'VOID' self._logger = device.get_logger() self.module_nbr = 0 self.module_name = [] for each in range(NBR_MAX_MODULE): self.module_name.append(str) self.module_path = [] for each in range(NBR_MAX_MODULE): self.module_path.append(str) self.module_path[each] = 'VOID' self.module_enable_value = [] for each in range(NBR_MAX_MODULE): self.module_enable_value.append(str) self.module_disable_value = [] for each in range(NBR_MAX_MODULE): self.module_disable_value.append(str) self.is_scalpe_platform = False self.module_cmd_enable = [] for each in range(NBR_MAX_MODULE): self.module_cmd_enable.append(str) self.module_cmd_enable[each] = 'VOID' self.module_cmd_disable = [] for each in range(NBR_MAX_MODULE): self.module_cmd_disable.append(str) self.module_cmd_disable[each] = 'VOID' self.is_loaded_algo = False
def __init__(self, device): BaseV2.__init__(self, device) self._camera_pkg = self._device.get_config("CameraPackageName", "").lower() self._logger.debug("%s camera requested" % self._camera_pkg)
def __init__(self, device): """ Constructor """ BaseV2.__init__(self, device) IImage.__init__(self, device)