diff --git a/src/com/android/settings/SettingsPreferenceFragment.java b/src/com/android/settings/SettingsPreferenceFragment.java
index 2fceb63..245a341 100644
--- a/src/com/android/settings/SettingsPreferenceFragment.java
+++ b/src/com/android/settings/SettingsPreferenceFragment.java
@@ -135,19 +135,7 @@
         if (icicle != null) {
             mPreferenceHighlighted = icicle.getBoolean(SAVE_HIGHLIGHTED_KEY);
         }
-        final Bundle arguments = getArguments();
-
-        // Check if we should keep the preferences expanded.
-        if (arguments != null) {
-            final String highlightKey =
-                    arguments.getString(SettingsActivity.EXTRA_FRAGMENT_ARG_KEY);
-            if (!TextUtils.isEmpty(highlightKey)) {
-                final PreferenceScreen screen = getPreferenceScreen();
-                if (screen != null) {
-                    screen.setInitialExpandedChildrenCount(Integer.MAX_VALUE);
-                }
-            }
-        }
+        HighlightablePreferenceGroupAdapter.adjustInitialExpandedChildCount(this /* host */);
     }
 
     @Override
@@ -264,6 +252,15 @@
         }
     }
 
+    /**
+     * Returns initial expanded child count.
+     * <p/>
+     * Only override this method if the initial expanded child must be determined at run time.
+     */
+    public int getInitialExpandedChildCount() {
+        return 0;
+    }
+
     protected void onDataSetChanged() {
         highlightPreferenceIfNeeded();
         updateEmptyView();
diff --git a/src/com/android/settings/deviceinfo/DeviceInfoSettings.java b/src/com/android/settings/deviceinfo/DeviceInfoSettings.java
index 9b99e8b..79f57be 100644
--- a/src/com/android/settings/deviceinfo/DeviceInfoSettings.java
+++ b/src/com/android/settings/deviceinfo/DeviceInfoSettings.java
@@ -20,14 +20,12 @@
 import android.app.Fragment;
 import android.content.Context;
 import android.content.Intent;
-import android.os.Bundle;
 import android.provider.SearchIndexableResource;
 import android.support.annotation.VisibleForTesting;
 import android.telephony.TelephonyManager;
 
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
 import com.android.settings.R;
-import com.android.settings.SettingsActivity;
 import com.android.settings.dashboard.DashboardFragment;
 import com.android.settings.dashboard.SummaryLoader;
 import com.android.settings.deviceinfo.firmwareversion.FirmwareVersionPreferenceController;
@@ -64,23 +62,12 @@
     }
 
     @Override
-    public void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-        final Bundle arguments = getArguments();
-        // Do not override initial expand children count if we come from
-        // search (EXTRA_FRAGMENT_ARG_KEY is set) - we need to display every if entry point
-        // is search.
-        if (arguments == null
-                || !arguments.containsKey(SettingsActivity.EXTRA_FRAGMENT_ARG_KEY)) {
-
-            // Increase the number of children when the device contains more than 1 sim.
-            final TelephonyManager telephonyManager = (TelephonyManager) getContext()
-                    .getSystemService(Context.TELEPHONY_SERVICE);
-            final int numberOfChildren = Math.max(SIM_PREFERENCES_COUNT,
-                    SIM_PREFERENCES_COUNT * telephonyManager.getPhoneCount())
-                    + NON_SIM_PREFERENCES_COUNT;
-            getPreferenceScreen().setInitialExpandedChildrenCount(numberOfChildren);
-        }
+    public int getInitialExpandedChildCount() {
+        final TelephonyManager telephonyManager = (TelephonyManager) getContext()
+                .getSystemService(Context.TELEPHONY_SERVICE);
+        return Math.max(SIM_PREFERENCES_COUNT,
+                SIM_PREFERENCES_COUNT * telephonyManager.getPhoneCount())
+                + NON_SIM_PREFERENCES_COUNT;
     }
 
     @Override
diff --git a/src/com/android/settings/location/LocationSettings.java b/src/com/android/settings/location/LocationSettings.java
index 510c162..3e9c8af 100644
--- a/src/com/android/settings/location/LocationSettings.java
+++ b/src/com/android/settings/location/LocationSettings.java
@@ -67,15 +67,13 @@
     private LocationSwitchBarController mSwitchBarController;
 
     @Override
-    public void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
+    public int getInitialExpandedChildCount() {
         final RecentLocationApps recentLocationApps = new RecentLocationApps(getActivity());
-        int locationRequestsApps = recentLocationApps.getAppList().size();
-        int locationRequestsPrefs = locationRequestsApps == 0 ? 1 : locationRequestsApps;
-        getPreferenceScreen().setInitialExpandedChildrenCount(locationRequestsPrefs + 2);
+        final int locationRequestsApps = recentLocationApps.getAppList().size();
+        final int locationRequestsPrefs = locationRequestsApps == 0 ? 1 : locationRequestsApps;
+        return locationRequestsPrefs + 2;
     }
 
-
     @Override
     public int getMetricsCategory() {
         return MetricsEvent.LOCATION;
diff --git a/src/com/android/settings/widget/HighlightablePreferenceGroupAdapter.java b/src/com/android/settings/widget/HighlightablePreferenceGroupAdapter.java
index e1999ef..cad11b7 100644
--- a/src/com/android/settings/widget/HighlightablePreferenceGroupAdapter.java
+++ b/src/com/android/settings/widget/HighlightablePreferenceGroupAdapter.java
@@ -16,10 +16,14 @@
 
 package com.android.settings.widget;
 
+import static com.android.settings.SettingsActivity.EXTRA_FRAGMENT_ARG_KEY;
+
 import android.content.Context;
+import android.os.Bundle;
 import android.support.annotation.VisibleForTesting;
 import android.support.v7.preference.PreferenceGroup;
 import android.support.v7.preference.PreferenceGroupAdapter;
+import android.support.v7.preference.PreferenceScreen;
 import android.support.v7.preference.PreferenceViewHolder;
 import android.support.v7.widget.RecyclerView;
 import android.text.TextUtils;
@@ -27,6 +31,7 @@
 import android.view.View;
 
 import com.android.settings.R;
+import com.android.settings.SettingsPreferenceFragment;
 
 public class HighlightablePreferenceGroupAdapter extends PreferenceGroupAdapter {
 
@@ -41,6 +46,39 @@
     private boolean mHighlightRequested;
     private int mHighlightPosition = RecyclerView.NO_POSITION;
 
+
+    /**
+     * Tries to override initial expanded child count.
+     * <p/>
+     * Initial expanded child count will be ignored if:
+     * 1. fragment contains request to highlight a particular row.
+     * 2. count value is invalid.
+     */
+    public static void adjustInitialExpandedChildCount(SettingsPreferenceFragment host) {
+        if (host == null) {
+            return;
+        }
+        final PreferenceScreen screen = host.getPreferenceScreen();
+        if (screen == null) {
+            return;
+        }
+        final Bundle arguments = host.getArguments();
+        if (arguments != null) {
+            final String highlightKey = arguments.getString(EXTRA_FRAGMENT_ARG_KEY);
+            if (!TextUtils.isEmpty(highlightKey)) {
+                // Has highlight row - expand everything
+                screen.setInitialExpandedChildrenCount(Integer.MAX_VALUE);
+                return;
+            }
+        }
+
+        final int initialCount = host.getInitialExpandedChildCount();
+        if (initialCount <= 0) {
+            return;
+        }
+        screen.setInitialExpandedChildrenCount(initialCount);
+    }
+
     public HighlightablePreferenceGroupAdapter(PreferenceGroup preferenceGroup, String key,
             boolean highlightRequested) {
         super(preferenceGroup);
diff --git a/src/com/android/settings/wifi/ConfigureWifiSettings.java b/src/com/android/settings/wifi/ConfigureWifiSettings.java
index 1607b74..3fd2171 100644
--- a/src/com/android/settings/wifi/ConfigureWifiSettings.java
+++ b/src/com/android/settings/wifi/ConfigureWifiSettings.java
@@ -23,7 +23,6 @@
 import android.net.NetworkInfo;
 import android.net.NetworkScoreManager;
 import android.net.wifi.WifiManager;
-import android.os.Bundle;
 import android.provider.SearchIndexableResource;
 
 import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
@@ -44,7 +43,6 @@
 
     private static final String TAG = "ConfigureWifiSettings";
 
-    public static final String KEY_WIFI_CONFIGURE = "wifi_configure_settings_screen";
     public static final String KEY_IP_ADDRESS = "current_ip_address";
 
     private WifiWakeupPreferenceController mWifiWakeupPreferenceController;
@@ -61,13 +59,12 @@
     }
 
     @Override
-    public void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
+    public int getInitialExpandedChildCount() {
         int tileLimit = 2;
         if (mUseOpenWifiPreferenceController.isAvailable()) {
             tileLimit++;
         }
-        getPreferenceScreen().setInitialExpandedChildrenCount(tileLimit);
+        return tileLimit;
     }
 
     @Override
diff --git a/tests/robotests/src/com/android/settings/widget/HighlightablePreferenceGroupAdapterTest.java b/tests/robotests/src/com/android/settings/widget/HighlightablePreferenceGroupAdapterTest.java
index e2fb6c1..fd5800f 100644
--- a/tests/robotests/src/com/android/settings/widget/HighlightablePreferenceGroupAdapterTest.java
+++ b/tests/robotests/src/com/android/settings/widget/HighlightablePreferenceGroupAdapterTest.java
@@ -27,12 +27,16 @@
 
 import android.content.Context;
 import android.graphics.drawable.ColorDrawable;
+import android.os.Bundle;
 import android.support.v7.preference.PreferenceCategory;
+import android.support.v7.preference.PreferenceScreen;
 import android.support.v7.preference.PreferenceViewHolder;
 import android.support.v7.widget.RecyclerView;
 import android.view.View;
 
 import com.android.settings.R;
+import com.android.settings.SettingsActivity;
+import com.android.settings.SettingsPreferenceFragment;
 import com.android.settings.TestConfig;
 import com.android.settings.testutils.SettingsRobolectricTestRunner;
 
@@ -55,6 +59,9 @@
     private View mRoot;
     @Mock
     private PreferenceCategory mPreferenceCatetory;
+    @Mock
+    private SettingsPreferenceFragment mFragment;
+
     private Context mContext;
     private HighlightablePreferenceGroupAdapter mAdapter;
     private PreferenceViewHolder mViewHolder;
@@ -96,6 +103,57 @@
     }
 
     @Test
+    public void adjustInitialExpandedChildCount_invalidInput_shouldNotadjust() {
+        HighlightablePreferenceGroupAdapter.adjustInitialExpandedChildCount(null /* host */);
+        HighlightablePreferenceGroupAdapter.adjustInitialExpandedChildCount(mFragment);
+        final Bundle args = new Bundle();
+        when(mFragment.getArguments()).thenReturn(args);
+        HighlightablePreferenceGroupAdapter.adjustInitialExpandedChildCount(mFragment);
+        final PreferenceScreen screen = mock(PreferenceScreen.class);
+        when(mFragment.getArguments()).thenReturn(null);
+        when(mFragment.getPreferenceScreen()).thenReturn(screen);
+        HighlightablePreferenceGroupAdapter.adjustInitialExpandedChildCount(mFragment);
+        verifyZeroInteractions(screen);
+    }
+
+    @Test
+    public void adjustInitialExpandedChildCount_hasHightlightKey_shouldExpandAllChildren() {
+        final Bundle args = new Bundle();
+        when(mFragment.getArguments()).thenReturn(args);
+        args.putString(SettingsActivity.EXTRA_FRAGMENT_ARG_KEY, "testkey");
+        final PreferenceScreen screen = mock(PreferenceScreen.class);
+        when(mFragment.getPreferenceScreen()).thenReturn(screen);
+        HighlightablePreferenceGroupAdapter.adjustInitialExpandedChildCount(mFragment);
+
+        verify(screen).setInitialExpandedChildrenCount(Integer.MAX_VALUE);
+    }
+
+    @Test
+    public void adjustInitialExpandedChildCount_noKeyOrChildCountOverride_shouldDoNothing() {
+        final Bundle args = new Bundle();
+        when(mFragment.getArguments()).thenReturn(args);
+        when(mFragment.getInitialExpandedChildCount()).thenReturn(-1);
+        final PreferenceScreen screen = mock(PreferenceScreen.class);
+        when(mFragment.getPreferenceScreen()).thenReturn(screen);
+        HighlightablePreferenceGroupAdapter.adjustInitialExpandedChildCount(mFragment);
+
+        verify(mFragment).getInitialExpandedChildCount();
+        verifyZeroInteractions(screen);
+    }
+
+    @Test
+    public void adjustInitialExpandedChildCount_hasCountOverride_shouldDoNothing() {
+        when(mFragment.getInitialExpandedChildCount()).thenReturn(10);
+        final PreferenceScreen screen = mock(PreferenceScreen.class);
+        when(mFragment.getPreferenceScreen()).thenReturn(screen);
+        HighlightablePreferenceGroupAdapter.adjustInitialExpandedChildCount(mFragment);
+
+        verify(mFragment).getInitialExpandedChildCount();
+
+        verify(screen).setInitialExpandedChildrenCount(10);
+    }
+
+    @Test
     public void updateBackground_notHighlightedRow_shouldNotSetHighlightedTag() {
         ReflectionHelpers.setField(mAdapter, "mHighlightPosition", 10);
 
