Commit graph

438 commits

Message SHA1
Merge QQ3A.200605.002 into master
Bug: 158095402
Merged-In: I5e28537689d1a53e99f91eafd494eb3a0c890f46
Change-Id: I436ef37a509cbe56d02c6d8d3a38c776f4b4883f

Xin Li   commited 2020-06-03 10:45:02 -07:00
d56d89c8a6
Merge "Stop reducing RA advertised ipv6 mtu by 16 - not needed." am: cfacebd651
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1322377

Change-Id: I5e28537689d1a53e99f91eafd494eb3a0c890f46

Maciej Żenczykowski   authored and   Automerger Merge Worker   commited 2020-06-03 05:32:55 +00:00
22238ed86f
Merge "Stop reducing RA advertised ipv6 mtu by 16 - not needed."
Maciej Żenczykowski   authored and   Gerrit Code Review   commited 2020-06-03 05:21:45 +00:00
cfacebd651
Stop reducing RA advertised ipv6 mtu by 16 - not needed.
This effectively reverts:

  commit da0fb1bca8
  Author: Maciej Żenczykowski <maze@google.com>
  Date:   Wed Feb 19 01:24:39 2020 -0800

      Reduce advertised ipv6 mtu by 16 to fit ethernet header

      This is a temporary hack to workaround the inability of current
      kernel's ebpf bpf_skb_change_mode() function to prefix a 14-byte
      ethernet header on to a packet without going over the upstream
      (source, rawip) interface's mtu *before* we bpf_redirect() to
      the downstream (destination, ethernet) interface.

      Test: build, atest, atest TetheringTests
      Bug: 149816401

Test: flashed a flame with new kernel and it works at 1500 mtu
Bug: 149816401
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I76a75a16fa27b47d78816b2f9379ef4bb68beb00
Merged-In: I76a75a16fa27b47d78816b2f9379ef4bb68beb00

Maciej Żenczykowski   commited 2020-06-02 22:20:39 -07:00
f99d2a103d
Merge "Switch to standard naming scheme" am: b04aea2791
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1322775

Change-Id: Ic1b75b3a6cd0db02d485ecd2ed3939d9faca8200

Paul Duffin   authored and   Automerger Merge Worker   commited 2020-06-02 19:41:30 +00:00
5b8f3bede8
Merge "Clean up the visibility rules for framework modules" am: 415e2387ae
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1322774

Change-Id: If3a3993f35d4eb09aee4ab4ff04cd41c4d9c28ab

Paul Duffin   authored and   Automerger Merge Worker   commited 2020-06-02 19:41:03 +00:00
94261519be
Switch to standard naming scheme
Removes use of the special framework-modules naming scheme.

Bug: 155164730
Test: m java
Exempt-From-Owner-Approval: Build cleanup.
Change-Id: I3896d7c91e937f503b49f5df011c21ee51219652
Merged-In: I0c31e2183353dfb5bd49f04f3455cb7b10be6866
Merged-In: I3b78fcbcacc3df787e171d6eedeef1e51b087615
(cherry picked from adac7d2cc3)

Paul Duffin   commited 2020-06-02 14:15:28 +00:00
dfc7fb7f75
Clean up the visibility rules for framework modules
Switching from java_library to java_sdk_library switched the meaning
of the module name from referring to the implementation library to
referring to the stubs. This change updates the visibility rules to
reflect that new meaning.

Visibility rules that were previously set for the java_library have
been moved to the impl_library_visibility property and the special
//visibility:override value has been prepended to prevent it from
inheriting the values from the visibility property.

Visibility rules set for the stubs (via stubs_library_visibility)
property have been moved to the visibility property.

Bug: 155164730
Test: m nothing
Exempt-From-Owner-Approval: Build cleanup
Change-Id: Icc9bc5a9ef86cf7ba0f15c2b2a4abd596ec9f640
Merged-In: Icc9bc5a9ef86cf7ba0f15c2b2a4abd596ec9f640
(cherry picked from a17cf677b5)

Paul Duffin   commited 2020-06-02 11:41:07 +01:00
2a8d380f40
Merge "Gate exemptFromEentitlementCheck by Network_STACK permission" am: 650c23fdc2
Original change: undetermined

Change-Id: I7dc479b54bbcb511b68a59d6f70f880e32c309bc

Treehugger Robot   authored and   Automerger Merge Worker   commited 2020-06-02 03:48:14 +00:00
dc1e33c9b3
Merge "Gate exemptFromEentitlementCheck by Network_STACK permission"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-06-02 03:31:24 +00:00
650c23fdc2
Merge changes from topic "tether_offload_data_limit" am: 4155d2a6ad
Original change: undetermined

Change-Id: Ibb464a45669213e1e0918367878f07bc1220ad8d

Nucca Chen   authored and   Automerger Merge Worker   commited 2020-06-01 23:53:10 +00:00
ff06ea7122
[BOT.5] Move class Ipv6ForwardingRule from IpServer to the coordinator am: b150b87fa9
Original change: undetermined

Change-Id: I0cfdf1e9f68057a4066b09be47d56e7537b2aa3d

Hungming Chen   authored and   Automerger Merge Worker   commited 2020-06-01 23:53:04 +00:00
b0f59dbbdf
[BOT.3] Add unit test for polling network stats in the coordinator am: 7997d691fe
Original change: undetermined

Change-Id: Ic3b56365d7f1dbde23e0d1b902a21a3de3ad7327

Hungming Chen   authored and   Automerger Merge Worker   commited 2020-06-01 23:52:56 +00:00
5fd9fcce13
[BOT.2] Create a coordinator and stats provider to provide tether stats am: 68f1c2a63f
Original change: undetermined

Change-Id: I21fe5385b8cdfe2ce2ff982884d72a398183bde3

Hungming Chen   authored and   Automerger Merge Worker   commited 2020-06-01 23:52:53 +00:00
eba638f4a9
[BOT.1] Add a class ForwardedStats in TetheringUtils am: d0216998a4
Original change: undetermined

Change-Id: Iaba770ec498db0732246549bb276dfcd8f3bc90a

Hungming Chen   authored and   Automerger Merge Worker   commited 2020-06-01 23:52:45 +00:00
e624037dd3
Merge changes from topic "tether_offload_data_limit"
* changes:
  Make tethering module to use netd_aidl_interface-unstable-java
  [BOT.5] Move class Ipv6ForwardingRule from IpServer to the coordinator
  [BOT.3] Add unit test for polling network stats in the coordinator
  [BOT.2] Create a coordinator and stats provider to provide tether stats
  [BOT.1] Add a class ForwardedStats in TetheringUtils

Nucca Chen   authored and   Gerrit Code Review   commited 2020-06-01 23:33:24 +00:00
4155d2a6ad
Merge "Use Class#getSimpleName instead of KClass#getSimpleName" am: aac3b2ead0
Change-Id: Ica9acc5b0df4a781a05ae49122978b8ce85b85d3

Paul Hu   authored and   Automerger Merge Worker   commited 2020-06-01 06:59:48 +00:00
ae18ba8e91
Merge "Use Class#getSimpleName instead of KClass#getSimpleName"
Paul Hu   authored and   Gerrit Code Review   commited 2020-06-01 06:43:13 +00:00
aac3b2ead0
Merge "Tethering: ensure downstream prefix do not conflict with upstream" am: 7bf51619d8
Change-Id: I55ff57be344e17d3ce16cda7291f7f29f26191b1

Mark Chien   authored and   Automerger Merge Worker   commited 2020-05-29 21:42:11 +00:00
3cefc6e048
Make tethering module to use netd_aidl_interface-unstable-java
Use unstable aidl for new api tetherOffload* and modified
parcel TetherStatsParcel in BpfCoordinator{, Test}.

Bug: 150736748
Test: m

Change-Id: I2d2cedf560319653f67f6b06f7abb0bf66eba91a

Hungming Chen   commited 2020-05-29 20:24:02 +08:00
140042db6f
[BOT.5] Move class Ipv6ForwardingRule from IpServer to the coordinator
This is a preparation for moving adding/removing forwarding rules from
IpServer to BpfCoordinator.

Bug: 150736748
Test: atest IpServerTest
Change-Id: I85316ef09ff3c9389ded11dcc384493d699da48e

Hungming Chen   commited 2020-05-29 20:23:40 +08:00
b150b87fa9
[BOT.3] Add unit test for polling network stats in the coordinator
Verify that the coordinator could fetch tether stats from BPF maps and
report the network stats to the service.

Bug: 150736748
Test: atest BpfCoordinatorTest
Change-Id: Ib1756159a2047c5db7d31359b0f288f840bd1bb1

Hungming Chen   commited 2020-05-29 20:23:31 +08:00
7997d691fe
[BOT.2] Create a coordinator and stats provider to provide tether stats
Make BPF tethering offload coordinator, BpfCoordinator,
registers a network stats provider, BpfTetherStatsProvider, and
provide the tethering stats from the BPF map.

Bug: 150736748
Test: new test BpfCoordinatorTest

Change-Id: I22e71f87b67668f7e733e4f215d93bf5b2c9380d

Hungming Chen   commited 2020-05-29 20:23:22 +08:00
68f1c2a63f
[BOT.1] Add a class ForwardedStats in TetheringUtils
Used to record offload transmitted/received forwarded bytes/packets.

Bug: 150736748
Test: new test BpfTetheringCoordinatorTest
Change-Id: Ie8725f95c3ddd5fb3811d479de32d2c1f7dcb493

Hungming Chen   commited 2020-05-29 20:23:14 +08:00
d0216998a4
Gate exemptFromEentitlementCheck by Network_STACK permission
Shell has TETHER_PRIVILEGED permission. To avoid any service to adopt
shell identity by lunching service with Shell process, gate
exemptFromEentitlementCheck by NETWORK_STACK.

Bug: 157702014
Test: atest TetheringCoverageTests
Change-Id: I6ddfda23d36ea9981e3e1eb5a87767f452a65852

markchien   authored and   Mark Chien   commited 2020-05-29 06:46:22 +00:00
9e790873d9
Merge "Tethering: ensure downstream prefix do not conflict with upstream"
Mark Chien   authored and   Gerrit Code Review   commited 2020-05-29 03:34:45 +00:00
7bf51619d8
Use Class#getSimpleName instead of KClass#getSimpleName
KClass#getSimpleName need refer to kotlin-reflect.jar which need
include it in Andorid.bp. However, it's not necessary to use
KClass#getSimpleName but use Class#getSimpleName instead.

Test: atest TetheringTests
Bug: 157527499
Change-Id: I49bc336a276d30152402eba926cc583bc81e8e5c
Merged-In: I49bc336a276d30152402eba926cc583bc81e8e5c

paulhu   commited 2020-05-29 00:29:22 +08:00
086f24626c
Merge "Switch framework-tethering to use java_sdk_library" am: b5bf211753
Change-Id: I9e5526a23087dd9d9610b4ce5e29e28a7dfdda4f

Paul Duffin   authored and   Automerger Merge Worker   commited 2020-05-28 15:18:36 +00:00
d65294b376
Merge "Switch framework-tethering to use java_sdk_library"
Paul Duffin   authored and   Gerrit Code Review   commited 2020-05-28 15:01:46 +00:00
b5bf211753
Switch framework-tethering to use java_sdk_library
The names of the individual modules do not quite follow the pattern
that java_sdk_library uses so this temporarily sets the following:
    naming_scheme: "frameworks-modules"

That causes java_sdk_library to use a naming scheme that matches the
one used by the individual modules of this. It will be cleaned up
later.

Part of the purpose of the java_sdk_library is to hide the
implementation code and force users of the library to depend on stubs
for a well defined API. Ideally, it would allow access to the
implementation in those cases where it is safe, e.g. from within the
same APEX, or from tests for the implementation. Unfortunately, due to
limitations in the build it does not yet have enough information to
make that decision correctly which means that any code that needs to
compile against the implementation is broken which would prevent us
from converting the module to java_sdk_library.

However, the only way to provide the additional information to allow
the implementation to be correctly exposed is to convert the modules
to java_sdk_library; a cycle.

In order to break that cycle the java_sdk_library creates a special
<module>.impl target which is used directly by tests and any other code
that needs it. Once all the modules have been converted to a
java_sdk_library then we can resolve the limitations in the build and
remove the direct references to <module>.impl.

Test: m update-api
Bug: 155164730
Merged-In: If5c115f482751f9f4b5f047e9e401a18e36799ef
Merged-In: Id1c2e848430c49a2da7402244814cd084f5da77c
Change-Id: Id1c2e848430c49a2da7402244814cd084f5da77c

Paul Duffin   commited 2020-05-28 13:14:52 +00:00
2dae272903
Merge "Extend timeout for requesting tethered interface" am: 95386f9ebd
Change-Id: I2336a5aeeda958048d6e8b24ff0015ab45a66397

Treehugger Robot   authored and   Automerger Merge Worker   commited 2020-05-28 08:34:24 +00:00
0c71ef1a6f
Merge "Extend timeout for requesting tethered interface"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-05-28 08:19:10 +00:00
95386f9ebd
Extend timeout for requesting tethered interface
Extend the timeout to lower the EthernetTetheringTest flaky.

Besides, also explicitly exempt entitlement check in
EtetherntTetheringTest because it do not test tethering upstream
currently. Thus, the tests would not be interrupted by entitlement
check if test SIM is entitlement required.

Bug: 156713866
Test: TetheringCoverageTests, CtsTehteringTest

Change-Id: I45e8e8d737486def9d0de8943ec7f09ca0942a0b

markchien   commited 2020-05-28 12:13:14 +08:00
908518d8e2
Tethering: ensure downstream prefix do not conflict with upstream
- Add New class PrivateAddressCoordinator to coordinate the private
  address conflict problem.
- Downstream prefix would be random in 192.168.0.0/24 ~
  192.168.255.0/24.
- If new upstream prefix is conflict with existing downstream prefix,
  downstream would be kicked out and it would request a new one.
- The last conflict upstream prefixes would be blacklist. Avoid to
select downstream prefix which is conflict with prefixes in blacklist.

Bug: 130879722
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib45b87bcd9eeb5da03fb7ec90b1af9ca53998cf5

markchien   commited 2020-05-27 21:36:01 +08:00
c9daba32f7
Merge "Remove platform cert from Tethering tests" am: a5e8d3f73d
Change-Id: If2177a9f24a9074ede3b90e083dbf6f3c88c1775

Treehugger Robot   authored and   Automerger Merge Worker   commited 2020-05-27 04:07:39 +00:00
e88c5146da
Remove platform cert from Tethering tests
Bug: 156866746
Test: atest TetheringTests, TetheringCoverageTests
Change-Id: I7c539f1f4a447b5913164b222601c6113c6fe645

markchien   commited 2020-05-26 09:31:16 +08:00
e79e02e5c4
Merge "Adjust TTL for ipv6 tethering" am: 6d0a178a6b
Change-Id: I80491fd3f1f344d17617aa238128cee39ce8e79f

Mark Chien   authored and   Automerger Merge Worker   commited 2020-05-25 01:55:01 +00:00
23450e1fd1
Merge "Adjust TTL for ipv6 tethering"
Mark Chien   authored and   Gerrit Code Review   commited 2020-05-25 01:42:36 +00:00
6d0a178a6b
Adjust TTL for ipv6 tethering
If upstream is cellular, set the TTL in Router Advertisements to
"network-set TTL - 1" for carrier requirement. For other non-cellular
upstream, set TTL as "network-set TTL + 1" to preventing arbitrary
distinction between tethered and untethered traffic.

Bug: 154776299
Test: atest TetheringTests

Change-Id: I7f2696a642f96c6aafb5613b980bf5bcdd08bbda

markchien   commited 2020-05-24 22:52:44 +08:00
d63c4f35de
Merge "Fix TetheringServiceTest test WRITE_SETTINGS permission failure" am: 7e8b14abee
Change-Id: If9674488fca6833556733efc8fbda230b93e798a

Mark Chien   authored and   Automerger Merge Worker   commited 2020-05-21 08:11:47 +00:00
b46dcf8317
Fix TetheringServiceTest test WRITE_SETTINGS permission failure
AdoptShellPermissionIdentity can not pass permission check by
Settings#checkAndNoteWriteSettingsOperation. It would compare the caller
uid and its package name. See error below:
1. java.lang.SecurityException:
Specified package com.android.shell under uid 10239 but it is really 2000
2. java.lang.SecurityException:
uid 10245 does not have android.permission.UPDATE_APP_OPS_STATS.

Override the method and test if caller hold WRITE_SETTINGS directly.

Bug: 154869719
Test: TetheringTests, TetheringCoverageTests, NetworkStackNextTests,
NetworkStackCoverageTests

Change-Id: I2a60c4d66ef30028f9663159f85464ea815248e2

markchien   commited 2020-05-20 16:56:33 +08:00
f4394e83f8
Merge "TetheringServiceTest: test caller permission" am: 366eae572d
Change-Id: I5064eb5e27d7803c0f86b75c391b56f1e3cb4d7d

Treehugger Robot   authored and   Automerger Merge Worker   commited 2020-05-19 03:07:55 +00:00
e46a70cbfe
Merge "TetheringServiceTest: test caller permission"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-05-19 02:40:03 +00:00
366eae572d
TetheringServiceTest: test caller permission
Bug: 154869719
Test: atest TetheringTests
Change-Id: I7beea3f011d930e433443ed62d772a3f8cce5d78

markchien   commited 2020-05-19 09:04:43 +08:00
2a1656d3f8
Merge "Fix READ_DEVICE_CONFIG permission denied problem in TetheringTests" am: fb2caff580
Change-Id: Id517f4122c4b078d16035274e8979247bc0b40f8

Treehugger Robot   authored and   Automerger Merge Worker   commited 2020-05-14 16:18:24 +00:00
61aba704a9
Merge "Fix READ_DEVICE_CONFIG permission denied problem in TetheringTests"
Treehugger Robot   authored and   Gerrit Code Review   commited 2020-05-14 16:00:27 +00:00
fb2caff580
Fix READ_DEVICE_CONFIG permission denied problem in TetheringTests
Bug: 156557122
Test: atest TetheringTests

Change-Id: Id9c0397306f3872fc23520d1354f338035a96dc9

markchien   commited 2020-05-14 16:42:22 +08:00
74174690d1
Merge "Support MirrorLink DHCPDECLINE." am: cc755bf9fc
Change-Id: I7082734a50da23488d1369dd6390f7c0ec2c1e0b

Xiao Ma   authored and   Automerger Merge Worker   commited 2020-05-14 06:41:36 +00:00
b80b1e09bc
Merge "Support MirrorLink DHCPDECLINE."
Xiao Ma   authored and   Gerrit Code Review   commited 2020-05-14 06:27:16 +00:00
cc755bf9fc
Merge "Make members final in TetheringService" am: 7e2180f019
Change-Id: I64e0d2512a31310948cdd106943d9f7345209fb7

Treehugger Robot   authored and   Automerger Merge Worker   commited 2020-05-13 16:14:28 +00:00
6636efb050