Commit Graph

2437 Commits

Author SHA1 Message Date
Jeremy Joslin
998d7ca56a Async network recommendation requests.
Exposing a new hidden API method that allows network recommendations
to be requested asynchronously.

Test: Built & run.
BUG:33784158
Change-Id: I8f84b09f43a6c5fae5d8f03ec01e75c25b4b62d6
2017-01-17 12:37:07 -08:00
Sundeep Ghuman
7a9612f032 Fix ScoredNetwork: unparcel bundle in toString.
Calling isEmpty will ensure the bundle is unparceled before converting
to a string.

Test: dumped network_score
Change-Id: Icaa4e736af55c6112805a2ce0e829739bbb5b312
2017-01-12 18:45:52 -08:00
Sundeep Ghuman
23ccbcd404 Modify WifiNetworkScoreCache to print full Score.
Test: dumped network_score and verified printout
Change-Id: I3689449db91e8c5e96bed349749f074c5626bd03
2017-01-12 01:44:24 -08:00
Etan Cohen
7a36073c14 Merge "[AWARE] Unhide Wi-Fi Aware API (baseline)" am: dfe8f5dc13 am: 2a4e3bef2c am: b32dfa4ef5
am: 3fc5b186fa

Change-Id: Ib668ed15ccf1f05c5ed31f700b69e1f3ab8b4cac
2017-01-11 23:28:20 +00:00
Etan Cohen
3fc5b186fa Merge "[AWARE] Unhide Wi-Fi Aware API (baseline)" am: dfe8f5dc13 am: 2a4e3bef2c
am: b32dfa4ef5

Change-Id: If2a6b632cd03984921572b190745865953a8e808
2017-01-11 23:22:51 +00:00
Etan Cohen
b32dfa4ef5 Merge "[AWARE] Unhide Wi-Fi Aware API (baseline)" am: dfe8f5dc13
am: 2a4e3bef2c

Change-Id: I6f894d92451032657678639c3021eef07289a6a2
2017-01-11 23:17:19 +00:00
Etan Cohen
2a4e3bef2c Merge "[AWARE] Unhide Wi-Fi Aware API (baseline)"
am: dfe8f5dc13

Change-Id: I581b72ce62966f4c04427603a2b9686dcf46cc42
2017-01-11 23:12:16 +00:00
Etan Cohen
dfe8f5dc13 Merge "[AWARE] Unhide Wi-Fi Aware API (baseline)" 2017-01-11 22:59:25 +00:00
Jeremy Joslin
ad9ff9c59a Merge "Move getActiveScorerPackage() to the score service." am: b5488ec3b3 am: 425a0fdc95
am: ab9eb11e2f

Change-Id: Iede47bf5a625ac4183919b4253c6d5e3f92520bc
2017-01-11 20:08:49 +00:00
Jeremy Joslin
ab9eb11e2f Merge "Move getActiveScorerPackage() to the score service." am: b5488ec3b3
am: 425a0fdc95

Change-Id: Icd1e76d7987cc9937cce5079dedf610fcd21c903
2017-01-11 19:59:27 +00:00
Jeremy Joslin
425a0fdc95 Merge "Move getActiveScorerPackage() to the score service."
am: b5488ec3b3

Change-Id: I8819c482a87a8c78ad0a1a39dda74b5ee2e7da4c
2017-01-11 19:52:37 +00:00
Treehugger Robot
b5488ec3b3 Merge "Move getActiveScorerPackage() to the score service." 2017-01-11 19:40:45 +00:00
Etan Cohen
6a4b323f08 [AWARE] Unhide Wi-Fi Aware API (baseline)
Baseline Wi-Fi Aware API providing discovery and connectivity (data-path).

Bug: 30983968
Test: unit tests + integration (sl4a) tests passing.
Change-Id: Idd7c6a625f168717b083d5f13e291ce916571933
2017-01-11 11:13:26 -08:00
Neil Fuller
261a1dcffd Merge "Refactor RFCOMM / BluetoothSocket usage of LocalSocket" am: 649a89e524 am: f4e236c794 am: 43d53395dc
am: 75f84f2261

Change-Id: I5cf584048e1e2cde67c33d77e99cd181db4e8c82
2017-01-11 15:45:29 +00:00
Neil Fuller
75f84f2261 Merge "Refactor RFCOMM / BluetoothSocket usage of LocalSocket" am: 649a89e524 am: f4e236c794
am: 43d53395dc

Change-Id: Ib7055c5ddf2caa52082aee4b67e3ebd213e09e4b
2017-01-11 13:54:10 +00:00
Neil Fuller
43d53395dc Merge "Refactor RFCOMM / BluetoothSocket usage of LocalSocket" am: 649a89e524
am: f4e236c794

Change-Id: If23b5efe912c5b0a76487c46723288ff6a903a14
2017-01-11 13:48:14 +00:00
Neil Fuller
f4e236c794 Merge "Refactor RFCOMM / BluetoothSocket usage of LocalSocket"
am: 649a89e524

Change-Id: Ib8dc0ec183b870931bf4befea5ff32532009fddd
2017-01-11 13:37:37 +00:00
Neil Fuller
649a89e524 Merge "Refactor RFCOMM / BluetoothSocket usage of LocalSocket" 2017-01-11 13:27:10 +00:00
Lorenzo Colitti
5bd8014265 Merge "Remove requestRouteToHost and {start,stop}UsingNetworkFeature." 2017-01-11 03:52:21 +00:00
Jeremy Joslin
99ca0df8d4 Merge "Moved isCallerActiveScorer() to the score service." am: 663b444196 am: 5fbd2791ac
am: 11b1311e21

Change-Id: I9e00b4593005729cdf2b01e2347f0513a6d52cf0
2017-01-11 01:50:13 +00:00
Jeremy Joslin
11b1311e21 Merge "Moved isCallerActiveScorer() to the score service." am: 663b444196
am: 5fbd2791ac

Change-Id: If5649294845f01a390bccd47fe99add3b27b0829
2017-01-11 01:45:43 +00:00
Jeremy Joslin
5fbd2791ac Merge "Moved isCallerActiveScorer() to the score service."
am: 663b444196

Change-Id: I44134284edc88567703435ce663b3d0efd9cff26
2017-01-11 01:41:14 +00:00
Treehugger Robot
663b444196 Merge "Moved isCallerActiveScorer() to the score service." 2017-01-11 01:30:03 +00:00
Treehugger Robot
60d10ea0f4 Merge changes I559eb049,I52425b84
* changes:
  DO NOT MERGE Captive portals: login activity probes like NetworkMonitor
  DO NOT MERGE Logging improvements in CaptivePortalLoginActivity
2017-01-11 01:06:57 +00:00
Jeremy Joslin
d7670f6d7c Move getActiveScorerPackage() to the score service.
Implemented getActiveScorerPackage() in the NetworkScoreService to
make it more efficient (no need to query PM).

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 33781558
Change-Id: Iee7610e4982b44aefa1ef8b6c208292b8f9adcf8
Merged-In: I2144351c2c09cad30f80399069364f3572e38445
2017-01-10 16:41:42 -08:00
Jeremy Joslin
9b442faa91 Moved isCallerActiveScorer() to the score service.
Implemented isCallerActiveScorer() in the NetworkScoreService to make
it more efficient (no need to query PM). Exposed the call as a new
internal API on NetworkScoreManager and deprecated the call on
NetworkScorerAppManager.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 33781558
Change-Id: I8ad232f8ef34b6e2f155ebb232e64300303300f0
Merged-In: I0e2142af95b068d322343f7c9362ac53d46b545e
2017-01-10 16:11:33 -08:00
Jeremy Joslin
6c1ca280b3 Move getActiveScorerPackage() to the score service.
Implemented getActiveScorerPackage() in the NetworkScoreService to
make it more efficient (no need to query PM).

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 33781558
Change-Id: I2144351c2c09cad30f80399069364f3572e38445
2017-01-10 13:08:32 -08:00
Jeremy Joslin
134c9d3311 Moved isCallerActiveScorer() to the score service.
Implemented isCallerActiveScorer() in the NetworkScoreService to make
it more efficient (no need to query PM). Exposed the call as a new
internal API on NetworkScoreManager and deprecated the call on
NetworkScorerAppManager.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 33781558
Change-Id: I0e2142af95b068d322343f7c9362ac53d46b545e
2017-01-10 10:52:56 -08:00
Sundeep Ghuman
4892f7d98f Merge "Cherrypick: Create ScoredNetwork Badging API changes." am: e34e47d645 am: 3098d3839f
am: 4962a3829f

Change-Id: Ia3928c4113e8f07969a3d551e31d6307f61e848e
2017-01-10 00:05:21 +00:00
Sundeep Ghuman
4962a3829f Merge "Cherrypick: Create ScoredNetwork Badging API changes." am: e34e47d645
am: 3098d3839f

Change-Id: I5f7d741dbd7f91518495f02de995bca6d191aa4e
2017-01-09 23:55:47 +00:00
Sundeep Ghuman
3098d3839f Merge "Cherrypick: Create ScoredNetwork Badging API changes."
am: e34e47d645

Change-Id: Ibeb6c60c30c302e12c45c7f35a7e4af904a4a6d5
2017-01-09 23:51:07 +00:00
Treehugger Robot
e34e47d645 Merge "Cherrypick: Create ScoredNetwork Badging API changes." 2017-01-09 23:39:48 +00:00
Jeremy Joslin
6cf53d0ab8 Merge "Check for REQUEST_NETWORK_SCORES instead of BROADCAST_NETWORK_PRIVILEGED." am: 4c456d7ddf am: 542aad4c75
am: f91d9debef

Change-Id: I7436278fa3eab064fe2b416c672bedaa300eb501
2017-01-09 21:17:17 +00:00
Jeremy Joslin
f91d9debef Merge "Check for REQUEST_NETWORK_SCORES instead of BROADCAST_NETWORK_PRIVILEGED." am: 4c456d7ddf
am: 542aad4c75

Change-Id: I3b35ec04e65f6b14f75f266dfcf15c10a12a4d74
2017-01-09 21:07:48 +00:00
Jeremy Joslin
542aad4c75 Merge "Check for REQUEST_NETWORK_SCORES instead of BROADCAST_NETWORK_PRIVILEGED."
am: 4c456d7ddf

Change-Id: I441cae5096b922419763832d5b38faa95818e337
2017-01-09 20:58:50 +00:00
Sundeep Ghuman
8bc096c09d Cherrypick: Create ScoredNetwork Badging API changes.
Defines an attribute bundles key to hold the badging curve, the
enums for badge values, and an API to retrieve a badge for a
specific RSSI.

OCL: ag/1727147
Bug: 33457699
Test: Unit tests
Change-Id: If9e8a60c4670b51c395fb501f55ddece8a72981e
Merged-In: If9e8a60c4670b51c395fb501f55ddece8a72981e
2017-01-09 12:57:02 -08:00
Jeremy Joslin
186f3339ab Check for REQUEST_NETWORK_SCORES instead of BROADCAST_NETWORK_PRIVILEGED.
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
BUG: 33752149
Change-Id: I3dd352c98bbc34b128ab9c2a28f81e1261ae2669
Merged-In: I7d91fa9a4f6ef4f9170c6af98567ce443c805e74
2017-01-09 11:03:21 -08:00
Jeremy Joslin
5519d7cf71 Check for REQUEST_NETWORK_SCORES instead of BROADCAST_NETWORK_PRIVILEGED.
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
BUG: 33752149
Change-Id: I7d91fa9a4f6ef4f9170c6af98567ce443c805e74
2017-01-06 15:42:57 -08:00
Neil Fuller
7fd724611b Refactor RFCOMM / BluetoothSocket usage of LocalSocket
LocalSocket is used by BluetoothSocket. BluetoothSocket
passes a pre-created file descriptor to LocalSocket that
is then given to the LocalSocketImpl.

Commit b08c7bc0bd broke the
behavior. Commit 7a8c36aa4e
put in a minimal fix.

This change tidies up LocalSocket and associated classes
and replaces a specialist constructor with a factory method
to highlight the special case. While there an unnecessary
exception has been removed.

Bug: 34111534
Test: Boot device
Test: vogar --mode app_process tests/tests/net/src/android/net/cts/LocalSocketTest.java
Change-Id: I4ba2f2d9ea361a950ff8bc8d64fc800d998c3210
2017-01-06 14:18:07 +00:00
Ajay Panicker
d02e1c3024 Merge "Prevent LocalSocket from creating an fd if fd is already there" am: 616910fd53 am: d76576b6d1 am: e0211af867
am: af525ff403

Change-Id: I564721fb1ba889cd159f10e769aee4a5bee3db67
2017-01-06 01:57:10 +00:00
Ajay Panicker
af525ff403 Merge "Prevent LocalSocket from creating an fd if fd is already there" am: 616910fd53 am: d76576b6d1
am: e0211af867

Change-Id: I5ac57ca6439359fc65622254090a3ea6cc2aec18
2017-01-06 01:50:03 +00:00
Ajay Panicker
e0211af867 Merge "Prevent LocalSocket from creating an fd if fd is already there" am: 616910fd53
am: d76576b6d1

Change-Id: I0b59b10a095bf23d4f26856690bf6be2a5304cbc
2017-01-06 01:46:10 +00:00
Ajay Panicker
d76576b6d1 Merge "Prevent LocalSocket from creating an fd if fd is already there"
am: 616910fd53

Change-Id: I90192dd7e656b9bec62815ad628fc4e67f806240
2017-01-06 01:41:09 +00:00
Treehugger Robot
616910fd53 Merge "Prevent LocalSocket from creating an fd if fd is already there" 2017-01-06 01:29:47 +00:00
Amin Shaikh
cf9ad83520 Merge "Fix NetworkScorerAppManager#isCallerActiveScorer." am: 48eecdcbc4 am: 7495cf633c am: d7f371813a
am: ea7931d107

Change-Id: I193abae0fef7cb976ef970085363822f4770215c
2017-01-06 00:29:31 +00:00
Amin Shaikh
ea7931d107 Merge "Fix NetworkScorerAppManager#isCallerActiveScorer." am: 48eecdcbc4 am: 7495cf633c
am: d7f371813a

Change-Id: I8fc3a45a910294c46982bac9a3f6e183977aad16
2017-01-06 00:21:56 +00:00
Amin Shaikh
d7f371813a Merge "Fix NetworkScorerAppManager#isCallerActiveScorer." am: 48eecdcbc4
am: 7495cf633c

Change-Id: Ie6913526fbc1b0ae63eb7c0c7be7d9eac5772f50
2017-01-06 00:15:01 +00:00
Amin Shaikh
7495cf633c Merge "Fix NetworkScorerAppManager#isCallerActiveScorer."
am: 48eecdcbc4

Change-Id: I6b9ecd35dbc0758cd45b804dc9586287428af293
2017-01-06 00:08:19 +00:00
Ajay Panicker
7a8c36aa4e Prevent LocalSocket from creating an fd if fd is already there
Any LocalSocket created with a FileDescriptor will throw IOExceptions
when performing most opperations due to the fact that the LocalSocket
tries to create an implementation but fails since there is a FileDescriptor
already set.

Bug: 34095140
Test: Setup using tap&go
Change-Id: Ie8f50def6156c16617697d939d6c0ab570281642
2017-01-05 23:52:30 +00:00
Amin Shaikh
2cd918a63e Fix NetworkScorerAppManager#isCallerActiveScorer.
The current implementation checks whether the caller's uid has the
SCORE_NETWORKS permission instead of checking the passed in callingUid. I
removed this check entirely because the getActiveScorer method already checks
whether the scorer's package has the SCORE_NETWORKS permission. There is no way
callingUid can equal the active scoring package's uid without also having the
SCORE_NETWORKS permission.

Bug: 34107721
Test: runtest --path core/tests/coretests/src/android/net/NetworkScorerAppManagerTest.java
Change-Id: Ifd427792169837c84a10a76b208c76137db06ae9
2017-01-05 14:28:47 -08:00