OSDN Git Service

Avoid exposing OffloadCallbackEvent values
authorErik Kline <ek@google.com>
Tue, 11 Jul 2017 15:15:26 +0000 (00:15 +0900)
committerErik Kline <ek@google.com>
Tue, 11 Jul 2017 15:24:38 +0000 (00:24 +0900)
commita0885000f227ebf15f0b78d1d28c7a5de4afa8ea
tree6a7fd7406e7a792fc8dcfc388a78146593597e4e
parent8b44d3722dde9fcd85acce2e190135c1684759d9
Avoid exposing OffloadCallbackEvent values

Keep the android.hardware.tetheroffload.control.V1_0.OffloadCallbackEvent
import from leaking outside of OffloadHardwareInterface by converting each
event type into a separate callback.

Add basic logging implementation in OffloadController. Seems like every
call just needs to log save for two that actually need to do work:

    - onSupportAvailable()
      * poll stats and notify NetworkStatsService
      * (re)push all state, as the hardware now supports offload (again)

    - onStoppedLimitReached()
      * poll stats and notify NetworkStatsService

Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passed
Bug: 29337859
Bug: 32163131
Change-Id: I46c2e5252ae72a09a1550862847c1af441ece072
services/core/java/com/android/server/connectivity/tethering/OffloadController.java
services/core/java/com/android/server/connectivity/tethering/OffloadHardwareInterface.java