Commit Graph

1096 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
4db7ca359f [automerger skipped] Merge "Move Inet[4]AddressUtils to libs/net" am: 5bc91ca167 am: e4116cf383 -s ours
am skip reason: Change-Id I7074651c6a2a7a6b11bcf13cc4bb03833d7d655f with SHA-1 e10b80de7d is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1324109

Change-Id: Iae9c8eb2e17130737e4cd30b03c4d20afbae6dc8
2020-07-02 09:39:11 +00:00
Remi NGUYEN VAN
e4116cf383 Merge "Move Inet[4]AddressUtils to libs/net" am: 5bc91ca167
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1324109

Change-Id: I51d32e4efd0d9fc458b02022b6308920f7c812a9
2020-07-02 09:21:23 +00:00
Remi NGUYEN VAN
cf86031c12 Move Inet[4]AddressUtils to libs/net
The classes should not be picked up from frameworks/base, as they are
part of several mainline modules.

Also refine comments in DhcpResults following feedback in previous
change.

(cherry-pick from internal branch skipping wifi classes; no other
conflict)

Bug: 151052811
Test: m; manual: flashed, wifi and telephony working
Test: atest NetworkStackCoverageTests
Merged-In: I7074651c6a2a7a6b11bcf13cc4bb03833d7d655f

Change-Id: I7074651c6a2a7a6b11bcf13cc4bb03833d7d655f
2020-07-02 10:52:31 +09:00
Mark Chien
203c4f1978 [automerger skipped] Merge "Fix tethering jarjar rule for LocalLog" am: 5ac18c5049 am: 13f66a7d24 -s ours
am skip reason: Change-Id I5f070b96f96aaabf7ec8da52a3d3444ed940fb56 with SHA-1 683932315b is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1353287

Change-Id: I8940d70a097ca954ceec622ba42663a7fbf11c9c
2020-07-01 09:59:28 +00:00
Mark Chien
13f66a7d24 Merge "Fix tethering jarjar rule for LocalLog" am: 5ac18c5049
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1353287

Change-Id: Ia21b091951f7e5dd3f879d68414653a6c9ff8b25
2020-07-01 09:46:24 +00:00
Mark Chien
5ac18c5049 Merge "Fix tethering jarjar rule for LocalLog" 2020-07-01 09:30:24 +00:00
TreeHugger Robot
422c0ddfe6 Merge "Fix tethering jarjar rule for LocalLog" into rvc-dev am: 6127ca43d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12040945

Change-Id: I8eec902878e34cb6a4ee7989d45cc0c7149c791c
2020-07-01 07:58:32 +00:00
markchien
683932315b Fix tethering jarjar rule for LocalLog
LocalLog is in android.util* instead of android.net*.
No crash happened because the methods used by tethering are
@UnsupportedAppUsage.

Bug: 160113128
Test: atest TetheringTests
Change-Id: I5f070b96f96aaabf7ec8da52a3d3444ed940fb56
2020-07-01 03:40:50 +00:00
markchien
a8ac97cf22 Fix tethering jarjar rule for LocalLog
LocalLog is in android.util* instead of android.net*.
No crash happen becaue the methods used by tethering are
@UnsupportedAppUsage.

Bug: 160113128
Test: atest TetheringTests
(cherry-pick from internal branch with conflicts)
Merged-In: I5f070b96f96aaabf7ec8da52a3d3444ed940fb56

Change-Id: I5f070b96f96aaabf7ec8da52a3d3444ed940fb56
2020-06-30 15:30:55 +00:00
Paul Hu
b6958b47d9 Merge "Correct PendingIntent#getActivity() flags" am: 6b2b4e6514 am: 7a87bc4742
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1329013

Change-Id: I67e2d4facd77f978255a10423a9baff231ac0695
2020-06-29 12:17:07 +00:00
Paul Hu
7a87bc4742 Merge "Correct PendingIntent#getActivity() flags" am: 6b2b4e6514
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1329013

Change-Id: I2d1886c4bc2892d3673e87544e3e9c2bb0bb8633
2020-06-29 12:04:06 +00:00
Paul Hu
6b2b4e6514 Merge "Correct PendingIntent#getActivity() flags" 2020-06-29 11:53:18 +00:00
Treehugger Robot
a2d6b35eeb [automerger skipped] Merge "Use unstable networkstack AIDLs in development branches" am: cdf6b4202c am: 9fba78c098 -s ours
am skip reason: Change-Id I74b4a16266bda7b8ac740b3a0193268da260fc2f with SHA-1 0d0ea27274 is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1343444

Change-Id: I86e4fca7fbec72a1cdbded8782afa22b211f2967
2020-06-29 04:29:37 +00:00
Treehugger Robot
9fba78c098 Merge "Use unstable networkstack AIDLs in development branches" am: cdf6b4202c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1343444

Change-Id: Ib2a16bd545b98a8d95338f6acce23e265ec5130a
2020-06-29 04:16:40 +00:00
Treehugger Robot
cdf6b4202c Merge "Use unstable networkstack AIDLs in development branches" 2020-06-29 04:02:49 +00:00
paulhu
67aeab2eee Correct PendingIntent#getActivity() flags
TetheringNotificationUpdater create a PendingIntent with
Intent#FLAG_ACTIVITY_NEW_TASK flag. But this flag is used for
Intent only. Thus, move this flag into Intent.

Bug: 158639789
Test: atest TetheringTests
Change-Id: I4c3af75c87b797bcde9356a94c835c7422dac1c6
2020-06-29 00:32:19 +08:00
Orion Hodson
6c0e9f46cd [automerger skipped] Merge changes from topic "lnh-platform-split" am: c6b2c39d04 am: 9228c914d2 -s ours
am skip reason: Change-Id I7af128f42ae89a77a8e3fb113ea533331153c535 with SHA-1 864d304156 is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1348764

Change-Id: I3bb4fbb8c5c7df3f43bb69e1228848540e1249f9
2020-06-25 08:13:32 +00:00
Orion Hodson
77156e6721 [automerger skipped] Sync with libnativehelper refactoring am: 0cdccd707f am: 1309dcd8de -s ours
am skip reason: Change-Id Icd06e9a315680c2251dbb9032a904dd6d66aa359 with SHA-1 697ec868d2 is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1348763

Change-Id: Ief614f159c1972c181986ae05b01b5dc2a92b1ee
2020-06-25 08:13:26 +00:00
Orion Hodson
9228c914d2 Merge changes from topic "lnh-platform-split" am: c6b2c39d04
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1348764

Change-Id: Ie34095ddf885fcf57e2a7bcb89817485564e9100
2020-06-25 07:58:17 +00:00
Orion Hodson
1309dcd8de Sync with libnativehelper refactoring am: 0cdccd707f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1348763

Change-Id: I7511170930440ec5a1a8067b57a76a6c19484d71
2020-06-25 07:58:10 +00:00
Orion Hodson
c6b2c39d04 Merge changes from topic "lnh-platform-split"
* changes:
  Update to use nativehelper/JNIPlatformHelp.h
  Sync with libnativehelper refactoring
2020-06-25 07:36:05 +00:00
Orion Hodson
1eff58da30 Merge "Sync with libnativehelper refactoring" into rvc-dev-plus-aosp 2020-06-24 21:02:39 +00:00
Luke Huang
04e5539162 [automerger skipped] Merge "Move DnsPacket to libs net" am: d295f3e4f4 am: 99368dec69 -s ours
am skip reason: Change-Id I8841d91456952ded5efbf8ea221289aecc7746ad with SHA-1 8dd7e0a936 is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1348582

Change-Id: I4bddd1c6f072845f1a62812995a3b4cb4299ccaa
2020-06-24 19:11:24 +00:00
Orion Hodson
0cdccd707f Sync with libnativehelper refactoring
jniGetFDFromFileDescriptor() is now a legacy method and moved to a
separate header.

Bug: 151443957
Bug: 158749603
Test: m
Change-Id: Icd06e9a315680c2251dbb9032a904dd6d66aa359
Merged-In: Icd06e9a315680c2251dbb9032a904dd6d66aa359
Exempt-From-Owner-Approval: cherry pick
(cherry picked from commit a5c4682505)
2020-06-24 14:13:13 +01:00
Orion Hodson
697ec868d2 Sync with libnativehelper refactoring
jniGetFDFromFileDescriptor() is now a legacy method and moved to a
separate header.

Bug: 151443957
Bug: 158749603
Test: m
Change-Id: Icd06e9a315680c2251dbb9032a904dd6d66aa359
Merged-In: Icd06e9a315680c2251dbb9032a904dd6d66aa359
Exempt-From-Owner-Approval: cherry pick
(cherry picked from commit a5c4682505)
2020-06-24 12:47:10 +00:00
Luke Huang
895594dcc2 Move DnsPacket to libs net
This class might be used by some mainline modules.

Bug: 151052811
Test: atest DnsPacketTest
Test: atest DnsResolverTest
(clean cherry-pick from internal branch)
Merged-In: I8841d91456952ded5efbf8ea221289aecc7746ad
Change-Id: I8841d91456952ded5efbf8ea221289aecc7746ad
2020-06-24 11:32:26 +00:00
TreeHugger Robot
5c5ee11ba0 [automerger skipped] Merge "tethering: offload: Netlink Req" into rvc-dev am: 0de458a801 -s ours
am skip reason: Change-Id Iaf3e847e92f205b55f10fa85c17b9f3995d52099 with SHA-1 6b94c31626 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11970745

Change-Id: Ib853e8dcf754451407ef858f3af766b9cab9696c
2020-06-24 06:50:26 +00:00
TreeHugger Robot
0de458a801 Merge "tethering: offload: Netlink Req" into rvc-dev 2020-06-24 06:46:47 +00:00
Lorenzo Colitti
fdb754c00d [automerger skipped] Merge "Tethering: Add WiGig support" into rvc-dev am: 7852107b29 -s ours
am skip reason: Change-Id Ic4d3aca0ed69234093af7f0206dab3335938c52a with SHA-1 6896f6193f is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11953638

Change-Id: I972b6d352b2c65f023b6a5239a32e9bfec573472
2020-06-24 04:40:39 +00:00
Lorenzo Colitti
e8141aa9c3 tethering: offload: Netlink Req
Send netlink request over fd for offload config before
completing init sequence. Provides existing conntrack
entries to IPA. Resolves issue where there are NAT
misses in IPA due to IPA only having the conntrack
entries added after tethering starts.

Bug: 149109043
Test: OffloadHardwareInterfaceTest
Original-Change: https://android-review.googlesource.com/1290954
Merged-In: Iaf3e847e92f205b55f10fa85c17b9f3995d52099
Change-Id: Iaf3e847e92f205b55f10fa85c17b9f3995d52099
2020-06-24 04:21:47 +00:00
Lorenzo Colitti
4d2944cda4 Merge "tethering: offload: Netlink Req" am: b90c974174 am: d45fd82ad0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1290954

Change-Id: I5f976d70d87ef25ebb8e1483532781ac3d42425b
2020-06-24 03:44:31 +00:00
Lorenzo Colitti
b90c974174 Merge "tethering: offload: Netlink Req" 2020-06-24 03:11:26 +00:00
Mark Chien
fdf89ee7fb Merge "Tethering: Add WiGig support" am: 65fadfc134 am: 6c5b5b0803
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1177323

Change-Id: Ib48182d51cc6e4586cb43f8ca51ea673ee14d1d7
2020-06-22 23:43:43 +00:00
Dedy Lansky
4dd87aafc0 Tethering: Add WiGig support
This change is a combination of following changes:

1) Tethering: add TETHERING_WIGIG type
   Currently both WIFI and WIGIG use the same tethering type,
   TETHERING_WIFI. This causes conflicts between the frameworks,
   when both WIFI and WIGIG SoftAPs are started, one or both will
   not work.
   Fix this by using a seperate tethering type for WIGIG.

2) Tethering: remove TETHERING_WIGIG state machine on interface down
   The wigig state machine relies on a TETHERING_STATE_CHANGED broadcast
   that is sent when the tethering state machine is first created, during
   interface up. Currently the tethering state machine is not removed
   on interface down except for TETHERING_BLUETOOTH, and as a result
   wigig tethering only works the first time SoftAP is started.
   In order to fix this, remove the tethering state machine on interface
   down for TETHERING_WIGIG as well.

Bug: 143356416
Test: TetheringCoverageTests

Change-Id: Ic4d3aca0ed69234093af7f0206dab3335938c52a
Merged-In: Ic4d3aca0ed69234093af7f0206dab3335938c52a
2020-06-22 23:23:25 +00:00
Dedy Lansky
6896f6193f Tethering: Add WiGig support
This change is a combination of following changes:

1) Tethering: add TETHERING_WIGIG type
   Currently both WIFI and WIGIG use the same tethering type,
   TETHERING_WIFI. This causes conflicts between the frameworks,
   when both WIFI and WIGIG SoftAPs are started, one or both will
   not work.
   Fix this by using a seperate tethering type for WIGIG.

2) Tethering: remove TETHERING_WIGIG state machine on interface down
   The wigig state machine relies on a TETHERING_STATE_CHANGED broadcast
   that is sent when the tethering state machine is first created, during
   interface up. Currently the tethering state machine is not removed
   on interface down except for TETHERING_BLUETOOTH, and as a result
   wigig tethering only works the first time SoftAP is started.
   In order to fix this, remove the tethering state machine on interface
   down for TETHERING_WIGIG as well.

Bug: 143356416
Test: TetheringCoverageTests

Change-Id: Ic4d3aca0ed69234093af7f0206dab3335938c52a
2020-06-22 21:17:46 +08:00
Xiao Ma
e5e0743057 Use unstable networkstack AIDLs in development branches
Development branches should use the -unstable version of the
NetworkStack AIDLs so that refreezing is not necessary for each
modification.
The versions will be re-frozen before each release instead.

Bug: 157534516
Test: m
Merged-In: I74b4a16266bda7b8ac740b3a0193268da260fc2f
Change-Id: I1c2fe707d865e6a1953b4ab82194d4b9132258f9
2020-06-22 10:15:13 +00:00
Wayne Ma
31b6461408 Merge "Add framework-statsd dependency and make framework-statsd visible to Tethering package." into rvc-dev am: 7ce578a359
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11926261

Change-Id: I81e0304f0560cbd070c5bb49967a8b6bf3e5d58a
2020-06-22 08:51:46 +00:00
waynema
b7048af0a9 Add framework-statsd dependency and make framework-statsd visible to
Tethering package.

Tethering needs StatsEvent and StatsLog which are in
framework-statsd.stubs.module_lib to write metrics.

Bug: 153942334

Test: make
Change-Id: I8ba142a9b3678de36e6c4880a64e992e00680f38
2020-06-22 06:57:51 +00:00
Remi NGUYEN VAN
6534f90a6c Merge "Use unstable networkstack AIDLs in development branches" into rvc-dev-plus-aosp 2020-06-22 04:32:42 +00:00
Mark Chien
df63d22cbe [automerger skipped] Merge changes from topics "pass-res", "remove-isProvisioningNeeded" am: 788abd7c99 am: 932375528d -s ours
am skip reason: Change-Id I9a5ff5dbc1db3f3be7fcd7146862a16b373507e6 with SHA-1 017bfba0d8 is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1345357

Change-Id: Ie251a5e4cbfc78f8b26ae32a12679dd08bd348d9
2020-06-20 04:32:35 +00:00
markchien
1f5c10559b [automerger skipped] Pass entitlement configuration to Settings for entitlement check am: 902043f5c3 am: f7d9dd76ab -s ours
am skip reason: Change-Id I6f23553bb1da5f0b767f920b32a86fafb9e00b9e with SHA-1 217d7b01f8 is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1253710

Change-Id: I259c3a257511436baac8894c7677dbd3090941ab
2020-06-20 04:32:18 +00:00
markchien
4c9428a135 Protect invalid entitlement app configuration
There is a protection in Settings that Settings would gray out if
tethering requires entitlement check but the entitlement app is
invalid. Tethering resource is moved from framework to tethering
module, so Settings can not fetch entitlement app name anymore.

In this change, tethering module would check whether entitltement app
package name is exsited if entitlement check is needed. Tethering would
be not supported (Settings tethering option would be hidded) if
entitlement app is not installed.

After moving the protection into tethering module,
TetherUtil#isProvisioningNeeded is no longer needed. Because The
only use case is Settings wants to gray out tethering setting
when entitltement check is needed but entitlement app is invalid.

Bug: 146918263
Test: atest TetheringCoverageTests
Change-Id: I9a5ff5dbc1db3f3be7fcd7146862a16b373507e6
Merged-In: I9a5ff5dbc1db3f3be7fcd7146862a16b373507e6
2020-06-20 10:19:25 +08:00
markchien
902043f5c3 Pass entitlement configuration to Settings for entitlement check
Tethering resource configuration is move from framwork to tethering
module. Since tethering resource would not be accessible from outside
of tethering module, EntitlementManager would tell Settings the
entitlement configuration via intent extra when run entitlement check.

Bug: 146918263
Test: atest TetheringTests
Change-Id: I6f23553bb1da5f0b767f920b32a86fafb9e00b9e
Merged-In: I6f23553bb1da5f0b767f920b32a86fafb9e00b9e
2020-06-20 10:19:21 +08:00
TreeHugger Robot
962cf025d9 [automerger skipped] Merge "Let only Ethernet manage ethernet interface up and down" into rvc-dev am: 28c2d1dcca -s ours
am skip reason: Change-Id I1cd40ae764bdeecbb59e3889e9399b7f4b05f9cc with SHA-1 9807816e09 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11908430

Change-Id: I6bb2a35f0f74cbd4bfe9b3a82c322c56b804d034
2020-06-19 08:28:32 +00:00
TreeHugger Robot
b207e9c9de [automerger skipped] Merge changes I2292c1cb,I8f60c137 into rvc-dev am: aee09af636 -s ours
am skip reason: Change-Id I2292c1cbff06a304f70191b88d833b19af2b8b92 with SHA-1 00ea6cecd8 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11907887

Change-Id: I6cd21960502b97f81d6a8027b51ec77d6928f3a9
2020-06-19 06:51:23 +00:00
Mark Chien
675697222a Let only Ethernet manage ethernet interface up and down
When LAN link is changed for using ethernet interface from Ethernet tethering to Ethernet,
there is confiict as Ethernet Tethering is trying to make ethernet link down and Ethernet is trying to make ethernet link up.

So, this would make Ethernet only manage ethernet interface link state.

Test: manual
Bug: 130840861
Merged-In: I1cd40ae764bdeecbb59e3889e9399b7f4b05f9cc
Change-Id: I1cd40ae764bdeecbb59e3889e9399b7f4b05f9cc
2020-06-19 06:49:46 +00:00
TreeHugger Robot
aee09af636 Merge changes I2292c1cb,I8f60c137 into rvc-dev
* changes:
  Test that IpNeighborMonitor is stopped when IpServer stops.
  Memory leak due to no stop for IpNeighborMonitor.
2020-06-19 06:36:50 +00:00
Mark Chien
0d3aeb6139 Merge "Let only Ethernet manage ethernet interface up and down" am: ac8445ca3b am: eb4a072814
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1317394

Change-Id: Ifc233eff24c893ca542e75b683be0628eafba37f
2020-06-19 06:25:12 +00:00
Mark Chien
ac8445ca3b Merge "Let only Ethernet manage ethernet interface up and down" 2020-06-19 05:55:35 +00:00
Mark Chien
83d3905afb [automerger skipped] Merge "Add owneship of tethering module" into rvc-dev am: fb8fc4a0f1 -s ours
am skip reason: Change-Id I13b291e5db6a8a8c9f2bfa477acabaea250aa48c with SHA-1 c907a99efd is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11910264

Change-Id: I411e7cffe6c8cb734cf800100138dd522697baa6
2020-06-19 04:43:37 +00:00