Commit graph

2,787 commits

Message SHA1
Merge "Support Dual ViLTE stats"
Junyu Lai   authored and   Gerrit Code Review   commited 2021-03-29 06:59:19 +00:00
df875106a7
Merge changes I6d5dd0a8,I106b3e4f
* changes:
  Use public API Network#getNetId() to get netid
  Remove unused import IConnectivityManager

Lucas Lin   authored and   Gerrit Code Review   commited 2021-03-25 10:49:35 +00:00
0cf3234045
Use public API Network#getNetId() to get netid
Network class will be a part of mainline module, external callers
cannot call its hidden constant. Use public API - getNetId() to
get netid instead.

Bug: 182963397
Test: m
Change-Id: I6d5dd0a8c3879df7bdc1d58e36022045c303bb40
Merged-In: I6d5dd0a8c3879df7bdc1d58e36022045c303bb40
  (cherry-picked from ag/13927649)

lucaslin   authored and   Lucas Lin   commited 2021-03-25 10:48:55 +00:00
20966d9193
Use getAllInterfaceNames to get all interface names
The current design is using hidden API - getStackedLinks() to
get LinkProperties then call getInterfaceName() to get the
interface name. In fact, this behavior could be replaced by
system API - getAllInterfaceNames().

Bug: 182963397
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases
Change-Id: Id2b19dc5099355af69d23a6d99d2b7e6c0e1e88a
Merged-In: Id2b19dc5099355af69d23a6d99d2b7e6c0e1e88a
  (cherry-picked from ag/13927660)

lucaslin   authored and   Lucas Lin   commited 2021-03-25 08:10:28 +00:00
11e8857033
Merge "Annotate NSM heavy methods with @WorkerThread"
Chalard Jean   authored and   Gerrit Code Review   commited 2021-03-17 02:03:22 +00:00
e096339dc3
Support Dual ViLTE stats
Some operator supports multiple VILTE,
both two SIM cards can make VILTE call.
We need to record VILTE data to different interface.
Now NetworkStatsService has only one VILTE data
interface: "vt_data0". All VILTE data stats will
be recorded in this interface.

Bug: 130871087
Test: NetworkStatsServiceTest#testDualVilteProviderStats
Change-Id: I000ec756827bc42cac88dd0a2ca6b7999252357e

Zhengyu Zhan   authored and   Lili Lin   commited 2021-03-15 10:00:59 +08:00
63a5820b4f
Merge changes Ib80f814f,Ic605e489
* changes:
  Use new API - getIpSecNetIdRange() in IpSecService
  Add a new API to get the network ID range of IPSec tunnel interface

Lucas Lin   authored and   Gerrit Code Review   commited 2021-03-12 03:30:32 +00:00
02929bde11
Use new API - getIpSecNetIdRange() in IpSecService
Use new API - getIpSecNetIdRange() to get the network ID range
of IPSec tunnel interface.

Bug: 172183305
Test: atest FrameworksNetTests:IpSecServiceTest
Change-Id: Ib80f814f991e9f000a68f5c539d15d97cf56930e

lucaslin   authored and   Lucas Lin   commited 2021-03-11 17:30:18 +00:00
7eb76590b8
Add Ethernet, TestNetworkSpecifier API
Rename StringNetworkSpecifier to EthernetNetworkSpecifier (its only
production user), and make it module-lib API.
The original StringNetworkSpecifier file is actually kept to satisfy
some invalid dependencies; it will be removed separately.

This allows specifying an Ethernet interface with a non-deprecated API:
until this change the only way to do so would be to use
NetworkRequest#setSpecifier(String), which is deprecated.

Similarly, add the TestNetworkSpecifier API for TestNetworkManager, to
replace previous usage of StringNetworkSpecifier. TestNetworkManager is
module API, so TestNetworkSpecifier should be module API too. This
allows tests to request the test interface specifically, without using
the deprecated NetworkRequest#setSpecifier(String).

Bug: 179329291
Test: m
Merged-In: Iee569f5c8bbdc4bc979610e1191308281f3d4620

Change-Id: Iee569f5c8bbdc4bc979610e1191308281f3d4620

Remi NGUYEN VAN   authored and   junyulai   commited 2021-03-11 23:02:02 +08:00
65949518fa
Annotate NSM heavy methods with @WorkerThread
Test: TH
Bug: 181906747
Change-Id: Ia30273466c1b91a3dcc5d36dac61f92185dec96e

Chalard Jean   commited 2021-03-11 10:47:46 +00:00
63595c6f88
Remove unused buildNetworkIdentity
The overload using a NetworkState is now unused.

Bug: 174123988
Change-Id: I22f2d2fffd2d70c08097d3217f01393ff8e75ab5
Test: m

Remi NGUYEN VAN   commited 2021-03-09 09:31:21 +00:00
872fe3f815
Replace ConnectivityManager.isNetworkTypeMobile usage in NSS
ConnectivityManager is a part of connectivity mainline. The
hidden methods dependency in ConnectivityManager should be
removed to make it a moudle. NSS use isNetworkTypeMobile to
check if the NetworkState belongs to a cellular network or not.
It should be replaced by the NetworkCapabilities inside the
NetworkState.

The result of isNetworkTypeMobile relies on the legacy network
type. The legacy network type comes from the network type
of its network info. The replacement should consider VPN active
case because the network type will not be TYPE_MOBILE. Thus,
replace it with Networkcapabilities.getDisplayTransport() to
get a transport that can be used to classify a network when
displaying its info to users, i.e. it will return TRANSPORT_VPN
for a vpn network on cellular network.

Bug: 172183305
Test: atest FrameworksNetTests
Change-Id: I2132a7288a93e4430cbd9efabc33ae56ce8bdd9b

Chiachang Wang   commited 2021-03-08 09:11:24 +00:00
055165000e
Merge "[FUI22] Support getAllNetworkStateSnapshot"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-03-05 05:16:43 +00:00
89f7c5570a
Merge "Revert "Use VERSION_CODES.S instead of VERSION_CODES.R + 1""
Yan Yan   authored and   Gerrit Code Review   commited 2021-03-05 02:30:21 +00:00
d032de0ecd
Revert "Use VERSION_CODES.S instead of VERSION_CODES.R + 1"
This reverts commit 272ee7c909.

Reason for revert:
1. The BUILD_VERSIONS.S is 1000, and thus it will prevent
   the code from requiring new algorithms on devices whose
   first sdk is 31 (e.g. cuttlefish), though these devices
   should be treated as first launched with SDK S.
2. It will break #testValidationForAlgosAddedInS, because
   the test code is using BUILD_VERSIONS.R to gate the test,
   which is inconsistent with the implementation.

Bug: 181887451
Test: atest IpSecAlgorithmTest
Change-Id: I5cd717c5ebd6086ae5cf9abf76311ae4fca0c6e9

Yan Yan   commited 2021-03-05 00:15:15 +00:00
88f5da0903
[FUI22] Support getAllNetworkStateSnapshot
Currently, ConnectivityService has getAllNetworkState but it is
not ideal to expose as system API since the plan is to get rid
of NetworkState. Thus, create a new one that returns
NetworkStateSnapshot to fulfill the needs.

Note the original getAllNetworkState cannot be deleted now since
it has @UnsupportedAppUsage annotation.

Test: atest FrameworksNetTests
Bug: 174123988
Change-Id: Icddd434552b0e9ecbc8299e7242ec88cf3145aca

junyulai   commited 2021-03-04 18:41:09 +08:00
41c85f50c4
Merge "Replace ConnectivityManager hidden symbols on framework"
Paul Hu   authored and   Gerrit Code Review   commited 2021-03-04 03:07:08 +00:00
1984fb1cb0
Merge "Merge RQ2A.210305.007"
Xin Li   authored and   Gerrit Code Review   commited 2021-03-03 21:41:39 +00:00
d60cc74f32
Merge "Use VERSION_CODES.S instead of VERSION_CODES.R + 1"
Yan Yan   authored and   Gerrit Code Review   commited 2021-03-03 18:04:52 +00:00
90b5d871e1
[FUI18] Expose notifyNetworkStatus as system API
Test: m -j doc-comment-check-docs
Bug: 174123988
Merged-In: I11d4c9ab24de87fb2ad120e3787b78b73133e874
Change-Id: I11d4c9ab24de87fb2ad120e3787b78b73133e874
  (cherry-picked from ag/13749978)

junyulai   commited 2021-03-03 20:01:46 +08:00
f72320776d
Merge "Support new IpSecAlgorithm AUTH_AES_CMAC" am: d3a444609a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1579251

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic9cc8508fb44e10371bc76bb31f20340f8663b18

Yan Yan   authored and   Automerger Merge Worker   commited 2021-03-02 21:08:15 +00:00
ecc13abaa0
Merge "[FUI09] Expose NetworkStateSnapshot as system API" am: c061f0053e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536708

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8eb6681328ad1f4a85bcc8c6c4b9446c23616b7a

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-03-02 20:52:02 +00:00
2f5b7f8155
Merge "[FUI17] Migrate NetworkStatsService to use NetworkStateSnapshot" am: 1ad27ef2a1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556553

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2b19538843007e38e170163120f38477e4b76be8

Treehugger Robot   authored and   Automerger Merge Worker   commited 2021-03-02 20:47:52 +00:00
8e8f318c1f
Merge "Move UidRange to connectivity" am: 5a81037576
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1612295

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I672615b0804b9a9de4befa1ba5aea2efb9c962df

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-03-02 20:24:20 +00:00
8819459e4a
Merge "Support new IpSecAlgorithm AUTH_AES_CMAC"
Yan Yan   authored and   Gerrit Code Review   commited 2021-03-02 18:24:27 +00:00
d3a444609a
Merge "[FUI09] Expose NetworkStateSnapshot as system API"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-03-02 16:08:03 +00:00
c061f0053e
[FUI09] Expose NetworkStateSnapshot as system API
This is needed by NetworkStatsService and
NetworkPolicyManagerService to utilize the snapshots of
information of networks that grabbed from ConnectivityService.

Test: atest FrameworksNetTests NetworkPolicyManagerServiceTest
Bug: 174123988
Change-Id: I7e974ef7b23ba9ba6ee775eed9899b0c0e2eca55

junyulai   commited 2021-03-02 23:09:16 +08:00
7c17de401b
Merge "[FUI17] Migrate NetworkStatsService to use NetworkStateSnapshot"
Treehugger Robot   authored and   Gerrit Code Review   commited 2021-03-02 13:21:32 +00:00
1ad27ef2a1
[FUI17] Migrate NetworkStatsService to use NetworkStateSnapshot
This change migrates NetworkStatsService and related code to use
NetworkStateSnapshot which is used for replacing the NetworkState.

This patch also changes some formating which is suggested by
the linter.

Test: FrameworksNetTests NetworkPolicyManagerServiceTest
Bug: 174123988
Change-Id: I547da8f411cb45bdadc376ac3cadf3f3c55bb282

junyulai   commited 2021-03-02 20:08:53 +08:00
125631330d
Move UidRange to connectivity
UidRange is a data class that is an implementation detail of
Connectivity. Move it to the connectivity boundary.

Remaining usages of UidRange outside of Connectivity (in VPN) should be
migrated to other classes, like Range<Integer> or UidRangeParcel.

Bug: 181512874
Test: m
Change-Id: I6f2e3685ad1c07171dd90480d1e546329de8732d

Remi NGUYEN VAN   commited 2021-03-02 15:35:36 +09:00
1bc09ccb14
Merge "[FUI08] Create NeworkStateSnapshot" am: 18f51bd23d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536328

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If6f0e981228ef886496f55626b499f9c487af320

Junyu Lai   authored and   Automerger Merge Worker   commited 2021-02-26 11:30:53 +00:00
0cd3ebb43d
Merge "[FUI08] Create NeworkStateSnapshot"
Junyu Lai   authored and   Gerrit Code Review   commited 2021-02-26 10:53:36 +00:00
18f51bd23d
[FUI08] Create NeworkStateSnapshot
Since NetworkState has UnsupportedAppUsage APIs that cannot
be changed, create another class for follow-up patches
to expose as system API.

Test: NetworkStateSnapshotTest
Bug: 174123988
Change-Id: I54ef872847f34166aa34a79f6178c90ac12b6c72

junyulai   commited 2021-02-26 11:57:06 +08:00
8f1eb24a94
Replace ConnectivityManager hidden symbols on framework
Connectivity is becoming a mainline module in S, so
ConnectivityManager hidden symbols can not be used for outside
components. Besides, most Tethering relevant methods or variables
on CM are migrated to TetheringManager. So replace all these
methods or variables from ConnectivityManager to TetheringManager
on Telephony on framework.

Bug: 180693313
Test: atest FrameworksNetTests
Change-Id: I14e032ad6f278a36e8756aa7045d73a403f8f059

paulhu   commited 2021-02-26 11:19:41 +08:00
da479fa1a4
Merge "Add support for tracking PANS data usage" am: dbedad0dd5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1578684

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If14211a988289a217c9eabb3cd43bc41959de346

Chris Weir   authored and   Automerger Merge Worker   commited 2021-02-25 21:50:22 +00:00
16e2ef942a
Merge "Add support for tracking PANS data usage"
Chris Weir   authored and   Gerrit Code Review   commited 2021-02-25 21:37:42 +00:00
dbedad0dd5
Use VERSION_CODES.S instead of VERSION_CODES.R + 1
Bug: 170424293
Test: IpSecAlgorithmTest
Change-Id: I4662b0d43c476b744536a41000d578e8b69286ef

Yan Yan   commited 2021-02-25 10:40:24 -08:00
272ee7c909
Support new IpSecAlgorithm AUTH_AES_CMAC
Bug: 161716062
Test: IpSecAlgorithmTest, verified with CTS
Change-Id: Ideaf4225bd851fad8c8072505c6ad99d85ba616e

Yan Yan   commited 2021-02-25 10:35:10 -08:00
f72b01527f
Merge changes I852e3a53,I86755647,I0ed8b0c6 am: 1e70c22af9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1553736

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0428b441b34d48157a28dfc0463976be135146f4

Lucas Lin   authored and   Automerger Merge Worker   commited 2021-02-23 22:27:15 +00:00
d1f4d2881f
Merge changes I852e3a53,I86755647,I0ed8b0c6
* changes:
  Remove unused INetworkManagementService from IpSecService
  Use NetdUtils instead of NetworkManagementService in Vpn
  Use NetdUtils instead of NetworkManagementService in IpSecService

Lucas Lin   authored and   Gerrit Code Review   commited 2021-02-22 06:49:39 +00:00
1e70c22af9
Merge ab/7061308 into stage.
Bug: 180401296
Merged-In: I4bf82035631ccff6d5a6144d6d9b1d203b076851
Change-Id: I1b5f3a672a55eaabba0f5389bab110b395553559

Xin Li   commited 2021-02-21 09:39:53 -08:00
e9a1554fea
Merge "Split parcelable .aidl files to aidl-export" am: 09bbad130d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1589694

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I35bcfe8b6861b1fbf7eb7c7f43dafe84ec364634

Remi NGUYEN VAN   authored and   Automerger Merge Worker   commited 2021-02-19 03:46:20 +00:00
634c81f7e8
Add support for tracking PANS data usage
Adds support for tracking oemManagedNetwork types (OEM_PAID and
OEM_PRIVATE).

Bug: 174485293
Test: atest NetworkTemplateTest NetworkStatsCollectionTest
NetworkStatsObserversTest NetworkStatsServiceTest NetworkIdentityTest
Test: verify that the bytes go up in PansTest app only when
`ping -I eth2 8.8.8.8` is run as root.

Change-Id: I78660a835f16265ba8e44bb84332c6633dd72b84

Chris Weir   commited 2021-02-17 20:32:53 -08:00
f8f291cb7b
Split parcelable .aidl files to aidl-export
The one-line "parcelable X" files need to be imported by targets that do
not build against SDK (the SDK has prebuilt definitions), so prepare a
dedicated directory for them.
This avoids having users of the classes include the whole src/
directory, which could contain definitions for classes that are not part
of the public API, so should not be imported.

Also move back to frameworks/base/core some .aidl definitions that
were separated from their associated class.

Bug: 171540887
Test: m
Merged-In: I7432fe4c87cd3cab04dcb6185c9a4f3f84376549
Change-Id: I7432fe4c87cd3cab04dcb6185c9a4f3f84376549

Remi NGUYEN VAN   commited 2021-02-18 01:17:04 +00:00
037a730efd
Merge changes Ifc8ad902,I6d1b8d0e am: 8d659bb1ec
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1453730

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I12bd81925142b20a04448952de67cb72d77b4ccd

Yan Yan   authored and   Automerger Merge Worker   commited 2021-02-12 21:41:59 +00:00
488687d11f
[API] Expose IpSecTunnelInterface#setUnderlyingNetwork
This API is required to perform MOBIKE. This API allows an IPsec
peer to change the underlying network of its established IPsec
tunnel without re-establishing the tunnel.

Bug: 169855650
Test: atest IpSecManagerTunnelTest (new tests added)
Change-Id: Ifc8ad902cbfbe4ad07e715f2fef0faa1bf9d68f3

Yan Yan   commited 2021-02-10 14:52:18 -08:00
441e35f612
Update underlying network of IpSecTunnelInterface
Bug: 169855650
Test: atest IpSecManagerTunnelTest
Change-Id: I6d1b8d0e49f89c67ddc2caf4ba63fb0b1eb062c0

Yan Yan   commited 2021-02-10 14:51:43 -08:00
a2f3b49f10
Merge changes from topic "removeNI" am: 5e1ec81e2f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1536707

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia7c6e3bf8f10b98fc2c4d83d41e65c64737753f0

Junyu Lai   authored and   Automerger Merge Worker   commited 2021-02-09 04:26:28 +00:00
ecb34129dc
Merge changes from topic "removeNI"
* changes:
  [FUI07] Stop making NetworkState with NetworkInfo from external callers
  [FUI06] Stop using NetworkInfo in NetworkState from external callers

Junyu Lai   authored and   Gerrit Code Review   commited 2021-02-09 03:37:59 +00:00
5e1ec81e2f
[FUI06] Stop using NetworkInfo in NetworkState from external callers
This is achieved by:
  1. Use legacy network type inside NetworkState to replace the
     needs of referencing NetworkInfo.getType().
  2. Let getAllNetworkState only return networks with isConnected()
     equals true. This allows callers such as NPMS or NSS does not
     have to reference to NetworkInfo.isConnected().

Test: atest FrameworksNetTests NetworkPolicyManagerServiceTest
Bug: 174123988
Change-Id: I1c4eb08d18ca973eb8f41d06258872eabc0006b8

junyulai   commited 2021-02-08 21:40:49 +08:00
64b1cfb7db