diff --git a/res/layout/assistant_new_badge.xml b/res/layout/assistant_new_badge.xml
index 6ca8cc5..21b5297 100644
--- a/res/layout/assistant_new_badge.xml
+++ b/res/layout/assistant_new_badge.xml
@@ -26,6 +26,7 @@
     android:paddingBottom="@dimen/nav_new_badge_vertical_pad"
     android:background="@drawable/new_badge_background"
     android:textSize="@dimen/nav_new_badge_font_size"
+    android:textStyle="bold"
     android:textAllCaps="true"
-    android:textColor="#FFFFFF"
+    android:textColor="@android:color/white"
     android:text="@string/menu_assistant_new_badge"/>
\ No newline at end of file
diff --git a/src/com/android/contacts/ContactsDrawerActivity.java b/src/com/android/contacts/ContactsDrawerActivity.java
index 29ac4f8..a56ce0d 100644
--- a/src/com/android/contacts/ContactsDrawerActivity.java
+++ b/src/com/android/contacts/ContactsDrawerActivity.java
@@ -141,7 +141,6 @@
             // overlaid by the action bar of the newly-created fragment.
             stopSearchAndSelection();
             updateStatusBarBackground();
-            initializeAssistantNewBadge();
         }
 
         private void stopSearchAndSelection() {
@@ -184,6 +183,7 @@
                 mRunnable.run();
                 mRunnable = null;
             }
+            initializeAssistantNewBadge();
         }
 
         public void runWhenIdle(Runnable runnable) {
@@ -264,7 +264,8 @@
     }
 
     private void initializeAssistantNewBadge() {
-        if (!Flags.getInstance().getBoolean(Experiments.ASSISTANT)) {
+        if (!Flags.getInstance().getBoolean(Experiments.ASSISTANT)
+                || mNavigationView == null) {
             return;
         }
         final LinearLayout newBadgeFrame = (LinearLayout) MenuItemCompat.getActionView(
diff --git a/src/com/android/contacts/DynamicShortcuts.java b/src/com/android/contacts/DynamicShortcuts.java
index fce2f8b..52307e4 100644
--- a/src/com/android/contacts/DynamicShortcuts.java
+++ b/src/com/android/contacts/DynamicShortcuts.java
@@ -407,8 +407,6 @@
             final Flags flags = Flags.getInstance();
             Log.d(TAG, "DyanmicShortcuts.initialize\nVERSION >= N_MR1? " +
                     (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) +
-                    "\n" + Experiments.DYNAMIC_SHORTCUTS + " enabled? " +
-                    flags.getBoolean(Experiments.DYNAMIC_SHORTCUTS) +
                     "\nisJobScheduled? " + isJobScheduled(context) +
                     "\nminDelay=" +
                     flags.getInteger(Experiments.DYNAMIC_MIN_CONTENT_CHANGE_UPDATE_DELAY_MILLIS) +
@@ -420,11 +418,7 @@
 
         final DynamicShortcuts shortcuts = new DynamicShortcuts(context);
 
-        if (!Flags.getInstance().getBoolean(Experiments.DYNAMIC_SHORTCUTS)) {
-            // Clear dynamic shortcuts if the flag is not enabled. This prevents shortcuts from
-            // staying around if it is enabled then later disabled (due to bugs for instance).
-            shortcuts.handleFlagDisabled();
-        } else if (!shortcuts.hasRequiredPermissions()) {
+        if (!shortcuts.hasRequiredPermissions()) {
             final IntentFilter filter = new IntentFilter();
             filter.addAction(RequestPermissionsActivity.BROADCAST_PERMISSIONS_GRANTED);
             LocalBroadcastManager.getInstance(shortcuts.mContext).registerReceiver(
diff --git a/src/com/android/contacts/activities/PeopleActivity.java b/src/com/android/contacts/activities/PeopleActivity.java
index fd6ee89..90aa580 100644
--- a/src/com/android/contacts/activities/PeopleActivity.java
+++ b/src/com/android/contacts/activities/PeopleActivity.java
@@ -449,10 +449,8 @@
 
         super.onPause();
 
-        if (Flags.getInstance().getBoolean(Experiments.PULL_TO_REFRESH)) {
-            ContentResolver.removeStatusChangeListener(mStatusChangeListenerHandle);
-            onSyncStateUpdated();
-        }
+        ContentResolver.removeStatusChangeListener(mStatusChangeListenerHandle);
+        onSyncStateUpdated();
     }
 
     @Override
@@ -471,14 +469,13 @@
         mProviderStatusWatcher.start();
         updateViewConfiguration(true);
 
-        if (Flags.getInstance().getBoolean(Experiments.PULL_TO_REFRESH)) {
-            mStatusChangeListenerHandle = ContentResolver.addStatusChangeListener(
-                    ContentResolver.SYNC_OBSERVER_TYPE_ACTIVE
-                            | ContentResolver.SYNC_OBSERVER_TYPE_PENDING
-                            | ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS,
-                    mSyncStatusObserver);
-            onSyncStateUpdated();
-        }
+        mStatusChangeListenerHandle = ContentResolver.addStatusChangeListener(
+                ContentResolver.SYNC_OBSERVER_TYPE_ACTIVE
+                        | ContentResolver.SYNC_OBSERVER_TYPE_PENDING
+                        | ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS,
+                mSyncStatusObserver);
+        onSyncStateUpdated();
+
         initializeFabVisibility();
         initializeHomeVisibility();
 
diff --git a/src/com/android/contacts/common/Experiments.java b/src/com/android/contacts/common/Experiments.java
index dee95dd..827083b 100644
--- a/src/com/android/contacts/common/Experiments.java
+++ b/src/com/android/contacts/common/Experiments.java
@@ -26,11 +26,6 @@
     public static final String ASSISTANT = "Assistant__enable_assistant";
 
     /**
-     * Experiment to show the restore assistant on the assistants view.
-     */
-    public static final String ASSISTANT_RESTORE = "Assistant__restore";
-
-    /**
      * Whether to open contact sheet (aka smart profile) instead of our own QuickContact.
      */
     public static final String CONTACT_SHEET = "QuickContact__contact_sheet";
@@ -48,22 +43,12 @@
             "Shortcuts__dynamic_min_content_change_update_delay_millis";
 
     /**
-     * Experiment to enable dynamic strequent shortcuts.
-     */
-    public static final String DYNAMIC_SHORTCUTS = "Shortcuts__dynamic_shortcuts";
-
-    /**
      * Experiment to enable device account detection using CP2 queries
      */
     public static final String OEM_CP2_DEVICE_ACCOUNT_DETECTION_ENABLED =
             "OEM__cp2_device_account_detection_enabled";
 
     /**
-     * Experiment to toggle contacts sync using the pull to refresh gesture.
-     */
-    public static final String PULL_TO_REFRESH = "PullToRefresh__pull_to_refresh";
-
-    /**
      * Flags for maximum time to show spinner for a contacts sync.
      */
     public static final String PULL_TO_REFRESH_CANCEL_REFRESH_MILLIS =
@@ -79,11 +64,6 @@
      */
     public static final String SEARCH_YENTA_TIMEOUT_MILLIS = "Search__yenta_timeout";
 
-    /**
-     * The options for sending email/messages to groups and selections
-     */
-    public static final String SEND_TO_GROUP = "Groups__send_to_group";
-
     private Experiments() {
     }
 }
diff --git a/src/com/android/contacts/common/list/AutoScrollListView.java b/src/com/android/contacts/common/list/AutoScrollListView.java
index ae7ca17..d0070b5 100644
--- a/src/com/android/contacts/common/list/AutoScrollListView.java
+++ b/src/com/android/contacts/common/list/AutoScrollListView.java
@@ -17,6 +17,7 @@
 package com.android.contacts.common.list;
 
 import android.content.Context;
+import android.os.Build;
 import android.util.AttributeSet;
 import android.widget.ListView;
 
@@ -114,4 +115,15 @@
             smoothScrollToPositionFromTop(position, offset);
         }
     }
+
+    @Override
+    protected void onLayout(boolean changed, int l, int t, int r, int b) {
+        super.onLayout(changed, l, t, r, b);
+
+        // Workaround for b/31160338.
+        if (android.os.Build.VERSION.SDK_INT == Build.VERSION_CODES.N
+            || android.os.Build.VERSION.SDK_INT == Build.VERSION_CODES.N_MR1) {
+            layoutChildren();
+        }
+    }
 }
diff --git a/src/com/android/contacts/common/preference/ContactsPreferences.java b/src/com/android/contacts/common/preference/ContactsPreferences.java
index 8865e91..ac7b0e0 100644
--- a/src/com/android/contacts/common/preference/ContactsPreferences.java
+++ b/src/com/android/contacts/common/preference/ContactsPreferences.java
@@ -16,13 +16,10 @@
 
 package com.android.contacts.common.preference;
 
-import android.content.ContentResolver;
 import android.content.Context;
 import android.content.SharedPreferences;
 import android.content.SharedPreferences.Editor;
 import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
-import android.net.Uri;
-import android.os.Bundle;
 import android.os.Handler;
 import android.os.Looper;
 import android.preference.PreferenceManager;
@@ -219,7 +216,8 @@
             return defaultAccount == null || !defaultAccount.isNullAccount();
         }
 
-        if (currentWritableAccounts.size() == 1) {
+        if (currentWritableAccounts.size() == 1
+                && !currentWritableAccounts.get(0).isNullAccount()) {
             return false;
         }
 
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java
index 65c30e8..42ef513 100644
--- a/src/com/android/contacts/editor/ContactEditorFragment.java
+++ b/src/com/android/contacts/editor/ContactEditorFragment.java
@@ -987,6 +987,9 @@
             mStatus = Status.SUB_ACTIVITY;
             startActivityForResult(intent, REQUEST_CODE_ACCOUNTS_CHANGED);
         } else {
+            // Make sure the default account is automatically set if there is only one non-device
+            // account.
+            mEditorUtils.maybeUpdateDefaultAccount();
             // Otherwise, there should be a default account. Then either create a local contact
             // (if default account is null) or create a contact with the specified account.
             AccountWithDataSet defaultAccount = mEditorUtils.getOnlyOrDefaultAccount();
diff --git a/src/com/android/contacts/editor/ContactEditorUtils.java b/src/com/android/contacts/editor/ContactEditorUtils.java
index fc1a887..5b80b04 100644
--- a/src/com/android/contacts/editor/ContactEditorUtils.java
+++ b/src/com/android/contacts/editor/ContactEditorUtils.java
@@ -132,6 +132,20 @@
         return mContactsPrefs.shouldShowAccountChangedNotification(getWritableAccounts());
     }
 
+    /**
+     * Sets the only non-device account to be default if it is not already.
+     */
+    public void maybeUpdateDefaultAccount() {
+        final List<AccountWithDataSet> currentWritableAccounts = getWritableAccounts();
+        if (currentWritableAccounts.size() == 1) {
+            final AccountWithDataSet onlyAccount = currentWritableAccounts.get(0);
+            if (!onlyAccount.isNullAccount()
+                    && !onlyAccount.equals(mContactsPrefs.getDefaultAccount())) {
+                mContactsPrefs.setDefaultAccount(onlyAccount);
+            }
+        }
+    }
+
     @VisibleForTesting
     String[] getWritableAccountTypeStrings() {
         final Set<String> types = Sets.newHashSet();
diff --git a/src/com/android/contacts/group/GroupMembersFragment.java b/src/com/android/contacts/group/GroupMembersFragment.java
index e71b3a4..be3b127 100644
--- a/src/com/android/contacts/group/GroupMembersFragment.java
+++ b/src/com/android/contacts/group/GroupMembersFragment.java
@@ -268,13 +268,9 @@
         final boolean isSelectionMode = mActionBarAdapter.isSelectionMode();
         final boolean isGroupEditable = mGroupMetaData != null && mGroupMetaData.editable;
         final boolean isGroupReadOnly = mGroupMetaData != null && mGroupMetaData.readOnly;
-        final boolean experimentFlagSet =
-                Flags.getInstance().getBoolean(Experiments.SEND_TO_GROUP);
 
-        setVisible(menu, R.id.menu_multi_send_email, !mIsEditMode && !isGroupEmpty()
-                && experimentFlagSet);
-        setVisible(menu, R.id.menu_multi_send_message, !mIsEditMode && !isGroupEmpty()
-                && experimentFlagSet);
+        setVisible(menu, R.id.menu_multi_send_email, !mIsEditMode && !isGroupEmpty());
+        setVisible(menu, R.id.menu_multi_send_message, !mIsEditMode && !isGroupEmpty());
         setVisible(menu, R.id.menu_add, isGroupEditable && !isSelectionMode);
         setVisible(menu, R.id.menu_rename_group, !isGroupReadOnly && !isSelectionMode);
         setVisible(menu, R.id.menu_delete_group, !isGroupReadOnly && !isSelectionMode);
diff --git a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
index 331c566..5539428 100644
--- a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
+++ b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
@@ -190,9 +190,7 @@
                     setSyncOffAlert();
 
                     // Determine whether the account has pullToRefresh feature
-                    if (Flags.getInstance().getBoolean(Experiments.PULL_TO_REFRESH)) {
-                        setSwipeRefreshLayoutEnabledOrNot(getFilter());
-                    }
+                    setSwipeRefreshLayoutEnabledOrNot(getFilter());
                     break;
                 case ActionBarAdapter.Listener.Action.CHANGE_SEARCH_QUERY:
                     final String queryString = mActionBarAdapter.getQueryString();
@@ -464,9 +462,8 @@
     protected void onCreateView(LayoutInflater inflater, ViewGroup container) {
         super.onCreateView(inflater, container);
 
-        if (Flags.getInstance().getBoolean(Experiments.PULL_TO_REFRESH)) {
-            initSwipeRefreshLayout();
-        }
+        initSwipeRefreshLayout();
+
         // Putting the header view inside a container will allow us to make
         // it invisible later. See checkHeaderViewVisibility()
         final FrameLayout headerContainer = new FrameLayout(inflater.getContext());
@@ -834,9 +831,7 @@
         setSyncOffAlert();
 
         // Determine whether the account has pullToRefresh feature
-        if (Flags.getInstance().getBoolean(Experiments.PULL_TO_REFRESH)) {
-            setSwipeRefreshLayoutEnabledOrNot(filter);
-        }
+        setSwipeRefreshLayoutEnabledOrNot(filter);
     }
 
     private void setSwipeRefreshLayoutEnabledOrNot(ContactListFilter filter) {
