Skip to content

Commit

Permalink
remove wakelock, causes crash on some devices
Browse files Browse the repository at this point in the history
  • Loading branch information
MankaranSingh committed Jun 2, 2023
1 parent e893b4b commit fc384d2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions android/src/main/java/ai.flow.android/AndroidLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fc384d2

Please sign in to comment.