Fix robolectric / mockito test

Fix robolectric / mockito test.

Make TimeResult non-final for mocking. This test probably used to work
but something probably changed with mockito, breaking the test. Maybe
related to b/266973332 / b/265320139.

Efforts to switch to inline mockmaker to enable mocking of final classes
again failed, so this commit changes the class to be non-final again to
get it passing.

Bug: 266973332
Test: atest ./src/com/android/server/location/gnss/NtpNetworkTimeHelperTest.java
Change-Id: I150d9f33c9c5c012bf580a2b831f2a1de83c209a
This commit is contained in:
Neil Fuller
2023-02-10 20:38:41 +00:00
parent 6b5b4c4181
commit c06d0bc0ca

View File

@@ -129,7 +129,8 @@ public abstract class NtpTrustedTime implements TrustedTime {
*
* @hide
*/
public static final class TimeResult {
// Non-final for mocking frameworks
public static class TimeResult {
private final long mUnixEpochTimeMillis;
private final long mElapsedRealtimeMillis;
private final int mUncertaintyMillis;