1. Should only set picture size from the list of supported picture sizes.
To choose the best picture size, we should keep ratio as preview size to
avoid image distortion and QR code scan failure.
2. When Camera#setOneShotPreviewCallback callbacks, the image data is of
preview size, not picture size.
Bug: 132866467
Test: QrCameraTest
manual
Change-Id: I087e5fcdf064f111e915e0872b50ca5a45ff1d26
1. Implements WifiNetworkConfig Wi-Fi connection method
2. Shows error message when the QR code is not valid and hides it after 2s
3. In configurator mode, launchs AddDeviceFragment for a valid QR code
4. In enrollee mode, connects Wi-Fi for a valid QR code
Bug: 118794978
Test: manual test
atest WifiQrCodetest
atest WifiDppConfiguratorActivityTest
atest WifiDppEnrolleeActivityTest
atest WifiDppQrCodeScannerFragmentTest
Change-Id: Ie4731b22df295c60906156d33ea28dad9c084ce4
1.Choose the smaller size of both dimensions as its size.
2.Set transform matrix to crop and center the preview picture.
Bug: 118797380
Test: make RunSettingsRoboTests
Change-Id: Ic65fb1fe0c5082995d6903f50dda48eec16c3fb1
Compares aspect ratio of camera preview and preview window to get better
preview size.
Bug: 118797380
Test: RunSettingsRoboTests
Change-Id: I5c58691b02c2b5d9709ff956e86ca301196d5664