Add feature flag for battery settings page.

Create PowerUsageSummaryLegacy and power_usage_summary_legacy, which
contains the old implementaion.

Bug: 69797586
Test: RunSettingsRoboTests
Change-Id: Icb9c25f06889462a6eedea48ae166043a6636848
This commit is contained in:
jackqdyulei
2017-11-27 13:49:19 -08:00
parent 82789a1f39
commit 166102c3c0
12 changed files with 1038 additions and 12 deletions

View File

@@ -4,6 +4,7 @@ com.android.settings.bluetooth.BluetoothDeviceDetailsFragment
com.android.settings.bluetooth.BluetoothPairingDetail
com.android.settings.accounts.AccountDetailDashboardFragment
com.android.settings.fuelgauge.PowerUsageAnomalyDetails
com.android.settings.fuelgauge.PowerUsageSummaryLegacy
com.android.settings.fuelgauge.AdvancedPowerUsageDetail
com.android.settings.development.featureflags.FeatureFlagsDashboard
com.android.settings.development.qstile.DevelopmentTileConfigFragment

View File

@@ -91,7 +91,7 @@ import java.util.List;
SettingsShadowResources.class,
SettingsShadowResources.SettingsShadowTheme.class,
})
public class PowerUsageSummaryTest {
public class PowerUsageSummaryLegacyTest {
private static final String[] PACKAGE_NAMES = {"com.app1", "com.app2"};
private static final String STUB_STRING = "stub_string";
private static final int UID = 123;
@@ -542,7 +542,7 @@ public class PowerUsageSummaryTest {
verify(mBatteryHeaderPreferenceController, never()).quickUpdateHeaderPreference();
}
public static class TestFragment extends PowerUsageSummary {
public static class TestFragment extends PowerUsageSummaryLegacy {
private Context mContext;
private boolean mStartActivityCalled;