Fix bug of ScanSettings. Add unit test.

b/16318637.

Change-Id: I3fbc1212c1712faa0c29132f3dc9cfc1d58af26b
2 files changed