Do not override SUW Glif theme when onApplyThemeResource() callback

1. Accodring to settings & setupdesign lib theme architecture
Only force apply sytle SetupWizardPartnerResource for current
activity/contextThemeWrapper is sufficient, override GlifV3Theme
again will cause incorrect resource mapping of private attributes.

2. Set Theme_AlertDialog style for AlertDialog in for Material design
- FingerprintEnrollEnrolling
- FingerprintEnrollFindSensor

3. Add test for AlertDialog theme, and fix broken test cases

Fixes: 245684949
Bug: 249789759
Bug: 248994476
Test: manual in SUW `adb shell cmd uimode night yes` and check visual
Test: manual in SUW enrolling check timeout dialog apply theme
Test: manual in SUW enroll UDFPS tips lottie view showing expectedly
Test: manual in SUW enroll UDFPS landscape showing correct layout
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      SetupFingerprintEnrollFindSensorTest
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      FingerprintEnrollEnrollingTest
Test: m RunSettingsRoboTests -j30 ROBOTEST_FILTER= \
      FingerprintEnrollFindSensorTest
Change-Id: I17cbf26e38318e6681ba124d23bf86317a0f1e1d
This commit is contained in:
lbill
2022-09-29 14:55:21 +00:00
parent 995dbc4f45
commit 39175b2f87
6 changed files with 27 additions and 17 deletions

View File

@@ -32,7 +32,6 @@ import android.view.accessibility.AccessibilityManager;
import androidx.annotation.Nullable;
import com.android.settings.R;
import com.android.settings.SetupWizardUtils;
import com.android.settings.Utils;
import com.android.settings.biometrics.BiometricEnrollBase;
import com.android.settings.biometrics.BiometricEnrollSidecar;
@@ -215,9 +214,8 @@ public class FingerprintEnrollFindSensor extends BiometricEnrollBase implements
@Override
protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) {
final int newResid = SetupWizardUtils.getTheme(this, getIntent());
theme.applyStyle(R.style.SetupWizardPartnerResource, true);
super.onApplyThemeResource(theme, newResid, first);
super.onApplyThemeResource(theme, resid, first);
}
protected int getContentView() {