WifiStateMachine: Always return a copy of WifiInfo

WifiStateMachine#syncRequestConnectionInfo() should always return a copy
of WifiInfo to prevent external services directly accessing a local
variable in WifiStateMachine.  Binder calls within the same process
doesn't parcel objects, hence this is needed to prevent other threads in
system_server directly using a local object within the wifi service.

Bug: 64207440
Test: Unit test that checks for object returned from
WifiStateMachine#getWifiInfo() vs
WifiStateMachine#syncRequestConnectionInfo().

Change-Id: I3d709a09d3d10a1d133fd79eeee430830eb008b2
2 files changed
tree: 88b36b93762ce945ac50057260f6ce04d3486d3d
  1. service/
  2. PREUPLOAD.cfg