Use pause signaling to halt a video call when data limit is reached.
authorTyler Gunn <tgunn@google.com>
Wed, 21 Dec 2016 18:39:48 +0000 (10:39 -0800)
committerTyler Gunn <tgunn@google.com>
Wed, 21 Dec 2016 18:39:48 +0000 (10:39 -0800)
commit266d3920ddc1e4cb95f9e21bc0ff0f2e0d0314cd
tree62ab5224202cf57e481e43984bde985fed812d42
parente441415a339670d2ca567e508f2b5806103954b5
Use pause signaling to halt a video call when data limit is reached.

This proved to be problematic as the InCallUI is the only place where
we would previously get a pause signal.  Added a VideoPauseTracker
class which is responsible for tracking the source of pause requests and
ensuring that the video is only paused on the first request, and only
resumed on the last resume request.

Added some new logic to ImsVideoCallProviderWrapper to support receiving
pause and resume requests from other sources, and to ensure that requests
to pause or resume use the VideoPauseTracker to determine if the pause
or resume should actually be passed along to the modem.

Test: manual
Bug: 30760683
Change-Id: Id54b2a955745132ab09feb01b5c961f6115ef3df
src/java/com/android/ims/internal/ImsVideoCallProviderWrapper.java
src/java/com/android/ims/internal/VideoPauseTracker.java [new file with mode: 0644]