Fixes nav stack issue.

By marking the Intent that's being sent to WPP as "launched from
settings", the code in CustomizationPickerActivity can correctly
conclude that the multi-pane wrapper does not need to be applied to the
intent, preventing the odd "disordering" of the back stack in the bug.

Fix: 284809020
Test: manually verified, on a large screen device with a multi-pane
settings configuration, that going to Display > Lock screen > Shortcuts
and then swiping back off the left edge of the display correctly exits
settings instead of revealing an incorrect screen like it did in the
bug.
Test: also manually verified that the long-press on the home screena and
on the lock screen paths both open the right tab in WPP in settings
correctly.

Change-Id: Iac2b4e9fa5bab91b6a5251f1c51b4d21a0824f00
This commit is contained in:
Alejandro Nijamkin
2023-06-05 15:50:54 -07:00
parent b2ed35b2ae
commit 6f9f3a4594
2 changed files with 17 additions and 1 deletions

View File

@@ -114,6 +114,9 @@ public class CustomizableLockScreenQuickAffordancesPreferenceControllerTest {
assertThat(intentCaptor.getValue().getPackage()).isEqualTo(
mContext.getString(R.string.config_wallpaper_picker_package));
assertThat(intentCaptor.getValue().getAction()).isEqualTo(Intent.ACTION_SET_WALLPAPER);
assertThat(intentCaptor.getValue().getStringExtra(
CustomizableLockScreenUtils.WALLPAPER_LAUNCH_SOURCE)).isEqualTo(
CustomizableLockScreenUtils.LAUNCH_SOURCE_SETTINGS);
assertThat(intentCaptor.getValue().getStringExtra("destination"))
.isEqualTo("quick_affordances");
}