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

Commit b27e167d authored by Patrick O'Leary's avatar Patrick O'Leary
Browse files

Workaround exception caused by incorrect system time (before 1970) reported on IRC by drbobb.

parent 8cc83ac3
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -900,7 +900,12 @@ public class ThrottleService extends IThrottleManager.Stub {
                dataFile = new File(throttleDir, imsiHash);
                dataFile = new File(throttleDir, imsiHash);
            }
            }
            // touch the file so it's not LRU
            // touch the file so it's not LRU
	    if (System.currentTimeMillis() >= 0) {
		dataFile.setLastModified(System.currentTimeMillis());
		dataFile.setLastModified(System.currentTimeMillis());
	    } else {
		// system clock is out of whack, but that doesn't mean we can't boot
		dataFile.setLastModified(Long.MAX_VALUE);
	    }
            checkAndDeleteLRUDataFile(throttleDir);
            checkAndDeleteLRUDataFile(throttleDir);
            return dataFile;
            return dataFile;
        }
        }