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

Commit 9dbf6b1b authored by Matthew Sedam's avatar Matthew Sedam
Browse files

Increase the duplicate detection timeout for reliable messages to 3 seconds

Bug: 333567700
Change-Id: Ic36905f85e5639cd047a949e9945992320b8fd66
Flag: EXEMPT bugfix
Test: Presubmits
parent 13fd920f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -297,7 +297,10 @@ public class ContextHubService extends IContextHubService.Stub {
        }

        public boolean isExpired() {
            return mTimestamp + ContextHubTransactionManager.RELIABLE_MESSAGE_TIMEOUT.toNanos()
            return mTimestamp
                            + ContextHubTransactionManager
                                    .RELIABLE_MESSAGE_DUPLICATE_DETECTION_TIMEOUT
                                    .toNanos()
                    < SystemClock.elapsedRealtimeNanos();
        }
    }
+3 −0
Original line number Diff line number Diff line
@@ -56,6 +56,9 @@ import java.util.concurrent.atomic.AtomicInteger;

    public static final Duration RELIABLE_MESSAGE_TIMEOUT = Duration.ofSeconds(1);

    public static final Duration RELIABLE_MESSAGE_DUPLICATE_DETECTION_TIMEOUT =
            RELIABLE_MESSAGE_TIMEOUT.multipliedBy(3);

    private static final int MAX_PENDING_REQUESTS = 10000;

    private static final int RELIABLE_MESSAGE_MAX_NUM_RETRY = 3;