Move super call to top of onActivityCreated
The historical reasons for not calling super.onActivityCreated early on appear to be no longer relevant. Bug: 6935999 Change-Id: I63aad8a4c70ce938ecb07541267cad44e3e18e13
This commit is contained in:
@@ -236,9 +236,8 @@ public class WifiSettings extends SettingsPreferenceFragment
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
// 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.
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
mP2pSupported = getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI_DIRECT);
|
||||
mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
|
||||
|
||||
@@ -294,7 +293,6 @@ 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;
|
||||
}
|
||||
@@ -356,9 +354,6 @@ public class WifiSettings extends SettingsPreferenceFragment
|
||||
registerForContextMenu(getListView());
|
||||
}
|
||||
setHasOptionsMenu(true);
|
||||
|
||||
// After confirming PreferenceScreen is available, we call super.
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user