[NS A23] Move a synchronized block in a central place

As the calls to this apparently need to be synchronized, let's
do it all in the same place instead of in all callers

Test: FrameworksNetTests
Change-Id: I0c097e7756fc155ba0243834b84626e86c68340e
2 files changed