From 871b0dc62554b1b8271df29ae1dc76e19004ba40 Mon Sep 17 00:00:00 2001 From: shahawi Date: Fri, 23 Apr 2021 21:48:51 +0200 Subject: [PATCH] Alert is causing problems on MIUI and other third party OSes // This alert is causing problems on MIUI and other third party OSes, I believe it is not necessary to be shown. // This alert always appears on a Xiaomi mi 9 with 6 GBs of ram /* new AlertDialog.Builder(this) .setTitle(R.string.low_memory) .setMessage(R.string.low_memory_message) .create() .show(); */ --- .../src/main/java/com/scanlibrary/ScanActivity.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ScanDemoExample/scanlibrary/src/main/java/com/scanlibrary/ScanActivity.java b/ScanDemoExample/scanlibrary/src/main/java/com/scanlibrary/ScanActivity.java index 5a98566a..fff9ba86 100644 --- a/ScanDemoExample/scanlibrary/src/main/java/com/scanlibrary/ScanActivity.java +++ b/ScanDemoExample/scanlibrary/src/main/java/com/scanlibrary/ScanActivity.java @@ -94,11 +94,15 @@ public void onTrimMemory(int level) { If the event is TRIM_MEMORY_COMPLETE, the process will be one of the first to be terminated. */ - new AlertDialog.Builder(this) + +// This alert is causing problems on MIUI and other third party OSes, I believe it is not necessary to be shown. +// This alert always appears on a Xiaomi mi 9 with 6 GBs of ram + /* new AlertDialog.Builder(this) .setTitle(R.string.low_memory) .setMessage(R.string.low_memory_message) .create() .show(); + */ break; default: /* @@ -125,4 +129,4 @@ public void onTrimMemory(int level) { System.loadLibrary("opencv_java3"); System.loadLibrary("Scanner"); } -} \ No newline at end of file +}