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

Commit 9a9db78d authored by Neil Fuller's avatar Neil Fuller
Browse files

Fix incorrect order of arguments / fix bug

android.util.TimestampedValue's constructor arguments
are reversed from the replaced telephony TimeStampedValue
class. This constructor was not reversed when it should
have been.

Also, both values should be adjusted to account for
elapsedRealtimeMillis changing, or neither. The reference
time was not updated but the system clock time was, which
would lead to errors creeping in. This commit changes the
code to use the original NITZ signal values.

Bug: 78217059
Test: Build
Change-Id: I8de75be56624bd737b9312c9655057b0f8251be2
parent 963c98ad
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -383,7 +383,8 @@ public final class NewNitzStateMachine implements NitzStateMachine {
                // Save the last NITZ time signal used so we can return to it later
                // if auto-time detection is toggled.
                mSavedNitzTime = new TimestampedValue<>(
                        adjustedCurrentTimeMillis, nitzSignal.getReferenceTimeMillis());
                        nitzSignal.getReferenceTimeMillis(),
                        nitzSignal.getValue().getCurrentTimeInMillis());
            } finally {
                mWakeLock.release();
            }
+2 −1
Original line number Diff line number Diff line
@@ -383,7 +383,8 @@ public final class OldNitzStateMachine implements NitzStateMachine {
                // Save the last NITZ time signal used so we can return to it later
                // if auto-time detection is toggled.
                mSavedNitzTime = new TimestampedValue<>(
                        adjustedCurrentTimeMillis, nitzSignal.getReferenceTimeMillis());
                        nitzSignal.getReferenceTimeMillis(),
                        nitzSignal.getValue().getCurrentTimeInMillis());
            } finally {
                mWakeLock.release();
            }