GoogleAccountUtil

public class GoogleAccountUtil
extends Object

java.lang.Object
   ↳ com.google.android.tradefed.util.GoogleAccountUtil


Cihazda Google Hesaplarının yapılandırılmasını destekleyen bir yardımcı program

Özet

Sabitler

String ACCOUNT_PKG_NAME

String UTIL_APK_NAME

Fields'ın oynadığı filmler

public static final String CHECK_INSTRUMENTATION_CMD

Herkese açık oluşturucular

GoogleAccountUtil()

Herkese açık yöntemler

static boolean addAccountAttempt(ITestDevice device, int userId, String accountName, String password, boolean sync, boolean waitForCheckin)

Test edilen cihazı, verilen Google Hesabı ile yapılandırmaya çalışın.

static boolean hasAccount(ITestDevice device, int userId)

Cihazda hesap olup olmadığını kontrol edin.

static boolean installUtil(ITestDevice device)
static boolean installUtil(ITestDevice device, File altApk)

Gerekirse jar dosyasında bulunan hesap yardımcı programı apk'sını yükleyin.

static boolean isAccountUtilInstalled(ITestDevice device)

Hesap yardımcı programının yüklü olup olmadığını kontrol etme

static boolean removeAccountAttempt(ITestDevice device, int userId, String accountName)

Belirtilen tek hesabı kaldırma

static boolean removeAllAccountAttempt(ITestDevice device, int userId)

Cihazdaki tüm hesapları kaldırma

static boolean syncAndOff(ITestDevice device, int userId, String accountName, long syncThenOff)

Belirtilen Google Hesabı ile senkronizasyonu kapatır.

static boolean syncOn(ITestDevice device, int userId, String accountName)

Belirtilen Google Hesabı ile senkronizasyonu etkinleştirir.

static boolean uninstallUtil(ITestDevice device)

Jar dosyasında bulunan hesap yardımcı programı APK'sını kaldırın.

static boolean waitForAccountSync(ITestDevice device, int userId, long interval, long timeout, boolean forceSync)

Cihazın senkronizasyonu tamamlamasını bekleyin.

Sabitler

ACCOUNT_PKG_NAME

public static final String ACCOUNT_PKG_NAME

Sabit Değer: "com.google.android.tradefed.account"

UTIL_APK_NAME

public static final String UTIL_APK_NAME

Sabit Değer: "GoogleAccountUtil"

Fields'ın oynadığı filmler

CHECK_INSTRUMENTATION_CMD

public static final String CHECK_INSTRUMENTATION_CMD

Herkese açık oluşturucular

GoogleAccountUtil

public GoogleAccountUtil ()

Herkese açık yöntemler

addAccountAttempt

public static boolean addAccountAttempt (ITestDevice device, 
                int userId, 
                String accountName, 
                String password, 
                boolean sync, 
                boolean waitForCheckin)

Test edilen cihazı, verilen Google Hesabı ile yapılandırmaya çalışın.

Hesap, sunucuda zaten mevcut olmalıdır.

Birim testi için kullanıma sunuldu.

Parametreler
device ITestDevice: ITestDevice

userId int: Hesabın ekleneceği kullanıcının kimliği

accountName String: Eklenecek Google Hesabı'nın tam adı

password String: Hesap şifresi

sync boolean: Bu hesap için otomatik senkronizasyonun etkinleştirilip etkinleştirilmeyeceği true

waitForCheckin boolean: Hesap eklendikten sonra check-in işleminin tamamlanmasını beklemek için true

İlerlemeler
boolean Hesap başarıyla oluşturulduysa true, aksi takdirde false

Dekoratif yastıklar
DeviceNotAvailableException

hasAccount

public static boolean hasAccount (ITestDevice device, 
                int userId)

Cihazda hesap olup olmadığını kontrol edin.

Parametreler
device ITestDevice: Hesap için ITestDevice işaretlendi

userId int: Kontrol edilecek kullanıcı kimliği

İlerlemeler
boolean

Dekoratif yastıklar
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

installUtil

public static boolean installUtil (ITestDevice device)

Parametreler
device ITestDevice

İlerlemeler
boolean

Dekoratif yastıklar
DeviceNotAvailableException

installUtil

public static boolean installUtil (ITestDevice device, 
                File altApk)

Gerekirse jar dosyasında bulunan hesap yardımcı programı apk'sını yükleyin.

Parametreler
device ITestDevice: yardımcı programın yükleneceği yer.

altApk File

İlerlemeler
boolean

Dekoratif yastıklar
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

isAccountUtilInstalled

public static boolean isAccountUtilInstalled (ITestDevice device)

Hesap yardımcı programının yüklü olup olmadığını kontrol etme

Parametreler
device ITestDevice: Hesap yardımcı programının yüklü olup olmadığını kontrol etmek için

İlerlemeler
boolean

Dekoratif yastıklar
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

removeAccountAttempt

public static boolean removeAccountAttempt (ITestDevice device, 
                int userId, 
                String accountName)

Belirtilen tek hesabı kaldırma

Parametreler
accountName String

İlerlemeler
boolean Kaldırma işlemi başarılıysa doğru, aksi takdirde yanlış.

Dekoratif yastıklar
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

removeAllAccountAttempt

public static boolean removeAllAccountAttempt (ITestDevice device, 
                int userId)

Cihazdaki tüm hesapları kaldırma

İlerlemeler
boolean Kaldırma işlemi başarılıysa doğru, aksi takdirde yanlış.

Dekoratif yastıklar
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

syncAndOff

public static boolean syncAndOff (ITestDevice device, 
                int userId, 
                String accountName, 
                long syncThenOff)

Belirtilen Google Hesabı ile senkronizasyonu kapatır. Senkronizasyonun açık olduğunu varsayın.

Parametreler
device ITestDevice: ITestDevice

userId int: Bu işlemin üzerinde çalıştırılacağı kullanıcının kimliği

accountName String: Senkronizasyonun devre dışı bırakılacağı Google Hesabı'nın tam adı

syncThenOff long: Senkronizasyonun kapatılmadan önce çalışmasına izin verilecek süre (saniye)

İlerlemeler
boolean Senkronizasyon başarıyla kapatıldıysa true

Dekoratif yastıklar
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

syncOn

public static boolean syncOn (ITestDevice device, 
                int userId, 
                String accountName)

Belirtilen Google Hesabı ile senkronizasyonu etkinleştirir. Senkronizasyonun yanlış olduğunu varsayın;

Parametreler
device ITestDevice: ITestDevice

userId int: Bu işlemin üzerinde çalıştırılacağı kullanıcının kimliği

accountName String: Senkronizasyonun etkinleştirileceği Google Hesabı'nın tam adı

İlerlemeler
boolean Senkronizasyon başarıyla kapatıldıysa true

Dekoratif yastıklar
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

uninstallUtil

public static boolean uninstallUtil (ITestDevice device)

Jar dosyasında bulunan hesap yardımcı programı APK'sını kaldırın.

Parametreler
device ITestDevice: Hesap yardımcı programının kaldırılacağı cihaz.

İlerlemeler
boolean

Dekoratif yastıklar
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException

waitForAccountSync

public static boolean waitForAccountSync (ITestDevice device, 
                int userId, 
                long interval, 
                long timeout, 
                boolean forceSync)

Cihazın senkronizasyonu tamamlamasını bekleyin.

Parametreler
device ITestDevice

userId int

interval long

timeout long

forceSync boolean

İlerlemeler
boolean

Dekoratif yastıklar
DeviceNotAvailableException