Merge changes from topic 'wifi-aosp-master' into stage-aosp-master

* changes:
  NetworkSelectionStatus: Fix copy constructor
  Deprecate QNS network disable reason BAD_LINK
  [NAN] API changes/fixes addressing apilint issues
  [NAN] Add method to ConfigRequest to determine if non-default
  [NAN] Simplify publish/subscribe configuration - merge match filters
  [NAN] Udpate NAN API documentation, clean-up visibility
  [NAN] Do not expose WifiManager.isNanSupported as new API
  [NAN] Update finalize to check and warn user if resources not freed
  [NAN] Fix bad merge use rethrowFromSystemServer
  Add Log.wtf when transitionTo is used improperly
  Ensure BSSIDs are correctly aged out in settings view
  [NAN] Provide calling package name to service
  Add WiFi toggle prompts - framework
  Reenable the unit tests for StateMachine
  Remove WiFi related methods from NetworkManagementService
  Don't pull in external/junit through mockito
  WifiConfiguration: Expose NetworkSelectionStatus strings
  Add Bluetooth toggle prompts - framework
  [NAN] Add LV utilities (TLV with T size of 0).
  [NAN] Fix TlvElement member names - reflect public access.
  TetherUtil: Use ConnectivityManager for tethering
  [NAN] TLV utilities iterator - throw correct exception
  [NAN] Modify arguments from "array, length" to "array"
  [NAN] NAN System Api: RTT
  Properly disable WiFi tethering
  [NAN] Provide inteface MAC address to app.
  [NAN] Add (T)LV validation testing
  Add IPv6 tethering coordinator
  Stop listening for WiFi interface status changes
  [NAN] Add validity checks for service name
  [NAN] Fix assumption about Strings containing single-byte characters.
  [NAN] NAN data-path API: network specifier
  DO NOT MERGE StateMachine: remove final from SendMessage
  wifi: allow config of default+verbose ring buffers
  Don't save the anonymous identity for EAP-SIM/AKA/AKA-Prime
  Add a WifiScanner API to listener for ongoing scans
  Fix invitation request from persistent GC
  SettingsBackupAgent: Remove redundant size parameter
  WifiConfiguration: Make NetworkSelectionStatus public
  Use WifiManager for wifi backup/restore
  Fix race conditions between Tethering and TetherInterfaceStateMachine
  WifiManager: Add new API to restore old backup data
  Tethering: Own WiFi tethering state and lifetime
  IpConfigStore: Changes for parsing old wifi backup
  WifiManager: Add new API's for backup/restore
  XmlUtils: Add missing readThisByteArrayXml method
  Use an ArrayMap instead of HashMap to track tether interfaces
  Consolidate cleanup logic in TetherInterfaceSM.TetheredState
  Annotate TetherInterfaceStateMachineTest for APCT
  Rely on Tethering mutex for TetherInterfaceSM
  Rename TetherInterfaceSM to TetherInterfaceStateMachine
  [NAN] Add retry count for transmitting L2 NAN messages
  Remove dead code from TetherInterfaceSM
  Remove transient StartingState from TetherInterfaceSM
  Expand test coverage of TetherInterfaceSM
  Add demonstration unittest for TetherInterfaceSM
  Extract TetherInterfaceSM to its own class.
  Make Tethering.TetherInterfaceSM more self contained
  WifiManager: add WIFI_MODE_NO_LOCKS_HELD
  Create frameworks-base-testutils lib
  Clean up class members in Tethering.TetherInterfaceSM
  Move android.net.util.IpUtilsTest into a util/ directory
  Fix trivial warnings in Tethering.java
  Fix some trivial warnings in WifiP2pDevice.java
  [NAN] Add support for NAN RTT.
  [NAN] Remove OnNanDown notification from API
  Remove unused method from NetworkManagementService
  WifiConfiguration: Add new selection disable reasons
  [NAN] Add type and nullability annotations. Update hide annotation.
  [NAN] Add master switch to enable/disable usage of NAN APIs.
  [NAN] Re-factor connect/config flow
  [NAN] Refactor session lifecycle to clarify API & eliminate race conditions
  [NAN] Removed NAN event registration - dispatch all callbacks.
  [NAN] Consolidate publish/subscribe callback sets into single set
  [NAN] Replace session callback configuration control
  [NAN] Expose match style configuration as public API.
  [NAN] API cleanup - rename FLAGS.
  [NAN] Renamed listeners to callback per API guidelines
  [NAN]: API update - consolidate Puslish|Subscribe Data+Subscribe -> Config
  NAN: Support multiple instantiation per UID - introduce a client ID.