Commit Graph

542 Commits

Author SHA1 Message Date
Benedict Wong
d7fc38a1cb Implement Ikev2VpnRunner
This change adds the implementation for IKEv2/IPsec VPNs.

Bug: 144246767
Test: Manually tested
Change-Id: I5ccec756cec49ccf57ccc4d5ad800eeb5d595a76
2020-02-13 00:33:44 -08:00
Automerger Merge Worker
6a8c28875c Merge "[SP10] Add IntDef annotations for system api of NetworkStats" am: de345df19b am: 5afc0ef0ff am: 557283df01
Change-Id: I0e7322090364fc1724797641276416c07277d0bc
2020-02-12 05:27:01 +00:00
Automerger Merge Worker
5afc0ef0ff Merge "[SP10] Add IntDef annotations for system api of NetworkStats" am: de345df19b
Change-Id: I4d352ed54671ce77ebbcaa9f0808a0ef703d3c6f
2020-02-12 04:54:02 +00:00
Treehugger Robot
de345df19b Merge "[SP10] Add IntDef annotations for system api of NetworkStats" 2020-02-12 04:37:55 +00:00
junyulai
950d79e145 [SP10] Add IntDef annotations for system api of NetworkStats
Test: m -j
Bug: 130855321
Change-Id: I8855ec95d5d086fc14e2eb71558bc2dcd9a830e5
2020-02-11 09:47:03 +00:00
Automerger Merge Worker
c2263368f8 Merge changes Iaa6f0d65,I68a16b64 am: 744d94b96f
Change-Id: I687e59f2c25d5c5e2cb5b1574dbcf6f32ec8c817
2020-01-31 16:37:49 +00:00
David Su
744d94b96f Merge changes Iaa6f0d65,I68a16b64
* changes:
  Networking: Rename removeDoubleQuotes to sanitizeSsid
  Wifi: Rename removeDoubleQuotes to sanitizeSsid
2020-01-30 22:42:16 +00:00
Lorenzo Colitti
11b91ef861 Merge changes I34842acd,Icc6c4d6b
am: 06fea00173

Change-Id: I38f5452905216ebf9e0b28311d34ad0667243274
2020-01-28 02:53:38 -08:00
Remi NGUYEN VAN
07b469658f Add support for Ethernet tethering
Ethernet tethering can be started via
startTethering(TETHERING_ETHERNET).

Test: flashed, enabled ethernet tethering, verified internet access on
      downstream.
Bug: 130840861

Merged-In: I34842acd94b972e440c3622f7617df10c18acf65
Change-Id: I34842acd94b972e440c3622f7617df10c18acf65
(cherry-pick with conflicts in test-current.txt)
2020-01-28 17:52:06 +09:00
Remi NGUYEN VAN
f151eb517c Merge "Support putting one Ethernet interface in server mode."
am: e7e38501e8

Change-Id: Ib1c26821880daa118b1911d4f98ebbd970c3c1b4
2020-01-28 00:37:20 -08:00
Lorenzo Colitti
22a02a7422 Support putting one Ethernet interface in server mode.
requestTetheredInterface can be used to put an interface in server mode,
which will persist until release() is called on the returned request, or
until the requesting process dies.

Test: Enabled ethernet tethering with change on top
Bug: 130840861
Merged-In: Id96d581acb3fa4e52ca62dd94ec257f56bd3a1ce
Change-Id: Id96d581acb3fa4e52ca62dd94ec257f56bd3a1ce
(clean cherry-pick from internal branch)
2020-01-28 16:25:43 +09:00
David Su
8b5779ee38 Networking: Rename removeDoubleQuotes to sanitizeSsid
Bug: 145745815
Test: compiles
Change-Id: Iaa6f0d65cab556c24b0a9010427de8e6a02836c1
2020-01-27 13:52:26 -08:00
David Su
b13338a8e3 Networking: Rename removeDoubleQuotes to sanitizeSsid
Bug: 145745815
Test: compiles
Change-Id: Iaa6f0d65cab556c24b0a9010427de8e6a02836c1
Merged-In: Iaa6f0d65cab556c24b0a9010427de8e6a02836c1
(clean cherry-pick from internal branch)
2020-01-27 13:51:56 -08:00
Remi NGUYEN VAN
355e6f0692 Add support for Ethernet tethering
Ethernet tethering can be started via
startTethering(TETHERING_ETHERNET).

Test: flashed, enabled ethernet tethering, verified internet access on
      downstream.
Bug: 130840861

Change-Id: I34842acd94b972e440c3622f7617df10c18acf65
2020-01-27 19:31:08 +09:00
Lorenzo Colitti
815e0fde87 Support putting one Ethernet interface in server mode.
requestTetheredInterface can be used to put an interface in server mode,
which will persist until release() is called on the returned request, or
until the requesting process dies.

Test: Enabled ethernet tethering with change on top
Bug: 130840861
Change-Id: Id96d581acb3fa4e52ca62dd94ec257f56bd3a1ce
2020-01-27 19:12:54 +09:00
Xin Li
a4b9008f4c DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master
Bug: 146167222
Change-Id: Ifeb003ec9b3bf824f04d31a117aea65d517241fb
2020-01-15 16:15:41 -08:00
Automerger Merge Worker
dc0d78b410 [SP03] support registerNetworkStatsProvider API am: b3f085c5a8 am: 0935e710d7 am: 33966d15b7
Change-Id: Iaedbf1f8bbe8128ca2631efff24048b97ce9d909
2020-01-13 14:48:01 +00:00
Automerger Merge Worker
33966d15b7 [SP03] support registerNetworkStatsProvider API am: b3f085c5a8 am: 0935e710d7
Change-Id: I16130e06129e985fab33b5caf904477bf241e1b2
2020-01-13 14:28:05 +00:00
Automerger Merge Worker
671fc37d01 [SP03.1] Replace com.android.internal.util.Preconditions.checkNotNull am: 892e3bf7b6 am: 99dc88756d
Change-Id: I872285f988905d6707109ab3c7e6a419df47d39b
2020-01-13 14:28:02 +00:00
junyulai
0935e710d7 [SP03] support registerNetworkStatsProvider API
am: b3f085c5a8

Change-Id: Id3a21676b6063048124c54035207a1c070df7a8c
2020-01-13 06:12:41 -08:00
junyulai
99dc88756d [SP03.1] Replace com.android.internal.util.Preconditions.checkNotNull
am: 892e3bf7b6

Change-Id: I17550a2191ccd33a53a195df3cd178d93fbfe952
2020-01-13 06:12:31 -08:00
Junyu Lai
9ccc0c05d8 Merge changes from topic "sp04"
* changes:
  [SP05] add unit test for onStatsProviderLimitReached in NPMS
  [SP04] add unit test for NetworkStatsProvider
  [SP03] support registerNetworkStatsProvider API
  [SP03.1] Replace com.android.internal.util.Preconditions.checkNotNull
2020-01-13 14:09:52 +00:00
Automerger Merge Worker
7b21835583 Merge "Use new UnsupportedAppUsage annotation." am: 89ac95017f am: b2b309516a
Change-Id: Ia3b772ad3ae7c26d92f3367a3689579cd00860ab
2020-01-13 13:50:52 +00:00
Artur Satayev
ea0a0c347f Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I534e3fd1305e2f4af076986770033478448a665c
Merged-In: I534e3fd1305e2f4af076986770033478448a665c
2020-01-13 12:39:59 +00:00
junyulai
b3f085c5a8 [SP03] support registerNetworkStatsProvider API
This change provides an API that allow external modules to
register a custom provider of NetworkStats to merge the
network statistics that cannot be seen by the kernel to system.

Test: atest FrameworksNetTests CtsUsageStatsTestCases
Test: atest NetworkPolicyManagerServiceTest
Test: m doc-comment-check-docs
Bug: 130855321

Change-Id: I265bc637c40666cde505fde5056d2d9bfc5fb204
2020-01-13 14:43:03 +08:00
junyulai
892e3bf7b6 [SP03.1] Replace com.android.internal.util.Preconditions.checkNotNull
Extracted from ag/9990011 to make NetworkStatsManager sync with internal
line, given that it is missing in aosp/1198084.

Bug: 126528330

Test: Treehugger
Change-Id: I77f50326869799f51d4636cb7c6d7c97daf531e6
Merged-In: I42117ebfb640e3b0b133183e5e146860bed8471a
2020-01-13 14:42:37 +08:00
Automerger Merge Worker
0518f83013 Merge "Allow mainline IPsec(IKE) to statically include @PolicyDirection" am: 287b253564 am: b5189ed2d9 am: 4605390760
Change-Id: I3c2b6dbe514a9f41d27c71b4f76484d801cb92e8
2020-01-10 00:27:55 +00:00
Automerger Merge Worker
4605390760 Merge "Allow mainline IPsec(IKE) to statically include @PolicyDirection" am: 287b253564 am: b5189ed2d9
Change-Id: I40382746ab54ed21fe9d8fc68b2c81bdf2b4e464
2020-01-10 00:16:11 +00:00
Yan Yan
287b253564 Merge "Allow mainline IPsec(IKE) to statically include @PolicyDirection" 2020-01-09 23:42:59 +00:00
Automerger Merge Worker
d423762140 Merge "Use new UnsupportedAppUsage annotation." am: ddb2110db6 am: fe3063fb71
Change-Id: Iea82f97f0ba766ce3f435630175aea48ca47f12f
2020-01-09 16:15:31 +00:00
Treehugger Robot
ddb2110db6 Merge "Use new UnsupportedAppUsage annotation." 2020-01-09 15:46:03 +00:00
Automerger Merge Worker
0ab7ab6232 Merge "[SP02] Add provider interfaces to system API" am: 2220f75cdf am: c6487568ad am: dd54131995
Change-Id: I490c69f902e4b288502adbe5f97c94688147c741
2020-01-09 15:33:22 +00:00
Automerger Merge Worker
dd54131995 Merge "[SP02] Add provider interfaces to system API" am: 2220f75cdf am: c6487568ad
Change-Id: I569fbcc38f44221ff1be355e48ced65359f2e70f
2020-01-09 15:14:16 +00:00
Artur Satayev
3d5d3b32af Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I8789f8499d4dca08580672e9e45ed9a7026dd686
Merged-In: I8789f8499d4dca08580672e9e45ed9a7026dd686
2020-01-09 13:56:05 +00:00
Automerger Merge Worker
0adb990be3 Merge "[SP01] Add NetworkStats to system API" am: a113464439 am: b340068a3e am: 1f118665a9
Change-Id: I1bb272727cbaec0102669b3f3b8141994f8e1f9a
2020-01-09 09:37:50 +00:00
Automerger Merge Worker
1f118665a9 Merge "[SP01] Add NetworkStats to system API" am: a113464439 am: b340068a3e
Change-Id: I771bf8836f9b754fc05fd743de8cc5a15aecddf1
2020-01-09 09:18:36 +00:00
junyulai
84b2c43b56 [SP02] Add provider interfaces to system API
This change contains a base class that allows external modules
to implement a custom network statistics provider. And a callback
interface that allows the implementation to signal the system.

These interfaces will be used in the follow-up changes that
implement the functionality.

Test: atest FrameworksNetTests CtsUsageStatsTestCases
Test: m doc-comment-check-docs
Bug: 130855321
Change-Id: Ib23377c8b9cef02bc32253462b068fd10734d21a
2020-01-09 08:57:37 +00:00
junyulai
10a00a2819 [SP01] Add NetworkStats to system API
In order to let external module report their network stats,
expose necessary APIs to construct NetworkStats object.

Test: atest FrameworksNetTests CtsUsageStatsTestCases
Test: m doc-comment-check-docs
Bug: 130855321
Change-Id: Id3ec8aaff3df67948c25eac2319a74cf33a27979
2020-01-09 03:11:22 +00:00
evitayan
5fa370c470 Allow mainline IPsec(IKE) to statically include @PolicyDirection
@PolicyDirection was hidden API defined in IpSecManager and
mainline module IPsec(IKE) needs to depend on it.

To remove this hidden API dependency, this commit:
- Moves definition of @PolicyDirection to a separate class
- Creates sharing filegroup framework-ike-shared-srcs for mainline
  IKE and include PolicyDirection.java

Bug: 146360859
Test: build, flash, boot
Test: atest FrameworksIkeTests
Change-Id: Ic6d7c06d4b92e16a9a65430365c9acc73932147b
2020-01-08 13:53:14 -08:00
Automerger Merge Worker
1bcadce424 Merge "Use new UnsupportedAppUsage annotation." am: 9395887931 am: 8081ee1b35
Change-Id: I330594303664e66571a460fdb1a5ab6cb8e5e273
2020-01-08 17:14:42 +00:00
Artur Satayev
af1eb472bf Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
Merged-In: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
2020-01-08 14:04:40 +00:00
Artur Satayev
725ce2f6c6 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
2020-01-06 16:47:35 +00:00
Daulet Zhanguzin
b874007169 Replace com.android.internal.util.Preconditions.checkNotNull with
java.util.Objects.requireNonNull

Bug: 126528330

Test: Treehugger
Change-Id: I42117ebfb640e3b0b133183e5e146860bed8471a
2019-12-30 15:41:28 +00:00
Artur Satayev
6fa0859890 Merge "Use new UnsupportedAppUsage annotation." 2019-12-19 16:55:30 +00:00
Artur Satayev
d70aacdd3b Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I534e3fd1305e2f4af076986770033478448a665c
2019-12-18 20:44:45 +00:00
Artur Satayev
efd5607e47 Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I8789f8499d4dca08580672e9e45ed9a7026dd686
2019-12-18 16:37:37 +00:00
Jeffrey Huang
991afd3f44 Merge "Rename writeToProto to be dumpDebug" 2019-12-06 18:53:15 +00:00
Aaron Huang
75fa1b4814 Merge "Add TrafficStats methods to public APIs" am: 8aed6e69f0
am: 1abb8de060

Change-Id: Ib98dde2ae3b6cfee05e8d5536565ce72f6722e0b
2019-12-06 03:12:46 -08:00
Aaron Huang
b0db4fdb65 Add TrafficStats methods to public APIs
Add methods to public APIs for mainline support.

Bug: 139268426
Bug: 135998869
Test: atest FrameworksNetTests
      ./frameworks/opt/net/wifi/tests/wifitests/runtests.sh
      atest android.net.cts
      atest android.net.wifi.cts

Change-Id: I21a9c0dbdc79b1f1041fc9e23c6a4e1e97ecde92
2019-12-06 16:19:40 +08:00
Jeffrey Huang
5d4c651bdf Rename writeToProto to be dumpDebug
We want to eventually migrate some of these APIs to be @SystemApi for mainline modules.
The #dumpDebug name is more appropriate than #writeToProto.

Bug: 142279786
Test: Manual
Change-Id: I60793e91cedf6b720d4ecef6a8484f4fed4ff30f
2019-12-05 11:28:11 -08:00