Sl4a블루투스유틸

public class Sl4aBluetoothUtil
extends Object

java.lang.객체
com.android.tradefed.util.Sl4aBluetoothUtil


유틸리티 클래스는 SL4A를 사용하여 하나 또는 두 개의 장치에서 Bluetooth 작업을 제공합니다.

요약

공개 생성자

Sl4aBluetoothUtil ()

공개 방법

boolean changeProfileAccessPermission ( ITestDevice primary, ITestDevice secondary, Sl4aBluetoothUtil.BluetoothProfile profile, Sl4aBluetoothUtil.BluetoothAccessLevel access)

보조 장치가 지정된 프로필의 기본 장치에 액세스할 수 있도록 기본 장치에서 보조 장치의 Bluetooth 프로필 액세스 권한을 변경합니다.

boolean connect ( ITestDevice primary, ITestDevice secondary, profiles) connect ( ITestDevice primary, ITestDevice secondary, profiles)

지정된 Bluetooth 프로필에서 기본 장치를 보조 장치에 연결

boolean disable ( ITestDevice device)

대상 장치에서 Bluetooth 비활성화

boolean disableBluetoothSnoopLog ( ITestDevice device)

블루투스 스눕 로그 비활성화

boolean disconnect ( ITestDevice primary, ITestDevice secondary, profiles) disconnect ( ITestDevice primary, ITestDevice secondary, profiles)

보조 장치에서 기본 장치 연결 해제

boolean enable ( ITestDevice device)

대상 장치에서 Bluetooth 활성화

boolean enableBluetoothSnoopLog ( ITestDevice device)

블루투스 스눕 로그 활성화

String getAddress ( ITestDevice device)

대상 장치의 Bluetooth MAC 주소 가져오기

getBondedDevices ( ITestDevice device)

대상 장치에서 본딩(페어링)된 장치의 Bluetooth MAC 주소 세트 가져오기

boolean pair ( ITestDevice primary, ITestDevice secondary)

기본 장치를 보조 장치에 페어링

void setBtConnectionTimeout (Duration timeout)
void setBtPairTimeout (Duration timeout)
boolean setProfilePriority ( ITestDevice primary, ITestDevice secondary, profiles, Sl4aBluetoothUtil.BluetoothPriorityLevel priority) setProfilePriority ( ITestDevice primary, ITestDevice secondary, profiles, Sl4aBluetoothUtil.BluetoothPriorityLevel priority)

기본 장치에서 지정된 프로필의 우선 순위 설정을 보조 장치로 변경

void startSl4a ( ITestDevice device, File sl4aApkFile)

지정된 장치 및 SL4A apk 파일로 SL4A 클라이언트를 명시적으로 시작합니다.

void stopSl4a ()

이미 열려 있는 SL4A 클라이언트를 중지합니다.

boolean unpairAll ( ITestDevice device)

현재 장치에 대해 페어링된 모든 장치의 페어링 해제

보호된 메서드

void finalize ()

모든 SL4A 연결 정리

공개 생성자

Sl4a블루투스유틸

public Sl4aBluetoothUtil ()

공개 방법

changeProfileAccessPermission

public boolean changeProfileAccessPermission (ITestDevice primary, 
                ITestDevice secondary, 
                Sl4aBluetoothUtil.BluetoothProfile profile, 
                Sl4aBluetoothUtil.BluetoothAccessLevel access)

보조 장치가 지정된 프로필의 기본 장치에 액세스할 수 있도록 기본 장치에서 보조 장치의 Bluetooth 프로필 액세스 권한을 변경합니다.

매개변수
primary ITestDevice : 권한을 변경할 장치

secondary ITestDevice : 주어진 프로필의 기본 장치에 액세스하는 장치

profile Sl4aBluetoothUtil.BluetoothProfile : 액세스할 블루투스 프로필

access Sl4aBluetoothUtil.BluetoothAccessLevel : 액세스 수준, BluetoothAccessLevel 참조

보고
boolean 권한이 성공적으로 변경된 경우 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

연결하다

public boolean connect (ITestDevice primary, 
                ITestDevice secondary, 
                 profiles)

지정된 Bluetooth 프로필에서 기본 장치를 보조 장치에 연결

매개변수
primary ITestDevice : 연결할 장치

secondary ITestDevice : 연결할 장치

profiles : 연결하려면 블루투스 프로필 세트가 필요합니다.

보고
boolean 연결에 성공하면 참

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

장애를 입히다

public boolean disable (ITestDevice device)

대상 장치에서 Bluetooth 비활성화

매개변수
device ITestDevice : 대상 장치

보고
boolean Bluetooth가 성공적으로 비활성화된 경우 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

disableBluetoothSnoopLog

public boolean disableBluetoothSnoopLog (ITestDevice device)

블루투스 스눕 로그 비활성화

매개변수
device ITestDevice : snoop 로그 비활성화

보고
boolean 성공적으로 비활성화된 경우 참

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

연결을 끊다

public boolean disconnect (ITestDevice primary, 
                ITestDevice secondary, 
                 profiles)

보조 장치에서 기본 장치 연결 해제

매개변수
primary ITestDevice : 연결 해제 작업을 수행할 장치

secondary ITestDevice : 연결 해제할 장치

profiles : 연결을 끊는 데 필요한 Bluetooth 프로필 세트 제공

보고
boolean 성공적으로 연결이 끊긴 경우 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

~할 수 있게 하다

public boolean enable (ITestDevice device)

대상 장치에서 Bluetooth 활성화

매개변수
device ITestDevice : 대상 장치

보고
boolean Bluetooth가 성공적으로 활성화된 경우 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

enableBluetoothSnoopLog

public boolean enableBluetoothSnoopLog (ITestDevice device)

블루투스 스눕 로그 활성화

매개변수
device ITestDevice : snoop 로그 활성화

보고
boolean 성공적으로 활성화된 경우 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

getAddress

public String getAddress (ITestDevice device)

대상 장치의 Bluetooth MAC 주소 가져오기

매개변수
device ITestDevice : 대상 장치

보고
String MAC 주소 문자열

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

getBondedDevices

public  getBondedDevices (ITestDevice device)

대상 장치에서 본딩(페어링)된 장치의 Bluetooth MAC 주소 세트 가져오기

매개변수
device ITestDevice : 대상 장치

보고
Bluetooth MAC 주소 세트

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

public boolean pair (ITestDevice primary, 
                ITestDevice secondary)

기본 장치를 보조 장치에 페어링

매개변수
primary ITestDevice : 페어링할 장치

secondary ITestDevice : 페어링할 장치

보고
boolean 페어링에 성공하면 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

setBtConnectionTimeout

public void setBtConnectionTimeout (Duration timeout)

매개변수
timeout Duration

setBtPairTimeout

public void setBtPairTimeout (Duration timeout)

매개변수
timeout Duration

setProfilePriority

public boolean setProfilePriority (ITestDevice primary, 
                ITestDevice secondary, 
                 profiles, 
                Sl4aBluetoothUtil.BluetoothPriorityLevel priority)

기본 장치에서 지정된 프로필의 우선 순위 설정을 보조 장치로 변경

매개변수
primary ITestDevice : 우선 순위를 설정할 장치

secondary ITestDevice : 우선 순위를 설정할 장치

profiles : 우선 순위 설정을 변경하는 블루투스 프로필

priority Sl4aBluetoothUtil.BluetoothPriorityLevel : 우선 순위 수준

보고
boolean 우선 순위가 성공적으로 설정된 경우 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

시작Sl4a

public void startSl4a (ITestDevice device, 
                File sl4aApkFile)

지정된 장치 및 SL4A apk 파일로 SL4A 클라이언트를 명시적으로 시작합니다. SL4A 연결은 항상 실제 작업 전에 설정되기 때문에 일반적으로 이 방법은 필요하지 않습니다.

매개변수
device ITestDevice : SL4A를 사용하여 연결할 장치

sl4aApkFile File : 설치 및 사용할 선택적 SL4A apk.

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

중지Sl4a

public void stopSl4a ()

이미 열려 있는 SL4A 클라이언트를 중지합니다. 기본적으로 더 이상 사용하지 않는 클라이언트를 즉시 정리하는 방법을 제공합니다.

unpairAll

public boolean unpairAll (ITestDevice device)

현재 장치에 대해 페어링된 모든 장치의 페어링 해제

매개변수
device ITestDevice : 작업을 수행할 현재 장치

보고
boolean 성공적으로 페어링 해제된 경우 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

보호된 메서드

마무리하다

protected void finalize ()

모든 SL4A 연결 정리

,

Sl4a블루투스유틸

public class Sl4aBluetoothUtil
extends Object

java.lang.객체
com.android.tradefed.util.Sl4aBluetoothUtil


유틸리티 클래스는 SL4A를 사용하여 하나 또는 두 개의 장치에서 Bluetooth 작업을 제공합니다.

요약

공개 생성자

Sl4aBluetoothUtil ()

공개 방법

boolean changeProfileAccessPermission ( ITestDevice primary, ITestDevice secondary, Sl4aBluetoothUtil.BluetoothProfile profile, Sl4aBluetoothUtil.BluetoothAccessLevel access)

보조 장치가 지정된 프로필의 기본 장치에 액세스할 수 있도록 기본 장치에서 보조 장치의 Bluetooth 프로필 액세스 권한을 변경합니다.

boolean connect ( ITestDevice primary, ITestDevice secondary, profiles) connect ( ITestDevice primary, ITestDevice secondary, profiles)

지정된 Bluetooth 프로필에서 기본 장치를 보조 장치에 연결

boolean disable ( ITestDevice device)

대상 장치에서 Bluetooth 비활성화

boolean disableBluetoothSnoopLog ( ITestDevice device)

블루투스 스눕 로그 비활성화

boolean disconnect ( ITestDevice primary, ITestDevice secondary, profiles) disconnect ( ITestDevice primary, ITestDevice secondary, profiles)

보조 장치에서 기본 장치 연결 해제

boolean enable ( ITestDevice device)

대상 장치에서 Bluetooth 활성화

boolean enableBluetoothSnoopLog ( ITestDevice device)

블루투스 스눕 로그 활성화

String getAddress ( ITestDevice device)

대상 장치의 Bluetooth MAC 주소 가져오기

getBondedDevices ( ITestDevice device)

대상 장치에서 본딩(페어링)된 장치의 Bluetooth MAC 주소 세트 가져오기

boolean pair ( ITestDevice primary, ITestDevice secondary)

기본 장치를 보조 장치에 페어링

void setBtConnectionTimeout (Duration timeout)
void setBtPairTimeout (Duration timeout)
boolean setProfilePriority ( ITestDevice primary, ITestDevice secondary, profiles, Sl4aBluetoothUtil.BluetoothPriorityLevel priority) setProfilePriority ( ITestDevice primary, ITestDevice secondary, profiles, Sl4aBluetoothUtil.BluetoothPriorityLevel priority)

기본 장치에서 지정된 프로필의 우선 순위 설정을 보조 장치로 변경

void startSl4a ( ITestDevice device, File sl4aApkFile)

지정된 장치 및 SL4A apk 파일로 SL4A 클라이언트를 명시적으로 시작합니다.

void stopSl4a ()

이미 열려 있는 SL4A 클라이언트를 중지합니다.

boolean unpairAll ( ITestDevice device)

현재 장치에 대해 페어링된 모든 장치의 페어링 해제

보호된 메서드

void finalize ()

모든 SL4A 연결 정리

공개 생성자

Sl4a블루투스유틸

public Sl4aBluetoothUtil ()

공개 방법

changeProfileAccessPermission

public boolean changeProfileAccessPermission (ITestDevice primary, 
                ITestDevice secondary, 
                Sl4aBluetoothUtil.BluetoothProfile profile, 
                Sl4aBluetoothUtil.BluetoothAccessLevel access)

보조 장치가 지정된 프로필의 기본 장치에 액세스할 수 있도록 기본 장치에서 보조 장치의 Bluetooth 프로필 액세스 권한을 변경합니다.

매개변수
primary ITestDevice : 권한을 변경할 장치

secondary ITestDevice : 주어진 프로필의 기본 장치에 액세스하는 장치

profile Sl4aBluetoothUtil.BluetoothProfile : 액세스할 블루투스 프로필

access Sl4aBluetoothUtil.BluetoothAccessLevel : 액세스 수준, BluetoothAccessLevel 참조

보고
boolean 권한이 성공적으로 변경된 경우 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

연결하다

public boolean connect (ITestDevice primary, 
                ITestDevice secondary, 
                 profiles)

지정된 Bluetooth 프로필에서 기본 장치를 보조 장치에 연결

매개변수
primary ITestDevice : 연결할 장치

secondary ITestDevice : 연결할 장치

profiles : 연결하려면 블루투스 프로필 세트가 필요합니다.

보고
boolean 연결에 성공하면 참

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

장애를 입히다

public boolean disable (ITestDevice device)

대상 장치에서 Bluetooth 비활성화

매개변수
device ITestDevice : 대상 장치

보고
boolean Bluetooth가 성공적으로 비활성화된 경우 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

disableBluetoothSnoopLog

public boolean disableBluetoothSnoopLog (ITestDevice device)

블루투스 스눕 로그 비활성화

매개변수
device ITestDevice : snoop 로그 비활성화

보고
boolean 성공적으로 비활성화된 경우 참

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

연결을 끊다

public boolean disconnect (ITestDevice primary, 
                ITestDevice secondary, 
                 profiles)

보조 장치에서 기본 장치 연결 해제

매개변수
primary ITestDevice : 연결 해제 작업을 수행할 장치

secondary ITestDevice : 연결 해제할 장치

profiles : 연결을 끊는 데 필요한 Bluetooth 프로필 세트 제공

보고
boolean 성공적으로 연결이 끊긴 경우 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

~할 수 있게 하다

public boolean enable (ITestDevice device)

대상 장치에서 Bluetooth 활성화

매개변수
device ITestDevice : 대상 장치

보고
boolean Bluetooth가 성공적으로 활성화된 경우 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

enableBluetoothSnoopLog

public boolean enableBluetoothSnoopLog (ITestDevice device)

블루투스 스눕 로그 활성화

매개변수
device ITestDevice : snoop 로그 활성화

보고
boolean 성공적으로 활성화된 경우 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

getAddress

public String getAddress (ITestDevice device)

대상 장치의 Bluetooth MAC 주소 가져오기

매개변수
device ITestDevice : 대상 장치

보고
String MAC 주소 문자열

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

getBondedDevices

public  getBondedDevices (ITestDevice device)

대상 장치에서 본딩(페어링)된 장치의 Bluetooth MAC 주소 세트 가져오기

매개변수
device ITestDevice : 대상 장치

보고
Bluetooth MAC 주소 세트

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

public boolean pair (ITestDevice primary, 
                ITestDevice secondary)

기본 장치를 보조 장치에 페어링

매개변수
primary ITestDevice : 페어링할 장치

secondary ITestDevice : 페어링할 장치

보고
boolean 페어링에 성공하면 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

setBtConnectionTimeout

public void setBtConnectionTimeout (Duration timeout)

매개변수
timeout Duration

setBtPairTimeout

public void setBtPairTimeout (Duration timeout)

매개변수
timeout Duration

setProfilePriority

public boolean setProfilePriority (ITestDevice primary, 
                ITestDevice secondary, 
                 profiles, 
                Sl4aBluetoothUtil.BluetoothPriorityLevel priority)

기본 장치에서 지정된 프로필의 우선 순위 설정을 보조 장치로 변경

매개변수
primary ITestDevice : 우선 순위를 설정할 장치

secondary ITestDevice : 우선 순위를 설정할 장치

profiles : 우선 순위 설정을 변경하는 블루투스 프로필

priority Sl4aBluetoothUtil.BluetoothPriorityLevel : 우선 순위 수준

보고
boolean 우선 순위가 성공적으로 설정된 경우 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

시작Sl4a

public void startSl4a (ITestDevice device, 
                File sl4aApkFile)

지정된 장치 및 SL4A apk 파일로 SL4A 클라이언트를 명시적으로 시작합니다. SL4A 연결은 항상 실제 작업 전에 설정되기 때문에 일반적으로 이 방법은 필요하지 않습니다.

매개변수
device ITestDevice : SL4A를 사용하여 연결할 장치

sl4aApkFile File : 설치 및 사용할 선택적 SL4A apk.

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

중지Sl4a

public void stopSl4a ()

이미 열려 있는 SL4A 클라이언트를 중지합니다. 기본적으로 더 이상 사용하지 않는 클라이언트를 즉시 정리하는 방법을 제공합니다.

unpairAll

public boolean unpairAll (ITestDevice device)

현재 장치에 대해 페어링된 모든 장치의 페어링 해제

매개변수
device ITestDevice : 작업을 수행할 현재 장치

보고
boolean 성공적으로 페어링 해제된 경우 true

던지기
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

보호된 메서드

마무리하다

protected void finalize ()

모든 SL4A 연결 정리