Automatic translation import

Change-Id: Ida0b902fa3aa11959399508d6cef5c73ddb235e5
Revert "Revert regressions introduced by QRD update."

This reverts commit fda9f47d13c14e94f68d1a89fea0272721dce821.

Reverted for easier upstream merging.

Conflicts:
	res/values-zh-rCN/strings.xml

Change-Id: I4c54b3489207d107cd877b2a0d20ee0381d1f031
SoundRecorder: Fix timestamp mismatches in recorder and music app

Recorded file in record app is named after the timestamp when user
starts recordings, but the timestamp string to be inserted into media
database depends on the time when user save record.

Need to keep the consistency of timestamp to avoid mismatches.

Change-Id: I9b8673c7ed69d6baf40155ccebaa05a9ecda2cb1
CRs-Fixed: 619158
SoundRecorder: don't exit app when user accepts recorded clip

It's not user friendly to quit the app directly when user either accepts
or discards current recorded clips. Enhance this app to allow user continue
operating on this app.

CRs-Fixed: 628730
Change-Id: I6d896cac8d58ecff964272ef0dcad123972815ad
audio: update mAudioSourceType during incall.

-When user doesnt select any options to record during
 voice call, only Tx(Voice call uplink) will be recorded.
 Because AudioRecord is starting with source as
 AudioSource.VOICE_UPLINK. But mAudioSourceType is not
 updated properly. Once the call is disconnected, recording
 is not getting stopped because mAudioSourceType is not
 updated to AudioSource.VOICE_UPLINK during voice call.

-Fix is to update the mAudioSourceType properly.

Change-Id: Idcd0602aa16567e45488b149660c7717abe1609c
CRs-fixed: 614859
SoundRecorder: audio source changes to UPLINK during incall state

During incall state, audio source should change from MIC to voice uplink
with except of multi-channel recording.

Change-Id: If08cb3db41cedd46a3beb6db9961c7dd1305e95f
SoundRecorder: Reset record state if length is less then 1s

Reset state if recorded clip is less than 1s to allow user adjusts
settings and exit app.

Change-Id: I8c35b9528b697488af7617f3cba29854b72b70ac
CRs-Fixed: 640325
SoundRecorder: set proper message and icon res in idle state

Prompt text and state icon can only refresh in updateUi() function, prohibit
changing them in onClick(). Set proper prompt message and icon display when
recording is in idle state.

Change-Id: I425f0617824897440797d8ff6ad9a8ad80450317
CRs-Fixed: 641449
SoundRecorder: Avoid error when record start and stop comes too closely.

If record start and stop come too closely, internal exception error
will be threw. Add necessary delay before back key is pressed in
recording state to avoid recording internal error.

CRs-Fixed: 642195
Change-Id: Ia24c4a45ce4cfdab05d269ec118dcf48f74beecc
MMS: Exit app after recording, if from MMS.

When add record audio in MMS, it can not back to MMS
automatically after recording.
Add a flag mExitAfterRecord, if from MMS, the value is true,
exit app and back to MMS after recording, if not from MMS,
the value is false, do not exit app after recording.

Change-Id: Id554bfd2a3f7128edd4f8825cfe1a1277831311d
CRs-Fixed: 638039
SoundRecorder: Fix back key no response in pause state

In the function onKeyDown(),there is no operation to
handle back key event of pause state

Add a case to handle the pause state when click back
key.

CRs-fixed: 643473

Change-Id: Ifc031917735ce6ea8283977428547835ab2bf31e
audio: Reset mAudioSourceType once call disconnects

-After ending the call while in recording, handset mic gets
selected for subsequent recording sessions though headset is
inserted, unless application is exited.
-mAudioSourceType remains to be VOICE_UPLINK in sound recorder
app when voice call is disconnected.
-Reset mAudioSourceType once call disconnects.

Change-Id: Ida4bebad3960bead7a1376c381927671553e3dfc
CRs-Fixed: 636368
SoundRecorder: Make pointer back to initial position.

When click the done button or discard button,the mVUMeter
is not reset to original space which make this bug happen

Add sentence to make mVUMeter reset to original space
when click done or discard button.

CRs-fixed: 646258

Change-Id: Ic00ea5618887924883889039e95449e51ae217d5
SoundRecorder: Fix getSDPath() returns unexpected volume.

getSDPath() fails to return expected SD card path since UICC storage is
added and owns the some mount attributions as SD card volume. Add extra
judgement to ensure SD card path is returned.

Change-Id: I5bcf008976dc698df008db247bfbf26c4580075f
CRs-Fixed: 646483
SoundRecorder: Fix menu item not display gray.

When we press home key,we only stop the Recorder,but
not reset it state.

When we stop Recorder,reset recorder stop state.

CRs-fixed: 652861

Change-Id: Id1c25a01227322e507187f58cb754c0e1d68bb72
SoundRecorder: add a focus listener to change record state

Recording won't stop when pressing hook key to play music. If music
start to play, SoundRecorder will lose audio focus, add the listener
to change record state.

Change-Id: Icc3422dd1c35bcf7914f1d4ad4250aad5b10c703
CRs-Fixed: 668528
SoundRecorder: reset VU Meter upon pause

Change-Id: I13492a2685119b0622253b7c4837219d7ee549a2
CRs-Fixed: 671783
Re-apply 'Revert regressions introduced by QRD update'

- Remove totally pointless confirmation dialogs on app exit
- Remove 'Press record' texts - should be obvious that one needs to
  press record to record, and the text displayed if the device supports
  surround recording was plain confusing.

Change-Id: I482ffb74b84f571a0f0d779150083e7f375f3493
SoundRecorder: only look for source files in src

gen/ sub directory generated by IntelliJ doesn't play nice unless we
only compile from src.

Change-Id: I32be9b7f2e330610dde3e2658f547572e30ee0e6
Signed-off-by: Roman Birg <roman@cyngn.com>
Automatic translation import

Change-Id: I911a061c135bb9efda906b199d90baa944d149ff