Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a9af3fd authored by Juan Yescas's avatar Juan Yescas Committed by Android (Google) Code Review
Browse files

Merge "Return TotalMemory size when ddr size is not present" into udc-dev

parents 974c3d95 34f1eab4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1359,7 +1359,7 @@ public class Process {
        String formatSize = MemoryProperties.memory_ddr_size().orElse("0KB");
        long memSize = FileUtils.parseSize(formatSize);

        if (memSize == Long.MIN_VALUE) {
        if (memSize <= 0) {
            return FileUtils.roundStorageSize(getTotalMemory());
        }

+1 −0
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ public class ProcessTest extends TestCase {
    }

    public void testGetAdvertisedMem() {
        assertTrue(Process.getAdvertisedMem() > 0);
        assertTrue(Process.getTotalMemory() <= Process.getAdvertisedMem());
    }
}