summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/DataUsageSummary.java
diff options
context:
space:
mode:
authorJaewan Kim <jaewan@google.com>2013-03-19 16:53:45 +0900
committerJaewan Kim <jaewan@google.com>2013-03-20 11:22:30 +0900
commitffce9c1e9aaaf48b56c40b52fd6b2f80d416ffb2 (patch)
tree3f34d6021ba64a0ad6ffcb1a12d73b39fd973cdd /src/com/android/settings/DataUsageSummary.java
parentae9ebfd153d63beb03c018786cb3a7ca7610ce64 (diff)
downloadpackages_apps_Settings-ffce9c1e9aaaf48b56c40b52fd6b2f80d416ffb2.zip
packages_apps_Settings-ffce9c1e9aaaf48b56c40b52fd6b2f80d416ffb2.tar.gz
packages_apps_Settings-ffce9c1e9aaaf48b56c40b52fd6b2f80d416ffb2.tar.bz2
Enable Ethernet tab in data usage
mStateSession is not initialized at the time hasEthernet is called to set mShowEthernet, so Ethernet tab is not shown at the startup. In this case, if the device doesn't support mobile network, user cannot even select it from the context menu. Bug: 8365419 Change-Id: I441971f18346c34a3adf3f18d9355075d9dce3f0
Diffstat (limited to 'src/com/android/settings/DataUsageSummary.java')
-rw-r--r--src/com/android/settings/DataUsageSummary.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/com/android/settings/DataUsageSummary.java b/src/com/android/settings/DataUsageSummary.java
index ae67d3a..963f864 100644
--- a/src/com/android/settings/DataUsageSummary.java
+++ b/src/com/android/settings/DataUsageSummary.java
@@ -277,13 +277,19 @@ public class DataUsageSummary extends Fragment {
mPolicyEditor = new NetworkPolicyEditor(mPolicyManager);
mPolicyEditor.read();
+ try {
+ mStatsSession = mStatsService.openSession();
+ } catch (RemoteException e) {
+ throw new RuntimeException(e);
+ }
+
mShowWifi = mPrefs.getBoolean(PREF_SHOW_WIFI, false);
mShowEthernet = mPrefs.getBoolean(PREF_SHOW_ETHERNET, false);
// override preferences when no mobile radio
if (!hasReadyMobileRadio(context)) {
- mShowWifi = hasWifiRadio(context);
- mShowEthernet = hasEthernet(context);
+ mShowWifi = true;
+ mShowEthernet = true;
}
setHasOptionsMenu(true);
@@ -298,12 +304,6 @@ public class DataUsageSummary extends Fragment {
mUidDetailProvider = new UidDetailProvider(context);
- try {
- mStatsSession = mStatsService.openSession();
- } catch (RemoteException e) {
- throw new RuntimeException(e);
- }
-
mTabHost = (TabHost) view.findViewById(android.R.id.tabhost);
mTabsContainer = (ViewGroup) view.findViewById(R.id.tabs_container);
mTabWidget = (TabWidget) view.findViewById(android.R.id.tabs);