Commit Graph

1329 Commits

Author SHA1 Message Date
Lorenzo Colitti
b25b5d4f81 Merge "Change the netId to nethandle mapping." am: 35bd74cfd3 am: feaf412e19
am: fb91426d12

Change-Id: I06e09bfaeb1040b97afa392faace339eb5bab4ad
2018-01-16 05:32:55 +00:00
Hugo Benichi
8f21758d4a MacAddress: add @NonNull annotations
This patch adds to the MacAddress class:
  - getAddressType() method which replaces addressType(), for naming
  consistency
  - @NonNull annotations on all input and output reference values for
  all public methods (@hide and public).

TYPE_UNKNOWN, which currently cannot be observed with a non @hide
method, is also removed from the public api.

Bug: 71866627
Test: $ runtest frameworks-net
Change-Id: I2af70408d46f431b7b32183e6b48ddae9a261a2c
2018-01-16 13:32:59 +09:00
Lorenzo Colitti
5183e57449 Change the netId to nethandle mapping.
Being able to update this handle is necessary to ensure that
system-only OTAs do not break vendor code that relies on
nethandles.

Bug: 63052780
Test: walleye builds, boots, networking works
Test: MultinetworkApiTest CTS tests passes
Change-Id: I049a4ad2610ca68b8f56377b63be7e5e8ce76039
2018-01-16 02:08:09 +09:00
Lorenzo Colitti
389812c768 Merge "Move more core networking tests to framework/base/tests/net." am: d207b1faa3 am: 8f852c341f
am: 291e7c4fce

Change-Id: I1eb98a82426d7b7e085316f8a67cdd1e81912538
2018-01-11 04:17:51 +00:00
Lorenzo Colitti
d207b1faa3 Merge "Move more core networking tests to framework/base/tests/net." 2018-01-11 03:09:40 +00:00
Lorenzo Colitti
a4fdc1204e Move more core networking tests to framework/base/tests/net.
Test: "runtest frameworks-net" passes except for already-failing IpConnectivityMetricsTest
Change-Id: I2a20d546089699ac67bc819f10a8fcd50c637ac4
2018-01-10 23:35:16 +09:00
Kweku Adams
2ee6dc1979 incidentd: dumping jobscheduler to proto
Bug: 65750819
Test: flash device and check incident.proto output
Also test: $ cts-tradefed run cts-dev --module CtsIncidentHostTestCases --test com.android.server.cts.JobSchedulerIncidentTest
Change-Id: I4abc01ca893edcbaf4d2254e4f807e06f5cb91f8
2018-01-09 12:05:39 -08:00
Malcolm Chen
acf59b8403 Add isMobileDataEnabled in TelephonyManager.
Added a new hidden API isMobileDataEnabled in TelephonyManager.
Rename related APIs to isUserMobileDataEnabled,
isUserMobileDataEnabled and setUserMobileDataEnabled to better
clarify their functionality.

Bug: 69814555
Test: build
Change-Id: I2f186f1e7550cafbe4ee3a5af293c39274cbfeaa
Merged-In: I2f186f1e7550cafbe4ee3a5af293c39274cbfeaa
2018-01-08 18:08:22 -08:00
Hugo Benichi
1f3ce3f31a MacAddress: address api review comments
1) toSafeString() is renamed to toOuiString()
2) toOuiString() returns a String that only contains the first 3 bytes
   of the mac address.

Bug: 70336442
Test: runtest frameworks-net
Change-Id: I798d8fec32dbff5687a682028e5d90eb941f81c1
Merged-In: I798d8fec32dbff5687a682028e5d90eb941f81c1

(cherry pick from commit 3f83b8ad4e)
2017-12-21 08:34:05 +09:00
TreeHugger Robot
7085d9496e Merge "Add isMobileDataEnabled in TelephonyManager." 2017-12-18 22:08:38 +00:00
Hugo Benichi
3f83b8ad4e MacAddress: address api review comments
1) toSafeString() is renamed to toOuiString()
2) toOuiString() returns a String that only contains the first 3 bytes
   of the mac address.

Bug: 70336442
Test: runtest frameworks-net
Change-Id: I798d8fec32dbff5687a682028e5d90eb941f81c1
2017-12-18 09:22:47 +09:00
Hugo Benichi
3f33d23522 Expose the MacAddress class in the api
Test: built,  flashed, $ runtest frameworks-net
Bug: 69390696
Change-Id: Ica5efdf5ffe8ad2500a87f574508a2bcd074b33d
Merged-In: Ica5efdf5ffe8ad2500a87f574508a2bcd074b33d

(cherry picked from commit d411cf61ed5b948aaf6f6234217d6c6999c35159)
2017-12-18 09:21:26 +09:00
Malcolm Chen
7e42131e05 Add isMobileDataEnabled in TelephonyManager.
Added a new hidden API isMobileDataEnabled in TelephonyManager.
Rename related APIs to isUserMobileDataEnabled,
isUserMobileDataEnabled and setUserMobileDataEnabled to better
clarify their functionality.

Bug: 69814555
Test: build
Change-Id: I2f186f1e7550cafbe4ee3a5af293c39274cbfeaa
2017-12-13 14:44:39 -08:00
Hugo Benichi
731c83e23f Merge "Expose the MacAddress class in the api" 2017-12-05 23:58:32 +00:00
Hugo Benichi
e06a0a395e Merge "Fix bug in MacAddress.fromString()" am: cdb84d2fc7 am: a31109c229
am: 23649344d2

Change-Id: I7df23a45618825b874658ccbbf1d1fda6b164954
2017-12-05 10:09:35 +00:00
Hugo Benichi
a31109c229 Merge "Fix bug in MacAddress.fromString()"
am: cdb84d2fc7

Change-Id: If4c85f0a5ea259f53f9cffa6eacb58fcde1fd1df
2017-12-05 09:47:50 +00:00
Hugo Benichi
21c7a52042 Fix bug in MacAddress.fromString()
Test: runtest frameworks-net
Bug: 69390696
Change-Id: I83f01e4915092e08ed201d9b6738bb02498d3bba
2017-12-05 13:14:08 +09:00
Hugo Benichi
9768c1013e Expose the MacAddress class in the api
Test: built,  flashed, $ runtest frameworks-net
Bug: 69390696
Change-Id: Ica5efdf5ffe8ad2500a87f574508a2bcd074b33d
2017-12-05 10:30:31 +09:00
Hugo Benichi
41dd9c894c Merge "MacAddress: light refactors and improve documentation" am: d871cab32d am: 56eeb80dc5
am: 6600538c55

Change-Id: Iae0e87bcc9bd9c1ba98319f3b65f18f6743c02a0
2017-12-05 00:06:50 +00:00
Hugo Benichi
56eeb80dc5 Merge "MacAddress: light refactors and improve documentation"
am: d871cab32d

Change-Id: I51bb8786ecd7f53e3342625c7a2625007eedfc0f
2017-12-04 23:38:27 +00:00
Hugo Benichi
5bc3546cf6 MacAddress: light refactors and improve documentation
This patch does some light refactoring in MacAddress to prepare for
exposing MacAddress in the public api:
 - documention is improved
 - some method names are renamed
 - a toSafeString method is added
 - a padding bug in the conversion methods outputting strings for
   mac addresses is fixed

Bug: 69390696
Test: runtest frameworks-net
Change-Id: I399a97dabc2dfa8df9c5518c8b12484e43ca05c9
2017-12-04 22:34:43 +09:00
Jeff Sharkey
a58947af78 Merge "Clarify docs, sanity check roaming state." am: c80a1f23f3 am: 8c089f392e
am: e0b2908be9

Change-Id: I59fbe09afc74e94e2f56cb6fd833fc2deb7023e5
2017-11-27 21:48:46 +00:00
Jeff Sharkey
8c089f392e Merge "Clarify docs, sanity check roaming state."
am: c80a1f23f3

Change-Id: Ic30d5aaadf2c59978162c53d7e7781847244ce52
2017-11-27 21:30:57 +00:00
Jeff Sharkey
9ff2ddd7e7 Clarify docs, sanity check roaming state.
Update public docs to hide the fact that NetworkCapabilities is only
used inside NetworkRequest as an implementation detail.

Take up less room on the wire when passing NetworkCapabilities around
via NetworkRequest.

Sanity check that the roaming state between NetworkInfo and
NetworkCapabilities is in agreement.

Test: bit FrameworksNetTests:android.net.,com.android.server.net.,com.android.server.connectivity.,com.android.server.ConnectivityServiceTest
Bug: 67040695
Change-Id: I982b4c3c41a140934bbad3b8ca8f12dc3814e86c
2017-11-27 12:47:14 -07:00
Xin Li
acae66beee Merge commit '98e12851336b7db16e583f9afac63ecc97465980' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.

Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7
Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
2017-11-14 12:31:11 -08:00
Hugo Benichi
7e1e0d1583 Merge "MacAddress follow-up: define the core of the class" am: 005a90b337 am: d39a50350a
am: ca102e61ce

Change-Id: Iaa55c54a46844428da0ddd9d0a5ee899c0aa1dfb
2017-11-09 12:55:56 +00:00
Hugo Benichi
ca102e61ce Merge "MacAddress follow-up: define the core of the class" am: 005a90b337
am: d39a50350a

Change-Id: I1063cbb5a468818f68ee5406e52b6cd74c85c4bf
2017-11-09 12:43:52 +00:00
Hugo Benichi
d380d14c4d MacAddress follow-up: define the core of the class
Test: new unit test parts of $ runtest frameworks-net
Change-Id: I08c57d2d656802f7bdd7a93fde711a7e77247583
2017-11-09 16:36:45 +09:00
Hugo Benichi
e75a60743d Merge "Define MacAddress class" am: 925349ac8f am: 37caaaa705
am: 491a93b5ac

Change-Id: I0e09e64bb2a6306c0422443038351fabf10e2d6e
2017-11-08 06:57:00 +00:00
Hugo Benichi
491a93b5ac Merge "Define MacAddress class" am: 925349ac8f
am: 37caaaa705

Change-Id: I377de35ab9ce9d8bf44bd90295a2a41fbea06d7a
2017-11-08 06:46:49 +00:00
Hugo Benichi
88ad29b907 Define MacAddress class
Test: new unit tests part of $ runtest frameworks-net
Change-Id: I5a6a868ff86e9bffdc551d4e2bb486b585525c30
2017-11-08 11:09:49 +09:00
Erik Kline
f7f5d4e654 Merge "Replace dns_tls with private_dns_mode setting" am: 3d806790c4 am: f1799116c2
am: 664bb6fc4f

Change-Id: Icba28e4d4e446dd6eac0f2f017957894e33084f2
2017-11-07 06:23:05 +00:00
Erik Kline
664bb6fc4f Merge "Replace dns_tls with private_dns_mode setting" am: 3d806790c4
am: f1799116c2

Change-Id: I3e0448c045eb1072d0cd70a163ca355786b21cc4
2017-11-07 06:12:39 +00:00
Erik Kline
b0be3e6682 Replace dns_tls with private_dns_mode setting
Also includes:
    - SettingsLib strings used in PrivateDnsModeDialogPreference
      interaction in the Settings app
    - rename ContentResolver "resolver" in methods working with
      DNS resolvers (too confusing)

Test: as follows
    - built
    - flashed
    - booted
    - runtest frameworks-net
    - no new failures in SettingsBackupTest nor in SettingsProviderTest
    - manual interaction with developer option works
Bug: 34953048
Bug: 64133961
Change-Id: Ia7502916db9ffa0792e1e500a35e34d06a88e79d
2017-11-07 12:47:36 +09:00
Jeff Sharkey
92675a966e Merge "Define NOT_ROAMING network capability." am: 8f380ab29c am: 3fe1ae29cd
am: 47ad296f75

Change-Id: I04220ff55fc87dbf8d417a30f15a06a877b412d4
2017-11-03 23:18:45 +00:00
Jeff Sharkey
47ad296f75 Merge "Define NOT_ROAMING network capability." am: 8f380ab29c
am: 3fe1ae29cd

Change-Id: Ib511f7af82c80fd4e95f4da9de1fdce200deb987
2017-11-03 23:07:03 +00:00
Jeff Sharkey
07e19362de Define NOT_ROAMING network capability.
The "roaming" state of a network really belongs on NetworkCapabilities
instead of being published through NetworkInfo.isRoaming().  One major
reason is to support developers creating NetworkRequests for a
non-roaming network.

Watch for any capability changes that network statistics are
interested in (either metered or roaming) and notify it to perform
an update pass; fixes bug where we previously only triggered on
roaming changes.

Fix bug in VPNs where metered/roaming capabilities of underlying
networks weren't being propagated; this was probably preventing
some jobs from running over unmetered networks, and causing other
jobs to run over roaming networks!  Also passes along link bandwidth
information from underlying networks, and propegates any changes
to underlying networks.

Fix race condition by reading prevNc inside lock.  Utility methods
correctly calculate min/max link bandwidth values.

Test: bit FrameworksNetTests:android.net.,com.android.server.net.,com.android.server.connectivity.,com.android.server.ConnectivityServiceTest
Bug: 68397798, 16207332
Change-Id: I3e1a6544c902bf3a79356b72d3616af1fd2b0f49
2017-11-01 19:05:42 -06:00
Tobias Thierer
52cb2d9ce4 Merge "Merge "Track moving of OkHttp facade API to new package." am: 3af8a3d48a am: 1f7fcb7970" into oc-mr1-dev-plus-aosp
am: f63d128dd9

Change-Id: Ibb562280213bdaa499787c0e6cfd371c553d4f1c
2017-10-30 18:32:55 +00:00
Tobias Thierer
ff55edaea6 Merge "Track moving of OkHttp facade API to new package." am: 3af8a3d48a
am: 1f7fcb7970

Change-Id: I16e01dde45dd70cfb4ea43a81e728350a5b26d3f
2017-10-30 18:05:53 +00:00
Tobias Thierer
3af8a3d48a Merge "Track moving of OkHttp facade API to new package." 2017-10-30 17:40:36 +00:00
Tobias Thierer
c8d921a034 Track moving of OkHttp facade API to new package.
Another CL in this topic moves the classes from
  libcore.net.http
to
  com.squareup.okhttp.internalandroidapi.
In jarjar'ed build targets, this becomes
  com.android.okhttp.internalandroidapi.

This facade constitutes the API via which non-libcore parts
of the Android platform (currently framework) may access
OkHttp. It's moving because libcore.net.http is already
part of libcore, and the overlap of packages is problematic
for builds with EXPERIMENTAL_USE_OPENJDK9 set to true.

Bug: 68220880
Test: Treehugger
Change-Id: Ia79966563cc0b5ab0923d54c21e54b6192d8c990
Exempt-From-Owner-Approval: Jeff Sharkey is an owner, but only one of his accounts is listed as an owner (@android.com vs. @google.com)
2017-10-30 17:40:23 +00:00
Jeff Sharkey
e4df4919d7 Merge "Improve NetworkCapabilities docs." am: 14a51058b1 am: b385ba095b
am: 74653aa0b5

Change-Id: I33ef6f930529f9c6e8502613633fffccaa18c192
2017-10-25 17:54:35 +00:00
Jeff Sharkey
74653aa0b5 Merge "Improve NetworkCapabilities docs." am: 14a51058b1
am: b385ba095b

Change-Id: I3a685156e46c980078c3a91b36e9c1301c29240f
2017-10-25 17:35:44 +00:00
Jeff Sharkey
20f339b7df Improve NetworkCapabilities docs.
Add IntDef for constants, and rely on new auto-documentation feature
to expand all of them at usage sites.

Test: docs-only change
Bug: 64133169
Change-Id: I8a6b5f54c8eb9d4fc7ae3d0d3fb673d52320664b
2017-10-24 21:26:04 -06:00
Hugo Benichi
795f7d79f9 Merge "Import a few android.net unit tests into frameworks-net" am: f851fef87f am: bf80e2f376 am: 3d4d464f0a
am: cf9ab489de

Change-Id: I4922d8505e641652cea028c6d60a0f9996b130e6
2017-10-12 12:45:11 +00:00
Hugo Benichi
cf9ab489de Merge "Import a few android.net unit tests into frameworks-net" am: f851fef87f am: bf80e2f376
am: 3d4d464f0a

Change-Id: Icf9ccd265754f1b85720bb778633dc5ef515646e
2017-10-12 12:34:55 +00:00
Hugo Benichi
87d306b45f Import a few android.net unit tests into frameworks-net
Bug: 62918393
Test: runtest frameworks-net
Change-Id: I3c7c60bcfeffec5c5ec287810312349237a2868a
2017-10-12 15:55:22 +09:00
Hugo Benichi
c941807809 Merge "LinkProperties: fix some indentation issues" am: 4dea4936c7 am: 2d91ade1d8 am: a63788076a
am: 454cfa238a

Change-Id: I0902027750cc797c950ed375832dcc379bbdb93b
2017-10-10 14:42:24 +00:00
Hugo Benichi
454cfa238a Merge "LinkProperties: fix some indentation issues" am: 4dea4936c7 am: 2d91ade1d8
am: a63788076a

Change-Id: Ife901fd1c9c30b3864ddce61326f2d5caacd0bae
2017-10-10 14:31:48 +00:00
Hugo Benichi
875e9a419c LinkProperties: fix some indentation issues
Test: no functional change
Change-Id: I469bba154feb382156e56043d83f066a5bd658aa
2017-10-10 18:25:50 +09:00