Unbind network after an update in Android. am: b19c3ec7bd am: b35addc4fd
am: 82b8ee405b
Change-Id: I61a334d85703980242622ed1f3f6a82c7133dbd9
diff --git a/update_attempter_android.cc b/update_attempter_android.cc
index 82e3855..99c941e 100644
--- a/update_attempter_android.cc
+++ b/update_attempter_android.cc
@@ -481,6 +481,12 @@
SetStatusAndNotify(new_status);
ongoing_update_ = false;
+ // The network id is only applicable to one download attempt and once it's
+ // done the network id should not be re-used anymore.
+ if (!network_selector_->SetProcessNetwork(kDefaultNetworkId)) {
+ LOG(WARNING) << "Unable to unbind network.";
+ }
+
for (auto observer : daemon_state_->service_observers())
observer->SendPayloadApplicationComplete(error_code);