OSDN Git Service

Tethering: fix using wrong subId problem
authorMark Chien <markchien@google.com>
Tue, 16 Apr 2019 13:03:51 +0000 (06:03 -0700)
committerMark Chien <markchien@google.com>
Fri, 19 Apr 2019 04:38:13 +0000 (04:38 +0000)
commit2ec3cce4526370b6971a2a91c455d949c0120356
tree0907a869f6b0c81680a15a8dfd387fa003eea1d5
parent17203cd88b318fa69001731c82474b23e6a9774b
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: I318cdd86bd7e516f7673bb293d1d9bf967861d8f
Merged-In: I32e238c4786657ecd4bacfa3260c28c3f083cf08
Merged-In: I318cdd86bd7e516f7673bb293d1d9bf967861d8f
(cherry picked from commit 430dd6e98aa1e76219c7ba74b9d9a1b202bf39cc)
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