Merge "Fix ConnectivityManager.requestNetwork crash issue when try again" into tm-dev am: 764d7f4b73
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/17321717 Change-Id: I2f3e5559c012457715257e5734121ae936f99782
This commit is contained in:
@@ -58,12 +58,17 @@ public class NetworkRequestDialogActivity extends FragmentActivity implements
|
||||
final static String EXTRA_IS_SPECIFIED_SSID =
|
||||
"com.android.settings.wifi.extra.REQUEST_IS_FOR_SINGLE_NETWORK";
|
||||
|
||||
@VisibleForTesting NetworkRequestDialogBaseFragment mDialogFragment;
|
||||
@VisibleForTesting
|
||||
NetworkRequestDialogBaseFragment mDialogFragment;
|
||||
@VisibleForTesting
|
||||
boolean mIsSpecifiedSsid;
|
||||
@VisibleForTesting
|
||||
boolean mShowingErrorDialog;
|
||||
@VisibleForTesting
|
||||
ProgressDialog mProgressDialog;
|
||||
|
||||
private NetworkRequestUserSelectionCallback mUserSelectionCallback;
|
||||
private boolean mIsSpecifiedSsid;
|
||||
private boolean mShowingErrorDialog;
|
||||
private WifiConfiguration mMatchedConfig;
|
||||
@VisibleForTesting ProgressDialog mProgressDialog;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
@@ -103,7 +108,8 @@ public class NetworkRequestDialogActivity extends FragmentActivity implements
|
||||
mDialogFragment.show(getSupportFragmentManager(), TAG);
|
||||
}
|
||||
|
||||
private void dismissDialogs() {
|
||||
@VisibleForTesting
|
||||
void dismissDialogs() {
|
||||
if (mDialogFragment != null) {
|
||||
mDialogFragment.dismiss();
|
||||
mDialogFragment = null;
|
||||
@@ -174,7 +180,9 @@ public class NetworkRequestDialogActivity extends FragmentActivity implements
|
||||
return;
|
||||
}
|
||||
|
||||
mDialogFragment.onUserSelectionCallbackRegistration(userSelectionCallback);
|
||||
if (mDialogFragment != null) {
|
||||
mDialogFragment.onUserSelectionCallbackRegistration(userSelectionCallback);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -201,7 +209,9 @@ public class NetworkRequestDialogActivity extends FragmentActivity implements
|
||||
return;
|
||||
}
|
||||
|
||||
mDialogFragment.onMatch(scanResults);
|
||||
if (mDialogFragment != null) {
|
||||
mDialogFragment.onMatch(scanResults);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user