summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/views/OptionsPopupView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/views/OptionsPopupView.java')
-rw-r--r--src/com/android/launcher3/views/OptionsPopupView.java14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/com/android/launcher3/views/OptionsPopupView.java b/src/com/android/launcher3/views/OptionsPopupView.java
index 706236907..63f742768 100644
--- a/src/com/android/launcher3/views/OptionsPopupView.java
+++ b/src/com/android/launcher3/views/OptionsPopupView.java
@@ -152,9 +152,9 @@ public class OptionsPopupView extends ArrowPopup
RectF target = new RectF(x - halfSize, y - halfSize, x + halfSize, y + halfSize);
ArrayList<OptionItem> options = new ArrayList<>();
- int resString = existsStyleWallpapers(launcher) ?
+ int resString = Utilities.existsStyleWallpapers(launcher) ?
R.string.styles_wallpaper_button_text : R.string.wallpaper_button_text;
- int resDrawable = existsStyleWallpapers(launcher) ?
+ int resDrawable = Utilities.existsStyleWallpapers(launcher) ?
R.drawable.ic_palette : R.drawable.ic_wallpaper;
options.add(new OptionItem(resString, resDrawable,
ControlType.WALLPAPER_BUTTON, OptionsPopupView::startWallpaperPicker));
@@ -168,14 +168,6 @@ public class OptionsPopupView extends ArrowPopup
show(launcher, target, options);
}
- private static boolean existsStyleWallpapers(Launcher launcher) {
- Intent intent = new Intent(Intent.ACTION_SET_WALLPAPER);
- intent.setComponent(new ComponentName(launcher.getString(R.string.wallpaper_picker_package),
- "com.android.customization.picker.CustomizationPickerActivity"));
- ResolveInfo ri = launcher.getPackageManager().resolveActivity(intent, 0);
- return ri != null;
- }
-
public static boolean onWidgetsClicked(View view) {
return openWidgets(Launcher.getLauncher(view.getContext()));
}
@@ -212,7 +204,7 @@ public class OptionsPopupView extends ArrowPopup
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
.putExtra(EXTRA_WALLPAPER_OFFSET,
launcher.getWorkspace().getWallpaperOffsetForCenterPage());
- if (!existsStyleWallpapers(launcher)) {
+ if (!Utilities.existsStyleWallpapers(launcher)) {
intent.putExtra(EXTRA_WALLPAPER_FLAVOR, "wallpaper_only");
} else {
intent.putExtra(EXTRA_WALLPAPER_FLAVOR, "focus_wallpaper");