Fix no show quick settings tutorial after device rotates
Root cause: Render apps below the cutout area to make the fragment recreate multiple times when the device rotates. The tutorial status is not stored correctly and try to show the tutorial when activity is finishing. Solution: Avoid showing the tutorial when the activity is finishing and store correct tutorial status after recreate. Bug: 239578655 Test: Manual testing Change-Id: I3ff12e23eb971f61280ebc89014b086dc348d734
This commit is contained in:
@@ -153,12 +153,10 @@ public class AccessibilityQuickSettingsPrimarySwitchPreferenceControllerTest {
|
||||
@Test
|
||||
@Config(shadows = ShadowFragment.class)
|
||||
public void restoreValueFromSavedInstanceState_showTooltipView() {
|
||||
mController.displayPreference(mScreen);
|
||||
mController.setChecked(true);
|
||||
final Bundle savedInstanceState = new Bundle();
|
||||
savedInstanceState.putBoolean(KEY_SAVED_QS_TOOLTIP_RESHOW, /* value= */ true);
|
||||
mController.onCreate(savedInstanceState);
|
||||
|
||||
mFragment.onCreate(savedInstanceState);
|
||||
mController.displayPreference(mScreen);
|
||||
|
||||
assertThat(getLatestPopupWindow().isShowing()).isTrue();
|
||||
|
Reference in New Issue
Block a user