Commit Graph

3312 Commits

Author SHA1 Message Date
Paul Lawrence
19a1c3f7d9 Add mechanism for securely returning parameters though NativeDaemonConnector
If the first word in the response is {{sensitive}}, don't log the body of the
response.

Bug: 18260068
Change-Id: Ibfb5c6abab1d04b4321cdbcf6c7cf6f18f903146
2014-11-24 10:41:37 -08:00
Paul Lawrence
1e803d5ed0 Revert "DO NOT MERGE: Don't log passwords returned from vdc"
This reverts commit 201c2f73b6.

The original change disabled all logging of RCVed messages in NativeDaemonConnector.
For MR1 we want a much more surgical disabling of sensitive messages. First,
though, we have to defeat the automerger.

Change-Id: I712919aee2db63f7fc0b2c6d6a2a658325dce596
2014-11-24 10:40:15 -08:00
Jeff Sharkey
8dea95b701 am 0d84fe11: am 54c11274: am c0491a2e: Merge "Lightweight checkin output for network stats." into lmp-mr1-dev
* commit '0d84fe11a182ac4b13391ca7e078800af6689a13':
  Lightweight checkin output for network stats.
2014-11-21 23:14:12 +00:00
Jeff Sharkey
0d84fe11a1 am 54c11274: am c0491a2e: Merge "Lightweight checkin output for network stats." into lmp-mr1-dev
* commit '54c11274b5e7ce9f774f7c846d7165563279b96a':
  Lightweight checkin output for network stats.
2014-11-21 22:09:28 +00:00
Andreas Gampe
162ac37980 resolve merge conflicts of 4c35627 to master.
Change-Id: I4d8a7ec4a25471565859050939ec05b0c1261627
2014-11-21 14:05:11 -08:00
Andreas Gampe
4c35627d7d resolved conflicts for merge of 3fc5e3ca to lmp-mr1-dev-plus-aosp
Change-Id: Id8286e5a4381315a6060251a8055b0f1d1a96019
2014-11-21 10:36:14 -08:00
Andreas Gampe
b9fd0471a6 Frameworks/base: Consistency in core/jni
Make consistent use of core_jni_helpers for registration.

Translate some #ifdefs into const bools.

Change-Id: I37639aa053dd50f003a552cbd8550dddecc811c5
2014-11-21 10:15:08 -08:00
Jeff Sharkey
583d956886 Lightweight checkin output for network stats.
Define and print a compact version of network statistics when dump
is requested with the "--checkin" flag.  Defaults to last 24 hours,
but included data can be tweaked with various flags.

Groups together detailed network identities into larger umbrella
terms like "mobile" and "wifi."

Bug: 18415963
Change-Id: I70cf9c828ea5c6e5bb6884837d3608f66fbad2e6
2014-11-21 10:11:10 -08:00
Geoffrey Borggaard
e02280d0ac am fb978eb1: am 8a2ac41d: am 29c0c3be: am c3f5d718: Merge "Fix null handling in proxies." into lmp-dev automerge: 90ed95f
* commit 'fb978eb150358b3fc913e43802c1babf63322833':
  Fix null handling in proxies.
2014-11-21 12:20:00 +00:00
Geoffrey Borggaard
fb978eb150 am 8a2ac41d: am 29c0c3be: am c3f5d718: Merge "Fix null handling in proxies." into lmp-dev automerge: 90ed95f
* commit '8a2ac41dcfa0ec10c09a7599d9345798c21cd47d':
  Fix null handling in proxies.
2014-11-21 10:31:03 +00:00
Geoffrey Borggaard
29c0c3beaa am c3f5d718: Merge "Fix null handling in proxies." into lmp-dev
automerge: 90ed95f

* commit '90ed95faeddf7ebe71320e3e0e80eb17d374e49c':
  Fix null handling in proxies.
2014-11-21 10:17:39 +00:00
Jaewan Kim
c5ac9f7e57 am 710c6e77: am 18ab5c21: Merge "Add an API to check availability of Ethernet interface." into lmp-mr1-dev automerge: 52dcc7f
* commit '710c6e775baa886bbf520470ad9355c169009ceb':
  Add an API to check availability of Ethernet interface.
2014-11-21 03:11:35 +00:00
Jaewan Kim
710c6e775b am 18ab5c21: Merge "Add an API to check availability of Ethernet interface." into lmp-mr1-dev
automerge: 52dcc7f

* commit '52dcc7fb0a17a77c41eddd1517821134946120b1':
  Add an API to check availability of Ethernet interface.
2014-11-21 02:52:28 +00:00
Geoffrey Borggaard
394a29333e Fix null handling in proxies.
ProxyInfo.getPacFileUrl() can not be null.  It will be equal to
Uri.EMPTY.  Checking for null was causing global proxies to never be
disabled.  Or more accurately, global proxies would be disabled, but
would reappear after a reboot.

ProxyInfo.getExclusionListByString() can be null.  If no
exclusion list was specified, the proxy settings would not be
successfully saved, they would disappear after reboot.

Bug: 18453223
Change-Id: I1c27e5dca5b9664bb7468ea909bff489fa110a07
2014-11-20 19:48:20 +00:00
Jaewan Kim
32b3f2ca36 Add an API to check availability of Ethernet interface.
Bug: 18045481
Change-Id: I95358241b431cfe4435ce70c23c9a639b9dc4d58
2014-11-20 11:12:17 +09:00
Andreas Gampe
9a36ec5037 am 8281b720: am 1e765df6: Merge "Frameworks/base: Wall Werror in core/jni"
* commit '8281b720cfba29c574b656a5750dc22b63fe77db':
  Frameworks/base: Wall Werror in core/jni
2014-11-14 19:15:42 +00:00
Andreas Gampe
8281b720cf am 1e765df6: Merge "Frameworks/base: Wall Werror in core/jni"
* commit '1e765df61a22f148d796e62cb0ac3dc36297629e':
  Frameworks/base: Wall Werror in core/jni
2014-11-13 23:35:22 +00:00
Andreas Gampe
1e765df61a Merge "Frameworks/base: Wall Werror in core/jni" 2014-11-13 23:21:36 +00:00
Andreas Gampe
76d0e9f03e Frameworks/base: Wall Werror in core/jni
Turn on -Wall -Werror in core/jni. Fix warnings.

Clang TODO: For GCC we need to turn off Wunused-but-set-variable in
the GL bindings. However, Clang doesn't have that warning and thus
complains about an unknown pragma. It is necessary to make the
pragma #ifdef-ed on the compiler being GCC.

Change-Id: I14cab48d45c2771eef0432082356c47ed44a3d7f
2014-11-13 15:20:37 -08:00
Paul Lawrence
c46548acf9 am 6fbbd274: (-s ours) am 202ab298: am c5ec9fed: am 3bde026a: am afb6b50e: Merge "DO NOT MERGE: Don\'t log passwords returned from vdc" into lmp-dev
* commit '6fbbd2740374235931948b0d06dad03a2af04a6e':
  DO NOT MERGE: Don't log passwords returned from vdc
2014-11-07 03:55:16 +00:00
Paul Lawrence
6fbbd27403 am 202ab298: am c5ec9fed: am 3bde026a: am afb6b50e: Merge "DO NOT MERGE: Don\'t log passwords returned from vdc" into lmp-dev
* commit '202ab2986c2ab61ea32845ea94af6e329c1fd83c':
  DO NOT MERGE: Don't log passwords returned from vdc
2014-11-07 00:06:25 +00:00
Paul Lawrence
c5ec9fed69 am 3bde026a: am afb6b50e: Merge "DO NOT MERGE: Don\'t log passwords returned from vdc" into lmp-dev
* commit '3bde026aebffdaea8ab1315977b05e53e4a75185':
  DO NOT MERGE: Don't log passwords returned from vdc
2014-11-06 20:34:49 +00:00
Paul Lawrence
201c2f73b6 DO NOT MERGE: Don't log passwords returned from vdc
Turns off logging of responses from native daemon connector altogether.
Proper solution to follow in LMP MR1

Bug: 18260068
Change-Id: I25bc9cb61049a3efdd9a9cd11195864a04ef05fd
2014-11-05 19:07:57 -08:00
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