LiveSession: check bandwidth in 10s interval to support adaptive stream switch

schedule another check bandwidth event when previous bandwidth check event responds.
so that HLS will realize adaptive stream switch when network bandwidh change.

the bug exists in kitkat 4.4.2, brough by AOSP upgrade and it will impact HLS
bandwidth switch feature

Steps to reproduce:
 1. connect phone /tablet to wifi, adjust router to set initial wifi bandwidth to low bandwidth
 2. lauch browser to access http live streaming server and start playback on full screen (there're three TS streaming for 900kbps/300kbps/100kbps bandwidth)
 3. During playing streaming, change network bandwidth to be high,such as 1000kbps

expected result: streaming switches to high quality
actual result: streaming does not switch to high quality

Change-Id: Ib662952ee0fa1574d17d81a3e15cbbc74b47ff1d
Signed-off-by: ywan171 <yi.a.wang@intel.com>
HLS: fix video pause/resume button not work after replay hls on HTML5 full screen

when replay HLS in HTML5 full screen mode, video starts in NuPlayer with RUNNING state,
the EOS flag is not clear, which will cause the mediaplayer finds the mismatch internal/external
state when app calls MediaPlayer::isPlaying.

step:
 1.playing HLS streaming in Browser
 2.click play.
 3.click full button into full screen.
 4.wait video playback finished.
 5.click play button to replay this video.
 6.then click pause button to pause video.

result: 1.can't pause video during playing this streaming.
        2.The statue of progress bar is pause. but audio is playing.
Change-Id: I65d78d31560a86526649053cc824e0df461f0879
Signed-off-by: Gu, Wangyi <wangyi.gu@intel.com>
Signed-off-by: ywan171 <yi.a.wang@intel.com>
libmediaplayerservice: fix hls can not pause/play issue in HTML5 fullscreen mode

fix hls can not pause/play issue in HTML5 fullscreen mode which is introduced in Android 4.3

Change-Id: I165e561a01faee95b3db599f13c397122b359dcd
Signed-off-by: ywan171 <yi.a.wang@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 107204
stagefright: Handle acquireWakeLock failure case

When the power service is not running, acquireWakeLock fails, but
TimedEventQueue still keeps a reference count to a non-existent
wakelock. This causes an assertion failure when trying to free the
wakelock. Only increment the reference count and save the wakelock
reference on successful acquire.

CRs-Fixed: 640796
Change-Id: I441bf8d4c3520eb6ce8a378d2744913de0a44f55
Merge remote-tracking branch 'upstream/android-4.4' into android-4.4