Merge "Fix Data Usage restrict logic, scrolling." into jb-mr2-dev

This commit is contained in:
Jeff Sharkey
2013-03-25 23:13:21 +00:00
committed by Android (Google) Code Review

View File

@@ -77,7 +77,6 @@ import android.net.NetworkStats;
import android.net.NetworkStatsHistory;
import android.net.NetworkTemplate;
import android.net.TrafficStats;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.INetworkManagementService;
@@ -329,6 +328,7 @@ public class DataUsageSummary extends Fragment {
mHeader = (ViewGroup) inflater.inflate(R.layout.data_usage_header, mListView, false);
mHeader.setClickable(true);
mListView.addHeaderView(new View(context), null, true);
mListView.addHeaderView(mHeader, null, true);
mListView.setItemsCanFocus(true);
@@ -454,9 +454,9 @@ public class DataUsageSummary extends Fragment {
mMenuDataRoaming.setChecked(getDataRoaming());
mMenuRestrictBackground = menu.findItem(R.id.data_usage_menu_restrict_background);
mMenuRestrictBackground.setVisible(hasReadyMobileRadio(context) && !appDetailMode);
mMenuRestrictBackground.setVisible(
hasReadyMobileRadio(context) && isOwner && !appDetailMode);
mMenuRestrictBackground.setChecked(mPolicyManager.getRestrictBackground());
mMenuRestrictBackground.setVisible(isOwner);
mMenuAutoSync = menu.findItem(R.id.data_usage_menu_auto_sync);
mMenuAutoSync.setChecked(ContentResolver.getMasterSyncAutomatically());