summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorRebecca Silberstein <silberst@google.com>2016-04-21 12:14:41 -0700
committerRebecca Silberstein <silberst@google.com>2016-04-22 06:40:49 +0000
commitefdb8454275954e54bd11a59d450cbac30c13da4 (patch)
treea80cb4e52680fa752de504a6c72a14852b7dd3ce /tools/aapt2/java/JavaClassGenerator_test.cpp
parentd3589ee715e397e61025265adc883c9ed3be4f56 (diff)
NativeDaemonConnector: add waitForCallbacks method
Add a method that allows callers to wait until all unsolicited responses received from the native daemon during a command are processed. When commands are issued to a native daemon (such as netd) through the NativeDaemonConnector we block until the command response is received. Any responses or events that are a side-effect (considered "unsolicited") of the command are placed in a Message and handled as callbacks. The order of their processing is not guaranteed and, as we have seen from bugreports, can be handled several seconds later - causing the SoftAP that was just set up to be torn down because a late interface down/removed is indistinguishable from a new interface down/removed. This CL adds a method that first checks to make sure callback thread is not the same thread as used for the blocking call. The new waitForCallbacks method uses a CountDownLatch to force the calling thread to wait until all unsolicited responses received from the native daemon during the execution of the command are handled. The wifiFirmwareReload method is also updated to use the new waitForCallbacks method. BUG: 27857665 Change-Id: I3e22978f720b1cbf57fbb64ad4fea73f8c2d408a
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions