Commit Graph

2689 Commits

Author SHA1 Message Date
Jeff Sharkey
53e8283bb1 am 99bbaa60: Merge "Drop DEV network stats to save RAM." into lmp-mr1-dev automerge: 49c1527 automerge: a5921b9
* commit '99bbaa609e63bb5c425d66f118f42fce8c58bac9':
  Drop DEV network stats to save RAM.
2014-10-28 07:16:34 +00:00
Jeff Sharkey
99bbaa609e Merge "Drop DEV network stats to save RAM." into lmp-mr1-dev automerge: 49c1527
automerge: a5921b9

* commit 'a5921b9b79a1d95e8a41bd74998cab82b153cb0a':
  Drop DEV network stats to save RAM.
2014-10-28 00:27:07 +00:00
Bill Yi
4d4d7a14a6 am 1aa4c271: (-s ours) am 5a71f832: (-s ours) Merge lmp-dev-plus-aosp-without-vendor into stage-aosp-master
* commit '1aa4c271fe5095336367d9a360882c829c0a7d40':
2014-10-27 04:19:54 +00:00
Bill Yi
1aa4c271fe am 5a71f832: (-s ours) Merge lmp-dev-plus-aosp-without-vendor into stage-aosp-master
* commit '5a71f83227f0340a265f34b226d8fe01d4dd9773':
2014-10-27 02:50:36 +00:00
Jeff Sharkey
90c441a71c Drop DEV network stats to save RAM.
We migrated to pure XT stats a long time ago, so we no longer need
to keep the DEV stats cached in RAM.  This saves ~250KB on a typical
device.

Bug: 18118003
Change-Id: I3d84ba47073fa3500454784afc956c8e53404492
2014-10-24 13:15:15 -07:00
Jeff Sharkey
b5e2e3047f am b0afc04d: am d4a9f511: am eec860ae: am a7b20bba: am bfd9a30f: Merge "NetworkStats always needs arrays." into lmp-dev
* commit 'b0afc04d71d5c37cfef34a48f40d7fb6b08cb51e':
2014-09-19 07:44:24 +00:00
Jeff Sharkey
b5296b615b am d4a9f511: am eec860ae: am a7b20bba: am bfd9a30f: Merge "NetworkStats always needs arrays." into lmp-dev
* commit 'd4a9f511ba4e960836d951efeaa1a672d8869a32':
  NetworkStats always needs arrays.
2014-09-17 19:48:17 +00:00
Jeff Sharkey
aa420b146b am 51420c63: am bfd9a30f: Merge "NetworkStats always needs arrays." into lmp-dev
* commit '51420c63918de8db44084b04c155448c3fd25362':
  NetworkStats always needs arrays.
2014-09-17 19:25:08 +00:00
Jeff Sharkey
8e9afdf05f NetworkStats always needs arrays.
Internal logic relies on Arrays.copyOf(), so always give ourselves
valid arrays, using shared empty objects to save overhead.

Bug: 17502649
Change-Id: I5dbb00545bdfe45bbd48144ab505ea08cc92cbcd
2014-09-17 09:26:31 -07:00
Christopher Lane
4d85e0219f am 614c653b: am 1fdb5100: Merge "Handle null values in registerService" into lmp-dev
* commit '614c653b7a2da14ded7d9c95142a5afd0b4d4722':
  Handle null values in registerService
2014-09-14 17:25:44 +00:00
Christopher Lane
45cc2ce6ed Handle null values in registerService
Bug: 17491971
Change-Id: I0443a9accd86ab70510d16456a03912845718ca9
2014-09-13 11:18:33 -07:00
Vinit Deshpande
f27a1ca3c6 am 81c30ffd: am 279e0cc4: Merge "Don\'t require CONNECTIVITY_INTERNAL check for protected broadcasts" into lmp-dev
* commit '81c30ffd140fb7d18cb8f0089770d3ecf33923c3':
  Don't require CONNECTIVITY_INTERNAL check for protected broadcasts
2014-09-11 18:39:44 +00:00
Vinit Deshpande
a2a966b884 Don't require CONNECTIVITY_INTERNAL check for protected broadcasts
This change removes requirement that sender has this permission for
protected broadcasts (since they can only come from framework)

Bug: 17409667

Change-Id: I3431c20a4ed28b3ba2bfc3cf53772e63a3424a2c
2014-09-10 18:12:41 -07:00
Jeff Sharkey
b0933e4dbe am a5746ce3: am b8d727ec: Merge "Use sscanf() for parsing tag values." into lmp-dev
* commit 'a5746ce305bc331c4cb6a5bd1fa152c17813e0f8':
  Use sscanf() for parsing tag values.
2014-09-09 21:56:04 +00:00
Jeff Sharkey
14966ee4ae Use sscanf() for parsing tag values.
Neither strtoll() nor strtoull() can parse the %llx formatted tag
values coming from the kernel.  We know the lowest 32 bits will never
be set, so fast-path the 3-character case as 0x0.

Bug: 17365163
Change-Id: I238bbd2830c9335e7ab7a53362d6e12b46e0bcb3
2014-09-09 12:29:41 -07:00
Christopher Ferris
d376c7ef3a am 7c931e2e: (-s ours) am f4eaaadb: Merge "Fix use of %llx for sscanf 64 bit values."
* commit '7c931e2e4b3e9bea0f4d9b942e28864adfe00887':
  Fix use of %llx for sscanf 64 bit values.
2014-09-06 17:25:38 +00:00
Sreeram Ramachandran
a53dd7f9ef Unescape strings properly in NsdService.
NativeDaemonEvent.unescapeArgs() was improperly skipping the terminating
quote in cases like "\\", where the char preceding the quote is a
backslash, but the backslash itself is escaped, so the quote is indeed
an unescaped terminator.

unescapeArgs() doesn't unescape "\xxx" decimal escapes used by mDNS, so
fix NsdService to do that sort of unescaping explicitly (which is only
applicable when it receives a "fullname", in SERVICE_RESOLVED).

Bug: 16983542
Bug: 16986203

Change-Id: Idfa79749336c68424d961bc414f984c525b7e5e6
2014-09-05 20:31:46 +00:00
Christopher Ferris
04d79e7756 Fix use of %llx for sscanf 64 bit values.
Change-Id: Ie7a0e243dfcf24722783fe7d697a1412de7efe68
2014-09-03 19:59:08 -07:00
Lorenzo Colitti
eff82e8099 Stop using LinkProperties for static configuration.
LinkProperties can represent way more complicated configurations
than what we can actually apply to interfaces. This makes it
error-prone to use it to represent static configuration, both
when trying to apply configuration coming from LinkProperties
and when trying to save configuration from current
LinkProperties.

Instead, move static configuration (IPv4 only, since we don't
support static IPv6 configuration) into a separate
StaticIpConfiguration class.

Bug: 16114392
Bug: 16893413
Change-Id: Ib33f35c004e30b6067bb20235ffa43c247d174df
2014-08-19 11:59:43 -07:00
Jeff Sharkey
5d6a2cd7ca Some networks may have null ifaces, I guess?
Seems like a bug further upstream, but guard ourselves against it
for now.

Bug: 17033841
Change-Id: Id0e5895c3389b63d4e34b1fb064efef8b72cd609
2014-08-14 22:42:27 +00:00
Jeff Sharkey
3b43a279e3 Hack and ship: NetworkStats edition.
Some devices use clatd for catching raw IPv4 traffic when running on
a pure-IPv6 carrier network.  In those situations, the per-UID
stats are accounted against the clat iface, so framework users need
to combine both the "base" and "stacked" iface usage together.

This also means that policy rules (like restricting background data
or battery saver) need to apply to the stacked ifaces.

Finally, we need to massage stats data slightly:

-- Currently xt_qtaguid double-counts the clatd traffic *leaving*
the device; both against the original UID on the clat iface, and
against UID 0 on the final egress interface.

-- All clatd traffic *arriving* at the device is missing the extra
IPv6 packet header overhead when accounted against the final UID.

Bug: 12249687, 15459248, 16296564
Change-Id: I0ee59d96831f52782de7a980e4cce9b061902fff
2014-08-11 18:40:23 -07:00
Christopher Tate
5a1878d6ca Make TrafficStats uid attribution @SystemApi
Anything that runs as a singleton may need to attribute traffic to
various client apps; in particular, backup transports need to do this.
Apropos of which, introduce a @SystemApi method specifically for that
purpose, setThreadStatsTagBackup().

Bug 16661321

Change-Id: Id5d22e28bdc68edb53f2a1fdba80b144fcbc61d2
2014-08-07 19:43:20 +00:00
Sreeram Ramachandran
fba15596cb Cleanup: Delete dead code.
Bug: 15413389
Change-Id: I315468832ef18ffc84174e54774ab63b86d284dc
2014-07-22 15:46:34 -07:00
Paul Jensen
b0bdb33876 Convert Vpn from NetworkStateTracker to NetworkAgent.
This eliminates the need for the ConnectivityService.VpnCallback class.
This requires shifting VPNs to the new "network" netd API.
VpnService.protect() is modified to no longer go through ConnectivityService.
NetworkCapabilities is extended to add a transport type for VPNs and a
capability requiring a non-VPN (so the default NetworkRequest isn't satisfied
by a VPN).

bug:15409918
Change-Id: Ic4498f1961582208add6f375ad16ce376ee9eb95
2014-07-10 20:39:33 +00:00
Joe LaPenna
0a998b84bc CW on Master: Disable CaptivePortalTracker, EthernetService
BUG: 15143878

Change-Id: I6c534a28c1fcd475982ae70e7f3af69f3a219e24
2014-07-08 22:52:02 +00:00
Andres Morales
aecbb5c710 interface for nfc handover supplicant commands
expose:
  NFC_GET_HANDOVER_SEL
  NFC_GET_HANDOVER_REQ
  NFC_REPORT_HANDOVER

These are used in for setting up WFD with NFC and
are only accessible given the CONNECTIVITY_INTERNAL
permission.

Change-Id: Ia43afc137d474822cad896d335530654081a808c
2014-06-16 08:12:47 -07:00
Robert Greenwalt
84844aa9b0 am e1f5b5e0: Merge "Minor changes to the LinkAddress API docs." into lmp-preview-dev
* commit 'e1f5b5e0cd5206e01e1c0e2bd282d421d9951960':
  Minor changes to the LinkAddress API docs.
2014-06-12 19:56:45 +00:00
Robert Greenwalt
debdf8ab42 am 4ad1f0d3: (-s ours) Merge "Add a new IpPrefix class and use it in RouteInfo." into lmp-preview-dev
* commit '4ad1f0d31e4c998aa65344ccb8abb51cf96dd909':
  Add a new IpPrefix class and use it in RouteInfo.
2014-06-12 19:56:39 +00:00
Robert Greenwalt
f40ca1b0f3 am fe5ca964: (-s ours) Merge "Fix public API of LinkProperties." into lmp-preview-dev
* commit 'fe5ca9646f86e041ed7729ecd0a006428806acf2':
  Fix public API of LinkProperties.
2014-06-12 16:53:43 +00:00
Sreeram Ramachandran
3097cf6186 Add a new IpPrefix class and use it in RouteInfo.
This change uses IpPrefix only in the public API and continues
to use LinkAddress for everything else. It does not change the
callers to use the new APIs, with the exception of changing
all current uses of getDestination to getDestinationLinkAddress
to make room for the new getDestination method that returns an
IpPrefix.

Based on Sreeram's earlier change:
https://googleplex-android-review.git.corp.google.com/#/c/477874/
but a bit simplified and with a bit more documentation.

Bug: 15142362
Bug: 13885501
Change-Id: Ib4cd96b22cbff4ea31bb26a7853989f50da8de4e
(cherry picked from commit 7d3b4b9a3d4de9673119632da0ebd583e50126f7)
2014-06-11 16:32:21 -07:00
Robert Greenwalt
c879e20e42 Fix public API of LinkProperties.
bug:15142362
(cherry picked from commit 51d898fd0223a4b7c728980ab987dd985c02df5f)
Change-Id: I1457111da7d3bd09998f7e010febb8bb4c45c8bc
2014-06-10 15:42:19 -07:00
Robert Greenwalt
4c368a073d Merge "Minor changes to the LinkAddress API docs." into lmp-preview-dev 2014-06-10 22:12:51 +00:00
Lorenzo Colitti
81c858241e Minor changes to the LinkAddress API docs.
1. Rename getNetworkPrefixLength to getPrefixLength. Update all
   callers in frameworks/base and add a shim method and a TODO
   for the rest.
2. @hide isSameAddressAs. It doesn't add much, and it's just
   one-liner that callers can implement if they want.
3. Fix the alignment of the initial paragraph (<ul> should have
   been </ul>).
4. Remove the documentation that talks about creating
   LinkAddresses, since there's no public API for creating them.

With these changes I think LinkAddress is fine as a public API.

Bug: 15142362
Change-Id: Iaf3b1db577745bb68a9e1dd7f96d666dd3f3ec7c
(cherry picked from commit 9ab53650cfcd91a2a151b44b3fd1381841f76269)
2014-06-11 18:52:19 +00:00
Lorenzo Colitti
8e33e456a1 Minor changes to the LinkAddress API docs.
1. Rename getNetworkPrefixLength to getPrefixLength. Update all
   callers in frameworks/base and add a shim method and a TODO
   for the rest.
2. @hide isSameAddressAs. It doesn't add much, and it's just
   one-liner that callers can implement if they want.
3. Fix the alignment of the initial paragraph (<ul> should have
   been </ul>).
4. Remove the documentation that talks about creating
   LinkAddresses, since there's no public API for creating them.

With these changes I think LinkAddress is fine as a public API.

Bug: 15142362
Change-Id: Iaf3b1db577745bb68a9e1dd7f96d666dd3f3ec7c
2014-06-10 14:46:39 -07:00
Sreeram Ramachandran
c447220e53 Add a new IpPrefix class and use it in RouteInfo.
This change uses IpPrefix only in the public API and continues
to use LinkAddress for everything else. It does not change the
callers to use the new APIs, with the exception of changing
all current uses of getDestination to getDestinationLinkAddress
to make room for the new getDestination method that returns an
IpPrefix.

Based on Sreeram's earlier change:
https://googleplex-android-review.git.corp.google.com/#/c/477874/
but a bit simplified and with a bit more documentation.

Bug: 15142362
Bug: 13885501
Change-Id: Ib4cd96b22cbff4ea31bb26a7853989f50da8de4e
2014-06-10 14:30:15 -07:00
Robert Greenwalt
690790088d Fix public API of LinkProperties.
bug:15142362
Change-Id: I1457111da7d3bd09998f7e010febb8bb4c45c8bc
2014-06-08 12:54:23 -07:00
Jaewan Kim
b444920d28 am 70246e34: Merge "Fix Ethernet documentation." into lmp-preview-dev
* commit '70246e348a81b8e0e3944ba5d67f4e2b138d6814':
  Fix Ethernet documentation.
2014-05-23 16:53:39 +00:00
Lorenzo Colitti
7308875a27 Fix Ethernet documentation.
1. Remove incorrect @return tag for void function.
2. Fix build breakage by removing the reference to
   #ETHERNET_SERVICE, which is hidden.

Change-Id: Ia893464bafc8257e48e0bd710d27954b535fcece
(cherry picked from commit ff7e406df8a46256e47fff70abc9116ad3f94c23)
2014-05-23 06:30:24 +00:00
Lorenzo Colitti
56e4e58eae Fix Ethernet documentation.
1. Remove incorrect @return tag for void function.
2. Fix build breakage by removing the reference to
   #ETHERNET_SERVICE, which is hidden.

Change-Id: Ia893464bafc8257e48e0bd710d27954b535fcece
2014-05-22 11:51:27 -07:00
Lorenzo Colitti
2edad7a160 Add an EthernetManager.
The implementation will live in frameworks/opt/net/ethernet.

Bug: 7606609
Bug: 8687763
Bug: 14993642
Bug: 14981801
Change-Id: Ic771e268b0c78f0fc32f46af6fe0dd7c634a426e
2014-05-21 16:41:24 -07:00
Lorenzo Colitti
eeae94e9cd Fix a typo in IpConfigStore.
Change-Id: I1fc845bf4547ae9a86db02ed29b6d5ba60a01277
2014-05-21 16:38:11 -07:00
Jaewan Kim
e36bfe74f3 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
Robert Greenwalt
61c34fd2a2 Turn down the logging.
Cut per-msg logging by 1/3 in NDC so we see that much more.

Change-Id: I406297d98f2649a88b16c7be3cf90757d009c762
2014-05-12 08:59:27 -07:00
Justin Koh
5179629b7b am 93332a0a: (-s ours) am 1aa51646: Hide NsdServiceInfo additions for KKWT DO NOT MERGE
* commit '93332a0a726132fcfaf4b33e95937107e1f7759f':
  Hide NsdServiceInfo additions for KKWT DO NOT MERGE
2014-05-05 22:24:46 +00:00
Justin Koh
93332a0a72 am 1aa51646: Hide NsdServiceInfo additions for KKWT DO NOT MERGE
* commit '1aa516467c398d43751130d4964fc626489e63b7':
  Hide NsdServiceInfo additions for KKWT DO NOT MERGE
2014-05-05 22:21:03 +00:00
Justin Koh
1aa516467c Hide NsdServiceInfo additions for KKWT DO NOT MERGE
Hide NsdServiceInfo additions for KKWT.
Bug: 14116162

Change-Id: I98755a2524168be5e833a634192fd49ff3c32346
2014-05-05 22:18:42 +00:00
Bill Yi
85f1efa3cb am eb7e4734: am d82212d8: (-s ours) Merge commit \'0b62467b142b61ee1e449ba958ba37dfd961ef56\' into HEAD
* commit 'eb7e47345eac198a3f2e2118278e424c31cf5bd3':
  Update framework to use M33 Skia. DO NOT MERGE
2014-04-30 12:51:01 +00:00
Bill Yi
eb7e47345e am d82212d8: (-s ours) Merge commit \'0b62467b142b61ee1e449ba958ba37dfd961ef56\' into HEAD
* commit 'd82212d8ae13a7c22dbf6b893f5329b2e4cf2f6e':
  Update framework to use M33 Skia. DO NOT MERGE
2014-04-30 01:19:37 +00:00
Bill Yi
d82212d8ae Merge commit '0b62467b142b61ee1e449ba958ba37dfd961ef56' into HEAD 2014-04-29 16:07:29 -07:00
Christopher Lane
7441122e23 Fix incorrect "listener no longer active" errors
Was incorrectly using .indexOfValue to search for Integer objects in the
client map.

Change-Id: I54e2e1725e0fff0a7d35a22376714cc8266a9eee
2014-04-25 18:57:23 -07:00