diff options
| -rw-r--r-- | tests/Internal/src/com/android/internal/os/ApplicationSharedMemoryTest.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/Internal/src/com/android/internal/os/ApplicationSharedMemoryTest.java b/tests/Internal/src/com/android/internal/os/ApplicationSharedMemoryTest.java index e3a129fb1059..d03ad5cb2877 100644 --- a/tests/Internal/src/com/android/internal/os/ApplicationSharedMemoryTest.java +++ b/tests/Internal/src/com/android/internal/os/ApplicationSharedMemoryTest.java @@ -61,8 +61,13 @@ public class ApplicationSharedMemoryTest { @Test public void canRead() { ApplicationSharedMemory instance = ApplicationSharedMemory.getInstance(); - instance.getLatestNetworkTimeUnixEpochMillisAtZeroElapsedRealtimeMillis(); - // Don't actually care about the value of the above. + try { + instance.getLatestNetworkTimeUnixEpochMillisAtZeroElapsedRealtimeMillis(); + // Don't actually care about the value of the above. + } catch (java.time.DateTimeException e) { + // This exception is okay during testing. It means there was no time source, which + // could be because of network problems or a feature being flagged off. + } } /** Application processes should not have mutable access. */ |