From fc384d2657b1ca3b826508ea0c5a2cba27c82cc2 Mon Sep 17 00:00:00 2001 From: MankaranSingh Date: Fri, 2 Jun 2023 22:39:20 +0530 Subject: [PATCH] remove wakelock, causes crash on some devices --- .../src/main/java/ai.flow.android/AndroidLauncher.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/android/src/main/java/ai.flow.android/AndroidLauncher.java b/android/src/main/java/ai.flow.android/AndroidLauncher.java index 76a56f29..fd8f8880 100644 --- a/android/src/main/java/ai.flow.android/AndroidLauncher.java +++ b/android/src/main/java/ai.flow.android/AndroidLauncher.java @@ -81,11 +81,11 @@ protected void onCreate(Bundle savedInstanceState) { PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "ai.flow.app::wakelock"); // acquiring wakelock causes crash on some devices. - try { - wakeLock.acquire(); - } catch (Exception e){ - System.err.println(e); - } + //try { + // wakeLock.acquire(); + //} catch (Exception e){ + // System.err.println(e); + //} // tune system for max throughput. Does this really help ? //if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {