diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java
index 1255b6b..3b0ce59 100644
--- a/src/com/android/settings/DataUsageSummary.java
+++ b/src/com/android/settings/DataUsageSummary.java
@@ -394,9 +394,6 @@
         mUsageSummary = (TextView) mHeader.findViewById(R.id.usage_summary);
         mEmpty = (TextView) mHeader.findViewById(android.R.id.empty);
 
-        // only assign layout transitions once first layout is finished
-        mListView.getViewTreeObserver().addOnGlobalLayoutListener(mFirstLayoutListener);
-
         mAdapter = new DataUsageAdapter(mUidDetailProvider, mInsetSide);
         mListView.setOnItemClickListener(mListListener);
         mListView.setAdapter(mAdapter);
@@ -574,25 +571,22 @@
     }
 
     /**
-     * Listener to setup {@link LayoutTransition} after first layout pass.
+     * Build and assign {@link LayoutTransition} to various containers. Should
+     * only be assigned after initial layout is complete.
      */
-    private OnGlobalLayoutListener mFirstLayoutListener = new OnGlobalLayoutListener() {
-        @Override
-        public void onGlobalLayout() {
-            mListView.getViewTreeObserver().removeOnGlobalLayoutListener(mFirstLayoutListener);
+    private void ensureLayoutTransitions() {
+        // skip when already setup
+        if (mChart.getLayoutTransition() != null) return;
 
-            mTabsContainer.setLayoutTransition(buildLayoutTransition());
-            mHeader.setLayoutTransition(buildLayoutTransition());
-            mNetworkSwitchesContainer.setLayoutTransition(buildLayoutTransition());
+        mTabsContainer.setLayoutTransition(buildLayoutTransition());
+        mHeader.setLayoutTransition(buildLayoutTransition());
+        mNetworkSwitchesContainer.setLayoutTransition(buildLayoutTransition());
 
-            final LayoutTransition chartTransition = buildLayoutTransition();
-            chartTransition.setStartDelay(LayoutTransition.APPEARING, 0);
-            chartTransition.setStartDelay(LayoutTransition.DISAPPEARING, 0);
-            chartTransition.setAnimator(LayoutTransition.APPEARING, null);
-            chartTransition.setAnimator(LayoutTransition.DISAPPEARING, null);
-            mChart.setLayoutTransition(chartTransition);
-        }
-    };
+        final LayoutTransition chartTransition = buildLayoutTransition();
+        chartTransition.disableTransitionType(LayoutTransition.APPEARING);
+        chartTransition.disableTransitionType(LayoutTransition.DISAPPEARING);
+        mChart.setLayoutTransition(chartTransition);
+    }
 
     private static LayoutTransition buildLayoutTransition() {
         final LayoutTransition transition = new LayoutTransition();
@@ -1176,6 +1170,9 @@
         }
 
         mUsageSummary.setText(getString(summaryRes, totalPhrase, rangePhrase));
+
+        // initial layout is finished above, ensure we have transitions
+        ensureLayoutTransitions();
     }
 
     private final LoaderCallbacks<ChartData> mChartDataCallbacks = new LoaderCallbacks<
