FeatureFlagTargetPreparer

public class FeatureFlagTargetPreparer
extends BaseTargetPreparer

java.lang.Object
   ↳ com.android.tradefed.targetprep.BaseTargetPreparer
     ↳ com.android.tradefed.targetprep.FeatureFlagTargetPreparer


DeviceConfig को अपडेट करता है (रिमोट सेवा की मदद से ट्यून किए गए सुविधा फ़्लैग).

इसका इस्तेमाल, किसी डिवाइस की स्थिति को फिर से दिखाने के लिए किया जा सकता है. इसके लिए, `adb shell device_config list` का इस्तेमाल करके, सभी फ़्लैग की वैल्यू को फ़ाइल में डालें. इसके अलावा, इसका इस्तेमाल फ़्लैग को एक साथ चालू/बंद करने के लिए भी किया जा सकता है.

इस्तेमाल का उदाहरण:

  • सभी-चालू/सभी-बंद टेस्टिंग के लिए इस्तेमाल करने के लिए, ज़रूरी फ़्लैग फ़ाइल तय करें:
    --flag-file=flag_file_path
  • एक या उससे ज़्यादा फ़्लैग को बदलने के लिए, उनकी वैल्यू डालें. इन्हें फ़्लैग फ़ाइलों के साथ जोड़ा जा सकता है:
    --flag-file=flag_file_path --flag-value=namespace/name=value
  • बदलाव को पहले जैसा करने की जांच के लिए, सभी-चालू फ़ाइल के बाद सभी-बंद फ़ाइल डालें और दोनों फ़ाइलों के बीच रीबूट करने की सुविधा चालू करें:
    --flag-file=all_on_file_path --flag-file=all_off_file_path --reboot-between-flag-files
           

इस टूल का इस्तेमाल, DeviceSetup के साथ किया जाना चाहिए, ताकि जांच के दौरान DeviceConfig सिंक करने की सुविधा बंद की जा सके. ऐसा करने से, इस टूल से किए गए बदलावों को बदला जा सकता है.

खास जानकारी

पब्लिक कंस्ट्रक्टर

FeatureFlagTargetPreparer()

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

void setUp(TestInformation testInformation)
void tearDown(TestInformation testInformation, Throwable e)

पब्लिक कंस्ट्रक्टर

FeatureFlagTargetPreparer

public FeatureFlagTargetPreparer ()

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

setUp

public void setUp (TestInformation testInformation)

पैरामीटर
testInformation TestInformation

थ्रो
BuildError
DeviceNotAvailableException
TargetSetupError

tearDown

public void tearDown (TestInformation testInformation, 
                Throwable e)

पैरामीटर
testInformation TestInformation

e Throwable

थ्रो
DeviceNotAvailableException