GoogleAccountPreparer

public class GoogleAccountPreparer
extends WaitForDeviceDatetimePreparer

java.lang.Object
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.WaitForDeviceDatetimePreparer
       ↳ com.google.android.tradefed.targetprep.GoogleAccountPreparer


Một ITargetPreparer hỗ trợ việc định cấu hình tài khoản Google. Nếu bạn không chỉ định tài khoản nào và bật tính năng tạo tài khoản gaia, thì một tài khoản gaia sẽ được tạo và thêm vào thiết bị.

Tóm tắt

Hàm khởi tạo công khai

GoogleAccountPreparer()

Phương thức công khai

void setAccount(String accountName, String accountPassword)

Đặt Tài khoản Google cần tạo.

void setAccountSync(boolean value)

Đặt xem có bật tính năng đồng bộ hoá trên tài khoản hay không

void setSyncThenOff(long syncThenOff)

Đặt xem có bật tính năng đồng bộ hoá trên tài khoản hay không

void setUp(TestInformation testInfo)

void setWaitForCheckin(boolean value)

Đặt xem có chờ quá trình đăng ký hoàn tất sau khi thêm tài khoản hay không

void tearDown(TestInformation testInfo, Throwable e)

Phương thức được bảo vệ

getAccountBlacklist()
String getAccountName()
String getAccountPassword()
int getAccountRangeEnd()
int getAccountRangeStart()
File getCredentialFile()
boolean getUseAccountRange()
JSONObject loadCredentialsFromFile(File file)
void processCredentialFile(IBuildInfo buildInfo)
File resolveRelativeFilePath(IBuildInfo buildInfo, String fileName)
void setCredentialFile(File file)

Hàm khởi tạo công khai

GoogleAccountPreparer

public GoogleAccountPreparer ()

Phương thức công khai

setAccount

public void setAccount (String accountName, 
                String accountPassword)

Đặt Tài khoản Google cần tạo.

Tham số
accountName String

accountPassword String

setAccountSync

public void setAccountSync (boolean value)

Đặt xem có bật tính năng đồng bộ hoá trên tài khoản hay không

Tham số
value boolean

setSyncThenOff

public void setSyncThenOff (long syncThenOff)

Đặt xem có bật tính năng đồng bộ hoá trên tài khoản hay không

Tham số
syncThenOff long

setUp

public void setUp (TestInformation testInfo)

Tham số
testInfo TestInformation

Gửi
BuildError
DeviceNotAvailableException
TargetSetupError

setWaitForCheckin

public void setWaitForCheckin (boolean value)

Đặt xem có chờ quá trình đăng ký hoàn tất sau khi thêm tài khoản hay không

Tham số
value boolean

tearDown

public void tearDown (TestInformation testInfo, 
                Throwable e)

Tham số
testInfo TestInformation

e Throwable

Gửi
DeviceNotAvailableException

Phương thức được bảo vệ

getAccountBlacklist

protected  getAccountBlacklist ()

Giá trị trả về

getAccountName

protected String getAccountName ()

Giá trị trả về
String

getAccountPassword

protected String getAccountPassword ()

Giá trị trả về
String

getAccountRangeEnd

protected int getAccountRangeEnd ()

Giá trị trả về
int

getAccountRangeStart

protected int getAccountRangeStart ()

Giá trị trả về
int

getCredentialFile

protected File getCredentialFile ()

Giá trị trả về
File

getUseAccountRange

protected boolean getUseAccountRange ()

Giá trị trả về
boolean

loadCredentialsFromFile

protected JSONObject loadCredentialsFromFile (File file)

Tham số
file File

Giá trị trả về
JSONObject

Gửi
TargetSetupError

processCredentialFile

protected void processCredentialFile (IBuildInfo buildInfo)

Tham số
buildInfo IBuildInfo

Gửi
TargetSetupError

resolveRelativeFilePath

protected File resolveRelativeFilePath (IBuildInfo buildInfo, 
                String fileName)

Tham số
buildInfo IBuildInfo

fileName String

Giá trị trả về
File

Gửi
TargetSetupError

setCredentialFile

protected void setCredentialFile (File file)

Tham số
file File