summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2016-07-20 02:39:22 +0900
committerLorenzo Colitti <lorenzo@google.com>2016-09-09 18:28:00 +0900
commit72bbf4829dffb5918b859867a63c5597cd461e1a (patch)
tree274b066596ed1e617be0b5f0e373645d422f244d /tools/aapt2/java/JavaClassGenerator.cpp
parentc60f54edfb719fa8a31e842c46cf63dff8841cad (diff)
Rematch requests first and listens second.
This CL splits rematching in two parts: first rematch requests, then rematch listens. This will allow us to change a network's capabilities depending on what requests are on that network, and properly dispatch callbacks depending on those capabilities. The behaviour changes are as follows: - Before this CL, callbacks for requests and listens were sent intermingled. After this CL, all request callbacks will be grouped together, and all listen callbacks will be grouped together. - Before this CL, the order was: 1. Send onLost callbacks. 2. If applicable, switch the default network. 3. Send onAvailable callbacks. After this CL, the order is: 1. Send onLost callbacks for requests. 2. If applicable, switch the default network. 3. Send onLost callbacks for listens. 4. Send onAvailable callbacks for listens. 5. Send onAvailable callbacks for requests. These changes shouldn't affect any apps because: 1. The order of callbacks continues to be first all onLost, then all onAvailable. 2. Both the old and the new code send callbacks in no particular order. Thus, the possible ordering combinations of callbacks in the new code are a strict subset of the possible ordering combinations of the old code. 3. The default network is switched before any onAvailable callback is sent. 4. Even though the new code does not send all onLost callbacks before switching the default network, even before this CL there was no guarantee that those callbacks would be received before the default network switch anyway, because callbacks are asynchronous. Bug: 23113288 Change-Id: Ia08900c50db9ff43895047e2f4f36b6c6c31a1f9
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions