diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 64bd4e3..6965fc6 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -113,21 +113,6 @@
         </activity>
 
         <activity
-            android:name="com.android.launcher3.WallpaperChooser"
-            android:theme="@style/Theme.WallpaperPicker"
-            android:label="@string/pick_wallpaper"
-            android:icon="@mipmap/ic_launcher_wallpaper"
-            android:finishOnCloseSystemDialogs="true"
-            android:process=":wallpaper_chooser">
-            <intent-filter>
-                <action android:name="android.intent.action.SET_WALLPAPER" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-            <meta-data android:name="android.wallpaper.preview"
-                android:resource="@xml/wallpaper_picker_preview" />
-        </activity>
-
-        <activity
             android:name="com.android.launcher3.WallpaperPickerActivity"
             android:theme="@style/Theme.WallpaperPicker"
             android:label="@string/pick_wallpaper"
diff --git a/res/drawable-xhdpi/wallpaper_picker_preview.png b/res/drawable-xhdpi/wallpaper_picker_preview.png
deleted file mode 100644
index 4560455..0000000
--- a/res/drawable-xhdpi/wallpaper_picker_preview.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/wallpaper_gallery_background.xml b/res/drawable/wallpaper_gallery_background.xml
deleted file mode 100644
index 283b468..0000000
--- a/res/drawable/wallpaper_gallery_background.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
-    <gradient android:startColor="#0000" android:endColor="#D0000000"
-            android:angle="270"/>
-</shape>
diff --git a/res/drawable/wallpaper_gallery_item.xml b/res/drawable/wallpaper_gallery_item.xml
deleted file mode 100644
index b7052bd..0000000
--- a/res/drawable/wallpaper_gallery_item.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_focused="true" android:drawable="@drawable/grid_focused" />
-    <item android:state_pressed="true" android:drawable="@drawable/grid_pressed" />
-    <item android:state_selected="true" android:drawable="@drawable/grid_selected" />
-    <item android:drawable="@android:color/transparent" />
-</selector>
diff --git a/res/layout-sw720dp/wallpaper_item.xml b/res/layout-sw720dp/wallpaper_item.xml
deleted file mode 100644
index f3c3217..0000000
--- a/res/layout-sw720dp/wallpaper_item.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:background="@drawable/wallpaper_gallery_item">
-    <ImageView
-        android:id="@+id/wallpaper_image"
-        android:layout_width="@dimen/wallpaper_chooser_grid_width"
-        android:layout_height="@dimen/wallpaper_chooser_grid_height"
-        android:scaleType="centerCrop"
-        android:focusable="true" />
-</FrameLayout>
diff --git a/res/layout/wallpaper_chooser.xml b/res/layout/wallpaper_chooser.xml
deleted file mode 100644
index 4993076..0000000
--- a/res/layout/wallpaper_chooser.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2008, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <LinearLayout
-            android:orientation="vertical"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_alignParentBottom="true"
-            android:background="@drawable/wallpaper_gallery_background">
-
-        <Gallery android:id="@+id/gallery"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:spacing="-4dp" />
-            
-        <Button android:id="@+id/set"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/wallpaper_instructions"
-            android:layout_gravity="center_horizontal" />
-    </LinearLayout>
-</RelativeLayout>
-
diff --git a/res/layout/wallpaper_chooser_base.xml b/res/layout/wallpaper_chooser_base.xml
deleted file mode 100644
index 1490667..0000000
--- a/res/layout/wallpaper_chooser_base.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2010, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-    <fragment class="com.android.launcher3.WallpaperChooserDialogFragment"
-        android:id="@+id/wallpaper_chooser_fragment"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-</FrameLayout>
diff --git a/res/layout/wallpaper_item.xml b/res/layout/wallpaper_item.xml
deleted file mode 100644
index bd3fa2b..0000000
--- a/res/layout/wallpaper_item.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/wallpaper_image"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:background="@drawable/wallpaper_gallery_item"
-    android:scaleType="fitXY"
-    android:focusable="true" />
diff --git a/res/values/extra_wallpapers.xml b/res/values/extra_wallpapers.xml
deleted file mode 100644
index 9e0951c..0000000
--- a/res/values/extra_wallpapers.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (C) 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- -->
-
-<resources>
-    <string-array name="extra_wallpapers">
-    </string-array>
-</resources>
diff --git a/res/values/wallpapers.xml b/res/values/wallpapers.xml
deleted file mode 100644
index 1e340e4..0000000
--- a/res/values/wallpapers.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (C) 2009 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- -->
-
-<resources>
-    <string-array name="wallpapers" translatable="false">
-    </string-array>
-</resources>
diff --git a/res/xml/wallpaper_picker_preview.xml b/res/xml/wallpaper_picker_preview.xml
deleted file mode 100644
index ce7124c..0000000
--- a/res/xml/wallpaper_picker_preview.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<wallpaper-preview
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:staticWallpaperPreview="@drawable/wallpaper_picker_preview">
-</wallpaper-preview>
diff --git a/src/com/android/launcher3/UserInitializeReceiver.java b/src/com/android/launcher3/UserInitializeReceiver.java
index 5cd5181..9ccefe4 100644
--- a/src/com/android/launcher3/UserInitializeReceiver.java
+++ b/src/com/android/launcher3/UserInitializeReceiver.java
@@ -34,37 +34,6 @@
 public class UserInitializeReceiver extends BroadcastReceiver {
     @Override
     public void onReceive(Context context, Intent intent) {
-        final Resources resources = context.getResources();
-        // Context.getPackageName() may return the "original" package name,
-        // com.android.launcher3; Resources needs the real package name,
-        // com.android.launcher3. So we ask Resources for what it thinks the
-        // package name should be.
-        final String packageName = resources.getResourcePackageName(R.array.wallpapers);
-        ArrayList<Integer> list = new ArrayList<Integer>();
-        addWallpapers(resources, packageName, R.array.wallpapers, list);
-        addWallpapers(resources, packageName, R.array.extra_wallpapers, list);
-        WallpaperManager wpm = (WallpaperManager) context.getSystemService(
-                Context.WALLPAPER_SERVICE);
-        for (int i=1; i<list.size(); i++) {
-            int resid = list.get(i);
-            if (!wpm.hasResourceWallpaper(resid)) {
-                try {
-                    wpm.setResource(resid);
-                } catch (IOException e) {
-                }
-                return;
-            }
-        }
-    }
-
-    private void addWallpapers(Resources resources, String packageName, int resid,
-            ArrayList<Integer> outList) {
-        final String[] extras = resources.getStringArray(resid);
-        for (String extra : extras) {
-            int res = resources.getIdentifier(extra, "drawable", packageName);
-            if (res != 0) {
-                outList.add(res);
-            }
-        }
+        // TODO: initial wallpaper now that wallpapers are owned by another app
     }
 }
diff --git a/src/com/android/launcher3/WallpaperChooser.java b/src/com/android/launcher3/WallpaperChooser.java
deleted file mode 100644
index fe81ccb..0000000
--- a/src/com/android/launcher3/WallpaperChooser.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.launcher3;
-
-import com.android.launcher3.R;
-
-import android.app.Activity;
-import android.app.DialogFragment;
-import android.app.Fragment;
-import android.os.Bundle;
-
-public class WallpaperChooser extends Activity {
-    @SuppressWarnings("unused")
-    private static final String TAG = "Launcher.WallpaperChooser";
-
-    @Override
-    public void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-        setContentView(R.layout.wallpaper_chooser_base);
-
-        Fragment fragmentView =
-                getFragmentManager().findFragmentById(R.id.wallpaper_chooser_fragment);
-        // TODO: The following code is currently not exercised. Leaving it here in case it
-        // needs to be revived again.
-        if (fragmentView == null) {
-            /* When the screen is XLarge, the fragment is not included in the layout, so show it
-             * as a dialog
-             */
-            DialogFragment fragment = WallpaperChooserDialogFragment.newInstance();
-            fragment.show(getFragmentManager(), "dialog");
-        }
-    }
-}
diff --git a/src/com/android/launcher3/WallpaperChooserDialogFragment.java b/src/com/android/launcher3/WallpaperChooserDialogFragment.java
deleted file mode 100644
index 99de815..0000000
--- a/src/com/android/launcher3/WallpaperChooserDialogFragment.java
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.android.launcher3;
-
-import android.app.Activity;
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.app.WallpaperManager;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.graphics.Canvas;
-import android.graphics.ColorFilter;
-import android.graphics.drawable.Drawable;
-import android.os.AsyncTask;
-import android.os.Bundle;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.view.ViewGroup;
-import android.widget.AdapterView;
-import android.widget.BaseAdapter;
-import android.widget.Gallery;
-import android.widget.ImageView;
-import android.widget.ListAdapter;
-import android.widget.SpinnerAdapter;
-
-import com.android.launcher3.R;
-
-import java.io.IOException;
-import java.util.ArrayList;
-
-public class WallpaperChooserDialogFragment extends DialogFragment implements
-        AdapterView.OnItemSelectedListener, AdapterView.OnItemClickListener {
-
-    private static final String TAG = "Launcher.WallpaperChooserDialogFragment";
-    private static final String EMBEDDED_KEY = "com.android.launcher3."
-            + "WallpaperChooserDialogFragment.EMBEDDED_KEY";
-
-    private boolean mEmbedded;
-    private Bitmap mBitmap = null;
-
-    private ArrayList<Integer> mThumbs;
-    private ArrayList<Integer> mImages;
-    private WallpaperLoader mLoader;
-    private WallpaperDrawable mWallpaperDrawable = new WallpaperDrawable();
-
-    public static WallpaperChooserDialogFragment newInstance() {
-        WallpaperChooserDialogFragment fragment = new WallpaperChooserDialogFragment();
-        fragment.setCancelable(true);
-        return fragment;
-    }
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        if (savedInstanceState != null && savedInstanceState.containsKey(EMBEDDED_KEY)) {
-            mEmbedded = savedInstanceState.getBoolean(EMBEDDED_KEY);
-        } else {
-            mEmbedded = isInLayout();
-        }
-    }
-
-    @Override
-    public void onSaveInstanceState(Bundle outState) {
-        outState.putBoolean(EMBEDDED_KEY, mEmbedded);
-    }
-
-    private void cancelLoader() {
-        if (mLoader != null && mLoader.getStatus() != WallpaperLoader.Status.FINISHED) {
-            mLoader.cancel(true);
-            mLoader = null;
-        }
-    }
-
-    @Override
-    public void onDetach() {
-        super.onDetach();
-
-        cancelLoader();
-    }
-
-    @Override
-    public void onDestroy() {
-        super.onDestroy();
-
-        cancelLoader();
-    }
-
-    @Override
-    public void onDismiss(DialogInterface dialog) {
-        super.onDismiss(dialog);
-        /* On orientation changes, the dialog is effectively "dismissed" so this is called
-         * when the activity is no longer associated with this dying dialog fragment. We
-         * should just safely ignore this case by checking if getActivity() returns null
-         */
-        Activity activity = getActivity();
-        if (activity != null) {
-            activity.finish();
-        }
-    }
-
-    /* This will only be called when in XLarge mode, since this Fragment is invoked like
-     * a dialog in that mode
-     */
-    @Override
-    public Dialog onCreateDialog(Bundle savedInstanceState) {
-        findWallpapers();
-
-        return null;
-    }
-
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container,
-            Bundle savedInstanceState) {
-        findWallpapers();
-
-        /* If this fragment is embedded in the layout of this activity, then we should
-         * generate a view to display. Otherwise, a dialog will be created in
-         * onCreateDialog()
-         */
-        if (mEmbedded) {
-            View view = inflater.inflate(R.layout.wallpaper_chooser, container, false);
-            view.setBackground(mWallpaperDrawable);
-
-            final Gallery gallery = (Gallery) view.findViewById(R.id.gallery);
-            gallery.setCallbackDuringFling(false);
-            gallery.setOnItemSelectedListener(this);
-            gallery.setAdapter(new ImageAdapter(getActivity()));
-
-            View setButton = view.findViewById(R.id.set);
-            setButton.setOnClickListener(new OnClickListener() {
-                @Override
-                public void onClick(View v) {
-                    selectWallpaper(gallery.getSelectedItemPosition());
-                }
-            });
-            return view;
-        }
-        return null;
-    }
-
-    private void selectWallpaper(int position) {
-        try {
-            WallpaperManager wpm = (WallpaperManager) getActivity().getSystemService(
-                    Context.WALLPAPER_SERVICE);
-            wpm.setResource(mImages.get(position));
-            Activity activity = getActivity();
-            activity.setResult(Activity.RESULT_OK);
-            activity.finish();
-        } catch (IOException e) {
-            Log.e(TAG, "Failed to set wallpaper: " + e);
-        }
-    }
-
-    // Click handler for the Dialog's GridView
-    @Override
-    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-        selectWallpaper(position);
-    }
-
-    // Selection handler for the embedded Gallery view
-    @Override
-    public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
-        if (mLoader != null && mLoader.getStatus() != WallpaperLoader.Status.FINISHED) {
-            mLoader.cancel();
-        }
-        mLoader = (WallpaperLoader) new WallpaperLoader().execute(position);
-    }
-
-    @Override
-    public void onNothingSelected(AdapterView<?> parent) {
-    }
-
-    private void findWallpapers() {
-        mThumbs = new ArrayList<Integer>(24);
-        mImages = new ArrayList<Integer>(24);
-
-        final Resources resources = getResources();
-        // Context.getPackageName() may return the "original" package name,
-        // com.android.launcher3; Resources needs the real package name,
-        // com.android.launcher3. So we ask Resources for what it thinks the
-        // package name should be.
-        final String packageName = resources.getResourcePackageName(R.array.wallpapers);
-
-        addWallpapers(resources, packageName, R.array.wallpapers);
-        addWallpapers(resources, packageName, R.array.extra_wallpapers);
-    }
-
-    private void addWallpapers(Resources resources, String packageName, int list) {
-        final String[] extras = resources.getStringArray(list);
-        for (String extra : extras) {
-            int res = resources.getIdentifier(extra, "drawable", packageName);
-            if (res != 0) {
-                final int thumbRes = resources.getIdentifier(extra + "_small",
-                        "drawable", packageName);
-
-                if (thumbRes != 0) {
-                    mThumbs.add(thumbRes);
-                    mImages.add(res);
-                    // Log.d(TAG, "add: [" + packageName + "]: " + extra + " (" + res + ")");
-                }
-            }
-        }
-    }
-
-    private class ImageAdapter extends BaseAdapter implements ListAdapter, SpinnerAdapter {
-        private LayoutInflater mLayoutInflater;
-
-        ImageAdapter(Activity activity) {
-            mLayoutInflater = activity.getLayoutInflater();
-        }
-
-        public int getCount() {
-            return mThumbs.size();
-        }
-
-        public Object getItem(int position) {
-            return position;
-        }
-
-        public long getItemId(int position) {
-            return position;
-        }
-
-        public View getView(int position, View convertView, ViewGroup parent) {
-            View view;
-
-            if (convertView == null) {
-                view = mLayoutInflater.inflate(R.layout.wallpaper_item, parent, false);
-            } else {
-                view = convertView;
-            }
-
-            ImageView image = (ImageView) view.findViewById(R.id.wallpaper_image);
-
-            int thumbRes = mThumbs.get(position);
-            image.setImageResource(thumbRes);
-            Drawable thumbDrawable = image.getDrawable();
-            if (thumbDrawable != null) {
-                thumbDrawable.setDither(true);
-            } else {
-                Log.e(TAG, "Error decoding thumbnail resId=" + thumbRes + " for wallpaper #"
-                        + position);
-            }
-
-            return view;
-        }
-    }
-
-    class WallpaperLoader extends AsyncTask<Integer, Void, Bitmap> {
-        BitmapFactory.Options mOptions;
-
-        WallpaperLoader() {
-            mOptions = new BitmapFactory.Options();
-            mOptions.inDither = false;
-            mOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;
-        }
-
-        @Override
-        protected Bitmap doInBackground(Integer... params) {
-            if (isCancelled()) return null;
-            try {
-                return BitmapFactory.decodeResource(getResources(),
-                        mImages.get(params[0]), mOptions);
-            } catch (OutOfMemoryError e) {
-                return null;
-            }
-        }
-
-        @Override
-        protected void onPostExecute(Bitmap b) {
-            if (b == null) return;
-
-            if (!isCancelled() && !mOptions.mCancel) {
-                // Help the GC
-                if (mBitmap != null) {
-                    mBitmap.recycle();
-                }
-
-                View v = getView();
-                if (v != null) {
-                    mBitmap = b;
-                    mWallpaperDrawable.setBitmap(b);
-                    v.postInvalidate();
-                } else {
-                    mBitmap = null;
-                    mWallpaperDrawable.setBitmap(null);
-                }
-                mLoader = null;
-            } else {
-               b.recycle();
-            }
-        }
-
-        void cancel() {
-            mOptions.requestCancelDecode();
-            super.cancel(true);
-        }
-    }
-
-    /**
-     * Custom drawable that centers the bitmap fed to it.
-     */
-    static class WallpaperDrawable extends Drawable {
-
-        Bitmap mBitmap;
-        int mIntrinsicWidth;
-        int mIntrinsicHeight;
-
-        /* package */void setBitmap(Bitmap bitmap) {
-            mBitmap = bitmap;
-            if (mBitmap == null)
-                return;
-            mIntrinsicWidth = mBitmap.getWidth();
-            mIntrinsicHeight = mBitmap.getHeight();
-        }
-
-        @Override
-        public void draw(Canvas canvas) {
-            if (mBitmap == null) return;
-            int width = canvas.getWidth();
-            int height = canvas.getHeight();
-            int x = (width - mIntrinsicWidth) / 2;
-            int y = (height - mIntrinsicHeight) / 2;
-            canvas.drawBitmap(mBitmap, x, y, null);
-        }
-
-        @Override
-        public int getOpacity() {
-            return android.graphics.PixelFormat.OPAQUE;
-        }
-
-        @Override
-        public void setAlpha(int alpha) {
-            // Ignore
-        }
-
-        @Override
-        public void setColorFilter(ColorFilter cf) {
-            // Ignore
-        }
-    }
-}
