Commit Graph

3891 Commits

Author SHA1 Message Date
Lorenzo Colitti
b403f8b992 Merge "Wakeup packet mark/mask configuration option" into oc-dr1-dev am: d2eef601f6
am: 2564b1c7cc

Change-Id: I0c25ea79b2f62fa548c4ed5cccb398530f138822
2017-07-06 16:25:24 +00:00
Lorenzo Colitti
2564b1c7cc Merge "Wakeup packet mark/mask configuration option" into oc-dr1-dev
am: d2eef601f6

Change-Id: Ibc89ffd87fb87cd95f941b2bbd67469d961cb13e
2017-07-06 16:09:30 +00:00
Joel Scherpelz
ba37c6c7d8 Wakeup packet mark/mask configuration option
Rules will only be installed if a device specific config.xml overrides
the default values of mark and mask.

This change also fixes a bug where wakeup rules added by the wakeup
controller would never be removed because updateInterfaces() is not
invoked on wifi network change or disable.

Test: as follows
    - built
    - flashed
    - booted
    - Manually verified that mask/mark is set correctly
Bug: 28806131

(cherry picked from commit d18b92cd95)

Change-Id: I95e75b11b973707bcb428ea6498fbfd8e717b855
2017-07-06 19:10:33 +09:00
Hugo Benichi
064fd68f16 Merge "ConnectivityManager: allow usage of TYPE_NONE" am: ffcaee218d am: fab5b13b83 am: 0278aa4b70
am: fe42a55877

Change-Id: I1e005686a1de5f2154fbc614ea52ce1a3ff5fc81
2017-07-05 14:54:05 +00:00
Hugo Benichi
fe42a55877 Merge "ConnectivityManager: allow usage of TYPE_NONE" am: ffcaee218d am: fab5b13b83
am: 0278aa4b70

Change-Id: I1707e39308b0cf425b75e1e3f85323743c252c2f
2017-07-05 14:47:56 +00:00
Hugo Benichi
600aae4fe7 Merge "ConnectivityServiceTest: more informative assert failures" am: 9951460998 am: 598e36fd6a am: 14f400ca81
am: 3ca4158752

Change-Id: Icafd27e8273aa6b6595c30affd23a960e5d55c53
2017-07-05 14:40:30 +00:00
Hugo Benichi
fab5b13b83 Merge "ConnectivityManager: allow usage of TYPE_NONE"
am: ffcaee218d

Change-Id: I72dbd17db63bd7b8637e82f5cdcfec3bf1482962
2017-07-05 14:33:35 +00:00
Hugo Benichi
3ca4158752 Merge "ConnectivityServiceTest: more informative assert failures" am: 9951460998 am: 598e36fd6a
am: 14f400ca81

Change-Id: If00f0fd750d54074c0c642465384446502c1deec
2017-07-05 14:33:34 +00:00
Treehugger Robot
ffcaee218d Merge "ConnectivityManager: allow usage of TYPE_NONE" 2017-07-05 14:21:35 +00:00
Hugo Benichi
598e36fd6a Merge "ConnectivityServiceTest: more informative assert failures"
am: 9951460998

Change-Id: Iaa55014ae4c2f4927059735c349c40ada836b79b
2017-07-05 14:19:33 +00:00
Treehugger Robot
9951460998 Merge "ConnectivityServiceTest: more informative assert failures" 2017-07-05 14:07:37 +00:00
Hugo Benichi
6fe0f587c5 Merge "ConnectivityServiceTest: eliminate remaining sleep()" am: 5b906a4ece am: 6c65982d2b am: 80bc56bf2a
am: f6362d50a6

Change-Id: I9b1c77bd8d0710736f1f29b204acc3a162e833fb
2017-07-05 12:56:08 +00:00
Hugo Benichi
f6362d50a6 Merge "ConnectivityServiceTest: eliminate remaining sleep()" am: 5b906a4ece am: 6c65982d2b
am: 80bc56bf2a

Change-Id: I5e33e909cd8887460c2641c069432ec6bfa5beda
2017-07-05 12:49:04 +00:00
Hugo Benichi
6c65982d2b Merge "ConnectivityServiceTest: eliminate remaining sleep()"
am: 5b906a4ece

Change-Id: Ib1e31c2b8999d07b20ef4cef8e70d851f93df6e5
2017-07-05 12:35:01 +00:00
Hugo Benichi
37d5c3cb21 ConnectivityManager: allow usage of TYPE_NONE
This patch allows to use TYPE_NONE for the legacy network type variable
of NetworkInfo. This usage is "safe" with respect to legacy APIs using
network types as most of them already returns null or do nothing for
TYPE_NONE.

Of the existing APIs in ConnectivityManager that accept a network type
argument, those which were already returning null or doing nothing for
TYPE_NONE are:
  getNetworkInfo(int)
  getNetworkForType(int)
  stopUsingNetworkFeature(int, String)
  networkCapabilitiesForType(int)
  requestRouteToHostAddress(int, InetAddress)
  reportInetCondition(int, int)
  isNetworkSupported(int)
  getLinkProperties(int)

Only setProvisioningNotificationVisible needs an additional guard
against TYPE_NONE.

Bug: 30088447
Bug: 62844794
Test: runtest frameworks-net
Change-Id: I112596fcd03d3c2cd42a2a84d265adb38e3944bb
2017-07-05 21:30:52 +09:00
Hugo Benichi
6b1d01e117 ConnectivityServiceTest: more informative assert failures
Bug: 62918393
Test: runtest frameworks-net
Change-Id: If87315ef7cba6380596f48b92c7e0f6eeccc8368
2017-07-05 21:30:10 +09:00
Hugo Benichi
5b906a4ece Merge "ConnectivityServiceTest: eliminate remaining sleep()" 2017-07-05 12:25:16 +00:00
Hugo Benichi
d148700cd0 ConnectivityServiceTest: eliminate remaining sleep()
ConnectivityServiceTest was still using sleep() in a few places although
these were unnecessary:
  - in testSatisfiedThenLostNetworkRequestDoesNotTriggerOnAvailable(),
    expectNoCallback() and expectAvailableCallback() already include
    waitForIdleHandler calls that drain the message queues and make
    sleep no-ops.
  - in testTimedoutAfterUnregisterdNetworkRequest, the sleeps were
    introduced before unregisterNetworkCallback was changed to have a
    synchronous effect for callback unregistration, therefore the sleep
    becomes simply non-sensical. To reflect this the name of the method
    is also changed.

Bug: 62918393
Test: runtest frameworks-net
Change-Id: I7b701ecf5846a5e1890e86107b8d2544b419ce44
2017-07-05 16:07:57 +09:00
Roland Levillain
fdf31f0988 Merge "Revert "ConnectivityManager: allow usage of TYPE_NONE"" am: 613b73cac8 am: 0d0c37da2a am: bdcebe39e6
am: 1305ff8ac6

Change-Id: Ibd1ef362cdc21d57aefb2d1180dc678bb2692f34
2017-07-04 11:53:16 +00:00
Roland Levillain
9edf336004 Merge "Revert "ConnectivityServiceTest: more informative assert failures"" am: a03e68e3e9 am: 2654f7c646 am: 3b2b9b6238
am: b952da3812

Change-Id: I914c3ad6074e99e313c65572e3f38144a7f8a0d9
2017-07-04 11:49:12 +00:00
Roland Levillain
1597bcf0be Merge "Revert "ConnectivityServiceTest: eliminate remaining sleep()"" am: 374ad24705 am: 08443dc3d6 am: a3909e0583
am: 2475bfde83

Change-Id: I3d7c4b4752143983bc67f72120883d45925129f7
2017-07-04 11:47:35 +00:00
Roland Levillain
1305ff8ac6 Merge "Revert "ConnectivityManager: allow usage of TYPE_NONE"" am: 613b73cac8 am: 0d0c37da2a
am: bdcebe39e6

Change-Id: I428cb473221a403e3c78cbc5d1224d46747ec315
2017-07-04 11:46:56 +00:00
Roland Levillain
b952da3812 Merge "Revert "ConnectivityServiceTest: more informative assert failures"" am: a03e68e3e9 am: 2654f7c646
am: 3b2b9b6238

Change-Id: Id038c0f03a0edaff27b51878a6e2ee7aace7e7cb
2017-07-04 11:43:07 +00:00
Roland Levillain
2475bfde83 Merge "Revert "ConnectivityServiceTest: eliminate remaining sleep()"" am: 374ad24705 am: 08443dc3d6
am: a3909e0583

Change-Id: I8ecc2290d58b9e8f570ec404bbde1a2a60a89b75
2017-07-04 11:41:37 +00:00
Roland Levillain
0d0c37da2a Merge "Revert "ConnectivityManager: allow usage of TYPE_NONE""
am: 613b73cac8

Change-Id: I49221522c1a9a6e7d4ae72529c1a47b736e26a39
2017-07-04 11:31:30 +00:00
Roland Levillain
2654f7c646 Merge "Revert "ConnectivityServiceTest: more informative assert failures""
am: a03e68e3e9

Change-Id: Ie61051984a1b6efbb0b19754ce0fb99024ab296a
2017-07-04 11:24:25 +00:00
Roland Levillain
08443dc3d6 Merge "Revert "ConnectivityServiceTest: eliminate remaining sleep()""
am: 374ad24705

Change-Id: If210f213c7840c218d5e847667c7613d53f86661
2017-07-04 11:22:32 +00:00
Roland Levillain
613b73cac8 Merge "Revert "ConnectivityManager: allow usage of TYPE_NONE"" 2017-07-04 11:15:18 +00:00
Roland Levillain
5a58f9da60 Revert "ConnectivityManager: allow usage of TYPE_NONE"
This CL is breaking some internal builds.

This reverts commit 0bc85784a8.

Change-Id: Ie79214808d84c73f54a525f515b4c90a3fb23542
2017-07-04 11:14:03 +00:00
Roland Levillain
a03e68e3e9 Merge "Revert "ConnectivityServiceTest: more informative assert failures"" 2017-07-04 11:12:10 +00:00
Roland Levillain
d91096e549 Revert "ConnectivityServiceTest: more informative assert failures"
CL https://android-review.googlesource.com/#/c/420720/ is
breaking several internal builds, and CL
https://android-review.googlesource.com/#/c/422480/ must
be reverted beforehand.

This reverts commit bde57bd251.

Change-Id: I5883409452d39e1834e183aa7b5ccdbf14291ca5
2017-07-04 11:11:35 +00:00
Roland Levillain
374ad24705 Merge "Revert "ConnectivityServiceTest: eliminate remaining sleep()"" 2017-07-04 11:11:09 +00:00
Roland Levillain
455db172a9 Revert "ConnectivityServiceTest: eliminate remaining sleep()"
CL https://android-review.googlesource.com/#/c/420720/ is
breaking several internal builds, and CL
https://android-review.googlesource.com/#/c/422481/ must
be reverted beforehand.

This reverts commit 638073b483.

Change-Id: If0b196b6860c4087a05b28770469d7850a76fd37
2017-07-04 11:10:06 +00:00
Hugo Benichi
f521523042 Merge "ConnectivityServiceTest: eliminate remaining sleep()" am: bd5e242d96 am: 556a005a30 am: 2a7985a6d0
am: a2838c9062

Change-Id: I9449d73a1cba183d6203d2fa9165027a5482c56c
2017-07-04 10:01:25 +00:00
Hugo Benichi
a2838c9062 Merge "ConnectivityServiceTest: eliminate remaining sleep()" am: bd5e242d96 am: 556a005a30
am: 2a7985a6d0

Change-Id: I3d53ece1c18cf1cf1e5e361231e321dcd59b5bad
2017-07-04 09:55:04 +00:00
Hugo Benichi
f5f34e604a Merge changes I90c211dc,I4455f272 am: 6cc4ed727e am: 1ac5f64000 am: d0e5f1d280
am: a348c0a644

Change-Id: I8a07b60112df37a63804454b356b4838c3a24965
2017-07-04 09:54:57 +00:00
Hugo Benichi
a348c0a644 Merge changes I90c211dc,I4455f272 am: 6cc4ed727e am: 1ac5f64000
am: d0e5f1d280

Change-Id: Ia79936c51ec8236d5c92c19a8d2a3dff34f0e1a1
2017-07-04 09:49:06 +00:00
Hugo Benichi
556a005a30 Merge "ConnectivityServiceTest: eliminate remaining sleep()"
am: bd5e242d96

Change-Id: I31a8f64b4ee37a58bc83c08251d949f44cc26fd4
2017-07-04 09:43:01 +00:00
Hugo Benichi
1ac5f64000 Merge changes I90c211dc,I4455f272
am: 6cc4ed727e

Change-Id: I502d978ff636a00979d2083c39381bf600d3d6da
2017-07-04 09:35:51 +00:00
Treehugger Robot
bd5e242d96 Merge "ConnectivityServiceTest: eliminate remaining sleep()" 2017-07-04 09:25:53 +00:00
Treehugger Robot
6cc4ed727e Merge changes I90c211dc,I4455f272
* changes:
  ConnectivityServiceTest: more informative assert failures
  ConnectivityManager: allow usage of TYPE_NONE
2017-07-04 09:22:07 +00:00
Hugo Benichi
638073b483 ConnectivityServiceTest: eliminate remaining sleep()
ConnectivityServiceTest was still using sleep() in a few places although
these were unnecessary:
  - in testSatisfiedThenLostNetworkRequestDoesNotTriggerOnAvailable(),
    expectNoCallback() and expectAvailableCallback() already include
    waitForIdleHandler calls that drain the message queues and make
    sleep no-ops.
  - in testTimedoutAfterUnregisterdNetworkRequest, the sleeps were
    introduced before unregisterNetworkCallback was changed to have a
    synchronous effect for callback unregistration, therefore the sleep
    becomes simply non-sensical. To reflect this the name of the method
    is also changed.

Bug: 62918393
Test: runtest frameworks-net
Change-Id: I78426665670f702304212753f417b3d5a8a2c107
2017-07-04 16:23:06 +09:00
Hugo Benichi
bde57bd251 ConnectivityServiceTest: more informative assert failures
Bug: 62918393
Test: runtest frameworks-net
Change-Id: I90c211dc6d6262475924ecabc2863c47aec5a0b9
2017-07-04 16:23:05 +09:00
Hugo Benichi
0bc85784a8 ConnectivityManager: allow usage of TYPE_NONE
This patch allows to use TYPE_NONE for the legacy network type variable
of NetworkInfo. This usage is "safe" with respect to legacy APIs using
network types as most of them already returns null or do nothing for
TYPE_NONE.

Of the existing APIs in ConnectivityManager that accept a network type
argument, those which were already returning null or doing nothing for
TYPE_NONE are:
  getNetworkInfo(int)
  getNetworkForType(int)
  stopUsingNetworkFeature(int, String)
  networkCapabilitiesForType(int)
  requestRouteToHostAddress(int, InetAddress)
  reportInetCondition(int, int)
  isNetworkSupported(int)
  getLinkProperties(int)

Only setProvisioningNotificationVisible needs an additional guard
against TYPE_NONE.

Bug: 30088447
Bug: 62844794
Test: runtest frameworks-net
Change-Id: I4455f2726d06406047086368628c1f253d854d8d
2017-07-04 16:22:59 +09:00
Joel Scherpelz
ca26d4c30e Merge "Wakeup packet mark/mask configuration option" am: 266cb98072 am: db7c49e8c6 am: 48360082bc
am: 4e10d0ab40

Change-Id: I96595368cfb6f461a84dae5bc1330f6c843f77ba
2017-07-04 04:16:43 +00:00
Joel Scherpelz
4e10d0ab40 Merge "Wakeup packet mark/mask configuration option" am: 266cb98072 am: db7c49e8c6
am: 48360082bc

Change-Id: Ie5c88f5b91248a5f069decc0708f17af4b649710
2017-07-04 04:07:56 +00:00
Joel Scherpelz
db7c49e8c6 Merge "Wakeup packet mark/mask configuration option"
am: 266cb98072

Change-Id: Ief60fa8a594931c8968db7a9ea2872c030794088
2017-07-04 03:47:14 +00:00
Treehugger Robot
266cb98072 Merge "Wakeup packet mark/mask configuration option" 2017-07-04 03:38:34 +00:00
Hugo Benichi
6464d696df Merge "Networking unit tests: fix some flaky tests" am: 501bae6492 am: c6121a13ea am: 741fdea598
am: 21bd7958cf

Change-Id: I6673a65a09214911063824d9beffe40b6376c380
2017-07-03 10:00:41 +00:00
Hugo Benichi
21bd7958cf Merge "Networking unit tests: fix some flaky tests" am: 501bae6492 am: c6121a13ea
am: 741fdea598

Change-Id: Ie5d8f2e01d14c4dc4fc83d1645130258ba92998d
2017-07-03 09:51:26 +00:00