[Miscellaneous Android Development] G-GFFD:
Sound recording doesn't work in all Apps except the Telephon App.

Here is a logcat of the App "Soundrecorder": Highlighted in red where it fails:

06-18 00:01:01.804 I/Timeline(13500): Timeline: Activity_launch_request id:com.android.soundrecorder time:2376500
06-18 00:01:01.810 I/ActivityManager(645): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.soundrecorder/.SoundRecorder (has extras)} from uid 10019 on display 0
06-18 00:01:01.846 V/WindowManager(645): addAppToken: AppWindowToken{2a8101f5 token=Token{1e36532c ActivityRecord{90bdadf u0 com.android.soundrecorder/.SoundRecorder t364}}} to stack=1 task=364 at 0

06-18 00:01:01.913 V/WindowManager(645): Adding window Window{27397a2e u0 Starting com.android.soundrecorder} at 4 of 8 (after Window{2a2fd6e9 u0 com.nolanlawson.logcat/com.nolanlawson.logcat.LogcatActivity})
06-18 00:01:02.061 I/ActivityManager(645): Start proc 17124:com.android.soundrecorder/u0a60 for activity com.android.soundrecorder/.SoundRecorder
06-18 00:01:02.258 E/cutils-trace(17150): Error opening trace file: No such file or directory (2)
06-18 00:01:02.259 I/dex2oat (17150): /system/bin/dex2oat --zip-fd=6 --zip-location=/system/app/SoundRecorder/SoundRecorder.apk --oat-fd=7 --oat-location=/data/dalvik-cache/arm/system@app@SoundRecorder@SoundRecorder.apk@classes.dex --instruction-set=arm --instruction-set-features=div --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=interpret-only --swap-fd=11
06-18 00:01:02.285 I/dex2oat (17150): Decided to run without swap.
06-18 00:01:02.337 I/dex2oat (17150): dex2oat took 76.823ms (threads: 8) arena alloc=0B java alloc=68KB native alloc=242KB free=7MB
06-18 00:01:02.877 D/SoundRecorder(17124): Surround sound recording is not supported
06-18 00:01:02.900 D/OpenGLRenderer(17124): Use EGL_SWAP_BEHAVIOR_PRESERVED: true
06-18 00:01:02.905 D/Atlas (17124): Validating map...
06-18 00:01:02.910 V/WindowManager(645): Adding window Window{5d6691d u0 com.android.soundrecorder/com.android.soundrecorder.SoundRecorder} at 4 of 9 (before Window{27397a2e u0 Starting com.android.soundrecorder})
06-18 00:01:03.322 I/OpenGLRenderer(17124): Initialized EGL, version 1.4
06-18 00:01:03.323 E/ (17124): appName=com.android.soundrecorder, acAppName=/system/bin/surfaceflinger
06-18 00:01:03.323 E/ (17124): 0
06-18 00:01:03.324 D/OpenGLRenderer(17124): Enabling debug mode 0
06-18 00:01:03.325 I/[MALI][Gralloc](17124): dlopen libsec_mem.so fail
06-18 00:01:03.333 I/MaliEGL (17124): [Mali]window_type=1, is_framebuffer=0, errnum = 0
06-18 00:01:03.333 I/MaliEGL (17124): [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
06-18 00:01:03.333 I/MaliEGL (17124): [Mali]max_allowed_dequeued_buffers=3
06-18 00:01:03.488 I/ActivityManager(645): Displayed com.android.soundrecorder/.SoundRecorder: +1s531ms
06-18 00:01:03.489 I/Timeline(645): Timeline: Activity_windows_visible id: ActivityRecord{90bdadf u0 com.android.soundrecorder/.SoundRecorder t364} time:2378185
06-18 00:01:03.531 I/Timeline(17124): Timeline: Activity_idle id: android.os.BinderProxy@2ac87db4 time:2378227

06-18 00:01:05.241 I/MediaFocusControl(645): AudioFocus requestAudioFocus() from android.media.AudioManager@6d9cf4ccom.android.soundrecorder.SoundRecorder$4@28ae9b95 req=1flags=0x0
06-18 00:01:05.285 E/Recorder(17124): audiosourcetype 1
06-18 00:01:05.288 D/AudioMTKStreamManager(5553): AudioMTKHardware getInputBufferSize, sampleRate=8000, format=1, channelCount=1
06-18 00:01:05.288 D/AudioMTKStreamManager(5553): getInputBufferSize bufferSize=320
06-18 00:01:05.288 D/AudioMTKHardware(5553): openInputStream, devices = 0x80000004 format=0x1 ,channels=0x10, rate=8000 acoustics = 0x0
06-18 00:01:05.288 D/AudioMTKStreamManager(5553): openInputStream, devices = 0x80000004 format=0x1 ,channels=0x10, rate=8000 acoustics = 0x0
06-18 00:01:05.292 D/AudioStreamAttribute(5553): AudioStreamAttribute constructor
06-18 00:01:05.293 D/AudioMTKStreamIn(5553): AudioMTKStreamIn contructor
06-18 00:01:05.295 V/AudioMTKStreamInManager(5553): getInstance()
06-18 00:01:05.295 D/AudioSpeechEnhanceInfo(5553): AudioSpeechEnhanceInfo getInstance()
06-18 00:01:05.295 D/AudioMTKStreamIn(5553): SetStreamInPreprocessStatus enable = 1, 0x0
06-18 00:01:05.295 D/AudioSpeechEnhanceInfo(5553): IsHDRecTunningEnable=0
06-18 00:01:05.295 D/AudioSpeechEnhanceInfo(5553): GetHDRecVMFileName mVMFileName=, VMFileName=
06-18 00:01:05.296 D/AudioYusuParam(5553): QueryFeatureSupportInfo(),feature support 8015
06-18 00:01:05.296 D/AudioSpeechEnhanceInfo(5553): GetForceMagiASRState(), feature_support=8015, 0, mForceMagiASR=0
06-18 00:01:05.296 D/AudioSpeechEnhanceInfo(5553): GetForceAECRecState(), mForceAECRec=0
06-18 00:01:05.296 D/AudioMTKStreamIn(5553): AudioMTKStreamIn set devices = 0x80000004 format = 0x1 channele = 0x10 samplerate = 8000, mIsHDRecTunningEnable=0,mIsAPDMNRTuningEnable=0
06-18 00:01:05.296 D/AudioMTKStreamManager(5553): openInputStream delete streamin
06-18 00:01:05.296 D/AudioMTKStreamIn(5553): AudioMTKStreamIn destructor
06-18 00:01:05.296 D/AudioMTKStreamIn(5553): audioMTKStreamIn::standby()
06-18 00:01:05.296 E/ (5553): AudioCloseDumpPCMFile file== NULL
06-18 00:01:05.296 D/AudioMTKStreamIn(5553): audioMTKStreamIn::standby()---
06-18 00:01:05.296 D/AudioStreamAttribute(5553): AudioStreamAttribute destructor
[COLOR="Red"]06-18 00:01:05.297 W/AudioPolicyManager(5553): getInputForAttr() failed opening input: samplingRate 8000, format 1, channelMask 10[/COLOR]
[COLOR="Red"]06-18 00:01:05.297 E/AudioRecord(5553): Could not get audio input for record source 1, sample rate 8000, format 0x1, channel mask 0x10, session 43, flags 0[/COLOR]
06-18 00:01:05.298 I/AudioSource(5553): AudioSource in TRANSFER_CALLBACK
06-18 00:01:05.298 D/AudioSource(5553): Start autoramp from 500000
06-18 00:01:05.298 E/StagefrightRecorder(5553): audio source is not initialized
06-18 00:01:05.298 E/MediaRecorder(17124): start failed: -2147483648
06-18 00:01:05.401 V/WindowManager(645): not Base app: Adding window Window{398ecade u0 com.android.soundrecorder/com.android.soundrecorder.SoundRecorder} at 5 of 9

06-18 00:01:08.023 I/MediaFocusControl(645): AudioFocus abandonAudioFocus() from android.media.AudioManager@6d9cf4ccom.android.soundrecorder.SoundRecorder$4@28ae9b95

06-18 00:01:09.054 W/ResourceType(1502): No package identifier when getting value for resource number 0x00000000
06-18 00:01:09.055 W/PackageManager(1502): Failure retrieving resources for com.android.soundrecorder: Resource ID #0x0
06-18 00:01:10.135 I/ActivityManager(645): START u0 {act=com.android.systemui.recents.SHOW_RECENTS flg=0x10804000 cmp=com.android.systemui/.recents.RecentsActivity} from uid 10016 on display 0

Dominic