Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7654e1fc authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Crash when scanning WiFi QR code" am: 6c312834 am: 7950a0ac am:...

Merge "Crash when scanning WiFi QR code" am: 6c312834 am: 7950a0ac am: 7ada247b am: 64e4a57f

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2020675

Change-Id: Ic370e0dc30be21fe0f112b2354c3b44bc7e835e0
parents 65bf3886 64e4a57f
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -168,10 +168,18 @@ public class WifiDppQrCodeScannerFragment extends WifiDppQrCodeBaseFragment impl
                    break;

                case MESSAGE_SCAN_ZXING_WIFI_FORMAT_SUCCESS:
                    final Context context = getContext();
                    if (context == null) {
                        // Context may be null if the message is received after the Activity has
                        // been destroyed
                        Log.d(TAG, "Scan success but context is null");
                        return;
                    }

                    // We may get 2 WifiConfiguration if the QR code has no password in it,
                    // one for open network and one for enhanced open network.
                    final WifiManager wifiManager =
                            getContext().getSystemService(WifiManager.class);
                            context.getSystemService(WifiManager.class);
                    final WifiNetworkConfig qrCodeWifiNetworkConfig =
                            (WifiNetworkConfig)msg.obj;
                    final List<WifiConfiguration> qrCodeWifiConfigurations =
+1 −0
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@ public class QrCamera extends Handler {
        }
        if (mCamera != null) {
            mCamera.stopPreview();
            releaseCamera();
        }
    }