diff --git a/res/layout/data_usage_summary.xml b/res/layout/data_usage_summary.xml index fc62465d41b..41b8eed9b7e 100644 --- a/res/layout/data_usage_summary.xml +++ b/res/layout/data_usage_summary.xml @@ -40,7 +40,8 @@ android:id="@android:id/list" android:layout_width="match_parent" android:layout_height="0dip" - android:layout_weight="1" /> + android:layout_weight="1" + android:smoothScrollbar="false" /> diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java index 2350d540dba..19caed87861 100644 --- a/src/com/android/settings/DataUsageSummary.java +++ b/src/com/android/settings/DataUsageSummary.java @@ -135,6 +135,7 @@ public class DataUsageSummary extends Fragment { final Context context = getActivity(); final String subscriberId = getActiveSubscriberId(context); mPolicyModifier = new NetworkPolicyModifier(mPolicyService, subscriberId); + mPolicyModifier.read(); setHasOptionsMenu(true); } @@ -194,9 +195,6 @@ public class DataUsageSummary extends Fragment { public void onResume() { super.onResume(); - // read current policy state from service - mPolicyModifier.read(); - // this kicks off chain reaction which creates tabs, binds the body to // selected network, and binds chart, cycles and detail list. updateTabs(); @@ -233,6 +231,14 @@ public class DataUsageSummary extends Fragment { return false; } + @Override + public void onDestroyView() { + super.onDestroyView(); + + mDataEnabledView = null; + mDisableAtLimitView = null; + } + /** * Rebuild all tabs based on {@link NetworkPolicyModifier} and * {@link #mShowWifi}, hiding the tabs entirely when applicable. Selects