इंस्टॉलएपेक्समॉड्यूलटार्गेटप्रेपेयर

public class InstallApexModuleTargetPreparer
extends SuiteApkInstaller

java.lang.ऑब्जेक्ट
com.android.tradefed.targetprep.BaseTargetPreparer
com.android.tradefed.targetprep.TestAppInstallSetup
com.android.tradefed.targetprep.suite.SuiteApkInstaller
com.android.tradefed.targetprep.InstallApexModuleTargetPreparer


सारांश

खेत

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) collectApexInfoFromApexModules ( testAppFileNames, TestInformation testInfo)

सक्रियण जांच के लिए शीर्ष मॉड्यूल से शीर्ष जानकारी एकत्र करता है।

boolean containsPersistentApk ( testAppFileNames, TestInformation testInfo) containsPersistentApk ( testAppFileNames, TestInformation testInfo)

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

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

शीर्ष पैकेज नाम से कीवर्ड प्राप्त करता है (उदाहरण के लिए, com.android.tzdata.apex के लिए 'tzdata')।

getModulesFailToActivate ( activatedApexes) getModulesFailToActivate ( activatedApexes)

वे मॉड्यूल प्राप्त करें जो सक्रिय होने में विफल रहे।

getSplitsForApks (TestInformation testInfo, File moduleFile)

निर्दिष्ट एपीके के लिए अर्क और रिटर्न विभाजन।

void initBundletoolUtil (TestInformation testInfo)

इस वर्ग के लिए बंडलटूल उपयोग को आरंभ करता है।

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

डिवाइस पर एपेक्स युक्त मेनलाइन ट्रेन स्थापित करने का प्रयास।

void installUsingBundleTool (TestInformation testInfo, testAppFileNames) installUsingBundleTool (TestInformation testInfo, testAppFileNames)

बंडलटूल का उपयोग करके मेनलाइन मॉड्यूल स्थापित करने का प्रयास।

void installer (TestInformation testInfo, testAppFileNames) installer (TestInformation testInfo, testAppFileNames)

डिवाइस पर पैकेज या स्प्लिट पैकेज स्थापित करने का प्रयास करें।

boolean isPersistentApk (File filename, TestInformation testInfo)

जाँचता है कि क्या कोई एपीके स्थायी एपीके है।

ITestDevice.ApexInfo retrieveApexInfo (File testApexFile, DeviceDescriptor deviceDescriptor)

ApexInfo को पुनः प्राप्त करता है जिसमें दी गई शीर्ष फ़ाइल से पैकेजनाम और संस्करणकोड शामिल है।

खेत

APEX_SUFFIX

protected static final String APEX_SUFFIX

APK_SUFFIX

protected static final String APK_SUFFIX

SPLIT_APKS_SUFFIX

protected static final String SPLIT_APKS_SUFFIX

सार्वजनिक निर्माणकर्ता

इंस्टॉलएपेक्समॉड्यूलटार्गेटप्रेपेयर

public InstallApexModuleTargetPreparer ()

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

getModulesToInstall

public  getModulesToInstall (TestInformation testInfo)

डिवाइस पर पहले से लोड किए गए मॉड्यूल के आधार पर, उन मॉड्यूल को प्राप्त करता है जिन्हें ट्रेन में स्थापित किया जाना चाहिए। जो मॉड्यूल प्रीलोडेड नहीं हैं उन्हें इंस्टॉल नहीं किया जाएगा.

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

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

फेंकता
DeviceNotAvailableException जब उपकरण उपलब्ध न हो.
TargetSetupError जब अनिवार्य मॉड्यूल स्थापित नहीं होते हैं, या मॉड्यूल स्थापित नहीं किया जा सकता है।

setIgnoreIfNotPreloaded

public void setIgnoreIfNotPreloaded (boolean skip)

पैरामीटर
skip boolean

सेटस्किपएपेक्सटियरडाउन

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

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

फेंकता
TargetSetupError

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

protected boolean containsPersistentApk ( testAppFileNames, 
                TestInformation testInfo)

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

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

testInfo TestInformation : TestInformation

रिटर्न
boolean यदि इनपुट फ़ाइलों में लगातार एपीके मॉड्यूल शामिल है तो true

फेंकता
DeviceNotAvailableException
TargetSetupError

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

protected  getApkInstalled ()

रिटर्न

getBundletoolFileName

protected String getBundletoolFileName ()

रिटर्न
String

getBundletoolUtil

protected BundletoolUtil getBundletoolUtil ()

रिटर्न
BundletoolUtil

getModuleKeywordFromApexPackageName

protected String getModuleKeywordFromApexPackageName (String packageName)

शीर्ष पैकेज नाम से कीवर्ड प्राप्त करता है (उदाहरण के लिए, com.android.tzdata.apex के लिए 'tzdata')।

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

रिटर्न
String एक स्ट्रिंग शीर्ष पैकेज नाम का कीवर्ड।

getModulesFairToActivate

protected  getModulesFailToActivate ( activatedApexes)

वे मॉड्यूल प्राप्त करें जो सक्रिय होने में विफल रहे।

पैरामीटर
activatedApexes : डिवाइस पर सक्रिय शीर्षों का सेट

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

फेंकता
DeviceNotAvailableException
TargetSetupError

getSplitsForApks

protected  getSplitsForApks (TestInformation testInfo, 
                File moduleFile)

निर्दिष्ट एपीके के लिए अर्क और रिटर्न विभाजन।

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

moduleFile File : विभाजन को निकालने के लिए मॉड्यूल फ़ाइल।

रिटर्न
एक फ़ाइल[] जिसमें विभाजन हैं।

फेंकता
TargetSetupError यदि बंडलटूल नहीं मिल पाता है या डिवाइस स्पेक फ़ाइल उत्पन्न होने में विफल रहती है।

initBundletoolUtil

protected void initBundletoolUtil (TestInformation testInfo)

इस वर्ग के लिए बंडलटूल उपयोग को आरंभ करता है।

पैरामीटर
testInfo TestInformation : आह्वान के लिए TestInformation .

फेंकता
TargetSetupError यदि बंडलटूल नहीं मिल पाता है।

इंस्टॉलट्रेन

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

डिवाइस पर एपेक्स युक्त मेनलाइन ट्रेन स्थापित करने का प्रयास।

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

moduleFilenames : स्ट्रिंग की सूची. स्थापित किए जाने वाले मेनलाइन मॉड्यूल के फ़ाइल नामों की सूची।

extraArgs String

फेंकता
DeviceNotAvailableException
TargetSetupError

बंडलटूल का उपयोग करके इंस्टॉल करें

protected void installUsingBundleTool (TestInformation testInfo, 
                 testAppFileNames)

बंडलटूल का उपयोग करके मेनलाइन मॉड्यूल स्थापित करने का प्रयास।

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

testAppFileNames : स्थापित करने के लिए प्रीलोडेड मॉड्यूल के फ़ाइल नाम।

फेंकता
DeviceNotAvailableException
TargetSetupError

इंस्टालर

protected void installer (TestInformation testInfo, 
                 testAppFileNames)

डिवाइस पर पैकेज या स्प्लिट पैकेज स्थापित करने का प्रयास करें।

पैरामीटर
testInfo TestInformation : आह्वान के लिए TestInformation

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

फेंकता
DeviceNotAvailableException
TargetSetupError

isPersistentApk

protected boolean isPersistentApk (File filename, 
                TestInformation testInfo)

जाँचता है कि क्या कोई एपीके स्थायी एपीके है।

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

testInfo TestInformation : TestInformation

रिटर्न
boolean यदि यह एक सतत एपीके मॉड्यूल है तो true

फेंकता
DeviceNotAvailableException
TargetSetupError

पुनर्प्राप्तएपेक्सइन्फो

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

ApexInfo को पुनः प्राप्त करता है जिसमें दी गई शीर्ष फ़ाइल से पैकेजनाम और संस्करणकोड शामिल है।

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

deviceDescriptor DeviceDescriptor

रिटर्न
ITestDevice.ApexInfo एक ApexInfo जिसमें दी गई फ़ाइल का पैकेजनाम और संस्करणकोड शामिल है

फेंकता
TargetSetupError यदि aapt पार्सर फ़ाइल को पार्स करने में विफल रहा।