1. 06 May, 2016 1 commit
    • Ningyuan Wang's avatar
      Fix string comparision and return value in try catch block · b2c2f85c
      Ningyuan Wang authored
      This CL uses value comparision instead of reference comparision
      for strings.
      This also removes returning value in finally block, otherwise
      exception may be suppressed.
      
      BUG=28605846
      TEST=compile
      TEST=runtest frameworks-wifi
      
      Change-Id: I6ace4d233d2b0af3627f75dfdb7dcec6a46b0092
      b2c2f85c
  2. 04 May, 2016 10 commits
    • Mukesh Agrawal's avatar
    • mukesh agrawal's avatar
      wifi_hal_stub: add stubs for packet fate · b070203c
      mukesh agrawal authored
      If the vendor's Wifi HAL does not provide packet fate
      functions, then WifiServiceImpl (and hence, system server)
      will crash when WifiLogger calls packet fate functions.
      
      Fix this, by providing stub implementations. These will
      be automatically overriden by vendor-provided implementations.
      
      BUG=28565646
      TEST=manual
      
      Manual test:
      - repeat for angler and bullhead:
        - try to connect to WPA-2 network with wrong password
        $ adb shell dumpsys > /tmp/dumpsys
        - verify that dumpsys contains "Last failed connection fates"
        - verify that dumpsys shows Authentication messages
      - on bullhead
        - hack up HAL, so that packet fate functions are not registered
        $ adb logcat -d | grep 'Failed to start packet fate'
          -> should see matching lines
        (with the hacked up HAL, and without this patch, the call to
        startPktFateMonitoring() causes a SIGSEGV, instead of just a
        clean failure message)
      
      Change-Id: I86ce34784dea396f9e8741353395cab1ec6e0913
      b070203c
    • Mukesh Agrawal's avatar
      Merge changes Icaa91d9d,Ic930337a into nyc-dev · 855b3287
      Mukesh Agrawal authored
      * changes:
        WifiStateMachine: dynamically configure WifiHAL log level
        wifi service: abstract away access to SystemProperties
      855b3287
    • Mitchell Wills's avatar
    • Mitchell Wills's avatar
    • Glen Kuhne's avatar
    • Glen Kuhne's avatar
    • Mitchell Wills's avatar
      Add more details about what scan results were delivered to clients · 59298c7c
      Mitchell Wills authored
      Fixes: 28563549
      Change-Id: I445054af4b176c69a26af6fe340a6eb88cf06452
      59298c7c
    • mukesh agrawal's avatar
      WifiStateMachine: dynamically configure WifiHAL log level · 2617b7a7
      mukesh agrawal authored
      By default, VERBOSE level logging is disabled for native code.
      However, when debugging Wifi issues, we'll sometimes want to
      include VERBOSE level log messages from the HAL implementation.
      
      Update WifiStateMachine's verbose-debugging logic, to support
      this case.
      
      Note that VERBOSE level messages will not be compiled in
      on user builds. Nor will system server be permitted to change
      the logging level on user builds. For these reasons, the
      log level is only modified on non-user builds.
      
      BUG=27857554
      TEST=unit tests, manual
      
      Manual test (bullhead):
      - On userdebug build with 'Enable Wi-Fi Verbose Logging' set:
        $ adb reboot && adb wait-for-device && adb logcat -d | grep 'V WifiHAL'
        -> matching lines seen
        $ adb shell getprop | grep WifiHAL
        [log.tag.WifiHAL]: [V]
      - On userdebug build with 'Enable Wi-Fi Verbose Logging' unset:
        $ adb reboot && adb wait-for-device && adb logcat -d | grep 'V WifiHAL'
        -> NO matching lines
        $ adb shell getprop | grep WifiHAL
        [log.tag.WifiHAL]: [D]
      - On user build with 'Enable Wi-Fi Verbose Logging' set:
        $ adb logcat -d | grep 'V WifiHAL'
        -> NO matching lines
        $ adb shell getprop | grep WifiHAL
        -> NO matching lines
      
      Change-Id: Icaa91d9d1261a6cf5851d5ad9b0a6a25fd329344
      2617b7a7
    • mukesh agrawal's avatar
      wifi service: abstract away access to SystemProperties · f74a1cfd
      mukesh agrawal authored
      We want the ability to modify the value of a system property,
      so that we can dynamically change the logging level for WifiHAL.
      
      This ability depends on permissions that are not available to
      the test runner. For example, the process that is running the
      wifi service code needs the ability to connect to the
      |property_service| socket.
      
      To resolve the problem, we do the following:
      - add a PropertyService interface, which abstracts away access
        to SystemProperties
      - add PropertyService to the dependencies managed by WifiInjector
      - add SystemPropertyService, which routes property requests
        to android.os.SystemProperties
      - update WifiStateMachine, to access properties via PropertyService
      - update WifiStateMachineTest, to use a mock implementation of
        PropertyService
      
      BUG=27857554
      TEST=unit tests
      
      Change-Id: Ic930337a6a8f6a600ae7b4da2ca2eaf5c9e6c2cb
      f74a1cfd
  3. 03 May, 2016 4 commits
  4. 02 May, 2016 4 commits
  5. 30 Apr, 2016 1 commit
  6. 29 Apr, 2016 2 commits
    • Rebecca Silberstein's avatar
      WifiLastResortWatchdog: update config if not null · 91a8893f
      Rebecca Silberstein authored
      When new scan results are processed, networks already stored as the
      available networks may have updated configs passed in, but they may also
      have null configs.  The null configs should not be used to update the
      stored config.  Added a check to determine if the passed in config is
      not null before the update.
      
      In addition, debugging output also reported the value of
      HasEverConnected as false for networks with a null config.  This was
      updated to report null_config instead.
      
      Added tests covering config updates.
      Added tests for debugging output.
      
      BUG: 28451079
      Change-Id: Iff9888ab87c61619b2f865516eca22d87eb4f4b8
      91a8893f
    • Randy Pan's avatar
      Fix check on current connected/connecting network · 50abba06
      Randy Pan authored
      Keep track of the network BSSID of the last connection attempt.
      This BSSID is checked in case the phone is still in the process of
      connecting to that network. mWifiInfo is checked for the currently
      connected network. This is for the case that firmware performed
      roaming automatically.
      
      While there, addressed a checkstyle issue.
      
      Bug: 28462151
      Change-Id: Ia9316048e0549036de1c20bf1f3099cfcda9a75e
      Test: WiFi unit tests
      50abba06
  7. 27 Apr, 2016 4 commits
    • TreeHugger Robot's avatar
      ddf3afe3
    • TreeHugger Robot's avatar
      Merge changes I91ad6127,I416bfd0e into nyc-dev · 7883cf59
      TreeHugger Robot authored
      * changes:
        WifiLastResortWatchdog trigger logic
        WifiLastResortWatchdog failure counting
      7883cf59
    • Glen Kuhne's avatar
      WifiLastResortWatchdog metrics · 5f001750
      Glen Kuhne authored
      Added logging of various metrics to the WifiLastResortWatchdog. These
      metrics count the number of times the Watchdog triggers, and stats
      counting the number of networks present at failure time for different
      failure types.
      
      BUG=27856474
      
      Change-Id: If43836b1c33791fefb8000196b231c312161feef
      5f001750
    • Glen Kuhne's avatar
      WifiLastResortWatchdog trigger logic · 83f2b808
      Glen Kuhne authored
      Implemented trigger condition logic that is checked after a failure is
      counted. The condition takes into account: failure counts, wifi
      connected state, past connections to saved networks and whether the
      watchdog has fired since the wifi environment changed.
      
      Please note: This change only implements the logic for deciding when to
      trigger, not the trigger itself.
      
      BUG=27856709
      
      Change-Id: I91ad6127a72ca24c72a5520348c4fff83f16b559
      83f2b808
  8. 26 Apr, 2016 9 commits
  9. 25 Apr, 2016 5 commits