41 Commits

Author SHA1 Message Date
Robert Greenwalt
13820af302 Fix BatchScan request coalesing
bug:10407896
Change-Id: Ic22c7d8b2a80d490d208570782a12e42d4690f5c
2013-09-20 15:30:17 -07:00
Robert Greenwalt
540784f903 Merge "Cleanup the shutdown of BatchedScans." into klp-dev 2013-09-20 17:43:30 +00:00
Robert Greenwalt
82f4218c0d Cleanup the shutdown of BatchedScans.
Fixes binder-death as well as disambiguation when an app has multiple requests in.

bug:10641931
Change-Id: Ib701d531fa51e7e2a027848cfdfcad3b47056923
2013-09-20 16:32:47 +00:00
Yuhao Zheng
af672998af Merge "Fix Settings app crash while enabling tethering" into klp-dev 2013-09-16 20:36:50 +00:00
Yuhao Zheng
8c461c6fc6 Fix Settings app crash while enabling tethering
While enabling Portable Wifi hotspot in Settings, a null WifiConfiguration
is provided. This null config is on purpose and meanful, and it should bypass
the validation test to avoid the NullPointerException.

Bug: 10780414

Change-Id: Ic507ecae463946c925b3d5fb5a1d185b37db410f
2013-09-16 13:24:04 -07:00
Vinit Deshapnde
ffec332727 Fix an NPE in WifiService
The check to validate incoming configurations is flagging a correct
API usage as well - which doesn't provide any configuration to test.
Fixing code to accommodate this.

Bug: 10749041

Change-Id: I972f0edbdfa14aaa3edb34e4c6784b436c288383
2013-09-16 12:41:12 -07:00
David Christie
6ab2284c98 Strip names out of externally supplied WorkSources to WifiManager (b/10710007).
Change-Id: I69bd7ce9e942c2f9327415b2821d805e1b50a1a4
2013-09-13 17:34:40 -07:00
Vinit Deshapnde
b481dae2f5 Merge "Fix invalid Wifi Network system crash" into klp-dev 2013-09-12 20:28:57 +00:00
Robert Greenwalt
126755cf41 Fix Wifi Batch Scanning
Some parsing bugs, more debug logs, etc.

bug:9301872
Change-Id: I245ab00955e245be81a019750be0f8491aa505fd
2013-09-11 19:31:20 -07:00
Vinit Deshapnde
10652a95b1 Fix invalid Wifi Network system crash
There is some validation code that is eventually detecting that we
have an invalid network; only the result is a crash. The right thing
to do is to do validation up front; and fail calls if the network
configuration looks invalid.

Bug: 10571289

Change-Id: I100506b777a34b26ac9a310ba508140560f87a90
2013-09-09 16:24:36 -07:00
Robert Greenwalt
8e628dadc3 Modify wifi BatchedScan.
Add pollBatchedScan API to allow forced retrieval.
Modified driver API, adding MSCAN, removing nextCount and making
the results look more like normal manual scan results.

bug:9301872
Change-Id: I58bce0624c36e2ad8d3c3f5defcb4d4e155dc8f9
2013-08-15 08:39:13 -07:00
Robert Greenwalt
0451d59ba2 Add support for batched wifi scans.
bug:9301872

Change-Id: I5a7edfdbd2b78a65119d11acad491eae350c0870
2013-08-13 14:37:37 -07:00
David Christie
6942a1200c Add WorkSource capability to WifiManager for starting a scan.
Change-Id: I011bf3b91fbddaba7ab0128bb03d27d90b8a886f
2013-07-25 15:25:07 -07:00
Vinit Deshapnde
64f0d5ba15 Allow enabling TDLS on specific routes
This change exposes couple of internal APIs to enable TDLS between local
machine and a remote machine. The implementation translates client provided
remote IP to a MAC address using system ARP cache, and then instructs the
driver to enable TDLS with that endpoint. Another API takes application
specified MAC address.

Bug: 8538898

Change-Id: Ida343fc42ba3a817a4f380255596e7fb7fcdfb9b
2013-07-11 15:12:44 -07:00
Vinit Deshpande
218339818c Revert "Temporarily disable 'Scan Always' mode"
This reverts commit c16b0d0061108685e74b40d77ad801fe0304bc42.

Change-Id: I89a23f5d786a53eea97fef3f19bd15f97fc26157
2013-07-03 00:10:53 +00:00
Vinit Deshapnde
c16b0d0061 Temporarily disable 'Scan Always' mode
This change disables 'Scan Always' by ignoring the setting; and
hard coding value to 'false'. The UI will change based on whatever
is in settings; but underneath we won't enable scans when WiFi is
off.

Change-Id: Ibb1401207b6675e609e979ea23b63177814f762c
2013-07-01 17:10:28 -07:00
Robert Greenwalt
8971084258 Fix power issues around wifi scans.
- Sending a broadcast indicating when scan requests could be serviced so that
apps don't request scans we won't do anything with.
- Fix our batt stats accounting so we only count it if we send the request to
the driver.

bug: 8868201
bug: 9496690
Change-Id: I64a4f1c294c848ac64c50d8854ed4a6a1a47f603
2013-06-26 10:00:16 -07:00
Robert Greenwalt
05caa2a3de Apply scan-always setting to initial wifi state.
Otherwise there's nothing to kick us into scanable modes unless
the user toggles wifi.

bug:9217455
Change-Id: I6460305e3f299646433546598412f817579cc805
2013-06-01 10:59:29 -07:00
Robert Greenwalt
304aad49cd Remember wifi country that's set before boot
Telehony seems to sometimes be reporting the country before boot
is completed so can't persist the data at that time.  Remember
and write it on BOOT_COMPLETED

Also, there are permission issues around writing the setting.

bug:9225156
Change-Id: Ifdf2243da71b0d2ce5743267842597937d790ef5
2013-05-31 21:10:15 -07:00
Robert Greenwalt
8c77692554 Don't put up wifi-available note when disabled
With the new scan-always mode we will get scan results when disabled.
Don't tell the user about open AP when they've turned off wifi.

bug:9067982
Change-Id: I7a303c2a6f87a331443eeb54fa8ff5b467c0a1ff
2013-05-21 11:17:11 -07:00
Robert Greenwalt
e47d7d4380 Add a time margin for deferred enable.
We were getting delayed message delivered 1 ms before we expected.
bug:9014777

Change-Id: I70e681ff6b4155d31097b43529478b39c816e70b
2013-05-20 11:49:46 -07:00
Robert Greenwalt
5c11e8ee54 Fix off-by-1 error in timing
If deferred action msg was delivered promptly it would end up
looking like it too needed to be deferred and then nothing
would end up getting done.

bug:9014777
Change-Id: I243df70463ebb9333efd6df510f71f9d8d9bdf91
2013-05-20 09:28:08 -07:00
Robert Greenwalt
02ba86f0cc Add some temp wifi debugging output
bug: 9014777
Change-Id: I38c61f235742a36be10cdf9125e19ac9406a61b9
2013-05-18 13:40:49 -07:00
Robert Greenwalt
c12783a90e Add min delay between disable and enable of wifi
We sometimes have issues if disable, enable seq happens to fast.
This should only slow down those fast cases.

bug:8715336
Change-Id: I4f7fe9708b7c3c2300c441511838e8a70eaad5d1
2013-05-16 20:57:52 +00:00
Irfan Sheriff
9f844790f3 Merge "Remove scan notification dialog on wifi off" into jb-mr2-dev 2013-04-29 22:58:50 +00:00
Irfan Sheriff
7167a66b5e Remove scan notification dialog on wifi off
This is now only handled in settings app

Bug: 8732391
Change-Id: If232bfb9f6c3976059bde11280318901c35161e7
2013-04-26 15:10:26 -07:00
Irfan Sheriff
e68d858b0f Keep device state always updated
Tasker app showed up a bug where we can be out of sync with screen state
if we only received broadcasts when wifi is toggled on. Always receive
updates.

Bug: 8689583
Change-Id: Iad457c9768ed421765adb6a15d5f42ecf682da38
2013-04-23 13:43:43 -07:00
Irfan Sheriff
7ea33eac4b Fix API name
Address council feedback

Bug: 8656932
Change-Id: I92972fc3672afbc38cdeee628c04b639053f7cf3
2013-04-19 08:39:53 -07:00
Robert Greenwalt
ca441ee2f0 Add new route.hasGateway() api
Fixes issues brought in by change to isHostRoute.  isHostRoute
was technically correct, but the callers really wanted hasNextHop
behavior.

bug:8597268
Change-Id: I360761ccfa98b2ba34642f717a78fa71ec1bae4f
2013-04-12 11:22:52 -07:00
Irfan Sheriff
07a2295a4d Notify user only when device provisioned
Make sure the notification about scan mode being availabe is only shown
when device is already provisioned

Bug: 8482739
Change-Id: If8a76ffcc0401b846e39b02a55ea69743303c93d
2013-03-27 14:40:46 -07:00
Irfan Sheriff
7b7beb7952 Notify user when wi-fi is toggled about scans
We let the user know when he turns off Wi-Fi that scans will continue to
be available.

User has the option to turn off the dialog and not receive this in the future.

Bug: 8141918
Change-Id: I115ce2ac57125b8ffbb34245dc25effd4b3bebb0
2013-03-21 12:27:20 -07:00
Irfan Sheriff
63f1e2fb6b Merge "Add API to control scan always mode" into jb-mr2-dev 2013-03-20 15:49:20 +00:00
Irfan Sheriff
9f2e83135c Fix reading sleep policy
Bug: 8418823
Change-Id: I432b0a1a7a13dcdd834f6a1c943b06937444f406
2013-03-19 14:32:11 -07:00
Irfan Sheriff
1ef840cdc7 Add API to control scan always mode
Bug: 8141918
Change-Id: I1e5e45e514726c2cbfd86e747123e477e00fd7ed
2013-03-19 07:44:47 -07:00
Irfan Sheriff
11aefad94d Add support for scan always available mode
Modify WifiService to add a controller to track the various
desired states and let the WifiStatemachine actually control
the bring up.

Bug: 8141918

Change-Id: I6e98fd5a29b43c3c50c315eff5255cd0a3eaebcd
2013-03-14 13:55:56 -07:00
Irfan Sheriff
c808a1955f Fix client tracking
Bug: 8311559
Change-Id: I167fcdd5c3da4d46b7d99e18041036023c8c60f7
2013-03-05 09:46:36 -08:00
Irfan Sheriff
302b06de7e Fix leak in WifiManager
Avoid leaks from having a channel connection per manager instance

Bug: 8254124
Change-Id: I10de91d7e5a775bc14bbab245734717d3b2f90d5
2013-02-26 09:01:48 -08:00
Irfan Sheriff
bcc97ca43a Clean up scan handling
Remove obsolete active/passive scan handling - drivers always
do active scan.

Also, remove AP_SCAN hack for preventing connections and use
the TYPE=ONLY scan.

Bug: 8158647
Change-Id: I8f70e19219ad789b7501a40529bcd6b6524739e8
2013-02-22 09:23:55 -08:00
Irfan Sheriff
8a64b1a7f4 Handle airplane settings properly
Fix bug dealing with airplane mode settings of whether wifi
is sensitive to airplane mode change and whether wifi is
allowed to override airplane mode that likely has been
broken ever since.

Bug: 8141918
Change-Id: Ia3116c9dfce2952cbe3911e9d81dbbae0430abef
2013-02-21 08:49:54 -08:00
Irfan Sheriff
b8c0e009a7 Restructure wifiservice for clarity
Move seperate operation pieces into own classes

Bug: 8141918
Change-Id: Iacb15ceca5431136051e815aa71617eef89b9fe9
2013-02-21 08:49:07 -08:00
Irfan Sheriff
d017f35232 Move wifiservice into its own package
Change-Id: I3ff378a29cb4dd191605b0b641147eba1f445d13
2013-02-21 08:48:18 -08:00