OSDN Git Service

Tethering: fix using wrong subId problem
authormarkchien <markchien@google.com>
Tue, 9 Apr 2019 07:53:24 +0000 (15:53 +0800)
committermarkchien <markchien@google.com>
Tue, 16 Apr 2019 10:48:38 +0000 (18:48 +0800)
commit3394e14fc3f5ce76162a9c2982831f200b80ee61
tree684a833583b51af45e502416d92e53e2d8f33131
parent873badbd1cbc622447aafdab87feca0719758ea7
Tethering: fix using wrong subId problem

There is the potential bug[1] that default data subId change
intent may lose. So tethering may cache the outdated default
data subId in TetheringConfiguration. Now EntitlementManager
would fetch configuration every time and this would re-exam
whether subId is changed.
Additional passing subId to Settings to avoid default data
subId change right away when launching entitlement check.
Thus, Settings can know whether this is outdated entitlement
check request.
[1] b/129224596

Bug: 129751453
Test: -build, flash, boot
      -atest FrameworksNetTests
      -manual test with carrier SIM

Change-Id: If334dd1cd383cced9db5cf0d0bc9dc60ed198816
services/core/java/com/android/server/connectivity/Tethering.java
services/core/java/com/android/server/connectivity/tethering/EntitlementManager.java
tests/net/java/com/android/server/connectivity/tethering/EntitlementManagerTest.java