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

Commit 896c574b authored by Etan Cohen's avatar Etan Cohen
Browse files

[CS] Allow network factory implementations to re-evaluate requests

Change the evalRequests() API to protected to allow network factory
implementations to call the API.

A use-case of the API change is for factories temporarily reject a
request since they cannot fullfill it immediately but retry it at a
later time if/when conditions change.

Bug: 63866251
Test: integration tests
Change-Id: Idc50ce0799c67634b7b2fdbad78a26e443caf2e4
parent 0862898a
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -254,6 +254,16 @@ public class NetworkFactory extends Handler {
        }
    }

    /**
     * Post a command, on this NetworkFactory Handler, to re-evaluate all
     * oustanding requests. Can be called from a factory implementation.
     */
    protected void reevaluateAllRequests() {
        post(() -> {
            evalRequests();
        });
    }

    // override to do simple mode (request independent)
    protected void startNetwork() { }
    protected void stopNetwork() { }