diff --git a/Android.mk b/Android.mk index e42a4632d6..bddcfaff2c 100644 --- a/Android.mk +++ b/Android.mk @@ -24,7 +24,6 @@ include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_STATIC_JAVA_LIBRARIES := \ - libWallpaperPicker \ android-support-v4 \ android-support-v7-recyclerview \ android-support-v7-palette @@ -32,7 +31,7 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ LOCAL_SRC_FILES := $(call all-java-files-under, src) \ $(call all-proto-files-under, protos) -LOCAL_RESOURCE_DIR := packages/apps/WallpaperPicker/res \ +LOCAL_RESOURCE_DIR := \ $(LOCAL_PATH)/res \ prebuilts/sdk/current/support/v7/recyclerview/res @@ -43,7 +42,6 @@ LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/protos/ LOCAL_AAPT_FLAGS := \ --auto-add-overlay \ --extra-packages android.support.v7.recyclerview \ - --extra-packages com.android.wallpaperpicker LOCAL_SDK_VERSION := current LOCAL_PACKAGE_NAME := Launcher3 diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 80ffa43dc2..09086f9b6e 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -91,33 +91,6 @@ - - - - - - - - - - - - - - - findBundledWallpapers() { - final PackageManager pm = getPackageManager(); - final ArrayList bundled = new ArrayList(24); - - Partner partner = Partner.get(pm); - if (partner != null) { - final Resources partnerRes = partner.getResources(); - final int resId = partnerRes.getIdentifier(Partner.RES_WALLPAPERS, "array", - partner.getPackageName()); - if (resId != 0) { - addWallpapers(bundled, partnerRes, partner.getPackageName(), resId); - } - - // Add system wallpapers - File systemDir = partner.getWallpaperDirectory(); - if (systemDir != null && systemDir.isDirectory()) { - for (File file : systemDir.listFiles()) { - if (!file.isFile()) { - continue; - } - String name = file.getName(); - int dotPos = name.lastIndexOf('.'); - String extension = ""; - if (dotPos >= -1) { - extension = name.substring(dotPos); - name = name.substring(0, dotPos); - } - - if (name.endsWith("_small")) { - // it is a thumbnail - continue; - } - - File thumbnail = new File(systemDir, name + "_small" + extension); - Bitmap thumb = BitmapFactory.decodeFile(thumbnail.getAbsolutePath()); - if (thumb != null) { - bundled.add(new FileWallpaperInfo( - file, new BitmapDrawable(getResources(), thumb))); - } - } - } - } - - Pair r = getWallpaperArrayResourceId(); - if (r != null) { - try { - Resources wallpaperRes = pm.getResourcesForApplication(r.first); - addWallpapers(bundled, wallpaperRes, r.first.packageName, r.second); - } catch (PackageManager.NameNotFoundException e) { - } - } - - if (partner == null || !partner.hideDefaultWallpaper()) { - // Add an entry for the default wallpaper (stored in system resources) - WallpaperTileInfo defaultWallpaperInfo = DefaultWallpaperInfo.get(this); - if (defaultWallpaperInfo != null) { - bundled.add(0, defaultWallpaperInfo); - } - } - return bundled; - } -}