diff --git a/res/layout-sw600dp/date_time_settings_setupwizard.xml b/res/layout-sw600dp/date_time_settings_setupwizard.xml
index b31462d..e37a4a6 100644
--- a/res/layout-sw600dp/date_time_settings_setupwizard.xml
+++ b/res/layout-sw600dp/date_time_settings_setupwizard.xml
@@ -1,168 +1,68 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
+<!-- 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
+          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
-    android:id="@+id/layout_root"
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:paddingTop="@dimen/datetime_margin_top"
-    android:paddingLeft="@dimen/screen_margin_sides"
-    android:paddingRight="@dimen/screen_margin_sides"
-    android:paddingBottom="@dimen/datetime_margin_bottom">
+-->
 
-    <!-- Title: Set date & time-->
-    <TextView
-        android:id="@+id/title"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:minHeight="48dip"
-        android:layout_alignParentLeft="true"
-        android:layout_marginLeft="16dip"
-        android:layout_alignParentTop="true"
-        android:textSize="32dip"
-        android:textColor="#FF99cc00"
-        android:text="@string/date_and_time_settings_title_setup_wizard"
-        android:gravity="bottom" />
-
-    <!-- Divider -->
-    <View
-        android:id="@+id/top_divider"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@+id/layout_root"
+        android:layout_height="match_parent"
         android:layout_width="match_parent"
-        android:layout_height="3dip"
-        android:layout_below="@id/title"
-        android:layout_marginTop="6dip"
-        android:layout_marginBottom="17dip"
-        android:background="@color/divider_color" />
+        android:paddingTop="96dip"
+        android:paddingLeft="40dip"
+        android:paddingRight="40dip"
+        android:paddingBottom="96dip"
+        android:orientation="vertical">
 
-    <RelativeLayout
-        android:id="@+id/timezone_auto_time"
-        android:layout_width="716dip"
-        android:layout_height="wrap_content"
-        android:layout_centerHorizontal="true"
-        android:layout_below="@id/top_divider">
-        <!-- timezone -->
-        <Button
-            android:id="@+id/time_zone_button"
-            style="?android:attr/dropDownSpinnerStyle"
-            android:layout_width="304dip"
-            android:layout_height="48dip"
-            android:layout_alignParentLeft="true"
-            android:layout_alignBottom="@+id/date_time_auto"
-            android:gravity="left|center_vertical"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:textSize="20dip" />
+    <FrameLayout android:id="@+id/timezone_dropdown_anchor"
+            android:layout_height="0px"
+            android:layout_width="match_parent"
+            android:layout_marginLeft="40dip"
+            android:layout_marginRight="40dip"/>
 
-        <LinearLayout
-            android:id="@+id/date_time_auto"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:orientation="vertical"
-            android:layout_toRightOf="@id/time_zone_button"
-            android:layout_marginLeft="32dip"
-            android:layout_alignParentRight="true">
+    <LinearLayout android:layout_height="0px"
+                  android:layout_weight="1"
+                  android:layout_width="match_parent"
+                  android:orientation="vertical">
 
-            <Switch
-                android:id="@+id/date_time_auto_button"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:minHeight="?android:attr/listPreferredItemHeight"
-                android:layout_marginLeft="16dip"
-                android:text="@string/date_time_auto"
-                android:textAppearance="?android:attr/textAppearanceMedium"
-                android:textSize="20dip" />
+        <fragment android:id="@+id/date_time_settings_fragment"
+                  class="com.android.settings.DateTimeSettings"
+                  android:layout_width="match_parent"
+                  android:layout_height="match_parent" />
 
-            <!-- Divider -->
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/divider_color" />
-        </LinearLayout>
-    </RelativeLayout>
-
-    <LinearLayout
-        android:layout_width="624dip"
-        android:layout_height="wrap_content"
-        android:layout_centerHorizontal="true"
-        android:layout_below="@+id/timezone_auto_time"
-        android:layout_marginTop="48dip"
-        android:orientation="horizontal">
-
-        <LinearLayout
-            android:layout_width="312dip"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-            <TextView
-                android:id="@+id/date_picker_title"
-                android:layout_width="match_parent"
-                android:layout_height="48dip"
-                android:text="@string/date_picker_title"
-                android:textAppearance="?android:attr/textAppearanceMedium"
-                android:textSize="20dip"
-                android:clickable="false"
-                android:longClickable="false"
-                android:gravity="center" />
-            <DatePicker
-                android:id="@+id/date_picker"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_below="@id/date_picker_title" />
-        </LinearLayout>
-
-        <!-- divider -->
-        <View
-            android:id="@+id/center_divider"
-            android:layout_width="1dip"
-            android:layout_height="match_parent"
-            android:background="@color/divider_color" />
-
-        <LinearLayout
-            android:layout_width="312dip"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-            <TextView
-                android:id="@+id/time_picker_title"
-                android:layout_width="match_parent"
-                android:layout_height="48dip"
-                android:text="@string/time_picker_title"
-                android:textAppearance="?android:attr/textAppearanceMedium"
-                android:textSize="20dip"
-                android:gravity="center" />
-
-            <TimePicker
-                android:id="@+id/time_picker"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_below="@id/time_picker_title" />
-        </LinearLayout>
     </LinearLayout>
 
-    <View
-        android:id="@+id/bottom_divider"
-        android:layout_width="match_parent"
-        android:layout_height="3dip"
-        android:layout_alignLeft="@id/timezone_auto_time"
-        android:layout_above="@+id/next_button"
-        android:layout_marginBottom="16dip"
-        android:background="@color/divider_color" />
+    <RelativeLayout android:layout_height="wrap_content"
+                    android:layout_weight="0"
+                    android:layout_width="match_parent">
 
-    <Button
-        android:id="@+id/next_button"
-        style="@style/setup_wizard_button"
-        android:layout_alignParentBottom="true"
-        android:layout_alignParentRight="true"
-        android:text="@string/next_label" />
-</RelativeLayout>
+        <View
+            android:id="@+id/bottom_divider"
+            android:layout_height="3dip"
+            android:layout_width="match_parent"
+            android:layout_marginTop="0dip"
+            android:layout_marginBottom="16dip"
+            android:background="@color/divider_color"
+            android:layout_above="@+id/next_button"/>
+
+        <Button android:id="@+id/next_button"
+            android:layout_width="wrap_content"
+            android:minWidth="208dip"
+            android:layout_height="48dip"
+            android:layout_marginTop="10dip"
+            android:layout_alignParentRight="true"
+            android:text="@string/next_label"/>
+
+    </RelativeLayout>
+
+</LinearLayout>
diff --git a/res/layout-sw600dp-land/date_time_settings_setupwizard.xml b/res/layout-sw720dp/date_time_settings_setupwizard.xml
similarity index 98%
rename from res/layout-sw600dp-land/date_time_settings_setupwizard.xml
rename to res/layout-sw720dp/date_time_settings_setupwizard.xml
index b31462d..1fc25da 100644
--- a/res/layout-sw600dp-land/date_time_settings_setupwizard.xml
+++ b/res/layout-sw720dp/date_time_settings_setupwizard.xml
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
+<!-- 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
+          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,
diff --git a/src/com/android/settings/DateTimeSettings.java b/src/com/android/settings/DateTimeSettings.java
index 64f42a0..d2c5973 100644
--- a/src/com/android/settings/DateTimeSettings.java
+++ b/src/com/android/settings/DateTimeSettings.java
@@ -60,6 +60,9 @@
     private static final int DIALOG_DATEPICKER = 0;
     private static final int DIALOG_TIMEPICKER = 1;
 
+    // have we been launched from the setup wizard?
+    protected static final String EXTRA_IS_FIRST_RUN = "firstRun";
+
     private CheckBoxPreference mAutoTimePref;
     private Preference mTimePref;
     private Preference mTime24Pref;
@@ -81,15 +84,18 @@
         boolean autoTimeEnabled = getAutoState(Settings.System.AUTO_TIME);
         boolean autoTimeZoneEnabled = getAutoState(Settings.System.AUTO_TIME_ZONE);
 
+        Intent intent = getActivity().getIntent();
+        boolean isFirstRun = intent.getBooleanExtra(EXTRA_IS_FIRST_RUN, false);
+
         mDummyDate = Calendar.getInstance();
         mDummyDate.set(mDummyDate.get(Calendar.YEAR), 11, 31, 13, 0, 0);
 
         mAutoTimePref = (CheckBoxPreference) findPreference(KEY_AUTO_TIME);
         mAutoTimePref.setChecked(autoTimeEnabled);
         mAutoTimeZonePref = (CheckBoxPreference) findPreference(KEY_AUTO_TIME_ZONE);
-        // Override auto-timezone if it's a wifi-only device.
-        // TODO: Remove this when auto-timezone is implemented based on wifi-location.
-        if (Utils.isWifiOnly()) {
+        // Override auto-timezone if it's a wifi-only device or if we're still in setup wizard.
+        // TODO: Remove the wifiOnly test when auto-timezone is implemented based on wifi-location.
+        if (Utils.isWifiOnly() || isFirstRun) {
             getPreferenceScreen().removePreference(mAutoTimeZonePref);
             autoTimeZoneEnabled = false;
         }
@@ -100,6 +106,10 @@
         mTimeZone = findPreference("timezone");
         mDatePref = findPreference("date");
         mDateFormat = (ListPreference) findPreference(KEY_DATE_FORMAT);
+        if (isFirstRun) {
+            getPreferenceScreen().removePreference(mTime24Pref);
+            getPreferenceScreen().removePreference(mDateFormat);
+        }
 
         String [] dateFormats = getResources().getStringArray(R.array.date_format_values);
         String [] formattedDates = new String[dateFormats.length];
@@ -158,7 +168,7 @@
                 .unregisterOnSharedPreferenceChangeListener(this);
     }
 
-    private void updateTimeAndDateDisplay(Context context) {
+    public void updateTimeAndDateDisplay(Context context) {
         java.text.DateFormat shortDateFormat = DateFormat.getDateFormat(context);
         final Calendar now = Calendar.getInstance();
         Date dummyDate = mDummyDate.getTime();
diff --git a/src/com/android/settings/DateTimeSettingsSetupWizard.java b/src/com/android/settings/DateTimeSettingsSetupWizard.java
index 670fcbc..685ee00 100644
--- a/src/com/android/settings/DateTimeSettingsSetupWizard.java
+++ b/src/com/android/settings/DateTimeSettingsSetupWizard.java
@@ -18,6 +18,8 @@
 
 import android.app.Activity;
 import android.app.AlarmManager;
+import android.app.Fragment;
+import android.app.FragmentTransaction;
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
@@ -25,6 +27,8 @@
 import android.content.pm.ActivityInfo;
 import android.content.res.Configuration;
 import android.os.Bundle;
+import android.preference.Preference;
+import android.preference.PreferenceFragment;
 import android.provider.Settings;
 import android.provider.Settings.SettingNotFoundException;
 import android.text.format.DateFormat;
@@ -39,6 +43,7 @@
 import android.widget.CompoundButton;
 import android.widget.CompoundButton.OnCheckedChangeListener;
 import android.widget.DatePicker;
+import android.widget.LinearLayout;
 import android.widget.ListPopupWindow;
 import android.widget.SimpleAdapter;
 import android.widget.TimePicker;
@@ -47,14 +52,18 @@
 import java.util.TimeZone;
 
 public class DateTimeSettingsSetupWizard extends Activity
-        implements OnClickListener, OnItemClickListener, OnCheckedChangeListener{
+        implements OnClickListener, OnItemClickListener, OnCheckedChangeListener,
+        PreferenceFragment.OnPreferenceStartFragmentCallback {
     private static final String TAG = DateTimeSettingsSetupWizard.class.getSimpleName();
 
     // force the first status of auto datetime flag.
     private static final String EXTRA_INITIAL_AUTO_DATETIME_VALUE =
             "extra_initial_auto_datetime_value";
 
-    private boolean mXLargeScreenSize;
+    // If we have enough screen real estate, we use a radically different layout with
+    // big date and time pickers right on the screen, which requires very different handling.
+    // Otherwise, we use the standard date time settings fragment.
+    private boolean mUsingXLargeLayout;
 
     /* Available only in XL */
     private CompoundButton mAutoDateTimeButton;
@@ -74,20 +83,25 @@
         requestWindowFeature(Window.FEATURE_NO_TITLE);
         super.onCreate(savedInstanceState);
         setContentView(R.layout.date_time_settings_setupwizard);
-        mXLargeScreenSize = (getResources().getConfiguration().screenLayout
-                & Configuration.SCREENLAYOUT_SIZE_MASK)
-                >= Configuration.SCREENLAYOUT_SIZE_LARGE;
-        if (mXLargeScreenSize) {
+
+        // we know we've loaded the special xlarge layout because it has controls
+        // not present in the standard layout
+        mUsingXLargeLayout = findViewById(R.id.time_zone_button) != null;
+        if (mUsingXLargeLayout) {
+            setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
             initUiForXl();
         } else {
+            setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
             findViewById(R.id.next_button).setOnClickListener(this);
         }
+        mTimeZoneAdapter = ZonePicker.constructTimezoneAdapter(this, false,
+            R.layout.date_time_setup_custom_list_item_2);
+
+        final View layoutRoot = findViewById(R.id.layout_root);
+        layoutRoot.setSystemUiVisibility(View.STATUS_BAR_DISABLE_BACK);
     }
 
     public void initUiForXl() {
-        final View layoutRoot = findViewById(R.id.layout_root);
-        layoutRoot.setSystemUiVisibility(View.STATUS_BAR_DISABLE_BACK);
-
         // Currently just comment out codes related to auto timezone.
         // TODO: Remove them when we are sure they are unnecessary.
         /*
@@ -98,16 +112,12 @@
         mAutoTimeZoneButton.setText(autoTimeZoneEnabled ? R.string.zone_auto_summaryOn :
                 R.string.zone_auto_summaryOff);*/
 
-        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
-
         final TimeZone tz = TimeZone.getDefault();
         mSelectedTimeZone = tz;
         mTimeZoneButton = (Button)findViewById(R.id.time_zone_button);
         mTimeZoneButton.setText(tz.getDisplayName());
         // mTimeZoneButton.setText(DateTimeSettings.getTimeZoneText(tz));
         mTimeZoneButton.setOnClickListener(this);
-        mTimeZoneAdapter = ZonePicker.constructTimezoneAdapter(this, false,
-                R.layout.date_time_setup_custom_list_item_2);
 
         final boolean autoDateTimeEnabled;
         final Intent intent = getIntent();
@@ -158,22 +168,11 @@
     public void onClick(View view) {
         switch (view.getId()) {
         case R.id.time_zone_button: {
-            mTimeZonePopup = new ListPopupWindow(this, null);
-            mTimeZonePopup.setWidth(mTimeZoneButton.getWidth());
-            mTimeZonePopup.setAnchorView(mTimeZoneButton);
-            mTimeZonePopup.setAdapter(mTimeZoneAdapter);
-            mTimeZonePopup.setOnItemClickListener(this);
-            mTimeZonePopup.setModal(true);
-            mTimeZonePopup.show();
+            showTimezonePicker(R.id.time_zone_button);
             break;
         }
         case R.id.next_button: {
-            if (mXLargeScreenSize) {
-                /* Settings.System.putInt(getContentResolver(), Settings.System.AUTO_TIME_ZONE,
-                        mAutoTimeZoneButton.isChecked() ? 1 : 0); */
-                Settings.System.putInt(getContentResolver(), Settings.System.AUTO_TIME,
-                        mAutoDateTimeButton.isChecked() ? 1 : 0);
-
+            if (mSelectedTimeZone != null) {
                 final TimeZone systemTimeZone = TimeZone.getDefault();
                 if (!systemTimeZone.equals(mSelectedTimeZone)) {
                     Log.i(TAG, "Another TimeZone is selected by a user. Changing system TimeZone.");
@@ -181,7 +180,10 @@
                             getSystemService(Context.ALARM_SERVICE);
                     alarm.setTimeZone(mSelectedTimeZone.getID());
                 }
-
+            }
+            if (mAutoDateTimeButton != null) {
+                Settings.System.putInt(getContentResolver(), Settings.System.AUTO_TIME,
+                      mAutoDateTimeButton.isChecked() ? 1 : 0);
                 if (!mAutoDateTimeButton.isChecked()) {
                     DateTimeSettings.setDate(mDatePicker.getYear(), mDatePicker.getMonth(),
                             mDatePicker.getDayOfMonth());
@@ -203,7 +205,7 @@
         final boolean autoEnabled = isChecked;  // just for readibility.
         /*if (buttonView == mAutoTimeZoneButton) {
             // In XL screen, we save all the state only when the next button is pressed.
-            if (!mXLargeScreenSize) {
+            if (!mUsingXLargeLayout) {
                 Settings.System.putInt(getContentResolver(),
                         Settings.System.AUTO_TIME_ZONE,
                         isChecked ? 1 : 0);
@@ -233,18 +235,62 @@
     @Override
     public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
         final TimeZone tz = ZonePicker.obtainTimeZoneFromItem(parent.getItemAtPosition(position));
-        mSelectedTimeZone = tz;
-
-        final Calendar now = Calendar.getInstance(tz);
-        mTimeZoneButton.setText(tz.getDisplayName());
-        // mTimeZoneButton.setText(DateTimeSettings.getTimeZoneText(tz));
-        mDatePicker.updateDate(now.get(Calendar.YEAR), now.get(Calendar.MONTH),
-                now.get(Calendar.DAY_OF_MONTH));
-        mTimePicker.setCurrentHour(now.get(Calendar.HOUR_OF_DAY));
-        mTimePicker.setCurrentMinute(now.get(Calendar.MINUTE));
+        if (mUsingXLargeLayout) {
+            mSelectedTimeZone = tz;
+            final Calendar now = Calendar.getInstance(tz);
+            if (mTimeZoneButton != null) {
+                mTimeZoneButton.setText(tz.getDisplayName());
+            }
+            // mTimeZoneButton.setText(DateTimeSettings.getTimeZoneText(tz));
+            mDatePicker.updateDate(now.get(Calendar.YEAR), now.get(Calendar.MONTH),
+                    now.get(Calendar.DAY_OF_MONTH));
+            mTimePicker.setCurrentHour(now.get(Calendar.HOUR_OF_DAY));
+            mTimePicker.setCurrentMinute(now.get(Calendar.MINUTE));
+        } else {
+            // in prefs mode, we actually change the setting right now, as opposed to waiting
+            // until Next is pressed in xLarge mode
+            final AlarmManager alarm = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
+            alarm.setTimeZone(tz.getID());
+            DateTimeSettings settingsFragment = (DateTimeSettings) getFragmentManager().
+                    findFragmentById(R.id.date_time_settings_fragment);
+            settingsFragment.updateTimeAndDateDisplay(this);
+        }
         mTimeZonePopup.dismiss();
     }
 
+    /**
+     * If this is called, that means we're in prefs style portrait mode for a large display
+     * and the user has tapped on the time zone preference. If we were a PreferenceActivity,
+     * we'd then launch the timezone fragment in a new activity, but we aren't, and here
+     * on a tablet display, we really want more of a popup picker look' like the one we use
+     * for the xlarge version of this activity. So we just take this opportunity to launch that.
+     *
+     * TODO: For phones, we might want to change this to do the "normal" opening
+     * of the zonepicker fragment in its own activity. Or we might end up just
+     * creating a separate DateTimeSettingsSetupWizardPhone activity that subclasses
+     * PreferenceActivity in the first place to handle all that automatically.
+     */
+    @Override
+    public boolean onPreferenceStartFragment(PreferenceFragment caller, Preference pref) {
+        showTimezonePicker(R.id.timezone_dropdown_anchor);
+        return true;
+    }
+
+    private void showTimezonePicker(int anchorViewId) {
+        View anchorView = findViewById(anchorViewId);
+        if (anchorView == null) {
+            Log.e(TAG, "Unable to find zone picker anchor view " + anchorViewId);
+            return;
+        }
+        mTimeZonePopup = new ListPopupWindow(this, null);
+        mTimeZonePopup.setWidth(anchorView.getWidth());
+        mTimeZonePopup.setAnchorView(anchorView);
+        mTimeZonePopup.setAdapter(mTimeZoneAdapter);
+        mTimeZonePopup.setOnItemClickListener(this);
+        mTimeZonePopup.setModal(true);
+        mTimeZonePopup.show();
+    }
+
     private boolean isAutoDateTimeEnabled() {
         try {
             return Settings.System.getInt(getContentResolver(), Settings.System.AUTO_TIME) > 0;
@@ -264,6 +310,9 @@
     }*/
 
     private void updateTimeAndDateDisplay() {
+        if (!mUsingXLargeLayout) {
+            return;
+        }
         final Calendar now = Calendar.getInstance();
         mTimeZoneButton.setText(now.getTimeZone().getDisplayName());
         mDatePicker.updateDate(now.get(Calendar.YEAR), now.get(Calendar.MONTH),
diff --git a/src/com/android/settings/deviceinfo/Memory.java b/src/com/android/settings/deviceinfo/Memory.java
index 6e7af5c..db60c37 100644
--- a/src/com/android/settings/deviceinfo/Memory.java
+++ b/src/com/android/settings/deviceinfo/Memory.java
@@ -21,7 +21,6 @@
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.DialogInterface;
-import android.content.DialogInterface.OnCancelListener;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.res.Resources;
@@ -42,7 +41,7 @@
 import com.android.settings.R;
 import com.android.settings.SettingsPreferenceFragment;
 
-public class Memory extends SettingsPreferenceFragment implements OnCancelListener {
+public class Memory extends SettingsPreferenceFragment {
     private static final String TAG = "MemorySettings";
 
     private static final int DLG_CONFIRM_UNMOUNT = 1;
@@ -50,9 +49,10 @@
 
     private Resources mResources;
 
-    // The mountToggle Preference that has been clicked.
-    // The click event will be discarded if this value is not null. Reset to null after (un)mount.
-    private Preference mClickedMountToggle;
+    // The mountToggle Preference that has last been clicked.
+    // Assumes no two successive unmount event on 2 different volumes are performed before the first
+    // one's preference is disabled
+    private Preference mLastClickedMountToggle;
     private String mClickedMountPoint;
     
     // Access using getMountService()
@@ -157,9 +157,8 @@
                 return true;
             }
 
-            boolean mountToggleClicked = svpc.mountToggleClicked(preference);
-            if (mountToggleClicked && mClickedMountToggle == null) {
-                mClickedMountToggle = preference;
+            if (svpc.mountToggleClicked(preference)) {
+                mLastClickedMountToggle = preference;
                 final StorageVolume storageVolume = svpc.getStorageVolume();
                 mClickedMountPoint = storageVolume.getPath();
                 String state = mStorageManager.getVolumeState(storageVolume.getPath());
@@ -208,32 +207,19 @@
         return null;
     }
 
-    @Override
-    protected void showDialog(int id) {
-        super.showDialog(id);
-
-        switch (id) {
-            case DLG_CONFIRM_UNMOUNT:
-            case DLG_ERROR_UNMOUNT:
-                setOnCancelListener(this);
-                break;
-        }
-    }
-
     private void doUnmount() {
         // Present a toast here
         Toast.makeText(getActivity(), R.string.unmount_inform_text, Toast.LENGTH_SHORT).show();
         IMountService mountService = getMountService();
         try {
-            mClickedMountToggle.setEnabled(false);
-            mClickedMountToggle.setTitle(mResources.getString(R.string.sd_ejecting_title));
-            mClickedMountToggle.setSummary(mResources.getString(R.string.sd_ejecting_summary));
+            mLastClickedMountToggle.setEnabled(false);
+            mLastClickedMountToggle.setTitle(mResources.getString(R.string.sd_ejecting_title));
+            mLastClickedMountToggle.setSummary(mResources.getString(R.string.sd_ejecting_summary));
             mountService.unmountVolume(mClickedMountPoint, true);
         } catch (RemoteException e) {
             // Informative dialog to user that unmount failed.
             showDialogInner(DLG_ERROR_UNMOUNT);
         }
-        mClickedMountToggle = null;
     }
 
     private void showDialogInner(int id) {
@@ -257,7 +243,8 @@
             return true;
         }
         */
-        return false;
+        // Better safe than sorry. Assume the storage is used to ask for confirmation.
+        return true;
     }
 
     private void unmount() {
@@ -273,7 +260,6 @@
             // Very unlikely. But present an error dialog anyway
             Log.e(TAG, "Is MountService running?");
             showDialogInner(DLG_ERROR_UNMOUNT);
-            mClickedMountToggle = null;
         }
     }
 
@@ -288,10 +274,5 @@
         } catch (RemoteException ex) {
             // Not much can be done
         }
-        mClickedMountToggle = null;
-    }
-
-    public void onCancel(DialogInterface dialog) {
-        mClickedMountToggle = null;
     }
 }
diff --git a/src/com/android/settings/deviceinfo/StorageMeasurement.java b/src/com/android/settings/deviceinfo/StorageMeasurement.java
index 14b5108..7fb309c 100644
--- a/src/com/android/settings/deviceinfo/StorageMeasurement.java
+++ b/src/com/android/settings/deviceinfo/StorageMeasurement.java
@@ -478,6 +478,7 @@
         File top = new File(mStorageVolume.getPath());
         mFileInfoForMisc = new ArrayList<FileInfo>();
         File[] files = top.listFiles();
+        if (files == null) return;
         final int len = files.length;
         // Get sizes of all top level nodes except the ones already computed...
         long counter = 0;
@@ -524,4 +525,11 @@
             return mFileName  + " : " + mSize + ", id:" + mId;
         }
     }
+
+    /**
+     * TODO remove this method, only used because external SD Card needs a special treatment.
+     */
+    boolean isPrimary() {
+        return mIsPrimary;
+    }
 }
diff --git a/src/com/android/settings/deviceinfo/StorageVolumePreferenceCategory.java b/src/com/android/settings/deviceinfo/StorageVolumePreferenceCategory.java
index 83f9ee2..e326b2b 100644
--- a/src/com/android/settings/deviceinfo/StorageVolumePreferenceCategory.java
+++ b/src/com/android/settings/deviceinfo/StorageVolumePreferenceCategory.java
@@ -289,6 +289,12 @@
 
         mPreferences[TOTAL_SIZE].setSummary(formatSize(totalSize));
 
+        if (!mMeasurement.isPrimary()) {
+            // TODO FIXME: external SD card will not report any size. Show used space in bar graph
+            final long usedSize = totalSize - availSize;
+            mUsageBarPreference.addEntry(usedSize / (float) totalSize, android.graphics.Color.GRAY);
+        }
+
         updatePreference(appsSize, totalSize, APPLICATIONS);
 
         long totalMediaSize = 0;
diff --git a/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java b/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java
index b265362..a73f96c 100644
--- a/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java
+++ b/src/com/android/settings/wifi/WifiSettingsForSetupWizardXL.java
@@ -21,6 +21,7 @@
 import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
+import android.content.pm.ActivityInfo;
 import android.net.NetworkInfo.DetailedState;
 import android.net.wifi.WifiConfiguration;
 import android.net.wifi.WifiManager;
@@ -54,6 +55,10 @@
     private static final String TAG = "SetupWizard";
     private static final boolean DEBUG = true;
 
+    // lock orientation into landscape or portrait
+    private static final String EXTRA_PREFS_LANDSCAPE_LOCK = "extra_prefs_landscape_lock";
+    private static final String EXTRA_PREFS_PORTRAIT_LOCK = "extra_prefs_portrait_lock";
+
     private static final EnumMap<DetailedState, DetailedState> sNetworkStateMap =
             new EnumMap<DetailedState, DetailedState>(DetailedState.class);
 
@@ -165,10 +170,18 @@
     }
 
     private void initViews() {
-        if (getIntent().getBooleanExtra("firstRun", false)) {
+        Intent intent = getIntent();
+
+        if (intent.getBooleanExtra("firstRun", false)) {
             final View layoutRoot = findViewById(R.id.layout_root);
             layoutRoot.setSystemUiVisibility(View.STATUS_BAR_DISABLE_BACK);
         }
+        if (intent.getBooleanExtra(EXTRA_PREFS_LANDSCAPE_LOCK, false)) {
+            setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
+        }
+        if (intent.getBooleanExtra(EXTRA_PREFS_PORTRAIT_LOCK, false)) {
+            setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
+        }
 
         mTitleView = (TextView)findViewById(R.id.wifi_setup_title);
         mProgressBar = (ProgressBar)findViewById(R.id.scanning_progress_bar);
