mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 15:56:49 +00:00
Add a flag to turn on theme picker in wallpaper picker
Bug: 122524192 Change-Id: I79bd8bde359a56185c1dd0c10964695263d0f6d5
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.android.launcher3.views;
|
||||
|
||||
import static com.android.launcher3.Utilities.EXTRA_WALLPAPER_FLAVOR;
|
||||
import static com.android.launcher3.Utilities.EXTRA_WALLPAPER_OFFSET;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -149,7 +150,9 @@ public class OptionsPopupView extends ArrowPopup
|
||||
RectF target = new RectF(x - halfSize, y - halfSize, x + halfSize, y + halfSize);
|
||||
|
||||
ArrayList<OptionItem> options = new ArrayList<>();
|
||||
options.add(new OptionItem(R.string.wallpaper_button_text, R.drawable.ic_wallpaper,
|
||||
int res = FeatureFlags.STYLE_WALLPAPER.get() ?
|
||||
R.string.styles_wallpaper_button_text : R.string.wallpaper_button_text;
|
||||
options.add(new OptionItem(res, R.drawable.ic_wallpaper,
|
||||
ControlType.WALLPAPER_BUTTON, OptionsPopupView::startWallpaperPicker));
|
||||
if (!FeatureFlags.GO_DISABLE_WIDGETS) {
|
||||
options.add(new OptionItem(R.string.widget_button_text, R.drawable.ic_widget,
|
||||
@@ -197,6 +200,9 @@ public class OptionsPopupView extends ArrowPopup
|
||||
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
|
||||
.putExtra(EXTRA_WALLPAPER_OFFSET,
|
||||
launcher.getWorkspace().getWallpaperOffsetForCenterPage());
|
||||
if (!FeatureFlags.STYLE_WALLPAPER.get()) {
|
||||
intent.putExtra(EXTRA_WALLPAPER_FLAVOR, "wallpaper_only");
|
||||
}
|
||||
String pickerPackage = launcher.getString(R.string.wallpaper_picker_package);
|
||||
if (!TextUtils.isEmpty(pickerPackage)) {
|
||||
intent.setPackage(pickerPackage);
|
||||
|
||||
Reference in New Issue
Block a user