am skip reason: Change-Id I297fcad0a83bd8c32c0fa6c6a77d83b42cd8c428 with SHA-1 7e81d01799 is in history
Change-Id: Icfae270ec371428c1e6bc391098aad0f7c7fc850
am skip reason: Change-Id I297fcad0a83bd8c32c0fa6c6a77d83b42cd8c428 with SHA-1 7e81d01799 is in history
Change-Id: I28154da3f37d182efd5b65c4c1169690f50e5731
am skip reason: Change-Id If74e9f2ea597a0d5ae4668c3358bc687f342bbb5 with SHA-1 1d4d01a8a8 is in history
Change-Id: I908caa2274b0bb6ede86ed86910f6141d201fa6e
am skip reason: Change-Id If74e9f2ea597a0d5ae4668c3358bc687f342bbb5 with SHA-1 a6880d0037 is in history
Change-Id: I3a6b61ea27bad16507e6df44e01d1cbd8a5eeedf
am skip reason: Change-Id If74e9f2ea597a0d5ae4668c3358bc687f342bbb5 with SHA-1 a6880d0037 is in history
Change-Id: I2ee29a01a22b0299993b99835fe8a18a6c1f364c
am skip reason: Change-Id I37dd459d08b57b14f72f3b28ea80fa231b152f10 with SHA-1 4d3f871a94 is in history
Change-Id: I439913a4195cea16832b3ec6c19a3cfaa63dfdb8
am skip reason: Change-Id I37dd459d08b57b14f72f3b28ea80fa231b152f10 with SHA-1 4d3f871a94 is in history
Change-Id: Ib9aaf9091937ae27f35a389cc3de696567cefe1b
am skip reason: Change-Id I1959f3080946267243564459ff4207647922566e with SHA-1 ec2e2e2174 is in history
Change-Id: Id31a417c7a4204bd646400e90456424d12d2d9d0
am skip reason: Change-Id I37dd459d08b57b14f72f3b28ea80fa231b152f10 with SHA-1 4d3f871a94 is in history
Change-Id: I0b5556bcaa27ca0a379f910bfba80aec506348c9
In NetworkStatsService, mStatsLock will be held when
iterating through the provider list. This is to protect the list
from concurrent broadcast that triggered by
NetworkPolicyManagerService. This is not good since the binder
call is oneway, it does not make sense to block every
access to the providers.
This change also remove unuse variable and reduce verbose log.
Test: atest FrameworksNetTests TetheringTests
Bug: 150418178
Change-Id: If74e9f2ea597a0d5ae4668c3358bc687f342bbb5
Merged-In: If74e9f2ea597a0d5ae4668c3358bc687f342bbb5
(cherry picked from commit 5d8f96c6967d5b1a42ba374521078e75a9e6f187)
IpSecService.applyTunnelModeTransform() currently does not take an
SpiRecord instance, yet implicitly requires that the SpiRecord instance
is still alive based on the stored SpiRecord resourceId in
the TransformRecord's IpSecConfig.
This check is unnecessary, as the SpiRecord has been subsumed into the
TransformRecord, and the kernel resources are kept alive whether or
not the SpiRecord is still held by the user.
This allows users of the IpSecManager API to allocate short-lived SPIs
during the creation of an IpSecTransform, without having to keep track
of both of them (even though the SPI is no longer usable).
The TransformRecord.getSpiRecord() call is already used in
multiple other places in the same method.
Bug: 142072071
Test: New tests added, passing.
Change-Id: I1959f3080946267243564459ff4207647922566e
Merged-In: I1959f3080946267243564459ff4207647922566e
(cherry picked from commit 5258b1b82f39bf17e0751bcb94479464250aaec5)
am skip reason: Change-Id Icf88d3e7a38562ab15187f6c71bc8fb0486d37c0 with SHA-1 3648f0a35d is in history
Change-Id: I5089485b8f861e11bc275188d16a20ecc2e71d47
am skip reason: Change-Id Icf88d3e7a38562ab15187f6c71bc8fb0486d37c0 with SHA-1 3648f0a35d is in history
Change-Id: Iac39289cb5a7d912131cd056a702a3bf8d361681
There is a corner case which may cause the deadlock:
When NetworkStatsService tried to broadcast the intent,
NetworkStatsService was waiting for a lock which was hold by
ActivityManagerService. In the same time, ActivityManagerService
was waiting for ActiveService#startServiceInnerLocked() to get a
lock which was hold by ConnectivityService. ConnectivityService
was waiting for a lock which was hold by BatteryStatsImpl.
BatteryStatsImpl was waiting for a lock which was hold by
NetworkStatsService, and the lock was locked by
NetworkStatsService when NetworkStatsService tried to broadcast
the intent.
To prevent deadlock when broadcasting the intent in
performPollLocked(), move the intent broadcasting from
performPollLocked() to NetworkStatsHandler.
Bug: 150418178
Bug: 155155473
Test: 1. Create the second user and see if the device will
do factory reset or not.
2. Factory reset manually and see if there is a deadlock.
Change-Id: I80569cb4388beb3fd6cbf64a7885bccee8b1c53c
Merged-In: Icf88d3e7a38562ab15187f6c71bc8fb0486d37c0
(cherry picked from commit 3f8ab0350450202910ea702799570c538e96d5cd)
There is a corner case which may cause the deadlock:
When NetworkStatsService tried to broadcast the intent,
NetworkStatsService was waiting for a lock which was hold by
ActivityManagerService. In the same time, ActivityManagerService
was waiting for ActiveService#startServiceInnerLocked() to get a
lock which was hold by ConnectivityService. ConnectivityService
was waiting for a lock which was hold by BatteryStatsImpl.
BatteryStatsImpl was waiting for a lock which was hold by
NetworkStatsService, and the lock was locked by
NetworkStatsService when NetworkStatsService tried to broadcast
the intent.
To prevent deadlock when broadcasting the intent in
performPollLocked(), move the intent broadcasting from
performPollLocked() to NetworkStatsHandler.
Bug: 150418178
Bug: 155155473
Test: 1. Create the second user and see if the device will
do factory reset or not.
2. Factory reset manually and see if there is a deadlock.
Change-Id: Icf88d3e7a38562ab15187f6c71bc8fb0486d37c0
am skip reason: Change-Id I45c3aa9046b316c8cd0943543d620a22e4afefd1 with SHA-1 f0fcc339c3 is in history
Change-Id: Ia28361c12804065aa4e0729f3e6283a7f4049101
am skip reason: Change-Id I45c3aa9046b316c8cd0943543d620a22e4afefd1 with SHA-1 f0fcc339c3 is in history
Change-Id: I44a2ee47f6a88286b28d5165c67cfd4fdbdd0152
In NetworkStatsService, mStatsLock will be held when
iterating through the provider list. This is to protect the list
from concurrent broadcast that triggered by
NetworkPolicyManagerService. This is not good since the binder
call is oneway, it does not make sense to block every
access to the providers.
This change also remove unuse variable and reduce verbose log.
Test: atest FrameworksNetTests TetheringTests
Bug: 150418178
Change-Id: If74e9f2ea597a0d5ae4668c3358bc687f342bbb5
am skip reason: Change-Id I3525edc385b07858b48c7add2d331c4b5a2e84ad with SHA-1 87ba308377 is in history
Change-Id: I4fe424305ea9af7c41033bd6cb7f52ef8f30c37a
am skip reason: Change-Id I3525edc385b07858b48c7add2d331c4b5a2e84ad with SHA-1 87ba308377 is in history
Change-Id: I89ff9147f99b03c5bd1e7f5aa34c5968cfbfc18e
NetworkStats calculation needs to filter out debug entries to
prevent over counting. While NetworkStatsFactory migrates data
usage over a VPN to the TUN network, NetworkStatsFactory does
not filter out debug entries per vpn which will cause debug
entries left and cause exception.
Bug: 152678151
Test: atest com.android.server.net.NetworkStatsFactoryTest
and verify no exception
Change-Id: I3525edc385b07858b48c7add2d331c4b5a2e84ad
Merged-In: I3525edc385b07858b48c7add2d331c4b5a2e84ad
NetworkStats calculation needs to filter out debug entries to
prevent over counting. While NetworkStatsFactory migrates data
usage over a VPN to the TUN network, NetworkStatsFactory does
not filter out debug entries per vpn which will cause debug
entries left and cause exception.
Bug: 152678151
Test: atest com.android.server.net.NetworkStatsFactoryTest
and verify no exception
Change-Id: I3525edc385b07858b48c7add2d331c4b5a2e84ad