Commit Graph

1321 Commits

Author SHA1 Message Date
Paul Stewart
59ff8a11bc Merge changes Iddeebeb8,Idd1e37a3 into nyc-dev am: 68ffbba
am: 366f851

* commit '366f851e35019816f278de6307c5aec87bbe569f':
  WifiManager: Use ConnectivityThread
  Create ConnectivityThread
2016-03-22 22:31:06 +00:00
Paul Stewart
68ffbba158 Merge changes Iddeebeb8,Idd1e37a3 into nyc-dev
* changes:
  WifiManager: Use ConnectivityThread
  Create ConnectivityThread
2016-03-22 22:23:48 +00:00
Paul Stewart
cbeae0f3d3 Merge "WifiManager: Defer Async Channel init" into nyc-dev am: ec1e5e8
am: e171539

* commit 'e171539d4e34c275a69cac794928a11118c04f7f':
  WifiManager: Defer Async Channel init
2016-03-22 19:45:33 +00:00
Paul Stewart
ec1e5e80fc Merge "WifiManager: Defer Async Channel init" into nyc-dev 2016-03-22 19:35:07 +00:00
Paul Stewart
38d1133fad Merge "Fix string equality comparison" into nyc-dev am: 0c66db8
am: da84dd2

* commit 'da84dd278d092de17943cfbd1a49592f666d89ea':
  Fix string equality comparison
2016-03-21 21:58:35 +00:00
Paul Stewart
c12bb1dd8c Fix string equality comparison
Don't use "==" to compare strings.

Bug: 25624963
Change-Id: Id25696e4fdcbcf4d48ec74e8ed65c1a33716b30c
2016-03-21 11:47:42 -07:00
Paul Stewart
bf8cbb05e0 WifiManager: Use ConnectivityThread
Instead of minting it's own hander thread, have WifiManager use
the looper from ConnectivityThread.

Bug: 27432949

Change-Id: Iddeebeb8ab506c912f526c7569f304e10b9d7ab8
2016-03-19 10:05:06 -07:00
Paul Stewart
75f129e17b WifiManager: Defer Async Channel init
Now that WifiManager instances are separate and do not depend
on a single static AsyncChannel for the entire process, all
contexts within a process will create an async channel on init.
Since creating this channel requires special permissions that
some applications do not have, it is problematic for them all
to request it in the process of getting a WifiManager instance.

This CL defers AsyncChannel initialization until it is actually
going to be used.  This allows callers to create WifiManager
instances without necessarily creating an AsyncChannel.
Depending on what parts of the API will be used, some callers
will never need one.  Also, this means that these apps will
not run afoul of permissions exceptions that do not apply to
them unless they actually request functionality that requires
the AsyncChannel.

While here, this CL no longer catches SecurityException while
requesting a messenger from WifiService. That hack appeared to
be an artifact of the static instance of sAsyncChannel -- it
was not clear to WifiManager which context had permissions to
successfully create the messenger, so it was necessary to
silently fail the attempt especially since that attempt was
made in the constructor.  With the restructuring to keep
mAsyncChannel per-instance and now only created at the time
specific API calls require it, a SecurityException is
completely relevant to the caller and should not be discarded.

Bug: 27694933
Test: Boot full image, repro b/27694933 with com.google.android.music

Change-Id: I680bf2443bc5b057e629544a687f985261201ded
2016-03-19 10:05:06 -07:00
Etan Cohen
88a6049545 [NAN] Refactor session lifecycle to clarify API & eliminate race conditions
(cherry-pick of 2a73c7fb2a)

Bug: 27257965
Change-Id: I4d7eaa6fa1f089bed2e9185f59a37f59b530975d
2016-03-17 11:52:43 -07:00
Etan Cohen
574b3fb810 [NAN] Removed NAN event registration - dispatch all callbacks.
All events dispatched by default - there's no reason to ignore events.
The specific identity changed events for which there are use-cases to
get or ignore is controlled through a new configuration.

(cherry-pick of a5ed693788)

Bug: 27607613
Change-Id: I289a36157b55270c58311a016ef79f8746e0e0a0
2016-03-16 10:43:52 -07:00
Etan Cohen
776ba56e53 [NAN] Consolidate publish/subscribe callback sets into single set
Merge onPublishFail & onSubscribeFail into onSessionConfigFail.
Merge onPublishTerminated & onSubscribeTerminated into onSessionTerminated.
A session is either publish or subscribe (never the two) so redundant.

(cherry-pick of 8414f5cf2b)

Bug: 27610709
Change-Id: I0282d17db88754428da25ee5f064b9a4805f9736
2016-03-16 10:43:52 -07:00
Etan Cohen
f6062eef20 [NAN] Replace session callback configuration control
Controlling session callback invocation:
- Remove event registration
- Add configurations to the subset (actually just termination) which
  can be configured through the HAL

(cherry-pick of e393f57d0d)

Bug: 27607613
Change-Id: I608314cc2a9b077b4d5a2d2d0d315d55c6a7724b
2016-03-16 10:43:52 -07:00
Etan Cohen
12213fb12d [NAN] Expose match style configuration as public API.
Match style allows apps to configure getting a single notification
or continuous notifications (for all matches).

(cherry-pick of 8ef7453416)

Bug: 27568256
Change-Id: I9b7bd2e4e58af5c73188267d11c1288a93cf64ed
2016-03-16 10:43:52 -07:00
Wei Wang
42e895b300 Merge "Fix device reboot when ranging empty params." into nyc-dev am: e1e3d99c46
am: e21e7cffd5

* commit 'e21e7cffd5086724e3b048820962df732324a0c5':
  Fix device reboot when ranging empty params.
2016-03-15 21:55:34 +00:00
Wei Wang
e1e3d99c46 Merge "Fix device reboot when ranging empty params." into nyc-dev 2016-03-15 21:32:03 +00:00
Wei Wang
fabae2fff0 Fix device reboot when ranging empty params.
Empty Rtt params was converted to null in
read/write paracel.

Bug:27227320

Change-Id: I7c9c897b0f7ed0ced499e9763dd56b48d209d195
2016-03-14 12:22:38 -07:00
Paul Stewart
36cf8bf552 Merge "WifiManager: Remove static objects" into mm-wireless-dev am: d292ed866c am: 0f3b7ac4b5
am: cc31e9cc31

* commit 'cc31e9cc31e042cebf4d73f77ddb83ca38b9e613':
  WifiManager: Remove static objects
2016-03-14 14:27:43 +00:00
Paul Stewart
0f3b7ac4b5 Merge "WifiManager: Remove static objects" into mm-wireless-dev
am: d292ed866c

* commit 'd292ed866c27bc7a23cfa292603d722a6b7f9d81':
  WifiManager: Remove static objects
2016-03-14 14:21:29 +00:00
Paul Stewart
d292ed866c Merge "WifiManager: Remove static objects" into mm-wireless-dev 2016-03-14 14:13:34 +00:00
Paul Stewart
a016ebbee7 WifiManager: Remove static objects
Thanks to b/24334032, we know that there can be more than one
WifiManager object per process.  Also, due to b/19159232 we know
that holding static references to contexts within WifiManager is
not okay.  This CL addresses both issues by correctly implementing
Wifimanager as the per-context CachedService as it is instantiated
in SystemServiceRegistry.

To do this, all previously static object members of WifiManager
are converted to non-static.  This is primarily safe since:

  - In processes which only instantiated WifiManager from a single
    context, the behavior is functionally identical between the
    static and non-static implementation.

  - In situations where multiple WifiManager objects were created,
    this is not a real issue:

    + sListenerKey is okay to be tracked per-instance since it
      only tracks replies for asynchronous outgoing calls for a
      single WifiManager instance (replies are not multicast to
      all instances within a pid, since replies from
      WifiServiceImpl are addressed to the other end of the
      AsyncConnection the request message came from).
    + The same is true of sListenerMap and sListenerMapLock
    + Having a per-WifiManager-instance mAsyncChannel is at worst
      a small linear increase with the number of contexts that
      use WifiManager, but for the vast majority of processes will
      not be an increase at all.
    + Having a thread per WifiManager is something that has been
      brought up in the past (b/25644527 comes to mind).  I think
      we should continue to track that particular problem there.

One static was added: an sServiceHandlerDispatchLock which ensures
that listeners from multiple ServiceHandler threads will be called
sequentially instead of interleaved.  Since ServiceHandler was
previously static, this preserves the behavior where multiple
WifiManager objects would not deliver callbacks in parallel.

BUG=19159232
BUG=24334032

Change-Id: I24125a285f97e0c5b3ca4fd721ba8ed19aa245e9
2016-03-08 09:57:06 -08:00
Glen Kuhne
69d70b7b76 Merge "Added EIDs for ERP, Supported & Extended Rates" into mm-wireless-dev am: 45eb1bdf87 am: ae0da24c8d
am: 6e60d15991

* commit '6e60d15991d600ec1ec002f91a698dd90922031f':
  Added EIDs for ERP, Supported & Extended Rates
2016-03-08 17:10:39 +00:00
Glen Kuhne
ae0da24c8d Merge "Added EIDs for ERP, Supported & Extended Rates" into mm-wireless-dev
am: 45eb1bdf87

* commit '45eb1bdf8788bc2aa537ec86bc93b3bf437d9c6e':
  Added EIDs for ERP, Supported & Extended Rates
2016-03-08 16:53:34 +00:00
Glen Kuhne
45eb1bdf87 Merge "Added EIDs for ERP, Supported & Extended Rates" into mm-wireless-dev 2016-03-08 16:48:35 +00:00
Roshan Pius
e5df8547f7 Merge "WifiScanner: Add hidden networkIds in scan setting" into mm-wireless-dev am: d412376ca0 am: 4e7ad35b2f
am: 7f7bd9b119

* commit '7f7bd9b11920fdedbf2920134c4cd0158e1725be':
  WifiScanner: Add hidden networkIds in scan setting
2016-03-07 22:52:06 +00:00
Roshan Pius
4e7ad35b2f Merge "WifiScanner: Add hidden networkIds in scan setting" into mm-wireless-dev
am: d412376ca0

* commit 'd412376ca00545857df7a21829e3f674253c0567':
  WifiScanner: Add hidden networkIds in scan setting
2016-03-07 22:47:59 +00:00
Roshan Pius
d412376ca0 Merge "WifiScanner: Add hidden networkIds in scan setting" into mm-wireless-dev 2016-03-07 22:44:08 +00:00
Lorenzo Colitti
2a3ca73158 DO NOT MERGE: Move PinningNetworkCallback out to a new NetworkPinner class.
Cherry-picked from 531a344300

Bug: 19159232
Change-Id: Ic366b53259ee5944a8e864876425a6558c0a7216
2016-03-07 10:34:32 -08:00
Glen Kuhne
bff37ecdaa Added EIDs for ERP, Supported & Extended Rates
Added EIs to InformationElement to support the parsing of Supported
Rates, Extended Supported Rates, and ERP.

BUG=25691077
Change-Id: Ie540e94f9aa0dca11c3b1d6a46c5a638ec958cff
2016-03-07 08:54:07 -08:00
Roshan Pius
49b6f19ded WifiScanner: Add hidden networkIds in scan setting
Add the hidden networkId list in scan settings to be used for
connectivity scans.

BUG: 27503786
Change-Id: Ibe7eaccd84d03a7b48728e3ea1d98ccc974377ec
TEST: Compiles & unit-test passes
2016-03-06 20:22:11 -08:00
Roshan Pius
9cd0040ab4 WifiScanner: Add PNO public API am: e4fd150962 am: 56eac13284
am: 3db959bbdb

* commit '3db959bbdb855a4738ed2887bb72cb964e742de6':
  WifiScanner: Add PNO public API
2016-03-04 22:05:07 +00:00
Roshan Pius
56eac13284 WifiScanner: Add PNO public API
am: e4fd150962

* commit 'e4fd150962e07dbcb0646d556bf372be0cc15f1f':
  WifiScanner: Add PNO public API
2016-03-04 22:01:04 +00:00
Roshan Pius
e4fd150962 WifiScanner: Add PNO public API
Add the public interface for starting/stopping PNO scan.

This is the internal flow that is going to be used for PNO scan:
1. Set Pno list
2. Start background scan

This flow will not work as is for supplicant, since background scan is
done manually today. So, we'll need a flag to indicate that this
background scan is targetted for PNO.

BUG: 27167559
Change-Id: I3f6921c5d03f7d9e8ad1847e57e12fb38df6c9c9
TEST: Compiles & unit-test passes
2016-03-04 13:37:48 -08:00
mukesh agrawal
c4d6d60e50 Merge "WifiConfiguration: show more detail in toString()" into mm-wireless-dev am: 7516adbd6d am: d4ef42f0e5
am: 76485f5af5

* commit '76485f5af5ab9537588dfdb4da1e6d3ac9c0f72c':
  WifiConfiguration: show more detail in toString()
2016-03-04 00:09:03 +00:00
mukesh agrawal
d4ef42f0e5 Merge "WifiConfiguration: show more detail in toString()" into mm-wireless-dev
am: 7516adbd6d

* commit '7516adbd6d8584aff957ff722dd20543c25c6897':
  WifiConfiguration: show more detail in toString()
2016-03-03 21:22:43 +00:00
Mukesh Agrawal
7516adbd6d Merge "WifiConfiguration: show more detail in toString()" into mm-wireless-dev 2016-03-03 21:15:18 +00:00
Jeremy Joslin
6e470ae38e Merge "Revert "New systemapi to mark a wifi network as metered."" into mm-wireless-dev am: 3f7314e331 am: b94df9db50
am: 42ed2d0609

* commit '42ed2d0609b75460a4a29da7b08dce7dfd0f9169':
  Revert "New systemapi to mark a wifi network as metered."
2016-03-03 17:02:59 +00:00
Jeremy Joslin
b94df9db50 Merge "Revert "New systemapi to mark a wifi network as metered."" into mm-wireless-dev
am: 3f7314e331

* commit '3f7314e3310fbaddc984ae3218f7bb22f13cda11':
  Revert "New systemapi to mark a wifi network as metered."
2016-03-03 16:54:28 +00:00
Jeremy Joslin
3f7314e331 Merge "Revert "New systemapi to mark a wifi network as metered."" into mm-wireless-dev 2016-03-03 16:49:28 +00:00
mukesh agrawal
e23993848c WifiConfiguration: show more detail in toString()
When debugging WiFi issues, it's helpful to know whether
or not a network uses a hidden SSID. Update
WifiConfiguration.toString(), to provide this information.

BUG=26836097
TEST=capture bugreport, verify "HIDDEN: false" is present for normal net
TEST=capture bugreport, verify "HIDDEN: true" is present for hidden net

Change-Id: I1f7c587fc2eda358e0868e9a7ef0bb2058e726a8
2016-03-03 03:06:05 +00:00
Jeremy Joslin
e9e6083ee1 Revert "New systemapi to mark a wifi network as metered."
This reverts commit 7a598d3d80.

Change-Id: Ib6b9081ee4ded7582fb90d7a9066de95ab221f61
2016-03-02 22:16:27 +00:00
Lorenzo Colitti
cdbf981889 Merge changes Ic366b532,I0179b45b into nyc-dev am: b7ffb76437
am: 6ad667122c

* commit '6ad667122c35098ab62afd92b5ac26937397825b':
  Move PinningNetworkCallback out to a new NetworkPinner class.
  Use MessageUtils in ConnectivityManager.
2016-03-02 07:04:56 +00:00
Jeff Sharkey
d1be3e0bdf Merge "When system server goes down, crash apps more." into nyc-dev am: 60b7bcc614
am: 33a64f5e56

* commit '33a64f5e5600d86ef6ce270ce57fffbf4f2ab35d':
  When system server goes down, crash apps more.
2016-03-02 06:57:26 +00:00
Lorenzo Colitti
b7ffb76437 Merge changes Ic366b532,I0179b45b into nyc-dev
* changes:
  Move PinningNetworkCallback out to a new NetworkPinner class.
  Use MessageUtils in ConnectivityManager.
2016-03-02 04:18:03 +00:00
Lorenzo Colitti
531a344300 Move PinningNetworkCallback out to a new NetworkPinner class.
Also add tests.

Bug: 19159232
Change-Id: Ic366b53259ee5944a8e864876425a6558c0a7216
2016-03-02 12:50:35 +09:00
Jeff Sharkey
c53962d4ed When system server goes down, crash apps more.
Apps making calls into the system server may end up persisting
internal state or making security decisions based on the perceived
success or failure of a call, or the default values returned.

The reality is that if the system process just died, init will be
along shortly to kill all running apps, so we should have no problem
rethrowing the RemoteException as a RuntimeException.

Bug: 27364859
Change-Id: Ife0bcb079636c88d54c44d17eb580409fd79028b
2016-03-01 19:29:16 -07:00
Randy Pan
f6afb8bdc2 Retire ScanResult.autoJoinStatus am: 366da67282 am: 037dd4aea0
am: 6364c1a15f

* commit '6364c1a15f5ae537438fcfd4be4692a609a6a62e':
  Retire ScanResult.autoJoinStatus
2016-02-25 20:17:32 +00:00
Randy Pan
037dd4aea0 Retire ScanResult.autoJoinStatus
am: 366da67282

* commit '366da672828864fa166f184757e44f89e5139a31':
  Retire ScanResult.autoJoinStatus
2016-02-25 19:12:41 +00:00
Randy Pan
366da67282 Retire ScanResult.autoJoinStatus
This attribute is no longer in use.

Bug: 27340037
Change-Id: I2e5dfdc266673388a55ef34a4d088352d2e1723c
2016-02-24 16:51:05 -08:00
Etan Cohen
56dec6e04b Merge changes from topic 'api_clean'
* changes:
  [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.
2016-02-24 18:19:30 +00:00
Roshan Pius
e0e00dc79c Merge "Modify the wake reasons data structure(2/2)" into mm-wireless-dev
am: 2d3bea7f01

* commit '2d3bea7f014a7fa2eff91ce996663059218bf21d':
  Modify the wake reasons data structure(2/2)
2016-02-23 19:09:24 +00:00