File tree Expand file tree Collapse file tree 10 files changed +16
-7
lines changed
kotlin/com/woocommerce/android/ui Expand file tree Collapse file tree 10 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <?xml version =" 1.0" encoding =" UTF-8" ?>
3
2
<lint >
4
3
<!-- WARNING -->
5
4
Original file line number Diff line number Diff line change 214
214
<service
215
215
android : name =" .media.ProductImagesJobService"
216
216
android : exported =" false"
217
- android : permission =" android.permission.BIND_JOB_SERVICE" />
217
+ android : permission =" android.permission.BIND_JOB_SERVICE"
218
+ tools : ignore =" NewApi" />
218
219
219
220
<!-- Provider for exposing file URIs on Android 7+ (required for camera) -->
220
221
<provider
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package com.woocommerce.android.ui.barcodescanner
2
2
3
3
import androidx.activity.compose.ManagedActivityResultLauncher
4
4
import androidx.annotation.StringRes
5
+ import androidx.camera.core.ExperimentalGetImage
5
6
import androidx.camera.core.ImageProxy
6
7
import androidx.lifecycle.LiveData
7
8
import androidx.lifecycle.MutableLiveData
@@ -39,6 +40,7 @@ class BarcodeScanningViewModel @Inject constructor(
39
40
fun startCodesRecognition () {
40
41
frameChannel = createChannel()
41
42
processingJob = launch {
43
+ @ExperimentalGetImage
42
44
for (frame in frameChannel) {
43
45
codeScanner.recogniseCode(frame).let { status ->
44
46
when (status) {
Original file line number Diff line number Diff line change 1
1
package com.woocommerce.android.ui.orders.creation
2
2
3
3
import android.os.Parcelable
4
+ import androidx.camera.core.ExperimentalGetImage
4
5
import androidx.camera.core.ImageProxy
5
6
import com.woocommerce.android.ui.orders.creation.GoogleBarcodeFormatMapper.BarcodeFormat
6
7
import kotlinx.parcelize.Parcelize
7
8
8
9
interface CodeScanner {
10
+ @ExperimentalGetImage
9
11
suspend fun recogniseCode (imageProxy : ImageProxy ): CodeScannerStatus
10
12
}
11
13
Original file line number Diff line number Diff line change 1
1
package com.woocommerce.android.ui.orders.creation
2
2
3
+ import androidx.camera.core.ExperimentalGetImage
3
4
import androidx.camera.core.ImageProxy
4
5
import com.google.mlkit.vision.barcode.BarcodeScanner
5
6
import com.google.mlkit.vision.barcode.common.Barcode
@@ -14,8 +15,8 @@ class GoogleMLKitCodeScanner @Inject constructor(
14
15
private val barcodeFormatMapper : GoogleBarcodeFormatMapper ,
15
16
private val inputImageProvider : MediaImageProvider ,
16
17
) : CodeScanner {
18
+ @ExperimentalGetImage
17
19
override suspend fun recogniseCode (imageProxy : ImageProxy ): CodeScannerStatus = suspendCoroutine { cont ->
18
- @androidx.camera.core.ExperimentalGetImage
19
20
val image = inputImageProvider.provideImage(imageProxy)
20
21
21
22
val barcodeTask = barcodeScanner.process(image)
Original file line number Diff line number Diff line change 1
1
[versions ]
2
- agp = ' 8.5.1 '
2
+ agp = ' 8.8.0 '
3
3
android-billingclient = ' 5.0.0'
4
4
android-desugar = ' 2.1.3'
5
5
android-security-lint = ' 1.0.1'
Original file line number Diff line number Diff line change 1
1
distributionBase =GRADLE_USER_HOME
2
2
distributionPath =wrapper/dists
3
- distributionSha256Sum =f8b4f4772d302c8ff580bc40d0f56e715de69b163546944f787c87abf209c961
4
- distributionUrl =https\://services.gradle.org/distributions/gradle-8.8 -all.zip
3
+ distributionSha256Sum =296742a352f0b20ec14b143fb684965ad66086c7810b7b255dee216670716175
4
+ distributionUrl =https\://services.gradle.org/distributions/gradle-8.12.1 -all.zip
5
5
networkTimeout =10000
6
6
validateDistributionUrl =true
7
7
zipStoreBase =GRADLE_USER_HOME
Original file line number Diff line number Diff line change 15
15
# See the License for the specific language governing permissions and
16
16
# limitations under the License.
17
17
#
18
+ # SPDX-License-Identifier: Apache-2.0
19
+ #
18
20
19
21
# #############################################################################
20
22
#
84
86
# shellcheck disable=SC2034
85
87
APP_BASE_NAME=${0##*/ }
86
88
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87
- APP_HOME=$( cd " ${APP_HOME:- ./ } " > /dev/null && pwd -P ) || exit
89
+ APP_HOME=$( cd -P " ${APP_HOME:- ./ } " > /dev/null && printf ' %s\n ' " $PWD " ) || exit
88
90
89
91
# Use the maximum available, or set MAX_FD != -1 to use that value.
90
92
MAX_FD=maximum
Original file line number Diff line number Diff line change 13
13
@ rem See the License for the specific language governing permissions and
14
14
@ rem limitations under the License.
15
15
@ rem
16
+ @ rem SPDX-License-Identifier: Apache-2.0
17
+ @ rem
16
18
17
19
@ if " %DEBUG% " == " " @ echo off
18
20
@ rem ##########################################################################
You can’t perform that action at this time.
0 commit comments