Change to use setupcompat and setupdesign for suw pages

1. remove the dependence of setupwizardlib.
2. add to use setupcompat and setupdesign.
3. modify new footer button in following up cl.

Bug: 120805516
Bug: 120872944
Test: RunSettingsRoboTests
Change-Id: I463dd35b799d4250b2aabce0cb0b8102cf9dd7d6
This commit is contained in:
Pasty Chang
2018-12-11 02:22:55 +00:00
parent 0805dbb98c
commit c1f8600d9f
53 changed files with 171 additions and 151 deletions

View File

@@ -22,7 +22,9 @@ import android.content.Intent;
import android.os.SystemProperties;
import com.android.settings.testutils.SettingsRobolectricTestRunner;
import com.android.setupwizardlib.util.WizardManagerHelper;
import com.google.android.setupcompat.util.WizardManagerHelper;
import com.google.android.setupdesign.util.ThemeHelper;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -47,9 +49,9 @@ public class SetupWizardUtilsTest {
@Test
public void testGetTheme_withIntentExtra_shouldReturnExtraTheme() {
SystemProperties.set(SetupWizardUtils.SYSTEM_PROP_SETUPWIZARD_THEME,
WizardManagerHelper.THEME_GLIF);
ThemeHelper.THEME_GLIF);
Intent intent = new Intent();
intent.putExtra(WizardManagerHelper.EXTRA_THEME, WizardManagerHelper.THEME_GLIF_V2);
intent.putExtra(WizardManagerHelper.EXTRA_THEME, ThemeHelper.THEME_GLIF_V2);
assertThat(SetupWizardUtils.getTheme(intent)).isEqualTo(R.style.GlifV2Theme);
}
@@ -57,7 +59,7 @@ public class SetupWizardUtilsTest {
@Test
public void testGetTheme_withEmptyIntent_shouldReturnSystemProperty() {
SystemProperties.set(SetupWizardUtils.SYSTEM_PROP_SETUPWIZARD_THEME,
WizardManagerHelper.THEME_GLIF_V2_LIGHT);
ThemeHelper.THEME_GLIF_V2_LIGHT);
Intent intent = new Intent();
assertThat(SetupWizardUtils.getTheme(intent)).isEqualTo(R.style.GlifV2Theme_Light);
@@ -66,7 +68,7 @@ public class SetupWizardUtilsTest {
@Test
public void testGetTheme_glifV3Light_shouldReturnThemeResource() {
SystemProperties.set(SetupWizardUtils.SYSTEM_PROP_SETUPWIZARD_THEME,
WizardManagerHelper.THEME_GLIF_V3_LIGHT);
ThemeHelper.THEME_GLIF_V3_LIGHT);
Intent intent = new Intent();
assertThat(SetupWizardUtils.getTheme(intent)).isEqualTo(R.style.GlifV3Theme_Light);