Unbind network after an update in Android.
Bug: 70736331
Test: none
Change-Id: I901c9a79adcbbe0237dce8f7a234ce4760b53256
diff --git a/update_attempter_android.cc b/update_attempter_android.cc
index e716296..1c54d68 100644
--- a/update_attempter_android.cc
+++ b/update_attempter_android.cc
@@ -475,6 +475,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);