Should not setPreviewSize from the value of getBestPictureSize.
Bug: 142630420
Test: QrCameraTest
manual:
visually make sure QR code scanner image not distorted.
Change-Id: I280beddac95ed65118af802c396d15da306e029b
As per the Google's design mentioned at
https://developer.android.com/training/camera/cameradirect.html
Calling Camera.open() throws an exception
if the camera is already in use by another application,
so we wrap it in a try block one must release the camera before opening
Bug: 141662635
Test: Manual occurs once while testing 10 times
1.Open wifi settings,tap QR code icon
2.Make a incoming VoLTE call,tap incoming VoLTE call dialog
3.Check device
Signed-off-by: JeiFeng Lee <linger.lee@mediatek.com>
Change-Id: Ief62600af8b745cb4eae2e5ae277a2cebdda68eb
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