Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
fgl27 committed Oct 25, 2024
1 parent 8fc12b3 commit 454b8b7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apk/app/src/main/java/com/fgl27/twitch/Tools.java
Original file line number Diff line number Diff line change
Expand Up @@ -689,11 +689,13 @@ static int DeviceRam(Context context) {
} else {
return maxRamSize / 20;
}
int ramSize = (int) (memInfo.totalMem / 20);
int ramSize = (int) memInfo.totalMem;

//Prevent Ram too big bigger then max int value
//Or just too big even on devices with a lot of RAM it can't be too large
return ramSize > maxRamSize || ramSize < 0 ? maxRamSize : ramSize;
ramSize = ramSize > maxRamSize || ramSize < 0 ? maxRamSize : ramSize;

return ramSize / 20;
}

static String getWebviewVersion(Context context) {
Expand Down

0 comments on commit 454b8b7

Please sign in to comment.