diff --git a/Android.mk b/Android.mk
index c8b81dc..0663e85 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,7 +1,7 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
-LOCAL_JAVA_LIBRARIES := bouncycastle telephony-common
+LOCAL_JAVA_LIBRARIES := bouncycastle conscrypt telephony-common
 LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 android-support-v13 jsr305
 
 LOCAL_MODULE_TAGS := optional
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 67aa7ee..7025a9c 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -262,7 +262,8 @@
         <activity android:name="ApnSettings"
                 android:label="@string/apn_settings"
                 android:configChanges="orientation|keyboardHidden|screenSize"
-                android:launchMode="singleTask">
+                android:launchMode="singleTask"
+                android:parentActivityName="Settings$WirelessSettingsActivity">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <action android:name="android.settings.APN_SETTINGS" />
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index eb94a69..021ef10 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -1561,7 +1561,7 @@
     <string name="add_device_admin_msg" msgid="6246742476064507965">"Geräteadministrator aktivieren?"</string>
     <string name="add_device_admin" msgid="7133327675884827091">"Aktivieren"</string>
     <string name="device_admin_add_title" msgid="7705551449705676363">"Geräteadministrator"</string>
-    <string name="device_admin_warning" msgid="2026747446313628233">"Die Aktivierung dieses Administrators ermöglicht der App \"<xliff:g id="APP_NAME">%1$s</xliff:g>\", folgende Vorgänge auszuführen:"</string>
+    <string name="device_admin_warning" msgid="2026747446313628233">"Die Aktivierung dieses Administrators ermöglicht der App <xliff:g id="APP_NAME">%1$s</xliff:g>, folgende Vorgänge auszuführen:"</string>
     <string name="device_admin_status" msgid="4252975713178851910">"Dieser Administrator ist aktiv und ermöglicht der App <xliff:g id="APP_NAME">%1$s</xliff:g>, folgende Vorgänge auszuführen:"</string>
     <string name="untitled_apn" msgid="1230060359198685513">"Unbenannt"</string>
     <string name="sound_category_sound_title" msgid="1488759370067953996">"Allgemein"</string>
diff --git a/src/com/android/settings/DateTimeSettings.java b/src/com/android/settings/DateTimeSettings.java
index ab87527..6c6553b 100644
--- a/src/com/android/settings/DateTimeSettings.java
+++ b/src/com/android/settings/DateTimeSettings.java
@@ -39,6 +39,7 @@
 import android.widget.DatePicker;
 import android.widget.TimePicker;
 
+import java.text.SimpleDateFormat;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.TimeZone;
@@ -233,44 +234,38 @@
 
     @Override
     public Dialog onCreateDialog(int id) {
-        Dialog d;
-
+        final Calendar calendar = Calendar.getInstance();
         switch (id) {
-        case DIALOG_DATEPICKER: {
-            final Calendar calendar = Calendar.getInstance();
-            d = new DatePickerDialog(
-                getActivity(),
-                this,
-                calendar.get(Calendar.YEAR),
-                calendar.get(Calendar.MONTH),
-                calendar.get(Calendar.DAY_OF_MONTH));
-            // The system clock can't represent dates outside this range.
-            DatePickerDialog datePicker = (DatePickerDialog)d;
-            Calendar t = Calendar.getInstance();
-            t.clear();
-            t.set(1970, Calendar.JANUARY, 1);
-            datePicker.getDatePicker().setMinDate(t.getTimeInMillis());
-            t.clear();
-            t.set(2037, Calendar.DECEMBER, 31);
-            datePicker.getDatePicker().setMaxDate(t.getTimeInMillis());
-            break;
-        }
-        case DIALOG_TIMEPICKER: {
-            final Calendar calendar = Calendar.getInstance();
-            d = new TimePickerDialog(
+        case DIALOG_DATEPICKER:
+            DatePickerDialog d = new DatePickerDialog(
+                    getActivity(),
+                    this,
+                    calendar.get(Calendar.YEAR),
+                    calendar.get(Calendar.MONTH),
+                    calendar.get(Calendar.DAY_OF_MONTH));
+            configureDatePicker(d.getDatePicker());
+            return d;
+        case DIALOG_TIMEPICKER:
+            return new TimePickerDialog(
                     getActivity(),
                     this,
                     calendar.get(Calendar.HOUR_OF_DAY),
                     calendar.get(Calendar.MINUTE),
                     DateFormat.is24HourFormat(getActivity()));
-            break;
-        }
         default:
-            d = null;
-            break;
+            throw new IllegalArgumentException();
         }
+    }
 
-        return d;
+    static void configureDatePicker(DatePicker datePicker) {
+        // The system clock can't represent dates outside this range.
+        Calendar t = Calendar.getInstance();
+        t.clear();
+        t.set(1970, Calendar.JANUARY, 1);
+        datePicker.setMinDate(t.getTimeInMillis());
+        t.clear();
+        t.set(2037, Calendar.DECEMBER, 31);
+        datePicker.setMaxDate(t.getTimeInMillis());
     }
 
     /*
@@ -378,40 +373,10 @@
         }
     }
 
-    /*  Helper routines to format timezone */
-
-    /* package */ static String getTimeZoneText(TimeZone tz) {
-        // Similar to new SimpleDateFormat("'GMT'Z, zzzz").format(new Date()), but
-        // we want "GMT-03:00" rather than "GMT-0300".
-        Date now = new Date();
-        return formatOffset(new StringBuilder(), tz, now).
-            append(", ").
-            append(tz.getDisplayName(tz.inDaylightTime(now), TimeZone.LONG)).toString();
-    }
-
-    private static StringBuilder formatOffset(StringBuilder sb, TimeZone tz, Date d) {
-        int off = tz.getOffset(d.getTime()) / 1000 / 60;
-
-        sb.append("GMT");
-        if (off < 0) {
-            sb.append('-');
-            off = -off;
-        } else {
-            sb.append('+');
-        }
-
-        int hours = off / 60;
-        int minutes = off % 60;
-
-        sb.append((char) ('0' + hours / 10));
-        sb.append((char) ('0' + hours % 10));
-
-        sb.append(':');
-
-        sb.append((char) ('0' + minutes / 10));
-        sb.append((char) ('0' + minutes % 10));
-
-        return sb;
+    private static String getTimeZoneText(TimeZone tz) {
+        SimpleDateFormat sdf = new SimpleDateFormat("ZZZZ, zzzz");
+        sdf.setTimeZone(tz);
+        return sdf.format(new Date());
     }
 
     private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
diff --git a/src/com/android/settings/DateTimeSettingsSetupWizard.java b/src/com/android/settings/DateTimeSettingsSetupWizard.java
index 05e0d4e..bb2c6da 100644
--- a/src/com/android/settings/DateTimeSettingsSetupWizard.java
+++ b/src/com/android/settings/DateTimeSettingsSetupWizard.java
@@ -121,7 +121,6 @@
         mSelectedTimeZone = tz;
         mTimeZoneButton = (Button)findViewById(R.id.time_zone_button);
         mTimeZoneButton.setText(tz.getDisplayName());
-        // mTimeZoneButton.setText(DateTimeSettings.getTimeZoneText(tz));
         mTimeZoneButton.setOnClickListener(this);
 
         final boolean autoDateTimeEnabled;
@@ -141,6 +140,7 @@
         mDatePicker = (DatePicker)findViewById(R.id.date_picker);
         mDatePicker.setEnabled(!autoDateTimeEnabled);
         mDatePicker.setCalendarViewShown(false);
+        DateTimeSettings.configureDatePicker(mDatePicker);
 
         mInputMethodManager = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
 
@@ -244,7 +244,6 @@
             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));
diff --git a/src/com/android/settings/TrustedCredentialsSettings.java b/src/com/android/settings/TrustedCredentialsSettings.java
index 687663a..cdfe7cd 100644
--- a/src/com/android/settings/TrustedCredentialsSettings.java
+++ b/src/com/android/settings/TrustedCredentialsSettings.java
@@ -45,7 +45,8 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.Set;
-import org.apache.harmony.xnet.provider.jsse.TrustedCertificateStore;
+
+import com.android.org.conscrypt.TrustedCertificateStore;
 
 public class TrustedCredentialsSettings extends Fragment {
 
diff --git a/src/com/android/settings/accounts/AccountSyncSettings.java b/src/com/android/settings/accounts/AccountSyncSettings.java
index 64c4d4a..c14dbbe 100644
--- a/src/com/android/settings/accounts/AccountSyncSettings.java
+++ b/src/com/android/settings/accounts/AccountSyncSettings.java
@@ -115,7 +115,8 @@
                                 } catch (AuthenticatorException e) {
                                     // handled below
                                 }
-                                if (failed) {
+                                if (failed && getActivity() != null &&
+                                        !getActivity().isFinishing()) {
                                     showDialog(FAILED_REMOVAL_DIALOG);
                                 } else {
                                     finish();
diff --git a/src/com/android/settings/wifi/WifiConfigController.java b/src/com/android/settings/wifi/WifiConfigController.java
index 587197b..90aef86 100644
--- a/src/com/android/settings/wifi/WifiConfigController.java
+++ b/src/com/android/settings/wifi/WifiConfigController.java
@@ -50,10 +50,10 @@
 import android.widget.Button;
 import android.widget.CheckBox;
 import android.widget.CompoundButton;
+import android.widget.CompoundButton.OnCheckedChangeListener;
 import android.widget.EditText;
 import android.widget.Spinner;
 import android.widget.TextView;
-import android.widget.CompoundButton.OnCheckedChangeListener;
 
 import com.android.settings.ProxySelector;
 import com.android.settings.R;
@@ -66,7 +66,7 @@
  * share the logic for controlling buttons, text fields, etc.
  */
 public class WifiConfigController implements TextWatcher,
-        View.OnClickListener, AdapterView.OnItemSelectedListener {
+       AdapterView.OnItemSelectedListener, OnCheckedChangeListener {
     private final WifiConfigUiBase mConfigUi;
     private final View mView;
     private final AccessPoint mAccessPoint;
@@ -78,7 +78,6 @@
     // e.g. AccessPoint.SECURITY_NONE
     private int mAccessPointSecurity;
     private TextView mPasswordView;
-    private CheckBox mShowPassword;
 
     private String unspecifiedCert = "unspecified";
     private static final int unspecifiedCertIndex = 0;
@@ -194,7 +193,9 @@
             showIpConfigFields();
             showProxyFields();
             mView.findViewById(R.id.wifi_advanced_toggle).setVisibility(View.VISIBLE);
-            mView.findViewById(R.id.wifi_advanced_togglebox).setOnClickListener(this);
+            ((CheckBox)mView.findViewById(R.id.wifi_advanced_togglebox))
+                    .setOnCheckedChangeListener(this);
+
 
             mConfigUi.setSubmitButton(context.getString(R.string.wifi_save));
         } else {
@@ -248,9 +249,10 @@
                 showIpConfigFields();
                 showProxyFields();
                 mView.findViewById(R.id.wifi_advanced_toggle).setVisibility(View.VISIBLE);
-                mView.findViewById(R.id.wifi_advanced_togglebox).setOnClickListener(this);
+                ((CheckBox)mView.findViewById(R.id.wifi_advanced_togglebox))
+                    .setOnCheckedChangeListener(this);
                 if (showAdvancedFields) {
-                    ((CheckBox) mView.findViewById(R.id.wifi_advanced_togglebox)).setChecked(true);
+                    ((CheckBox)mView.findViewById(R.id.wifi_advanced_togglebox)).setChecked(true);
                     mView.findViewById(R.id.wifi_advanced_fields).setVisibility(View.VISIBLE);
                 }
             }
@@ -558,13 +560,9 @@
         if (mPasswordView == null) {
             mPasswordView = (TextView) mView.findViewById(R.id.password);
             mPasswordView.addTextChangedListener(this);
-            mShowPassword = (CheckBox) mView.findViewById(R.id.show_password);
-            mShowPassword.setOnClickListener(this);
-            mShowPassword.setOnCheckedChangeListener(new OnCheckedChangeListener() {
-                public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
-                    updatePasswordVisibility(isChecked);
-                }
-            });
+            ((CheckBox) mView.findViewById(R.id.show_password))
+                .setOnCheckedChangeListener(this);
+
             if (mAccessPoint != null && mAccessPoint.networkId != INVALID_NETWORK_ID) {
                 mPasswordView.setHint(R.string.wifi_unchanged);
             }
@@ -872,11 +870,18 @@
     }
 
     @Override
-    public void onClick(View view) {
+    public void onCheckedChanged(CompoundButton view, boolean isChecked) {
         if (view.getId() == R.id.show_password) {
-            updatePasswordVisibility(((CheckBox) view).isChecked());
+            int pos = mPasswordView.getSelectionEnd();
+            mPasswordView.setInputType(
+                    InputType.TYPE_CLASS_TEXT | (isChecked ?
+                            InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD :
+                                InputType.TYPE_TEXT_VARIATION_PASSWORD));
+            if (pos >= 0) {
+                ((EditText)mPasswordView).setSelection(pos);
+            }
         } else if (view.getId() == R.id.wifi_advanced_togglebox) {
-            if (((CheckBox) view).isChecked()) {
+            if (isChecked) {
                 mView.findViewById(R.id.wifi_advanced_fields).setVisibility(View.VISIBLE);
             } else {
                 mView.findViewById(R.id.wifi_advanced_fields).setVisibility(View.GONE);
diff --git a/src/com/android/settings/wifi/WifiEnabler.java b/src/com/android/settings/wifi/WifiEnabler.java
index 846c324..7ce3b8d 100644
--- a/src/com/android/settings/wifi/WifiEnabler.java
+++ b/src/com/android/settings/wifi/WifiEnabler.java
@@ -110,6 +110,7 @@
             Toast.makeText(mContext, R.string.wifi_in_airplane_mode, Toast.LENGTH_SHORT).show();
             // Reset switch to off. No infinite check/listenenr loop.
             buttonView.setChecked(false);
+            return;
         }
 
         // Disable tethering if enabling Wifi
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index cb35e10..24f56c1 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -646,6 +646,8 @@
                         ap = new AccessPoint(getActivity(), mAccessPointSavedState);
                         // For repeated orientation changes
                         mDlgAccessPoint = ap;
+                        // Reset the saved access point data
+                        mAccessPointSavedState = null;
                     }
                 }
                 // If it's still null, fine, it's for Add Network
