OSDN Git Service

Don't completely stop offload if setting data limit fails.
authorLorenzo Colitti <lorenzo@google.com>
Mon, 21 Aug 2017 03:34:50 +0000 (12:34 +0900)
committerErik Kline <ek@google.com>
Thu, 24 Aug 2017 03:51:35 +0000 (20:51 -0700)
commitddce7ee20fcad91bd45f77222d762136587bc192
tree57e57476dffa484d7aa43ba93fe158a4b823174e
parentff12ba93765cebbae0d38113b8c9d935f80681f5
Don't completely stop offload if setting data limit fails.

Currently, if setting a data limit fails, we completely stop
offload in order to avoid data overages. However, the next thing
we do is try to fetch the stats and crash, because once offload
is stopped all our local state is cleared.

Fix this by fetching stats before we stop offload.

Bug: 29337859
Bug: 32163131
Bug: 64867836
Test: OffloadControllerTest passes
Test: no crash when disabling wifi tethering with BT tethering active
Merged-In: I7fc47e60b2da5f39c26fb22c1325618f9948dd38
Merged-In: I464dd2a6d1996b1cfb8bbf82b6ee453fd0747569
Change-Id: I260f5450f8b67f055983af68fb23a5f3cfc0bc69
(cherry picked from commit d743601a002ac12c02da58e92ebd0544ab0b77ea)
services/core/java/com/android/server/connectivity/tethering/OffloadController.java
tests/net/java/com/android/server/connectivity/tethering/OffloadControllerTest.java