Commit Graph

1187 Commits

Author SHA1 Message Date
android-build-team Robot
c95fa12d4e Snap for 4662252 from c5d0ed9f3c9c7472354b2cd34fb158f72c219b3a to pi-release
Change-Id: Idceaaf72503dfebc1c23739907977c2846c6b734
2018-03-18 07:27:15 +00:00
Nathan Harold
e3536f066d Docstring Updates for applyTransportModeTransform
-Add anotations to usages of PolicyDirection for
 apply...() methods.
-Update the comments on DIRECTION_IN and DIRECTION_OUT
 to better reflect their current usage.
-Add a better explanation to the rekey procedure doc.
-Remove disused createTunnelInterface() stub.

Bug: 73751066
Test: make docs
Merged-In: I9f2ec864466148a18899f1e952c74a525902ccbc
Change-Id: I9f2ec864466148a18899f1e952c74a525902ccbc
(cherry picked from commit f4cdf25a906d0f52ffd76508d660b843b13b3ff8)
2018-03-16 17:46:05 -07:00
android-build-team Robot
90b14389f7 Snap for 4623514 from 3a1b5d186786bf41a73370f31f90033b23a5a70a to pi-release
Change-Id: Ibc8214e4308dcb2cd5a235568017ab2d37db089e
2018-02-27 08:20:48 +00:00
Tetsutoki Shiozawa
3920dd7584 Merge "Definitely abort reconnecting to native daemon during shutdown" am: 65a583bb6a am: 282c038240
am: 31a35289ee

Change-Id: I74677602cd4642c2b441fb353a9f0824a238deae
2018-02-26 08:05:10 +00:00
Tetsutoki Shiozawa
31a35289ee Merge "Definitely abort reconnecting to native daemon during shutdown" am: 65a583bb6a
am: 282c038240

Change-Id: I034072b89d0a8b9362940155ae2e2d173fde1b33
2018-02-26 07:50:37 +00:00
Treehugger Robot
65a583bb6a Merge "Definitely abort reconnecting to native daemon during shutdown" 2018-02-26 06:49:52 +00:00
android-build-team Robot
0962590191 Snap for 4620899 from 55a3fe78c3f642c873193c4fd1cf2fcc1849ea55 to pi-release
Change-Id: Id2dd2991781763dd72552cc35ffb13b7f896a8d6
2018-02-25 08:29:09 +00:00
Jeff Sharkey
1459069bb6 Name specific app for rapid data usage.
When a single app is responsible for more than half of the data usage
that caused us to trigger a "rapid usage" alert, name that app in the
notification.  Tests to verify.

Move NPMS->NSS direct calls to "Internal" pattern, following
best-practices to avoid unnecessary AIDL exposure.

Remove 3G/4G split mobile plan support, which has been deprecated for
years and was never supported in a shipping product.

Move MultipathPolicyTracker in tree to reflect its package name.

Test: bit FrameworksNetTests:*
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Bug: 69263587, 64221505, 73431080, 72746951
Exempt-From-Owner-Approval: approved in previous PS
Change-Id: I3e4ec1ae2222d51b232f76f32faca93d4f8cd272
2018-02-23 16:27:39 +00:00
android-build-team Robot
3fd05abd0a Snap for 4615953 from 61b44dca6e002389fd75b36d0d04e99294dc1f4a to pi-release
Change-Id: Ice53dcc93d82e4aff6812bf2515db95e757a611b
2018-02-22 08:21:26 +00:00
Jeff Sharkey
ddd09dfbe7 Only emit debug logging when requested.
Test: builds, boots
Bug: 72556865
Change-Id: I69d5d760221ef907eeea38490f56243f0a3b9dcb
2018-02-20 13:36:23 -07:00
android-build-team Robot
4bbdaa182f Snap for 4610834 from ce5665485f to pi-release
Change-Id: I7b18ec81c66b69ff80b795eb26dddf116b0ddf32
2018-02-18 08:27:25 +00:00
Jeff Sharkey
ce5665485f Merge "Leave NetworkStatsService around during shutdown." 2018-02-17 18:16:02 +00:00
Jeff Sharkey
a0626d7f40 Leave NetworkStatsService around during shutdown.
We've seen system code continue to ask about network statistics
during a shutdown, so keep our objects around to avoid crashing
with NPEs.

Test: builds, boots
Bug: 73323432
Change-Id: I2654d37a59eb830ff32a2151ae6ad6a999a41677
2018-02-16 16:28:27 -07:00
Jeff Sharkey
77bd2dfb9f Better handling of NTP-based clocks.
Now that we have a nice Clock abstraction, we can use it to represent
a clock backed by an NTP fix.  (This makes testing logic much easier
to write.)

We now rely completely on NetworkTimeUpdateService to keep our NTP
fix up to date, instead of trying to refresh in the middle of
critical paths which could trigger random ANRs.

Add internal FallbackClock to make it easier to handle missing NTP
fixes.  Add internal SimpleClock to let implementers focus on single
millis() method.

Test: bit FrameworksNetTests:com.android.server.net.NetworkStatsServiceTest
Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Bug: 69714690, 72320957
Change-Id: Ic32cdcbe093d08b73b0e4b23d6910b23ea8e1968
Exempt-From-Owner-Approval: approved in previous PS
2018-02-16 22:11:35 +00:00
android-build-team Robot
54e0e968f8 Snap for 4605948 from ce3f5d00f953203442dfbe07841d1c36a4eba00f to pi-release
Change-Id: Ic9f6a9f833e8022a85cc58d0d5ccf9c18e245d01
2018-02-15 08:21:09 +00:00
Benedict Wong
5e58ea8a2f Merge "Copy IpSecConfig when IpSecTransforms are created" am: 2c8456b22e am: 3988c929ad
am: 4aa9fef2fc

Change-Id: I511e6b0cadfc24f24a492ae63c48a8b4baa89edb
2018-02-15 06:01:49 +00:00
Benedict Wong
4aa9fef2fc Merge "Copy IpSecConfig when IpSecTransforms are created" am: 2c8456b22e
am: 3988c929ad

Change-Id: I041cd94be9cefc997b95478444661b557d95e3dc
2018-02-14 21:25:08 +00:00
Benedict Wong
e5623e2b61 Copy IpSecConfig when IpSecTransforms are created
This change prevents IpSecTransforms from being inadvertently modified
by changes to the IpSecConfig. Specifically, once the transform is
created, it takes a copy of the config, rather than a reference.

Bug: 69385347
Test: New tests added, and all test passing
Change-Id: I89b8660c175ca20aa70352dcda893434ff7fd42b
2018-02-13 23:23:13 +00:00
android-build-team Robot
8fa902a066 Snap for 4598635 from 049ecedd92d91fb692ec424311318cd8b8977b0d to pi-release
Change-Id: Ica483c727fc2da3c722fdf11e521fab348e2ac8a
2018-02-11 08:23:00 +00:00
nharold
c40b5fb671 Merge "Require NETWORK_STACK Permission for IpSec Tunnel Mode" am: 43699e90f3 am: e736f83caf
am: 34c6697356

Change-Id: Ib33ccecfe2fc600c05a208d24df10a474addb0e5
2018-02-10 02:11:15 +00:00
nharold
34c6697356 Merge "Require NETWORK_STACK Permission for IpSec Tunnel Mode" am: 43699e90f3
am: e736f83caf

Change-Id: If7330b4fdf5d2ccbddb590ab81a4b19c1f612b66
2018-02-10 01:57:50 +00:00
android-build-team Robot
764b2faea9 Merge cherrypicks of [3594560, 3594912, 3594913, 3594914, 3594915, 3594916, 3594917, 3594918, 3594919, 3594822, 3594823, 3594561, 3594495, 3594496, 3594123, 3594124, 3594125] into pi-release
Change-Id: I8b524220d30725418e1a6dca23c873f41baa2d13
2018-02-09 23:44:11 +00:00
Jeff Sharkey
563017099b Shore up dividing by zero protections.
We're already trying to protect against zero elsewhere in this file,
but we've seen evidence of it still happening, so add last-ditch
protections.

Test: builds, boots
Bug: 73060623
Change-Id: I0549ed08f906521a8dbd9ff6162f80fa9b388434
(cherry picked from commit 1e80651d2a)
2018-02-09 23:43:35 +00:00
TreeHugger Robot
5a89c8e36e Merge "Shore up dividing by zero protections." 2018-02-09 18:54:31 +00:00
Jeff Sharkey
1e80651d2a Shore up dividing by zero protections.
We're already trying to protect against zero elsewhere in this file,
but we've seen evidence of it still happening, so add last-ditch
protections.

Test: builds, boots
Bug: 73060623
Change-Id: I0549ed08f906521a8dbd9ff6162f80fa9b388434
2018-02-09 10:06:59 -07:00
Nathan Harold
025aae1fc9 Require NETWORK_STACK Permission for IpSec Tunnel Mode
At least until further permissions are agreed upon,
the NETWORK_STACK permission is sufficient to ensure
that access to the tunnel mode APIs is secure, and
this permission will always be a sufficient condition.
Thus, adding NETWORK_STACK.

Bug: 66955045
Test: compilation
Change-Id: I2dc36896a52d2e71fad55041507d68ca91191ffc
2018-02-08 21:16:51 +00:00
Andreas Gampe
49ccde2dfb Frameworks: Annotate trivial @GuardedBy in services/core
Add @GuardedBy for simple functions that require a single lock
and are named XYZLocked.

Derived by errorprone.

Bug: 73000847
Test: m
Test: m javac-check-framework RUN_ERROR_PRONE=true
Change-Id: I6993325b11c71a4ec27c21935fb54a954d95455f
2018-02-08 02:19:42 -08:00
android-build-team Robot
3f4a4ee66c Snap for 4585119 from 76be79a7c97064906b58222936c0d9c58eb290c9 to pi-release
Change-Id: Ie04482e204076f9f6230756811fe8f4d4334dd0b
2018-02-05 08:22:26 +00:00
Pavel Maltsev
f8505b7fae Merge "Enable multiple active Ethernet interfaces" am: cbcc1d6665 am: ac908d6728
am: f4c6c808a2

Change-Id: Ibd84c2ba3252e3d65ba4a63a0be912747ea18df9
2018-02-04 01:06:51 +00:00
Pavel Maltsev
f4c6c808a2 Merge "Enable multiple active Ethernet interfaces" am: cbcc1d6665
am: ac908d6728

Change-Id: I95a4e5d519857950297f5948525990c4808cd5fd
2018-02-03 01:25:34 +00:00
Treehugger Robot
cbcc1d6665 Merge "Enable multiple active Ethernet interfaces" 2018-02-02 23:13:54 +00:00
Chenbo Feng
c2a2f738ba Merge "Return non-negetive value in getMobileStats method" am: 9fb04e29e5 am: 515a54a93e
am: 4ae5e0c06c

Change-Id: I304f42d473289ad876f6ceae8d6866e4248686a9
2018-02-02 17:59:53 +00:00
Chenbo Feng
4ae5e0c06c Merge "Return non-negetive value in getMobileStats method" am: 9fb04e29e5
am: 515a54a93e

Change-Id: I54a400b4231c38db25aa1b717f302a8a52e1773e
2018-02-02 17:02:10 +00:00
Treehugger Robot
9fb04e29e5 Merge "Return non-negetive value in getMobileStats method" 2018-02-02 04:22:34 +00:00
android-build-team Robot
7048498b58 Snap for 4579913 from b3dc01059967e42066961931ba6723e3260ba89b to pi-release
Change-Id: Id3bf4f67c62adadf59033e2c7db0fd9e1960948f
2018-02-01 08:55:53 +00:00
Benedict Wong
04514d3e4b Merge "Fix minor bugs with tunnel mode implementation" am: cb9cd96c50 am: b7afa3f6fb
am: 25cb38a9b7

Change-Id: Ie74c4edcc7586e0220ff948222010e126841e8f7
2018-02-01 04:12:18 +00:00
Benedict Wong
25cb38a9b7 Merge "Fix minor bugs with tunnel mode implementation" am: cb9cd96c50
am: b7afa3f6fb

Change-Id: I9c2a844d9ccc401a34d0e6318506406e8c33fab6
2018-02-01 03:49:45 +00:00
Benedict Wong
7660370a83 Fix minor bugs with tunnel mode implementation
This change makes sure tunnel mode transforms are properly activated
upon construction, and corrects bugs with how policy selectors were being
generated for tunnel mode policies. Specifically, the source/destination could
not be empty strings, even for cases where an empty selector was desired.

Bug: 72457770
Test: GTS tests run
Change-Id: I9a9f64c34b07883a02a5c996614f958486d214fc
2018-01-31 01:16:53 +00:00
gitbuildkicker
04724a7702 merge in pi-release history after reset to master 2018-01-29 14:54:38 -08:00
Chenbo Feng
905f034c57 Return non-negetive value in getMobileStats method
The current implementation of getMobileRxBytes and all the similiar
method adds up the return values for multiple calls to getRxBytes so if
all of them return UNSUPPORTED for any reason, getMobileRxBytes() would
return a value such as -3. This behavior is not compliance with the cts
TrafficStatsTest which always assume getMobileRxBytes to return a
non-negetive value. The method now will check tha stats get from
getRxBytes method and add them up only if the stats is valid.

Bug: 72473294
Test: run cts -m CtsNetTestCases -t android.net.cts.TrafficStatsTest
Change-Id: I656970ebc8f6506cf17c4353ad46c0178bb65cfd
2018-01-29 12:19:26 -08:00
gitbuildkicker
04dcb76378 merge in pi-release history after reset to master 2018-01-29 11:53:00 -08:00
Pavel Maltsev
50ec1f33c6 Enable multiple active Ethernet interfaces
- add Ethernet interface configurations to config.xml; no vendors can
specify network capabilities (in particular they can mark network as
restricted which make sense for embedded applications + static IP
configuration)
- extend EthernetManager to support multiple interfaces, use interface
name as an identificator
- extend IpConfigStore to store IP configuration based on string
identifier (e.g. ethernet name)

Test: runtest -x frameworks/base/services/tests/servicestests/ -c com.android.server.net.IpConfigStoreTest
Change-Id: Ic1e70003f2380ca8edb4469d6b34e27c5e8cf059
2018-01-29 10:11:05 -08:00
android-build-team Robot
52b681535e Snap for 4571561 from 231cb066abab5faddd73d1c3a0e8e823c8e76819 to pi-release
Change-Id: Id58e0227ceb42cc90c4412d5324611d777157e13
2018-01-28 08:22:06 +00:00
android-build-team Robot
b283eefcf3 Snap for 4565898 from 18dae16dcd8ee1f6aafeae73d94784861afda8cd to pi-release
Change-Id: Idc631e6bd8f9713c58fd5a8556b5c4835415af6c
2018-01-25 09:06:33 +00:00
nharold
c20e9c8b4b Merge "Move Keepalive out of IpSecTransform.Builder" am: af3fb3efe4 am: bbb4b05a64
am: b9d614d4df

Change-Id: Ic554e34d9b16f522156bc7e8b176f96693e8e32c
2018-01-25 07:59:57 +00:00
nharold
b9d614d4df Merge "Move Keepalive out of IpSecTransform.Builder" am: af3fb3efe4
am: bbb4b05a64

Change-Id: I383aa402d9d570ee7c7d5a603d022d1dade267a5
2018-01-25 07:49:59 +00:00
Nathan Harold
b559164017 Move Keepalive out of IpSecTransform.Builder
The lifecycle of Keepalive offloading is, unfortunately
different from that of an IpSecTransform. Because starting
a keepalive is fundamentally asynchronous, and isn't valid
until after a transform exists, it will now be a separate
optional procedure that may succeed or fail. It remains
linked with a Transform by the need for a Transform to exist
in order to initiate a Keepalive.

Bug: 38350389
Test: compilation
Change-Id: Ia76fccee41f86d694dff436043293d0c0762c041
2018-01-24 19:32:04 -08:00
Benedict Wong
49f46b8e74 Merge "Add tunnel-mode calls to netd in IpSecService" am: 475fe28c50 am: 02d6d81006
am: 24dd1e9fb7

Change-Id: I998d44bac0993a8f2e9e228a0b0a80adfaa4d87e
2018-01-24 20:07:20 +00:00
Benedict Wong
24dd1e9fb7 Merge "Add tunnel-mode calls to netd in IpSecService" am: 475fe28c50
am: 02d6d81006

Change-Id: I8a3d16c8e58ad1c09d967943abe1c729fe37636a
2018-01-24 19:56:24 +00:00
Benedict Wong
45828d7122 Merge "Add TunnelInterface API and KernelResourceRecords" am: e02b700032 am: e1aa92f1c1
am: 5c3eb9ce8e

Change-Id: I955d5090171f08e4fa20eac5bdfe761132b87d35
2018-01-24 09:54:06 +00:00