Change manifest file to show SoundRecorder app in UI

-AndroidManifest file is changed to show sound recorder app
in UI.

Change-Id: Ic6e88949e2ea076f422f3f670abbc204faa34980
(cherry picked from commit 046de37c337346f0c37fd1b28f06d0560597d6ce)
(cherry picked from commit 4a55550977b6ec218290f2122fdbc6828391c4ea)
(cherry picked from commit f7e6125ee4c2935d3866ba417357cb79d08364e8)
audio: initial bring up for SoundRecorder

- Add QCOM recording features including: EVRC/QCELP/
  AAC/AMRNB/voice call recording
- Port bug fixes in SoundRecorder app
- Issues fixed 530931,517007,536091

Change-Id: I67cab9253561e2ce2106fc9fba5b3a781bc70594
(cherry picked from commit efd94a245687b0f45d1e51c8f64bedc6e52b8a43)
(cherry picked from commit bcc7a8a22763b5023fbea4318cf48edf863a4be0)
(cherry picked from commit ec345aeb7837274a79975ab703614b81347ff2ad)
audio: add missing 'break' in switch of format selection

- In the switch loop for selecting encoding format
  'break' was missing so the last format was getting selected
- Add 'break' in each switch case so that correct format gets
  selected

Change-Id: Iff30b266c4bf01b390d283efd23067b8f4223344
(cherry picked from commit eba8997c86c39e07a418eeab8d8d668e39e42001)
(cherry picked from commit 48017ad747f3c793bb124cc286b0059dd7e86da7)
(cherry picked from commit 3f37e2580f616b919df94f22640aa7bed1ff6523)
audio: Exception handling in Sound Recorder Stop

 - When sound recorder is stopped before fully
   starting the recorder the stop used to fail
 - This used to throw uncaught exception.
 - Handled the exception using try catch to avaoid
   exception crash and will show internal error
   message

Change-Id: Ia7a259367380605c2a4ad0b9ee6eb18ad8101cff
CRs-Fixed: 507140
(cherry picked from commit 69a54727dd39f7b05764edb7328ef3a478fcef41)
(cherry picked from commit b035be4c86d0b791cdb6baf8422436dfec14d429)
(cherry picked from commit 4de7d8fc02aa00f5c329229021528c863987114f)
audio/SoundRecorder: Fix to update the channel count

 - For SSR recording ,the channel count is updated to 6.
   But ,after recording the channel count is not reset
   to the default value.So,if AMR recording is started
   after SSR recording it fails because of invalid channel
   count .
 - Resetting the channel count to default value after
   recording is stopped.

   CRs-Fixed: 572421

Change-Id: I5bdfab142d776ee84923b58158404417c550e418
SoundRecorder: Fix music sound and recorded play at the same time.

- When playback the recording, it doesn't stop the playback service.
- add the code to stop the playback service.

Change-Id: I5e0ac51e492be1844ad985147ab4bd3d3b9957c0
CRs-Fixed: 522373
SounderRecorder: Change default storage location to "SoundRecoder".

Change-Id: Ic3c4feeacd9a0dc0078853eda537c1ade2e58590
SoundRecorder: Fix can't search recording files.

The Recorder file set is_music to be 0 in database.
Change the Recorder file is_music to be 1.

Change-Id: I68a2868d62b63e11990bab5ad11e3d00664c5dbf
CRs-Fixed: 535419
SoundRecorder: Avoid exiting app when touching keyboard in landscape.

The record button will request focus when the configuration is
changed. Set the record button focusable property to false and
do not request focus in IDLE_STATE.

CRs-Fixed: 526736
Change-Id: Id79db08e3da2eb6fc137aa2c87d640c8989289f2
SoundRecorder: Stop recording when receiving power off broadcast.

The SoundRecorder doesn't register receiver to deal with power off
broadcast. Add it to stop recording.

CRs-Fixed: 531576
Change-Id: I76b3461a182c5813bddc73fdec9c101d8b46f3d6
SoundRecorder: Update path and extension name before recording.

When the sound recorder does not save and exit, the last sample file
still exists. And the directory and the extension name of the last
sample file is not updated. So the recorder still use the directory
and the extension name of the last sample to create another record.
Before starting another recording task, if the last sample file is not
saved, delete it. Update the storage path and the file extension name
before starting to record another sample.

CRs-Fixed: 534026
Change-Id: I9c4da217b470dfe2ada2b2cc40554dc6ab35087b
SoundRecorder: Multiple SoundRecorder app fixes

- Support AMR/3GPP/WAV format.
- Support custom storage location of recordings.
- Avoid available time displaying disorder when recording audio in
the MMS edit interface.
- Set AMR/3gpp record channels.
- Modify the value of BITRATE_AMR and format the time.
- Add a prompt toast if the SoundRecord file does't exist.
- Add a in call message error prompt.
- Avoid prompting "file has been saved" if the file has been
deleted in phone storage.
- Avoid prompting "Message size limit reached".
- Set the menu items unavailable if the file has been saved.
- Unify a rule of recorded file's name.
- Save previous settings of storage path and format.
- Use "debug.soundrecorder.enable" system property to decide
whether to show the menu item keyboard.

Change-Id: I7bee35c2168faf9695a8971b3523da3bc28a861d
CRs-Fixed: 507978 507979 522222 526751 532105 533255 534516
           533255 540495 551417 532072 557347 548351
SoundRecorder: Fix deleting unsupport wav format when recording in MMS.

In MMS, it doesn't support wav format recoders.
Delete wav format when recording in MMS.

Change-Id: If21360b502f3bbae4b54cb2f4a6b2b822c398b11
CRs-Fixed: 563997
SoundRecorder: Fix it prompts "Xxxx.amr file has been saved"

The onPrepareOptionsMenu() won't be called when tapping the menu
key first time. Add invalidateOptionsMenu() to make it recreated.

Change-Id: Id081bcbd70fc7cd670f411ae23d075a71bfe44c1
CRs-Fixed: 551417
SoundRecorder: Fix the recording file will be saved when powering off

When powering off the DUT, the file has been saved.
Delete the file at the case.

Change-Id: I438d57cd677aa5591293d5466018b82b6baf76be
CRs-Fixed: 564083
SoundRecorder: Fix it can't name sound record file by time

Define the record name format by time.

Change-Id: I57fb51e62bb68e55595a7187b2d66ef3bebc3414
CRs-Fixed: 574979
SoundRecorder: Fix the menu items not gray while recording

On Android 3.0 and higher, the option menu is considered to
be opened when menu item is presented in the action bar.
Call invalidateOptionsMenu to request that the system call
onPrepareOptionsMenu to update a menu.

CRs-Fixed: 532069
Change-Id: Iaa66758a518d42f923b3c99d3b7b564cc3d6031e
SoundRecorder: Add discard and save record file prompts

- Add a prompt if record has done.
- Add a prompt if record is discarded.

Change-Id: I1ff76bdca358ace1a5340929ddf8f8fb53e26936
SoundRecorder: Enable SSR based on system prop

- Enable surround sound recording feature only
  when SSR system prop(ro.qc.sdk.audio.ssr) is
  set to true.
- Check system prop directly instead of checking
  SSR audio parameter.

Change-Id: I5e526f8a465d47fe67219c3501f95feb91b3867a
Crs-Fixed: 589342
SoundRecorder: Fix user can't save record after mounting SD card

Before user press accept button, media scanner has already inserted
the record of this record file into the database and the _data column
is not unique. If so, do not insert it into the database.

Change-Id: I2f30f109b0f39176864a4099ced72d6e01fb1f61
CRs-Fixed: 546223