diff --git a/src/com/android/settings/UserSpinnerAdapter.java b/src/com/android/settings/UserSpinnerAdapter.java
new file mode 100644
index 0000000..c267f6f
--- /dev/null
+++ b/src/com/android/settings/UserSpinnerAdapter.java
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2014 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.settings;
+
+import android.content.Context;
+import android.content.pm.UserInfo;
+import android.database.DataSetObserver;
+import android.graphics.Bitmap;
+import android.graphics.drawable.Drawable;
+import android.os.UserHandle;
+import android.os.UserManager;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.SpinnerAdapter;
+import android.widget.TextView;
+
+import com.android.settings.drawable.CircleFramedDrawable;
+
+import java.util.ArrayList;
+
+/**
+ * Adapter for a spinner that shows a list of users.
+ */
+public class UserSpinnerAdapter implements SpinnerAdapter {
+    // TODO: Update UI. See: http://b/16518801
+    /** Holder for user details */
+    public static class UserDetails {
+        private final UserHandle mUserHandle;
+        private final String name;
+        private final Drawable icon;
+
+        public UserDetails(UserHandle userHandle, UserManager um, Context context) {
+            mUserHandle = userHandle;
+            UserInfo userInfo = um.getUserInfo(mUserHandle.getIdentifier());
+            name = userInfo.name;
+            Bitmap bitmap = um.getUserIcon(userHandle.getIdentifier());
+            if (bitmap != null) {
+                icon = CircleFramedDrawable.getInstance(context, bitmap);
+            } else {
+                icon = null;
+            }
+        }
+    }
+    private ArrayList<UserDetails> data;
+    private final LayoutInflater mInflater;
+
+    public UserSpinnerAdapter(Context context, ArrayList<UserDetails> users) {
+        if (users == null) {
+            throw new IllegalArgumentException("A list of user details must be provided");
+        }
+        this.data = users;
+        mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+    }
+
+    public UserHandle getUserHandle(int position) {
+        if (position < 0 || position >= data.size()) {
+            return null;
+        }
+        return data.get(position).mUserHandle;
+    }
+
+    @Override
+    public View getDropDownView(int position, View convertView, ViewGroup parent) {
+        final View row = convertView != null ? convertView : createUser(parent);
+
+        UserDetails user = data.get(position);
+        ((ImageView) row.findViewById(android.R.id.icon)).setImageDrawable(user.icon);
+        ((TextView) row.findViewById(android.R.id.title)).setText(user.name);
+        return row;
+    }
+
+    private View createUser(ViewGroup parent) {
+        return mInflater.inflate(R.layout.user_preference, parent, false);
+    }
+
+    @Override
+    public void registerDataSetObserver(DataSetObserver observer) {
+        // We don't support observers
+    }
+
+    @Override
+    public void unregisterDataSetObserver(DataSetObserver observer) {
+        // We don't support observers
+    }
+
+    @Override
+    public int getCount() {
+        return data.size();
+    }
+
+    @Override
+    public UserDetails getItem(int position) {
+        return data.get(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return data.get(position).mUserHandle.getIdentifier();
+    }
+
+    @Override
+    public boolean hasStableIds() {
+        return false;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        return getDropDownView(position, convertView, parent);
+    }
+
+    @Override
+    public int getItemViewType(int position) {
+        return 0;
+    }
+
+    @Override
+    public int getViewTypeCount() {
+        return 1;
+    }
+
+    @Override
+    public boolean isEmpty() {
+        return data.isEmpty();
+    }
+}
\ No newline at end of file
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index 558adde..feee90e 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -68,7 +68,7 @@
 
 import com.android.settings.dashboard.DashboardCategory;
 import com.android.settings.dashboard.DashboardTile;
-import com.android.settings.users.CircleFramedDrawable;
+import com.android.settings.drawable.CircleFramedDrawable;
 
 import java.io.IOException;
 import java.io.InputStream;
diff --git a/src/com/android/settings/users/CircleFramedDrawable.java b/src/com/android/settings/drawable/CircleFramedDrawable.java
similarity index 99%
rename from src/com/android/settings/users/CircleFramedDrawable.java
rename to src/com/android/settings/drawable/CircleFramedDrawable.java
index 6423078..f68dace 100644
--- a/src/com/android/settings/users/CircleFramedDrawable.java
+++ b/src/com/android/settings/drawable/CircleFramedDrawable.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.settings.users;
+package com.android.settings.drawable;
 
 import android.content.Context;
 import android.content.res.Resources;
diff --git a/src/com/android/settings/print/PrintSettingsFragment.java b/src/com/android/settings/print/PrintSettingsFragment.java
index f883c7f..9fb42c5 100644
--- a/src/com/android/settings/print/PrintSettingsFragment.java
+++ b/src/com/android/settings/print/PrintSettingsFragment.java
@@ -16,6 +16,7 @@
 
 package com.android.settings.print;
 
+import android.app.Activity;
 import android.app.ActivityManager;
 import android.app.LoaderManager.LoaderCallbacks;
 import android.content.AsyncTaskLoader;
@@ -31,6 +32,9 @@
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
+import android.os.UserHandle;
+import android.os.UserManager;
+import android.os.Process;
 import android.preference.Preference;
 import android.preference.PreferenceCategory;
 import android.preference.PreferenceScreen;
@@ -50,9 +54,12 @@
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.AdapterView;
 import android.widget.TextView;
 
 import com.android.internal.content.PackageMonitor;
+import com.android.settings.UserSpinnerAdapter;
+import com.android.settings.UserSpinnerAdapter.UserDetails;
 import com.android.settings.DialogCreatable;
 import com.android.settings.R;
 import com.android.settings.SettingsPreferenceFragment;
@@ -64,11 +71,14 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import android.widget.AdapterView.OnItemSelectedListener;
+import android.widget.Spinner;
+
 /**
  * Fragment with the top level print settings.
  */
 public class PrintSettingsFragment extends SettingsPreferenceFragment
-        implements DialogCreatable, Indexable {
+        implements DialogCreatable, Indexable, OnItemSelectedListener {
 
     private static final int LOADER_ID_PRINT_JOBS_LOADER = 1;
 
@@ -113,6 +123,14 @@
     private PreferenceCategory mPrintServicesCategory;
 
     private PrintJobsController mPrintJobsController;
+    private Context mContext;
+    private UserSpinnerAdapter mProfileSpinnerAdapter;
+
+    @Override
+    public void onAttach(Activity activity) {
+        super.onAttach(activity);
+        mContext = activity;
+    }
 
     @Override
     public void onCreate(Bundle icicle) {
@@ -169,6 +187,27 @@
         textView.setText(R.string.print_no_services_installed);
         contentRoot.addView(emptyView);
         getListView().setEmptyView(emptyView);
+
+        final UserManager um = (UserManager) getSystemService(Context.USER_SERVICE);
+        List<UserHandle> userProfiles = um.getUserProfiles();
+        if (userProfiles.size() >= 2) {
+            Spinner spinner = (Spinner) getActivity().getLayoutInflater().inflate(
+                    R.layout.spinner_view, null);
+
+            UserHandle myUserHandle = Process.myUserHandle();
+            userProfiles.remove(myUserHandle);
+            userProfiles.add(0, myUserHandle);
+            ArrayList<UserDetails> userDetails = new ArrayList<UserDetails>(userProfiles.size());
+            final int count = userProfiles.size();
+            for (int i = 0; i < count; i++) {
+                userDetails.add(new UserDetails(userProfiles.get(i), um, mContext));
+            }
+
+            mProfileSpinnerAdapter = new UserSpinnerAdapter(mContext, userDetails);
+            spinner.setAdapter(mProfileSpinnerAdapter);
+            spinner.setOnItemSelectedListener(this);
+            setPinnedHeaderView(spinner);
+        }
     }
 
     private void updateServicesPreferences() {
@@ -271,6 +310,22 @@
         }
     }
 
+    @Override
+    public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+        UserHandle selectedUser = mProfileSpinnerAdapter.getUserHandle(position);
+        if (selectedUser.getIdentifier() != UserHandle.myUserId()) {
+            Intent intent = new Intent(Settings.ACTION_PRINT_SETTINGS);
+            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            mContext.startActivityAsUser(intent, selectedUser);
+            getActivity().finish();
+        }
+    }
+
+    @Override
+    public void onNothingSelected(AdapterView<?> parent) {
+        // Nothing to do
+    }
+
     private class SettingsPackageMonitor extends PackageMonitor {
         @Override
         public void onPackageAdded(String packageName, int uid) {
@@ -565,4 +620,4 @@
             return indexables;
         }
     };
-}
\ No newline at end of file
+}
diff --git a/src/com/android/settings/users/AppRestrictionsFragment.java b/src/com/android/settings/users/AppRestrictionsFragment.java
index 70b6ce9..0518f56 100644
--- a/src/com/android/settings/users/AppRestrictionsFragment.java
+++ b/src/com/android/settings/users/AppRestrictionsFragment.java
@@ -17,7 +17,6 @@
 package com.android.settings.users;
 
 import android.app.Activity;
-import android.app.AppGlobals;
 import android.appwidget.AppWidgetManager;
 import android.content.BroadcastReceiver;
 import android.content.Context;
@@ -57,13 +56,13 @@
 import android.view.inputmethod.InputMethodInfo;
 import android.view.inputmethod.InputMethodManager;
 import android.view.ViewGroup;
-import android.widget.CheckBox;
 import android.widget.CompoundButton;
 import android.widget.CompoundButton.OnCheckedChangeListener;
 import android.widget.Switch;
 
 import com.android.settings.R;
 import com.android.settings.SettingsPreferenceFragment;
+import com.android.settings.drawable.CircleFramedDrawable;
 
 import java.util.ArrayList;
 import java.util.Collections;
diff --git a/src/com/android/settings/users/EditUserInfoController.java b/src/com/android/settings/users/EditUserInfoController.java
index 53aaf27..0f844a7 100644
--- a/src/com/android/settings/users/EditUserInfoController.java
+++ b/src/com/android/settings/users/EditUserInfoController.java
@@ -37,6 +37,7 @@
 import android.widget.ImageView;
 
 import com.android.settings.R;
+import com.android.settings.drawable.CircleFramedDrawable;
 
 /**
  * This class encapsulates a Dialog for editing the user nickname and photo.
diff --git a/src/com/android/settings/users/EditUserPhotoController.java b/src/com/android/settings/users/EditUserPhotoController.java
index 5ed3560..538f332 100644
--- a/src/com/android/settings/users/EditUserPhotoController.java
+++ b/src/com/android/settings/users/EditUserPhotoController.java
@@ -44,6 +44,7 @@
 import android.widget.ListPopupWindow;
 
 import com.android.settings.R;
+import com.android.settings.drawable.CircleFramedDrawable;
 
 import java.io.File;
 import java.io.FileNotFoundException;
diff --git a/src/com/android/settings/users/UserSettings.java b/src/com/android/settings/users/UserSettings.java
index 6f5a669..7dc83ef 100644
--- a/src/com/android/settings/users/UserSettings.java
+++ b/src/com/android/settings/users/UserSettings.java
@@ -37,7 +37,6 @@
 import android.content.pm.UserInfo;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
 import android.graphics.Canvas;
 import android.graphics.drawable.Drawable;
 import android.os.AsyncTask;
@@ -69,6 +68,7 @@
 import com.android.settings.SettingsActivity;
 import com.android.settings.SettingsPreferenceFragment;
 import com.android.settings.Utils;
+import com.android.settings.drawable.CircleFramedDrawable;
 
 /**
  * Screen that manages the list of users on the device.
