summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2012-09-12 14:27:43 -0700
committerChristopher Tate <ctate@google.com>2012-09-12 14:27:43 -0700
commitdf5a62e30be409d2b80c896fa333d155a9198522 (patch)
treea438a5c68f0b97fd55ff8a5a1775169e2bf20d54 /src
parentfc76a78c458ac90d7e050ffc233cf9e32a2d9c0b (diff)
downloadpackages_apps_settings-df5a62e30be409d2b80c896fa333d155a9198522.zip
packages_apps_settings-df5a62e30be409d2b80c896fa333d155a9198522.tar.gz
packages_apps_settings-df5a62e30be409d2b80c896fa333d155a9198522.tar.bz2
Don't crash during setup of secondary users
Make sure to call super.onActivityCreated() even in the short-circuit case where there's an early 'return'. This has probably been broken for a long time but was never exercised while bringing up a new-from- scratch device, but is the usual code path now for secondary users. Change-Id: I0c1a5116440908d65750133689507917307e1dcd
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/wifi/WifiSettings.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index a4ee589..b28aef3 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -239,7 +239,6 @@ public class WifiSettings extends SettingsPreferenceFragment
// We don't call super.onActivityCreated() here, since it assumes we already set up
// Preference (probably in onCreate()), while WifiSettings exceptionally set it up in
// this method.
-
mP2pSupported = getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI_DIRECT);
mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
@@ -295,6 +294,7 @@ public class WifiSettings extends SettingsPreferenceFragment
getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);
if (connectivity != null
&& connectivity.getNetworkInfo(ConnectivityManager.TYPE_WIFI).isConnected()) {
+ super.onActivityCreated(savedInstanceState);
activity.finish();
return;
}