frameworks/base: support for wallpaper to report surface change when rotated

Client side rotation needs static wall paper prerotation, this change is to support that.

Change-Id: I8d6908bdfd9020f868e84df48940ac86526de086
frameworks/base: fixed ANR which happens with some livewallpapers

Change-Id: Ic2eea9e1c5b5f9335e4dd2a8f5ce5f3fc8f747c3
NuPlayer: Changes to support asynchronous read in DASH
NuPlayer: Signal time discontinuity during seek for DASH source

-When seek is issued, the renderer needs to reset its the values
of variables used to calculate AV sync.
-Set mTimeDiscontinuityPending to signal renderer about the seek.
-Also reset the mSyncQueues flag when an EOS is queued immediately
 after seek

CRs-Fixed: 340370
Change-Id: I90c16e5622d6263a273ccc53bee6f7ff891ccecb
(cherry picked from commit 8918ccf496a064017efa5ff8f4e259a1cc2d0cf4)
NuPlayer: Shutdown deocders during seek for DashLiveSource

Shutdown deocders during seek for DashLiveSource

Change-Id: I3530dc48a380e1e289f2d6ef1d22f0629a139c31
CRs-Fixed: 346380

Conflicts:

	media/libmediaplayerservice/nuplayer/NuPlayer.cpp
(cherry picked from commit 947d8e80943f4029faea02ad9b5482076197f036)
libstagefright: Enable suspension policy

-ADSP did not enter suspend state after audio playback.
-No support for suspension policy in stagefright.
-Enable suspension policy for the OMX component to
take care of the power collapse in stagefright.
-Merged the three gingerbread changes 50118, 62031
 and 89989 for this

Change-Id: I92f545d2684dddb9ef398c93b8c941a6c842a9f9
frameworks/base: Fix to prevent ANR during seek and pause

-While Streaming HD audio content over lowbandwidth server,
 After seek,the read()on parser gets blocked.So when we try to pause after seek,
 if the read()is not returned within 5sec, it results ANR
-Avoid calling OMXCodec::pause() from AudioPlayer
 which is not required in case of SW Decoders

CRs-Fied: 358143
(cherry picked from commit 31b301ec3a8e3e9ce77cdbf7777a1e961051d9fe)

Change-Id: Ie19ecc3650c6cb421b9dcc8e0ff5ec0f38493f11
libstagefright: Free all video decoder output buffers on an error

- OMXCodec calls dequeueBuffer on the NativeWindow in a loop
  and registers output buffers with the OMX component
- If a dequeueBuffer fails, the buffers already registered
  with the OMX component were not getting freed laeding
  to a memory leak.

Change-Id: I56abc7577b10e7540bdd6488708ae6830b9d907b
CRs-Fixed: 351388
(cherry picked from commit 0d4e06d9a53240e0e7aca05a64faea353babb029)
libstagefright: more accurate statistics logging
libstagefright: start collecting stats after first frame

- AwesomePlayer was collecting statistics starting from first read
  call to first frame, this puts first frame latency into
  statistics consideration which is not correct behavior
- Fixes this problem by waiting until first frame is read and then
  start collecting statistics on FPS
- Also improve precision by using double to store intermediate fps
  values and extending duration to 250000us

Crs-Fixed: 338656
(cherry picked from commit 8bc7cd5bbafa652dff3f835a69d717909705cf4f)

Change-Id: I541d30a4dce11a4ab46bb36f70086ce36a7f6748
libstagefright - fix fps calculations
libstagefright: A particular MP3 clip does not play completely.

  --  MP3 frame gives a side info error.
  --  Modified decoder to recover even after side info error.
  --  The error frame is skipped and rest of the file is played.

CRs-Fixed: 327840
(cherry picked from commit e0fa87bf1672eacc4c76d9334bae1bcf5c906f2a)

Change-Id: Ife848b34315e723a7660559f94c2767f6506eefe
libstagefright: Disconnect connecting datasource in reset

- MediaSource Read is a blocking call, and it can stall
  the complete player if it takes longer. There are chances of
  seeing a ANR in streaming scenarios.
- This change will ensure that read call does not block, by
  disconnecting datasource

Change-Id: I905384fbd5ca845ab7a6bf5c6ec30cc396fc5aba
CRs-Fixed: 358143
libstagefright:FIRST_FRAME is set with audioEOS event

As audioEOS event is posted, timesource is changed from audio clock to
system timesource.Because of the difference in two timeclock,it assumes it
to be late/early and leads to seek.
By setting the FIRST_FRAME with audioEOS event,the timesource difference is
taken into account while lateness calculation.

CRs-Fixed: 335557

(cherry picked from commit 7c75a90eca414b7424d1b1fc2bb55642dd46c317)

Change-Id: I504eac51d42bf78e42fdd453d8d5068ea7d81ca5
libstagefright: Add support to seek to zero for aac adif clips

-Seeking to zero not working for aac adif audio clips.
-Enabled seekTo zero for aac adif audio clips.
-Clear the temporary buffer holding the partial frames.
 Add CAN_SEEK_TO_ZERO flag in MediaExtractor to allow
 seek only if seek time is zero.

CRs-Fixed: 324073
(cherry picked from commit 3c040ebfaffbd5470bccf4f25dbf664ead9e728c)

Change-Id: I0658c4a535b7abedc1899b397e7a27947791fe1b
Cherry-pick changes Ie476aefc,I66f7e910,Iee906711
frameworks/base: capping live wallpapper fps

CRs-Fixed: 343813
(cherry picked from commit a3343a04940bcd31d1a9992336ab178777fd0ff9)

Change-Id: I46b805f8cf74995a744eb6c9e0cd0d593d3af3b9
Revert "frameworks/base: Fix to prevent ANR during seek and pause".

This reverts commit fa4c4bba7e1ea7697897ce23082d00bf6fe534db.
bring HTCQualcommRIL inline with Intervigilium