Settings: Fix crash in SUW

10-28 18:30:05.867  3687  3687 D AndroidRuntime: Shutting down VM
10-28 18:30:05.868  3687  3687 E AndroidRuntime: FATAL EXCEPTION: main
10-28 18:30:05.868  3687  3687 E AndroidRuntime: Process: com.android.settings, PID: 3687
10-28 18:30:05.868  3687  3687 E AndroidRuntime: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=799414034, result=-1, data=Intent { (has extras) }} to activity {com.android.settings/com.android.settings.network.NetworkSetupActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.net.wifi.WifiManager.connect(android.net.wifi.WifiConfiguration, android.net.wifi.WifiManager$ActionListener)' on a null object reference
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at android.app.ActivityThread.deliverResults(ActivityThread.java:5304)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at android.app.ActivityThread.handleSendResult(ActivityThread.java:5343)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:54)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2214)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:106)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at android.os.Looper.loopOnce(Looper.java:201)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:288)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:7842)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:550)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
10-28 18:30:05.868  3687  3687 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.net.wifi.WifiManager.connect(android.net.wifi.WifiConfiguration, android.net.wifi.WifiManager$ActionListener)' on a null object reference
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at com.android.settings.network.NetworkProviderSettings.onActivityResult(NetworkProviderSettings.java:519)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at androidx.fragment.app.FragmentManager$9.onActivityResult(FragmentManager.java:3011)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at androidx.fragment.app.FragmentManager$9.onActivityResult(FragmentManager.java:2991)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at androidx.activity.result.ActivityResultRegistry.doDispatch(ActivityResultRegistry.java:362)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at androidx.activity.result.ActivityResultRegistry.dispatchResult(ActivityResultRegistry.java:322)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at androidx.activity.ComponentActivity.onActivityResult(ComponentActivity.java:634)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at androidx.fragment.app.FragmentActivity.onActivityResult(FragmentActivity.java:164)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at com.android.settings.SettingsActivity.onActivityResult(SettingsActivity.java:364)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at android.app.Activity.dispatchActivityResult(Activity.java:8382)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        at android.app.ActivityThread.deliverResults(ActivityThread.java:5297)
10-28 18:30:05.868  3687  3687 E AndroidRuntime:        ... 13 more
1 file changed