From 41588c67fd4d6b8cb2551da81bb128cb45dd584b Mon Sep 17 00:00:00 2001 From: WenmuZhou Date: Mon, 10 May 2021 14:09:15 +0800 Subject: [PATCH] Adapt to paddle lite 2.9 --- deploy/android_demo/app/build.gradle | 2 +- .../java/com/baidu/paddle/lite/demo/ocr/MainActivity.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/android_demo/app/build.gradle b/deploy/android_demo/app/build.gradle index 63c66773..cff8d5f6 100644 --- a/deploy/android_demo/app/build.gradle +++ b/deploy/android_demo/app/build.gradle @@ -48,7 +48,7 @@ dependencies { def archives = [ [ - 'src' : 'https://paddleocr.bj.bcebos.com/dygraph_v2.0/lite/paddle_lite_libs_v2_8_0.gz', + 'src' : 'https://paddleocr.bj.bcebos.com/dygraph_v2.0/lite/paddle_lite_libs_v2_9_0.tar.gz', 'dest': 'PaddleLite' ], [ diff --git a/deploy/android_demo/app/src/main/java/com/baidu/paddle/lite/demo/ocr/MainActivity.java b/deploy/android_demo/app/src/main/java/com/baidu/paddle/lite/demo/ocr/MainActivity.java index 4c45ba16..1c83e218 100644 --- a/deploy/android_demo/app/src/main/java/com/baidu/paddle/lite/demo/ocr/MainActivity.java +++ b/deploy/android_demo/app/src/main/java/com/baidu/paddle/lite/demo/ocr/MainActivity.java @@ -429,8 +429,8 @@ public class MainActivity extends AppCompatActivity { String[] proj = {MediaStore.Images.Media.DATA}; Cursor cursor = managedQuery(uri, proj, null, null, null); cursor.moveToFirst(); - onImageChanged(image); if (image != null) { +// onImageChanged(image); ivInputImage.setImageBitmap(image); } } catch (IOException e) { @@ -450,8 +450,8 @@ public class MainActivity extends AppCompatActivity { Log.i(TAG, "rotation " + orientation); Bitmap image = BitmapFactory.decodeFile(currentPhotoPath); image = Utils.rotateBitmap(image, orientation); - onImageChanged(image); if (image != null) { +// onImageChanged(image); ivInputImage.setImageBitmap(image); } } else { -- GitLab