7dd2a3d7db7ff9ff8fcf55ec2abd8d14cd63dd6a
The value should be assigned as a long to do the bit calculation as the mNetworkCapabilities is intended to be a long. Otherwise, the value will be temporary assigned into an integer then assigned to the target long. When the bit shift calculation is out of the integer scope, the calculation will overflow and result in unexpected bebavior. Without assigning to a long, ConnectivityServiceTest will get Out-Of-Memory in StringBuilder while generating toString() in NetworkCapabilities after updating tests to verify NET_CAPABILITY_VSIM and NET_CAPABILITY_BIP. Bug: 130869457 Test: atest FrameworksNetTests Change-Id: I4d34c1215c7efb6dc352c314107792e3fa512ad7
Description
android_packages_modules_Connectivity
Languages
Java
81.4%
Kotlin
7.7%
AIDL
4.5%
C++
4.5%
C
1.7%
Other
0.1%