Launch WallpaperPicker in a new task
Wallpaper does not support multi window mode, but launching from
Settings will make it support multi window because the root activity
supports.
Solution: Launch WallpaperPicker in a new task
Test: Manually
Fixes: 158642941
Change-Id: I93a6eaa8c0292e99c54d5278274482075ed007d5
diff --git a/src/com/android/settings/display/WallpaperPreferenceController.java b/src/com/android/settings/display/WallpaperPreferenceController.java
index b6af9bc..2e7e101 100644
--- a/src/com/android/settings/display/WallpaperPreferenceController.java
+++ b/src/com/android/settings/display/WallpaperPreferenceController.java
@@ -92,7 +92,8 @@
@Override
public boolean handlePreferenceTreeClick(Preference preference) {
if (getPreferenceKey().equals(preference.getKey())) {
- preference.getContext().startActivity(new Intent().setComponent(getComponentName()));
+ preference.getContext().startActivity(new Intent().setComponent(getComponentName())
+ .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
return true;
}
return super.handlePreferenceTreeClick(preference);