Set WifiDialog to light theme in setup flow

Screenshot: https://screenshot.googleplex.com/X6tkxihEWFY

Test: Manual
Bug: 130507879
Change-Id: Icca6b827cdb62387fde4c91435d4df10e2ff4d04
This commit is contained in:
pastychang
2019-04-15 11:58:28 +08:00
committed by Pasty Chang
parent 96b534951c
commit 1d2b51aeb0
5 changed files with 60 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ import static com.google.common.truth.Truth.assertThat;
import android.content.Context;
import com.android.settings.R;
import com.android.settings.testutils.shadow.ShadowEntityHeaderController;
import com.android.settings.wifi.WifiDialog.WifiDialogListener;
import com.android.settingslib.wifi.AccessPoint;
@@ -41,4 +42,16 @@ public class WifiDialogTest {
assertThat(modal.getContext().getThemeResId())
.isEqualTo(wifiDialog.getContext().getThemeResId());
}
@Test
public void createModal_whenSetTheme_shouldBeCustomizedTheme() {
WifiDialog modal = WifiDialog.createModal(mContext, mListener, mockAccessPoint,
WifiConfigUiBase.MODE_CONNECT, R.style.SuwAlertDialogThemeCompat_Light);
WifiDialog wifiDialog = new WifiDialog(mContext, mListener, mockAccessPoint,
WifiConfigUiBase.MODE_CONNECT, R.style.SuwAlertDialogThemeCompat_Light,
false /* hideSubmitButton */);
assertThat(modal.getContext().getThemeResId())
.isEqualTo(wifiDialog.getContext().getThemeResId());
}
}