diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 112b4b5..a11a948 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1379,7 +1379,7 @@
         </activity>
 
         <activity android:name="com.android.settings.accounts.AddAccountSettings"
-            android:theme="@android:style/Theme.Holo.Panel"
+            android:theme="@android:style/Theme.Translucent.NoTitleBar"
             android:configChanges="orientation|keyboardHidden|screenSize"
             android:label="@string/header_add_an_account"
             android:taskAffinity="com.android.settings"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 1f94287..1373b30 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -3776,10 +3776,7 @@
     <string name="background_data_dialog_message">Disabling background data extends battery life and lowers data use. Some apps may still use the background data connection.</string>
     <!-- Title for a checkbox that enables data synchronization in the account and sync screen [CHAR LIMIT=35] -->
     <string name="sync_automatically">Auto-sync app data</string>
-    <!-- Account creation warning in multi-user tablets [CHAR LIMIT=none] -->
-    <string name="add_account_shared_system_warning" product="tablet">Reminder: As with any shared computer, there is some risk that other users may find a way to access your data on this tablet.</string>
-    <!-- Account creation warning in multi-user phones[CHAR LIMIT=none] -->
-    <string name="add_account_shared_system_warning" product="default">Reminder: As with any shared computer, there is some risk that other users may find a way to access your data on this phone.</string>
+
     <!-- Sync status messages on Accounts & Synchronization settings --><skip />
     <!-- Sync status shown when sync is enabled [CHAR LIMIT=25] -->
     <string name="sync_enabled">Sync is ON</string>
diff --git a/src/com/android/settings/accounts/AddAccountSettings.java b/src/com/android/settings/accounts/AddAccountSettings.java
index dffb1ee..e0fe629 100644
--- a/src/com/android/settings/accounts/AddAccountSettings.java
+++ b/src/com/android/settings/accounts/AddAccountSettings.java
@@ -22,25 +22,18 @@
 import android.accounts.AuthenticatorException;
 import android.accounts.OperationCanceledException;
 import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
 import android.app.PendingIntent;
-import android.content.DialogInterface;
-import android.content.DialogInterface.OnClickListener;
-import android.content.DialogInterface.OnDismissListener;
 import android.content.Intent;
 import android.os.Bundle;
 import android.util.Log;
 
 import com.android.settings.Utils;
-import com.android.settings.R;
 
 import java.io.IOException;
 
 /**
  * Entry point Actiivty for account setup. Works as follows
- * 0) If it is a multi-user system with multiple users, it shows a warning dialog first.
- *    If the user accepts this warning, it moves on to step 1.
+ *
  * 1) When the other Activities launch this Activity, it launches {@link ChooseAccountActivity}
  *    without showing anything.
  * 2) After receiving an account type from ChooseAccountActivity, this Activity launches the
@@ -65,7 +58,6 @@
      * application.
      */
     private static final String KEY_CALLER_IDENTITY = "pendingIntent";
-    private static final String KEY_SHOWED_WARNING = "showedWarning";
 
     private static final String TAG = "AccountSettings";
 
@@ -76,8 +68,6 @@
 
     private static final int CHOOSE_ACCOUNT_REQUEST = 1;
 
-    private static final int DLG_MULTIUSER_WARNING = 1;
-
     private PendingIntent mPendingIntent;
 
     private AccountManagerCallback<Bundle> mCallback = new AccountManagerCallback<Bundle>() {
@@ -105,57 +95,21 @@
     };
 
     private boolean mAddAccountCalled = false;
-    private boolean mShowedMultiuserWarning;
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
         if (savedInstanceState != null) {
-            mShowedMultiuserWarning = savedInstanceState.getBoolean(KEY_SHOWED_WARNING);
             mAddAccountCalled = savedInstanceState.getBoolean(KEY_ADD_CALLED);
             if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "restored");
         }
 
-        if (!Utils.hasMultipleUsers(this)) {
-            mShowedMultiuserWarning = true;
+        if (mAddAccountCalled) {
+            // We already called add account - maybe the callback was lost.
+            finish();
+            return;
         }
-
-        // Show the multiuser warning dialog first. If that was already shown and accepted,
-        // then show the account type chooser.
-        if (!mShowedMultiuserWarning) {
-            showMultiuserWarning();
-        } else {
-            if (mAddAccountCalled) {
-                // We already called add account - maybe the callback was lost.
-                finish();
-                return;
-            }
-            showChooseAccount();
-        }
-    }
-
-    private void showMultiuserWarning() {
-        showDialog(DLG_MULTIUSER_WARNING);
-    }
-
-    public Dialog onCreateDialog(int dlgId) {
-        AlertDialog.Builder builder = new AlertDialog.Builder(this);
-        builder.setMessage(R.string.add_account_shared_system_warning);
-        builder.setPositiveButton(android.R.string.ok, mDialogClickListener);
-        builder.setNegativeButton(android.R.string.cancel, mDialogClickListener);
-        builder.setOnDismissListener(new OnDismissListener() {
-            public void onDismiss(DialogInterface di) {
-                if (!mShowedMultiuserWarning) {
-                    setResult(RESULT_CANCELED);
-                    finish();
-                }
-            }
-        });
-        return builder.create();
-    }
-
-    private void showChooseAccount() {
         final String[] authorities =
                 getIntent().getStringArrayExtra(AccountPreferenceBase.AUTHORITIES_FILTER_KEY);
         final String[] accountTypes =
@@ -188,7 +142,6 @@
     protected void onSaveInstanceState(Bundle outState) {
         super.onSaveInstanceState(outState);
         outState.putBoolean(KEY_ADD_CALLED, mAddAccountCalled);
-        outState.putBoolean(KEY_SHOWED_WARNING, mShowedMultiuserWarning);
         if (Log.isLoggable(TAG, Log.VERBOSE)) Log.v(TAG, "saved");
     }
 
@@ -207,17 +160,4 @@
                 null /* handler */);
         mAddAccountCalled  = true;
     }
-
-    private OnClickListener mDialogClickListener = new OnClickListener() {
-        @Override
-        public void onClick(DialogInterface dialog, int which) {
-            if (which == Dialog.BUTTON_POSITIVE) {
-                mShowedMultiuserWarning = true;
-                showChooseAccount();
-            } else if (which == Dialog.BUTTON_NEGATIVE) {
-                setResult(RESULT_CANCELED);
-                finish();
-            }
-        }
-    };
 }
