您是否愿意检查您的壁纸是否已经设置?
在您执行WallpaperService#onCreateEngine()时,您可以:
WallpaperManager wpm = (WallpaperManager) getSystemService(WALLPAPER_SERVICE);
WallpaperInfo info = wpm.getWallpaperInfo();
if (info != null && info.getComponent().equals(new ComponentName(this, getClass()))) {
Log.d(TAG, "We're already running");
// Still might be a preview, but the user is already running your LWP.
} else {
Log.d(TAG, "We're not running, this should be a preview");
// Should definitely be a preview.
}