845 Commits

Author SHA1 Message Date
vandwalle
d3adb7e816 various autojoin fixes
Change-Id: I96acd02764a6fd7c8482ab82bd7e33280b90a577
2014-05-21 10:54:25 -07:00
Jaewan Kim
6346155c5a Move IP config from WifiConfiguration to IpConfiguration.
This is so that Ethernet can use it in the future.

Bug: 7606609
Bug: 8687763

Change-Id: I5d1189682b13f1088848809604690648d8d9ecca
2014-05-20 15:24:10 -07:00
Vinit Deshpande
c101b1c90b Implement onPeriodChanged and multiple scans of same channels
This change fixes multiple scans of same channels; and it generates
onPeriodChanged event.

cherry-picked from partner:klp-wireless-dev
SHA1 950564a305865cc0ae2bc528479ea6922efbb898

Bug: 15000051
Change-Id: I06a4ecc9d45eda4984de50b97b39f623dd0b26d1
2014-05-19 15:29:43 -07:00
Vinit Deshpande
ff251510b4 Fix docs build break in passpoint manager
Change-Id: I045a361d3a5c3f55c77dd33271892e50f275ab0d
2014-05-18 09:41:36 -07:00
vandwalle
b914c3343f introducing link layer
Change-Id: Ie949d5edf07ef538fff815d9600a02565658ee7e
2014-05-18 09:41:36 -07:00
Vinit Deshapnde
fdb2575a80 Fix doc build - ScanResult is exposing PassointInfo which is still hidden
Hiding the passpoint information for now.

Change-Id: Ic3cbb84d251478af687d9d46e2276115c8ebef18
2014-05-18 09:41:35 -07:00
Vinit Deshapnde
8ca0339ddb Enable more features on WifiScanner
This change enables full scan results and allows overriding wifichange
configuration. There are also minor API changes take relavent parameters.

Change-Id: I6ebcb49f64bd8bc9e5e0c88c3b56eb634783524e
2014-05-18 09:41:35 -07:00
Yuhao Zheng
0c78205e66 Hotspot 2.0 framework API -- more functionalities
- Added resolution parameter for requestOsuIcons()
- Added ANQP parser (OSU provider list only)

Bug: 5485670
Change-Id: I69f6fd2ce6f80980ad786c2a3833cca8279771b3
2014-05-18 09:41:35 -07:00
Yuhao Zheng
a486447231 Hotspot 2.0 framework APIs -- initial implementation
Cherry-picked from klp-wireless-dev-mirror
SHA1: e73969fac45aaca72528226dc8c0c5e54fb2cdd4

Bug: 5485670
Change-Id: If3250a2fae181a3774d3158e341220006ad6ebe5
2014-05-18 09:41:35 -07:00
Vinit Deshapnde
1ab9cc8029 Unhide the WifiScanner API
This change also adds java docs where needed.

Change-Id: I1b7e56e31d460bc773dab9603fbebacf7c439e60
2014-05-18 09:41:34 -07:00
Navtej Singh Mann
94f77dbb02 Fixed bypass of ConnectivityInternal permission
Removed public function 'getWifiStateMachineMessenger' of
WifiManager to fix bypass of ConnectivityInternal permission
by application, which is security concern

Bug: 13749822

Change-Id: I3ae73e33b77ee8ae0133ca9dc8cc03c504f09e40
2014-05-18 09:41:34 -07:00
vandwalle
13f48ffab8 autojoin fix for devices which are using the enableNEtwork API
Bug: 15000352

Change-Id: Ib8b5dfd517e48444913f0ad0e5d08749d6eaa757
2014-05-15 23:27:00 +00:00
vandwalle
e50869df0d autojoin is to eager to black list networks due to connection failure
Bug: 14834820

Change-Id: If2862ce09faf583d25cac7713c619975713ccd95
2014-05-15 20:36:25 +00:00
Robert Greenwalt
7b81602f3c Enabling internal msg apis
NetworkFactory and NetworkAgent.  First trying with wifi and
getting rid of WifiStateTracker.

Conflicts:
	api/current.txt
	services/core/java/com/android/server/ConnectivityService.java

Change-Id: I7f0ec13d7d8988b32f3c6dc71f72012f3349fe02
2014-05-14 03:56:34 -07:00
Robert Greenwalt
f9cb86aebe Replace LinkCapabilities with NetworkCapabilities
Also remove unused LinkSocket and LinkSocketNotifier.
bug:13885501

Change-Id: Id426e31b201fa4f29109b5fea485d8efb34519d3
2014-05-12 16:52:56 -07:00
vandwalle
60a28c6c4b Don't crash when asked to enable an AP with a null SSID.
WifiConfiguration can have been build by an app with a NULL SSID, or
other null fields. We need to verify that at least that those fields
are not NULL before using them. More specifically, don't crash when
enabling an AP with a null SSID in setApConfiguration function.

Bug: 14568953
Change-Id: I6b33ddf97789c0ee4b850d3ec0bccb08100c21d5
2014-05-09 00:43:35 +00:00
Vinit Deshapnde
011e1b35a6 Initial implementation of WifiScanner
This change implements basic functionality of WifiScanner. Following
functionality is enabled

1. Scanning - specify a list of channels to scan
2. Significant change detection
3. AP hotlist

Change-Id: Ieef75b96bdbbd3c7d9b9e698bd16e64d3b465254
2014-05-07 21:14:24 -07:00
vandwalle
7c3606c103 initial Best Network Selection implementation
-add dhcpserver, defaultGwMAC address, linked configuration and user choices link lists to WiFiconfiguration
-add default gateway mac address to RouteInfo
-add a Date to the ScanResult
-add BSSID date to the WifiConfiguration
- make framework auto-join into a config option
- add Settings option for showing RSSI in Wifi picker view; add auto-join specific status to WifiConfiguration

Change-Id: I5cfc4f2a48c9f3bc9766e8e68e24eff7b57f2821

 Changes to be committed:
	modified:   core/java/android/provider/Settings.java
	modified:   wifi/java/android/net/wifi/ScanResult.java
	modified:   wifi/java/android/net/wifi/WifiConfiguration.java
2014-05-07 18:48:48 -07:00
Jaewan Kim
baa00cc350 Merge "Revert "Refactor IpConfiguration from WifiConfiguration"" 2014-04-07 09:01:43 +00:00
Jaewan Kim
6789797485 Revert "Refactor IpConfiguration from WifiConfiguration"
This reverts commit 1284767ceb1affa6d5af77fd26ccf7322df48a6d.

Change-Id: Ibccea84e5dc44c1b8954779660e0721b27f762d4
2014-04-07 09:01:24 +00:00
Jaewan Kim
ce245e1c65 Merge "Refactor IpConfiguration from WifiConfiguration" 2014-04-07 04:40:45 +00:00
Jaewan Kim
1284767ceb Refactor IpConfiguration from WifiConfiguration
Bug: 7606609, Bug: 8687763
Change-Id: I736eb3c73a8ffc8f137a04a5ea66ee564dc2b530
2014-04-07 11:35:35 +09:00
Andres Morales
2517be5b72 Merge "Add calls for NFC WSC token creation" 2014-04-04 16:42:37 +00:00
Wei Wang
c90005d292 Use correct wifi batching parameter ranges.
Note these are slightly adjusted capabilities of N5.

Cherry pick.

Change-Id: Ia6888f6a5a69d135ff7e3c87d9744e18265fb3bf
2014-04-01 22:51:52 +00:00
Brian Williammee
137ff532eb Clean up two wifi javadoc comments
Remove references to TI drivers, and unnecessary uncertainty.

Change-Id: I74a01357264338df7c513684c6c752d1edb4ea4d
2014-03-31 17:18:03 -07:00
Yuhao Zheng
10bf6354a5 Wifi hotspot stack initial hook up
Add a dummy wifi hotspot service for futher development use. This is to
resolve the different between master branch and kwd branch, such that future
development can go into kwd and being auto-merged to master.

bug: 5485670
Change-Id: Ica58de445dd050a9f0b817f8e4accaa2478299c5
2014-03-25 15:00:45 -07:00
Yuhao Zheng
72e1400e2f Merge "Add new API to scan a given channel set" 2014-02-27 03:12:06 +00:00
Yuhao Zheng
738803fee6 Add new API to scan a given channel set
Create new (hidden) APIs to scan a specified channel set. This is mainly for
location service for now, as doing frequent full scans (including DFS channel)
kills battery.

This set of new APIs contains:
- API to query available channel list for scanning, and DFS channels are marked
- API to scan a specified channel set

Selective scan results are returned in the same way as normal full scan ones.
In order not to intrude full scan results, BSS_FLUSH is NOT performed before a
selective scan. Therefore, selective scan results may contain results that's not
in the given channel set, and post-filtering may be required for location
service use.

Bug: 12610436
Change-Id: Icced18dd9b54f6dd92c0c2874d31518d56af8163
2014-02-18 15:26:29 -08:00
Felipe Leme
70a415e7fe Added support for WiFi frequency on WifiInfo (getter, settter, and frequency constant).
Bug: 12767819

Change-Id: Ib4a03919d9100861e993c733b7e478dc93dffaae
2014-02-05 18:23:22 -08:00
Andres Morales
b2e6bfd0f0 Add calls for NFC WSC token creation
Expose interface for generating Wifi Simple
Configuration tokens from supplicant.

Change-Id: Ie310a32f529c0330340e045aee561dc434aeee3e
2014-01-31 22:16:34 +00:00
Vinit Deshapnde
ffadfb9ffd Move Wifi/P2p service components under services
Some methods need to be public, since frameworks/base complies before
frameworks/base/services; and services takes build dependency on base.

Similar issue exists with WifiEnterpriseConfig constants.

Bug: 9907308
Change-Id: Ied0e3dee0b25c939067dbc66867a9814b3b3b68e
2013-12-11 16:06:49 -08:00
Dmitry Shmidt
3af71e6dcf wifi: P2P: Fix WFD subelement parsing
Change-Id: Ifd802b59266760fb570fee28a6c34339a7f9fa01
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-12-11 14:55:59 -08:00
Lorenzo Colitti
4598ea4e5e am 263c4788: am 30253d7a: am 2daa0c93: Merge "Add address flags and scope to LinkAddress."
* commit '263c4788dcf45f104f8668fd6621d1a7c39689b9':
  Add address flags and scope to LinkAddress.
2013-12-09 18:34:44 +00:00
Lorenzo Colitti
2daa0c93c4 Merge "Add address flags and scope to LinkAddress." 2013-12-07 02:43:04 +00:00
Lorenzo Colitti
64483947fd Add address flags and scope to LinkAddress.
This is necessary so that the framework can know whether an IPv6
address is likely to be usable (i.e., if it's global scope and
preferred). Also, it will simplify the address notification
methods in INetworkManagementEventObserver, which currently take
the address, the flags, and the scope as separate arguments.

1. Add flags and scope to the class and update the unit test.
   Use the IFA_F_* and RT_SCOPE_* constants defined by libcore.
   Since most callers don't know about flags and scope, provide
   constructors that default the flags to zero and determine the
   scope from the address. Addresses notified by the kernel will
   have these properly set. Make multicast addresses invalid.
   Update the class documentation.
2. Provide an isSameAddressAs() method that compares only the
   address and prefix information between two LinkAddress
   objects. This is necessary because an interface can't have
   two addresses with the same address/prefix but different
   flags.
3. Update LinkProperties's addLinkAddress and removeLinkAddress
   to identify existing addresses to add/remove using
   isSameAddressAs instead of implicit equals(). Specifically:
   - If addLinkAddress is called with an address that is already
     present, the existing address's flags and scope are updated.
     This allows, for example, an address on an interface to go
     from preferred to deprecated when it expires, without it
     having to be removed and re-added.
   - If removeLinkAddress is called with an address that is
     present but with different flags, it deletes that address
     instead of failing to find a match.
4. Update the INetworkManagementEventObserver address
   notification methods to take just a LinkAddress instead of
   LinkAddress, flags, and scope. While I'm at it, change the
   order of the arguments for consistency with the other
   functions in the interface.

Change-Id: Id8fe0f09a7e8f6bee1ea3b52102178b689a9336e
2013-12-06 13:54:35 +09:00
The Android Open Source Project
ebcb32f58a Merge commit 'bac61807d3bcfff957b358cb9ad77850bd373689' into HEAD
Change-Id: I29374270c8e0c2f2859efaf1d55af9f73da0f8d7
2013-12-05 13:10:46 -08:00
Lorenzo Colitti
317d15c155 am 4806fdfb: am f226bc60: Merge "Use LinkAddress in address notifications."
* commit '4806fdfbd0fecf91584396fc0f620c97a05ab837':
  Use LinkAddress in address notifications.
2013-12-02 20:53:06 +00:00
Lorenzo Colitti
4806fdfbd0 am f226bc60: Merge "Use LinkAddress in address notifications."
* commit 'f226bc606af9ce5aceff6b05fc4b0200c94cb248':
  Use LinkAddress in address notifications.
2013-11-26 17:56:45 -08:00
Lorenzo Colitti
5ad421a3d0 Use LinkAddress in address notifications.
Currently address{Updated,Removed} pass in the address as a
string such as "fe80::1/64". Use LinkAddresses instead, since
that's what it is.

This makes the code more robust in the unlikely case that netd
passes in an invalid string. In the future we can move flags and
scope into the LinkAddress itself and simplify the code further.

Bug: 9180552
Change-Id: I66599f9529cf421caa7676fdd0141bb110b8589e
2013-11-26 21:55:15 +09:00
John Spurlock
6090995951 Remove unused imports from frameworks/base.
Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
2013-11-20 11:31:47 -05:00
Vinit Deshapnde
86513aafee Merge "Refactor WifiEnterpriseConfig and move service part in WifiConfigStore" 2013-11-19 18:47:37 +00:00
Vinit Deshapnde
5d5f5a3791 am 9dbaaab8: am daf21d76: am 75c12de0: Merge "Increase Reject threshold for disabling networks" into klp-dev
* commit '9dbaaab85eb4557b40086e6b37882af7b03725ba':
  Increase Reject threshold for disabling networks
2013-11-13 18:48:13 -08:00
Vinit Deshapnde
8fa06ee413 Increase Reject threshold for disabling networks
This change modifies a framework optimization. The framework optimization
disables a network when an access point repeatedly rejects requests
to associate with it. This change has some problems; one being that
it counts the rejects for all networks, and not for a specific network.
This incorrectly penalizes last networks at times; and since the current
threshold is 4 rejects, the probability of penalizing wrong networks
is high. This change ups that number to 16 to reduce that probability.

Bug: 11654725

Change-Id: I7150a9ccbb54bac44f2c2ba100fb6617ded33616
2013-11-13 15:48:11 -08:00
Robert Greenwalt
d528d48e5d resolved conflicts for merge of c3eef190 to master
Change-Id: I36fd3c7fcbb13e47e27ffc340484c03b5a553bb1
2013-11-07 15:05:26 -08:00
Vinit Deshapnde
ade8de3c4a Refactor WifiEnterpriseConfig and move service part in WifiConfigStore
This change moves the code related to 'importing' the configuration
in supplicant and keystore from WifiEnterpriseConfig class to
WifiConfigStore class. This would allow moving system classes
to server package.


Bug: 9989922
Change-Id: Id96f34bb5d16ef192e9174d9caa867bdfdacf803
2013-11-07 11:22:09 -08:00
Robert Greenwalt
a029ea1318 Add BatteryStats for Wifi Batched Scanning.
bug:10690989
Change-Id: Ia39b715ee6d5733970095bc76de0ed40ff8208c0
2013-11-06 17:43:18 -08:00
Robert Greenwalt
405f731a4d am 63dd9d2f: am 4802c6da: am 4d8a8392: Merge "Don\'t set same country code on supplicant again and again" into klp-dev
* commit '63dd9d2f550983d890ea21eee9b8f8619608bb79':
  Don't set same country code on supplicant again and again
2013-10-21 18:09:02 -07:00
Vinit Deshapnde
da40d92766 Don't set same country code on supplicant again and again
Setting the same code is redundant, and may cause supplicant to drop
currently connected connection.

Bug: 11303252
Change-Id: I1af57b3af2d0b8cc51939a8b9872fb3fe0105a91
2013-10-21 17:55:12 -07:00
Narayan Kamath
98e1797367 Remove captive portal code that has no effect.
Note that this CL does not change any behaviour.

At the center of this change is
CaptivePortalTracker#detectCaptivePortal(), which does nothing
except call back into ConnectivityService. Removing it allows us to
simplify code in ConnectivityService. It also allows us to remove
ConnectivityService#captivePortalCheckComplete which was only ever
called in response to this method.

While this does not change any behaviour, it preserves existing
bad behaviour, i.e, that the CAPTIVE_PORTAL_CHECK NetworkInfo
state does not correspond to actual captive portal detection.
We transition into that state and immediately (and unconditionally)
out of it and into CONNECTED.

Change-Id: Ib3797f956d2db5e3cacaaa53e899d81aa8e958af
2013-10-16 08:10:55 +00:00
Robert Greenwalt
ed22e9ce2f am dcc31551: am e9d99705: am 72dc0b43: Merge "Make Wifi Scans more heap-efficient" into klp-dev
* commit 'dcc31551f80500a096b8eb95f7f0670b4c19fd95':
  Make Wifi Scans more heap-efficient
2013-10-14 10:49:34 -07:00