Write build id to SharedPref only after APNs have been updated.

Earlier SharedPref was updated first. So if there was a crash
while adding APNs, they didn't get added after process restart
because the SharedPref indicated that it had already been done.
To fix that, the SharedPref should be updated only after APNs
have been added successfully.

Test: manual
Bug: 173171704
Change-Id: Ibfd6ed98508d4d70406167baf3e56b7f1a919852
1 file changed