Create a staleScanResults bit.

This bit is set to true during stop tracking and will not change until
fresh scan results come in. This bit is used to prevent
onAccessPointsChanged callbacks from being invoked until other new scan
results are processed.

This is necessary to fix a UI issue in WifiSettings during app
resumption where sticky broadcasts from other intents come in before
a new scan result is available, causing us to clear out all shown APs
since the ScanResults are stale and thus removed from the picker.

Bug: b/38212080
Test: runtest --path
frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/wifi/WifiTrackerTest.java

Change-Id: I2f1fd84d1ab3461d9c8eac9511b90ba7533879c1
2 files changed