Loading res/values/config.xml +0 −3 Original line number Diff line number Diff line Loading @@ -79,9 +79,6 @@ <!-- Name of an icon provider class. --> <string name="icon_provider_class" translatable="false"></string> <!-- Package name of the default wallpaper picker. --> <string name="wallpaper_picker_package" translatable="false"></string> <!-- View ID to use for QSB widget --> <item type="id" name="qsb_widget" /> Loading src/com/android/launcher3/Launcher.java +0 −6 Original line number Diff line number Diff line Loading @@ -2641,17 +2641,11 @@ public class Launcher extends Activity return; } String pickerPackage = getString(R.string.wallpaper_picker_package); if (TextUtils.isEmpty(pickerPackage)) { pickerPackage = PackageManagerHelper.getWallpaperPickerPackage(getPackageManager()); } int pageScroll = mWorkspace.getScrollForPage(mWorkspace.getPageNearestToCenterOfScreen()); float offset = mWorkspace.mWallpaperOffset.wallpaperOffsetForScroll(pageScroll); setWaitingForResult(new PendingRequestArgs(new ItemInfo())); Intent intent = new Intent(Intent.ACTION_SET_WALLPAPER) .setPackage(pickerPackage) .putExtra(Utilities.EXTRA_WALLPAPER_OFFSET, offset); intent.setSourceBounds(getViewBounds(v)); startActivityForResult(intent, REQUEST_PICK_WALLPAPER, getActivityLaunchOptions(v)); Loading src/com/android/launcher3/util/PackageManagerHelper.java +0 −23 Original line number Diff line number Diff line Loading @@ -79,29 +79,6 @@ public class PackageManagerHelper { } } /** * Returns the package for a wallpaper picker system app giving preference to a app which * is not as image picker. */ public static String getWallpaperPickerPackage(PackageManager pm) { ArrayList<String> excludePackages = new ArrayList<>(); // Exclude packages which contain an image picker for (ResolveInfo info : pm.queryIntentActivities( new Intent(Intent.ACTION_GET_CONTENT).setType("image/*"), 0)) { excludePackages.add(info.activityInfo.packageName); } excludePackages.add(LIVE_WALLPAPER_PICKER_PKG); for (ResolveInfo info : pm.queryIntentActivities( new Intent(Intent.ACTION_SET_WALLPAPER), 0)) { if (!excludePackages.contains(info.activityInfo.packageName) && (info.activityInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) { return info.activityInfo.packageName; } } return excludePackages.get(0); } /** * Returns true if {@param srcPackage} has the permission required to start the activity from * {@param intent}. If {@param srcPackage} is null, then the activity should not need Loading Loading
res/values/config.xml +0 −3 Original line number Diff line number Diff line Loading @@ -79,9 +79,6 @@ <!-- Name of an icon provider class. --> <string name="icon_provider_class" translatable="false"></string> <!-- Package name of the default wallpaper picker. --> <string name="wallpaper_picker_package" translatable="false"></string> <!-- View ID to use for QSB widget --> <item type="id" name="qsb_widget" /> Loading
src/com/android/launcher3/Launcher.java +0 −6 Original line number Diff line number Diff line Loading @@ -2641,17 +2641,11 @@ public class Launcher extends Activity return; } String pickerPackage = getString(R.string.wallpaper_picker_package); if (TextUtils.isEmpty(pickerPackage)) { pickerPackage = PackageManagerHelper.getWallpaperPickerPackage(getPackageManager()); } int pageScroll = mWorkspace.getScrollForPage(mWorkspace.getPageNearestToCenterOfScreen()); float offset = mWorkspace.mWallpaperOffset.wallpaperOffsetForScroll(pageScroll); setWaitingForResult(new PendingRequestArgs(new ItemInfo())); Intent intent = new Intent(Intent.ACTION_SET_WALLPAPER) .setPackage(pickerPackage) .putExtra(Utilities.EXTRA_WALLPAPER_OFFSET, offset); intent.setSourceBounds(getViewBounds(v)); startActivityForResult(intent, REQUEST_PICK_WALLPAPER, getActivityLaunchOptions(v)); Loading
src/com/android/launcher3/util/PackageManagerHelper.java +0 −23 Original line number Diff line number Diff line Loading @@ -79,29 +79,6 @@ public class PackageManagerHelper { } } /** * Returns the package for a wallpaper picker system app giving preference to a app which * is not as image picker. */ public static String getWallpaperPickerPackage(PackageManager pm) { ArrayList<String> excludePackages = new ArrayList<>(); // Exclude packages which contain an image picker for (ResolveInfo info : pm.queryIntentActivities( new Intent(Intent.ACTION_GET_CONTENT).setType("image/*"), 0)) { excludePackages.add(info.activityInfo.packageName); } excludePackages.add(LIVE_WALLPAPER_PICKER_PKG); for (ResolveInfo info : pm.queryIntentActivities( new Intent(Intent.ACTION_SET_WALLPAPER), 0)) { if (!excludePackages.contains(info.activityInfo.packageName) && (info.activityInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) { return info.activityInfo.packageName; } } return excludePackages.get(0); } /** * Returns true if {@param srcPackage} has the permission required to start the activity from * {@param intent}. If {@param srcPackage} is null, then the activity should not need Loading