Skip to content

Commit

Permalink
update ram size value
Browse files Browse the repository at this point in the history
  • Loading branch information
fgl27 committed Oct 26, 2024
1 parent 34d69e7 commit fd160f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apk/app/src/main/java/com/fgl27/twitch/Tools.java
Original file line number Diff line number Diff line change
Expand Up @@ -687,15 +687,15 @@ static int DeviceRam(Context context) {
if (actManager != null) {
actManager.getMemoryInfo(memInfo);
} else {
return maxRamSize / 20;
return maxRamSize;
}
int ramSize = (int) memInfo.totalMem;
int ramSize = (int) (memInfo.totalMem / 20);

//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
ramSize = ramSize > maxRamSize || ramSize < 0 ? maxRamSize : ramSize;

return ramSize / 20;
return ramSize;
}

static String getWebviewVersion(Context context) {
Expand Down

0 comments on commit fd160f6

Please sign in to comment.