Merge "Fix the NPE issue" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
74babf6e91
@@ -201,7 +201,7 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
|
||||
* ensure that behavior is consistent if {@link #isUiRestricted()} changes. It could be changed
|
||||
* by the Test DPC tool in AFW mode.
|
||||
*/
|
||||
private boolean mIsRestricted;
|
||||
protected boolean mIsRestricted;
|
||||
|
||||
@VisibleForTesting
|
||||
AirplaneModeEnabler mAirplaneModeEnabler;
|
||||
@@ -219,7 +219,8 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
|
||||
PreferenceCategory mConnectedWifiEntryPreferenceCategory;
|
||||
@VisibleForTesting
|
||||
PreferenceCategory mFirstWifiEntryPreferenceCategory;
|
||||
private PreferenceCategory mWifiEntryPreferenceCategory;
|
||||
@VisibleForTesting
|
||||
PreferenceCategory mWifiEntryPreferenceCategory;
|
||||
@VisibleForTesting
|
||||
AddWifiNetworkPreference mAddWifiNetworkPreference;
|
||||
private WifiSwitchPreferenceController mWifiSwitchPreferenceController;
|
||||
@@ -794,7 +795,11 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
|
||||
}
|
||||
}
|
||||
|
||||
private void updateWifiEntryPreferences() {
|
||||
protected void updateWifiEntryPreferences() {
|
||||
// bypass the update if the activity and the view are not ready, or it's restricted UI.
|
||||
if (getActivity() == null || getView() == null || mIsRestricted) {
|
||||
return;
|
||||
}
|
||||
// in case state has changed
|
||||
if (mWifiPickerTracker.getWifiState() != WifiManager.WIFI_STATE_ENABLED) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user