Specifies nav destination when opening shortcuts.

Doing this will open the correct screen when clicking on "Shortcuts"
under Settings > Display > Lock screen.

Fix: 258471384
Test: manually verified that clicking on it opens the wallpaper picker
experience with the correct page showing.

Change-Id: I627bcb9c9fac7a834f1c9d9cb36b73a6c8817af5
This commit is contained in:
Alejandro Nijamkin
2022-12-02 16:00:38 -08:00
parent 71dd4b23e8
commit f31108f11a
3 changed files with 5 additions and 3 deletions

View File

@@ -50,13 +50,13 @@ public class CustomizableLockScreenQuickAffordancesPreferenceController extends
final Preference preference = screen.findPreference(getPreferenceKey());
if (preference != null) {
preference.setOnPreferenceClickListener(preference1 -> {
// TODO(b/258471384): open the buttons destination within wallpaper picker.
final Intent intent = new Intent(Intent.ACTION_SET_WALLPAPER);
final String packageName =
mContext.getString(R.string.config_wallpaper_picker_package);
if (!TextUtils.isEmpty(packageName)) {
intent.setPackage(packageName);
}
intent.putExtra("destination", "quick_affordances");
mContext.startActivity(intent);
return true;
});