Fix getLocalAddress on closed sockets.

Bug: https://code.google.com/p/android/issues/detail?id=54072
Change-Id: Ie32708054f584885ec85dd7847c128d48ff6c7d5
Do not set valueDecoded until after the value is decoded

Bug: https://code.google.com/p/chromium/issues/detail?id=233610
Bug: 8712523
Change-Id: I976df514e761ffe0d1be1ca8b18e9fe5050c2ba7