InstallApexModuleTargetPrer

public class InstallApexModuleTargetPreparer
extends SuiteApkInstaller

java.lang.Object
com.android.tradefed.targetprep.BaseTarget रीमार्केटिंग
  com.android.tradefed.targetprep.TestAppInstallSetup
    com.android.tradefed.targetprep.suite.SuiteApkInstaller
      com.android.tradefed.targetprep.InstallApexModuleTarget रीमार्केटिंग


खास जानकारी

फ़ील्ड्स की फ़िल्में

protected static final String APEX_SUFFIX

protected static final String APK_SUFFIX

protected static final String SPLIT_APKS_SUFFIX

सार्वजनिक कंस्ट्रक्टर

InstallApexModuleTargetPreparer()

सार्वजनिक तरीके

getModulesToInstall(TestInformation testInfo)

यह डिवाइस.

void setIgnoreIfNotPreloaded(boolean skip)
void setSkipApexTearDown(boolean skip)
void setUp(TestInformation testInfo)

void tearDown(TestInformation testInfo, Throwable e)

सुरक्षित तरीके

void addApksToTestFiles()
collectApexInfoFromApexModules( testAppFileNames, TestInformation testInfo)

ऐक्टिवेशन की जांच के लिए, एपेक्स मॉड्यूल से एपेक्स जानकारी इकट्ठा करता है.

boolean containsPersistentApk( testAppFileNames, TestInformation testInfo)

यह जांचता है कि इनपुट फ़ाइलों में कोई स्थायी APK है या नहीं.

getApkInstalled()
String getBundletoolFileName()
BundletoolUtil getBundletoolUtil()
String getModuleKeywordFromApexPackageName(String packageName)

कीवर्ड पाता है (उदाहरण के लिए, 'tzdata' com.android.tzdata.apex) फ़ाइल को खोलें.

getModulesFailToActivate( activatedApexes)

वे मॉड्यूल पाएं जो चालू नहीं हो पाए.

getSplitsForApks(TestInformation testInfo, File moduleFile)

बताए गए apk के लिए, एक्सट्रैक्ट और रिटर्न स्प्लिट.

void initBundletoolUtil(TestInformation testInfo)

इस क्लास के लिए बंडलटूल इस्तेमाल शुरू करता है.

void installTrain(TestInformation testInfo, moduleFilenames, String[] extraArgs)

डिवाइस पर एपेक्स वाली मेनलाइन ट्रेन इंस्टॉल करने की कोशिश की जाती है.

void installUsingBundleTool(TestInformation testInfo, testAppFileNames)

बंडलटूल का इस्तेमाल करके मेनलाइन मॉड्यूल इंस्टॉल करने की कोशिश करता है.

void installer(TestInformation testInfo, testAppFileNames)

डिवाइस पर कोई पैकेज या स्प्लिट पैकेज इंस्टॉल करने की कोशिश करें.

boolean isPersistentApk(File filename, TestInformation testInfo)

यह जांचता है कि क्या कोई apk एक स्थायी APK है.

ITestDevice.ApexInfo retrieveApexInfo(File testApexFile, DeviceDescriptor deviceDescriptor)

यह ApexInfo फ़ेच करता है, जिसमें दी गई एपेक्स फ़ाइल से PackageName और versionCode होता है.

फ़ील्ड्स की फ़िल्में

एपीईएक्स_समस्या

protected static final String APEX_SUFFIX

APK_ टॉप

protected static final String APK_SUFFIX

SPLIT_APKS_ पैरामीटर

protected static final String SPLIT_APKS_SUFFIX

सार्वजनिक कंस्ट्रक्टर

InstallApexModuleTargetPrer

public InstallApexModuleTargetPreparer ()

सार्वजनिक तरीके

getModulesToInstall

public  getModulesToInstall (TestInformation testInfo)

यह डिवाइस. जो मॉड्यूल पहले से लोड नहीं हैं उन्हें इंस्टॉल नहीं किया जाएगा.

पैरामीटर
testInfo TestInformation: TestInformation

रिटर्न
उन मॉड्यूल की सूची जिन्हें डिवाइस पर इंस्टॉल किया जाना चाहिए.

थ्रो
DeviceNotAvailableException जब डिवाइस उपलब्ध न हो.
TargetSetupError जब ज़रूरी मॉड्यूल इंस्टॉल न किए गए हों या मॉड्यूल मौजूद न हो इंस्टॉल किया गया.

setignoreIfNotPreloading

public void setIgnoreIfNotPreloaded (boolean skip)

पैरामीटर
skip boolean

सेट करेंस्किप ApexTearDown

public void setSkipApexTearDown (boolean skip)

पैरामीटर
skip boolean

सेट अप

public void setUp (TestInformation testInfo)

पैरामीटर
testInfo TestInformation

थ्रो
BuildError
DeviceNotAvailableException
TargetSetupError

टियरडाउन

public void tearDown (TestInformation testInfo, 
                Throwable e)

पैरामीटर
testInfo TestInformation

e Throwable

थ्रो
DeviceNotAvailableException

सुरक्षित तरीके

addApksToTestFiles

protected void addApksToTestFiles ()

संग्रहApexInfoFromApexModules

protected  collectApexInfoFromApexModules ( testAppFileNames, 
                TestInformation testInfo)

ऐक्टिवेशन की जांच के लिए, एपेक्स मॉड्यूल से एपेक्स जानकारी इकट्ठा करता है.

पैरामीटर
testAppFileNames : इंस्टॉल किए जाने वाले मॉड्यूल के फ़ाइल नामों की सूची

testInfo TestInformation: TestInformation

रिटर्न
ऐसी सूची जिसमें इनपुट फ़ाइल सूचियों में एपेक्स मॉड्यूल की apexinfo नंबर की जानकारी शामिल है

थ्रो
TargetSetupError

इसमें शामिल हैPersistentApk

protected boolean containsPersistentApk ( testAppFileNames, 
                TestInformation testInfo)

यह जांचता है कि इनपुट फ़ाइलों में कोई स्थायी apk है या नहीं.

पैरामीटर
testAppFileNames : इंस्टॉल किए जाने वाले मॉड्यूल के फ़ाइल नामों की सूची

testInfo TestInformation: TestInformation

रिटर्न
boolean true अगर इनपुट फ़ाइलों में स्थायी apk मॉड्यूल मौजूद है.

थ्रो
DeviceNotAvailableException
TargetSetupError

getApkइंस्टॉल किया गया

protected  getApkInstalled ()

रिटर्न

getBundletoolFileName

protected String getBundletoolFileName ()

रिटर्न
String

getBundletoolUtil

protected BundletoolUtil getBundletoolUtil ()

रिटर्न
BundletoolUtil

getModuleKeywordFromApexPackageName

protected String getModuleKeywordFromApexPackageName (String packageName)

कीवर्ड पाता है (उदाहरण के लिए, 'tzdata' com.android.tzdata.apex) फ़ाइल को खोलें.

पैरामीटर
packageName String: एपेक्स फ़ाइल का पैकेज नाम.

रिटर्न
String apex पैकेज के नाम का कीवर्ड.

getModulesFailToActivate

protected  getModulesFailToActivate ( activatedApexes)

वे मॉड्यूल पाएं जो चालू नहीं हो पाए.

पैरामीटर
activatedApexes : डिवाइस पर सक्रिय एपेक्स का सेट

रिटर्न
ऐसी सूची जिसमें इनपुट एपेक्स मॉड्यूल की apexinfo फ़ाइल है, जो चालू नहीं हो सकी.

थ्रो
DeviceNotAvailableException
TargetSetupError

getSplitsForApks

protected  getSplitsForApks (TestInformation testInfo, 
                File moduleFile)

बताए गए apk के लिए, एक्सट्रैक्ट और रिटर्न स्प्लिट.

पैरामीटर
testInfo TestInformation: TestInformation

moduleFile File: वह मॉड्यूल फ़ाइल जिससे स्प्लिट एक्सट्रैक्ट किए जाने हैं.

रिटर्न
स्प्लिट वाली File[] फ़ाइल.

थ्रो
TargetSetupError अगर बंडलटूल नहीं मिल पाता है या डिवाइस की खास जानकारी वाली फ़ाइल जनरेट नहीं हो पाती है.

initBundletoolUtil

protected void initBundletoolUtil (TestInformation testInfo)

इस क्लास के लिए बंडलटूल इस्तेमाल शुरू करता है.

पैरामीटर
testInfo TestInformation: शुरू करने के लिए TestInformation.

थ्रो
TargetSetupError अगर बंडलटूल नहीं मिल रहा है.

InstallTrain

protected void installTrain (TestInformation testInfo, 
                 moduleFilenames, 
                String[] extraArgs)

डिवाइस पर एपेक्स वाली मेनलाइन ट्रेन इंस्टॉल करने की कोशिश की जाती है.

पैरामीटर
testInfo TestInformation: TestInformation

moduleFilenames : स्ट्रिंग की सूची. मेनलाइन मॉड्यूल के फ़ाइल नामों की सूची इंस्टॉल किया गया.

extraArgs String

थ्रो
DeviceNotAvailableException
TargetSetupError

इंस्टॉल करें BundleTool

protected void installUsingBundleTool (TestInformation testInfo, 
                 testAppFileNames)

बंडलटूल का इस्तेमाल करके मेनलाइन मॉड्यूल इंस्टॉल करने की कोशिश करता है.

पैरामीटर
testInfo TestInformation: TestInformation

testAppFileNames : पहले से लोड किए गए ऐसे मॉड्यूल के फ़ाइल नाम जिन्हें इंस्टॉल करना है.

थ्रो
DeviceNotAvailableException
TargetSetupError

इंस्टॉल करने वाला व्यक्ति

protected void installer (TestInformation testInfo, 
                 testAppFileNames)

डिवाइस पर कोई पैकेज या स्प्लिट पैकेज इंस्टॉल करने की कोशिश करें.

पैरामीटर
testInfo TestInformation: शुरू करने के लिए TestInformation

testAppFileNames : इंस्टॉल किए जाने वाले apks और उनका पैकेज.

थ्रो
DeviceNotAvailableException
TargetSetupError

isPersistentApk

protected boolean isPersistentApk (File filename, 
                TestInformation testInfo)

यह जांचता है कि क्या कोई apk एक स्थायी APK है.

पैरामीटर
filename File: जांच करने के लिए apk मॉड्यूल फ़ाइल

testInfo TestInformation: TestInformation

रिटर्न
boolean true अगर यह एक परसिस्टेंट apk मॉड्यूल है.

थ्रो
DeviceNotAvailableException
TargetSetupError

फिर से पाएंApexInfo

protected ITestDevice.ApexInfo retrieveApexInfo (File testApexFile, 
                DeviceDescriptor deviceDescriptor)

यह ApexInfo फ़ेच करता है, जिसमें दी गई एपेक्स फ़ाइल से PackageName और versionCode होता है.

पैरामीटर
testApexFile File: वह एपेक्स फ़ाइल जिससे हम जानकारी लेते हैं.

deviceDescriptor DeviceDescriptor

रिटर्न
ITestDevice.ApexInfo एक ApexInfo में, दी गई फ़ाइल का PackageName और versionCode शामिल है

थ्रो
TargetSetupError अगर aapt पार्सर, फ़ाइल को पार्स नहीं कर सका.