Commit Graph

2186 Commits

Author SHA1 Message Date
Mark Chien
db9f95eefd [automerger skipped] Merge "Tethering: ensure downstream prefix do not conflict with upstream" into rvc-dev am: 495145fa63 -s ours am: a6d948cf73 -s ours am: 0966a74414 -s ours am: 04b69e59e1 -s ours
am skip reason: Change-Id Ib45b87bcd9eeb5da03fb7ec90b1af9ca53998cf5 with SHA-1 c9daba32f7 is in history

Change-Id: Ieb7c9f6255907b338fb67c4a583e1f70e29b42b1
2020-05-30 15:25:33 +00:00
Mark Chien
04b69e59e1 [automerger skipped] Merge "Tethering: ensure downstream prefix do not conflict with upstream" into rvc-dev am: 495145fa63 -s ours am: a6d948cf73 -s ours am: 0966a74414 -s ours
am skip reason: Change-Id Ib45b87bcd9eeb5da03fb7ec90b1af9ca53998cf5 with SHA-1 c9daba32f7 is in history

Change-Id: I2d3e65e5a2f709d99be6dfd565215710b64e12b2
2020-05-30 15:15:10 +00:00
Mark Chien
0966a74414 [automerger skipped] Merge "Tethering: ensure downstream prefix do not conflict with upstream" into rvc-dev am: 495145fa63 -s ours am: a6d948cf73 -s ours
am skip reason: Change-Id Ib45b87bcd9eeb5da03fb7ec90b1af9ca53998cf5 with SHA-1 c9daba32f7 is in history

Change-Id: I7a42ee0b98c9f4b7251b2673609ed89e81722aac
2020-05-30 15:03:34 +00:00
Mark Chien
a6d948cf73 [automerger skipped] Merge "Tethering: ensure downstream prefix do not conflict with upstream" into rvc-dev am: 495145fa63 -s ours
am skip reason: Change-Id Ib45b87bcd9eeb5da03fb7ec90b1af9ca53998cf5 with SHA-1 c9daba32f7 is in history

Change-Id: I99ca97c91bf2f3705b7295d14f5ddb84d29c84c0
2020-05-30 14:46:40 +00:00
Mark Chien
2ecd333f59 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

Merged-In: Ib45b87bcd9eeb5da03fb7ec90b1af9ca53998cf5
Change-Id: Ib45b87bcd9eeb5da03fb7ec90b1af9ca53998cf5
2020-05-30 03:42:57 +00:00
Mark Chien
c4060a16d2 Merge "Tethering: ensure downstream prefix do not conflict with upstream" am: 7bf51619d8 am: 3cefc6e048 am: 0e1a1f4c68 am: df94b648c8 am: a37347cae9
Change-Id: Ie4a4e389c3f0bc5754eec0ae489833b8cd2fdb83
2020-05-29 22:56:13 +00:00
Mark Chien
a37347cae9 Merge "Tethering: ensure downstream prefix do not conflict with upstream" am: 7bf51619d8 am: 3cefc6e048 am: 0e1a1f4c68 am: df94b648c8
Change-Id: I73efd6bfe5cd362fa9988cb17b9152441721518d
2020-05-29 22:39:37 +00:00
Mark Chien
df94b648c8 Merge "Tethering: ensure downstream prefix do not conflict with upstream" am: 7bf51619d8 am: 3cefc6e048 am: 0e1a1f4c68
Change-Id: Ib77ca516f83ac552429573178f63d08ccfce008e
2020-05-29 22:26:13 +00:00
Mark Chien
0e1a1f4c68 Merge "Tethering: ensure downstream prefix do not conflict with upstream" am: 7bf51619d8 am: 3cefc6e048
Change-Id: Ib70a471603d850069aae029dea7fc09a9b28f4bc
2020-05-29 22:07:37 +00:00
Mark Chien
3cefc6e048 Merge "Tethering: ensure downstream prefix do not conflict with upstream" am: 7bf51619d8
Change-Id: I55ff57be344e17d3ce16cda7291f7f29f26191b1
2020-05-29 21:42:11 +00:00
Chalard Jean
fec854e7f6 Merge "Use Class#getSimpleName instead of KClass#getSimpleName" into rvc-dev am: 88c69840cd am: 601193a68e am: 5ba4e8018e am: b3cee20121
Change-Id: I8865869b94af08463d024b065f94e1594282f8f8
2020-05-29 10:20:11 +00:00
Chalard Jean
a8aa5f0a84 Merge "Use Class#getSimpleName instead of KClass#getSimpleName" into rvc-dev am: 88c69840cd am: 04fb018acc am: fe32a82433 am: b8176a3a07
Change-Id: I2f9ac84362972bdd45929f8b8f3df303c188f20d
2020-05-29 10:17:17 +00:00
Chalard Jean
b3cee20121 Merge "Use Class#getSimpleName instead of KClass#getSimpleName" into rvc-dev am: 88c69840cd am: 601193a68e am: 5ba4e8018e
Change-Id: I419045f62d9d1f15b5764c301dcb190fd6ccc349
2020-05-29 10:01:46 +00:00
Chalard Jean
b8176a3a07 Merge "Use Class#getSimpleName instead of KClass#getSimpleName" into rvc-dev am: 88c69840cd am: 04fb018acc am: fe32a82433
Change-Id: Ie191a6044b8bc04ec558ce192a26027e027bf5e6
2020-05-29 10:00:50 +00:00
Chalard Jean
5ba4e8018e Merge "Use Class#getSimpleName instead of KClass#getSimpleName" into rvc-dev am: 88c69840cd am: 601193a68e
Change-Id: If2085438daf43081c67d5174aca07ed7e3055327
2020-05-29 09:51:40 +00:00
Chalard Jean
fe32a82433 Merge "Use Class#getSimpleName instead of KClass#getSimpleName" into rvc-dev am: 88c69840cd am: 04fb018acc
Change-Id: Idfe54387a331f532040ea3986eb7948e24ea7304
2020-05-29 09:51:14 +00:00
Chalard Jean
04fb018acc Merge "Use Class#getSimpleName instead of KClass#getSimpleName" into rvc-dev am: 88c69840cd
Change-Id: I085ccc0a27d07489daeb91e13c23ccf58e3f7bc0
2020-05-29 09:25:22 +00:00
Chalard Jean
601193a68e Merge "Use Class#getSimpleName instead of KClass#getSimpleName" into rvc-dev am: 88c69840cd
Change-Id: Ice90dba6408eca9c031592fd4933a107fdbbec2f
2020-05-29 09:24:53 +00:00
Chalard Jean
88c69840cd Merge "Use Class#getSimpleName instead of KClass#getSimpleName" into rvc-dev 2020-05-29 09:16:28 +00:00
Automerger Merge Worker
a552cdaac7 Merge "[automerger skipped] Merge "Extend timeout for requesting tethered interface" into rvc-dev am: 40a9eb779b -s ours am: f1d99b078a -s ours am: 491b0772e1 -s ours" into rvc-qpr-dev-plus-aosp am: dd7b312acc -s ours
am skip reason: Change-Id I45e8e8d737486def9d0de8943ec7f09ca0942a0b with SHA-1 9c9c600c16 is in history

Change-Id: I98b1049075ae56b979b3c5e49fb0e5451e444ac7
2020-05-29 07:17:28 +00:00
Mark Chien
784e446901 [automerger skipped] Merge "Extend timeout for requesting tethered interface" into rvc-dev am: 40a9eb779b am: 86780d3db9 -s ours am: 6e4df2bbea -s ours am: ee89e03498 -s ours
am skip reason: Change-Id I45e8e8d737486def9d0de8943ec7f09ca0942a0b with SHA-1 908518d8e2 is in history

Change-Id: Ia5df44fa2fb59843313df24fc1613eafe80d0cc5
2020-05-29 07:15:29 +00:00
Mark Chien
27087c713c [automerger skipped] Merge "Extend timeout for requesting tethered interface" into rvc-dev am: 40a9eb779b -s ours am: f1d99b078a -s ours am: 491b0772e1 -s ours
am skip reason: Change-Id I45e8e8d737486def9d0de8943ec7f09ca0942a0b with SHA-1 9c9c600c16 is in history

Change-Id: I0e0a623ef6a149e1482c341a6987599e326ffe11
2020-05-29 06:50:45 +00:00
Mark Chien
ee89e03498 [automerger skipped] Merge "Extend timeout for requesting tethered interface" into rvc-dev am: 40a9eb779b am: 86780d3db9 -s ours am: 6e4df2bbea -s ours
am skip reason: Change-Id I45e8e8d737486def9d0de8943ec7f09ca0942a0b with SHA-1 908518d8e2 is in history

Change-Id: Iffcb69ef26033a5d17dcb05a014d98e9dc33cb63
2020-05-29 06:50:12 +00:00
Mark Chien
491b0772e1 [automerger skipped] Merge "Extend timeout for requesting tethered interface" into rvc-dev am: 40a9eb779b -s ours am: f1d99b078a -s ours
am skip reason: Change-Id I45e8e8d737486def9d0de8943ec7f09ca0942a0b with SHA-1 908518d8e2 is in history

Change-Id: Id4febbdbf75c4acfaa4a62f8124314608fb494b5
2020-05-29 06:38:55 +00:00
Mark Chien
6e4df2bbea [automerger skipped] Merge "Extend timeout for requesting tethered interface" into rvc-dev am: 40a9eb779b am: 86780d3db9 -s ours
am skip reason: Change-Id I45e8e8d737486def9d0de8943ec7f09ca0942a0b with SHA-1 908518d8e2 is in history

Change-Id: I8e1a67cf3573d0294e5585cb794ea5265a9486a3
2020-05-29 06:38:49 +00:00
Mark Chien
f1d99b078a [automerger skipped] Merge "Extend timeout for requesting tethered interface" into rvc-dev am: 40a9eb779b -s ours
am skip reason: Change-Id I45e8e8d737486def9d0de8943ec7f09ca0942a0b with SHA-1 908518d8e2 is in history

Change-Id: If8c7dd5b84efc54b5ba4fcbcbed18c1f18009613
2020-05-29 06:25:12 +00:00
Mark Chien
86780d3db9 Merge "Extend timeout for requesting tethered interface" into rvc-dev am: 40a9eb779b
Change-Id: I762c9ac79b181a409e6aa2b362665a9f94a62a6d
2020-05-29 06:25:08 +00:00
Mark Chien
40a9eb779b Merge "Extend timeout for requesting tethered interface" into rvc-dev 2020-05-29 06:11:12 +00:00
Mark Chien
7bf51619d8 Merge "Tethering: ensure downstream prefix do not conflict with upstream" 2020-05-29 03:34:45 +00:00
Paul Duffin
c2cb4e2621 [automerger skipped] Merge "Switch framework-tethering to use java_sdk_library" into rvc-dev am: 5e988a656f am: 0135bd56b3 am: a088f4ddfa am: d38049c6c9 -s ours
am skip reason: Change-Id If5c115f482751f9f4b5f047e9e401a18e36799ef with SHA-1 e0b78577f7 is in history

Change-Id: Iaab877f5138b33d86aa0cbcb07d635277d66c6e8
2020-05-28 22:11:07 +00:00
Paul Duffin
d38049c6c9 Merge "Switch framework-tethering to use java_sdk_library" into rvc-dev am: 5e988a656f am: 0135bd56b3 am: a088f4ddfa
Change-Id: I10e5dd11013a32db055c52fedff9587ca3d0cf2a
2020-05-28 21:48:09 +00:00
Paul Duffin
a088f4ddfa Merge "Switch framework-tethering to use java_sdk_library" into rvc-dev am: 5e988a656f am: 0135bd56b3
Change-Id: I3cc810ee63810855d1acfe5cddd156d33ed47567
2020-05-28 21:34:23 +00:00
Paul Duffin
0135bd56b3 Merge "Switch framework-tethering to use java_sdk_library" into rvc-dev am: 5e988a656f
Change-Id: I509bba81369d935cb869e313ac7ae9930fbadbf4
2020-05-28 21:23:58 +00:00
Paul Duffin
55036f2281 [automerger skipped] Merge "Switch framework-tethering to use java_sdk_library" am: b5bf211753 am: d65294b376 -s ours am: 027e07d72d -s ours am: fdcbc6042a -s ours am: 81e7d45cb7 -s ours
am skip reason: Change-Id If5c115f482751f9f4b5f047e9e401a18e36799ef with SHA-1 e0b78577f7 is in history

Change-Id: Ideba08059ba06bb231a2edf7d8bf6d270f5850e6
2020-05-28 16:14:08 +00:00
Paul Duffin
81e7d45cb7 [automerger skipped] Merge "Switch framework-tethering to use java_sdk_library" am: b5bf211753 am: d65294b376 -s ours am: 027e07d72d -s ours am: fdcbc6042a -s ours
am skip reason: Change-Id Id1c2e848430c49a2da7402244814cd084f5da77c with SHA-1 cbac8e0b63 is in history

Change-Id: I6379d3afe817057eec201635c63558847e2de3ee
2020-05-28 16:01:03 +00:00
Paul Duffin
fdcbc6042a [automerger skipped] Merge "Switch framework-tethering to use java_sdk_library" am: b5bf211753 am: d65294b376 -s ours am: 027e07d72d -s ours
am skip reason: Change-Id Id1c2e848430c49a2da7402244814cd084f5da77c with SHA-1 cbac8e0b63 is in history

Change-Id: I39ea3325d903b1f3170e6304d83dcc3d257ea113
2020-05-28 15:44:25 +00:00
Paul Duffin
027e07d72d [automerger skipped] Merge "Switch framework-tethering to use java_sdk_library" am: b5bf211753 am: d65294b376 -s ours
am skip reason: Change-Id Id1c2e848430c49a2da7402244814cd084f5da77c with SHA-1 cbac8e0b63 is in history

Change-Id: I1f0759e84c6f7e17427165fc6db9dd7531284e8a
2020-05-28 15:29:34 +00:00
Paul Duffin
d65294b376 Merge "Switch framework-tethering to use java_sdk_library" am: b5bf211753
Change-Id: I9e5526a23087dd9d9610b4ce5e29e28a7dfdda4f
2020-05-28 15:18:36 +00:00
Paul Duffin
b5bf211753 Merge "Switch framework-tethering to use java_sdk_library" 2020-05-28 15:01:46 +00:00
Paul Duffin
1026f7010d [automerger skipped] Merge "Switch framework-tethering to use java_sdk_library" into rvc-dev am: 5e988a656f am: 6216a6904e am: 2744465710 am: eec4633145 -s ours
am skip reason: Change-Id If5c115f482751f9f4b5f047e9e401a18e36799ef with SHA-1 e0b78577f7 is in history

Change-Id: I5aa60f50fbfa39808dd7a3d54e261fa60e1e43f0
2020-05-28 13:59:18 +00:00
Paul Duffin
eec4633145 Merge "Switch framework-tethering to use java_sdk_library" into rvc-dev am: 5e988a656f am: 6216a6904e am: 2744465710
Change-Id: Ic769e747c5090c905a1e723b5123880cf6eb726a
2020-05-28 13:38:47 +00:00
Paul Duffin
2744465710 Merge "Switch framework-tethering to use java_sdk_library" into rvc-dev am: 5e988a656f am: 6216a6904e
Change-Id: Ic732265e75f86e9aa5c523ae1ced9ff2b92e220a
2020-05-28 13:24:45 +00:00
Paul Duffin
2dae272903 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
2020-05-28 13:14:52 +00:00
Paul Duffin
6216a6904e Merge "Switch framework-tethering to use java_sdk_library" into rvc-dev am: 5e988a656f
Change-Id: Icf8a3b8eed7e85065d54f2f48d8cb6f05974de00
2020-05-28 13:09:48 +00:00
Paul Duffin
cbac8e0b63 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 Tethering InProcessTethering checkapi
Bug: 155164730
Merged-In: If5c115f482751f9f4b5f047e9e401a18e36799ef
Change-Id: Id1c2e848430c49a2da7402244814cd084f5da77c
2020-05-28 12:50:04 +01:00
Paul Duffin
c99e906069 Merge "Switch framework-tethering to use java_sdk_library" 2020-05-28 11:48:45 +00:00
paulhu
6c633de59e 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
2020-05-28 19:17:45 +08:00
Treehugger Robot
d814fbbcef Merge "Extend timeout for requesting tethered interface" am: 95386f9ebd am: 0c71ef1a6f am: 99466515f8 am: 40ef082118 am: 831c6a697c
Change-Id: I133050d9d19a3cf926478c97eecee9a540c2bfa7
2020-05-28 09:36:33 +00:00
Treehugger Robot
831c6a697c Merge "Extend timeout for requesting tethered interface" am: 95386f9ebd am: 0c71ef1a6f am: 99466515f8 am: 40ef082118
Change-Id: I6677419621d87f72eb9b74b65a3d913fad698414
2020-05-28 09:21:21 +00:00
Treehugger Robot
9c9c600c16 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

Merged-In: I45e8e8d737486def9d0de8943ec7f09ca0942a0b
Change-Id: I45e8e8d737486def9d0de8943ec7f09ca0942a0b
2020-05-28 09:17:28 +00:00