来闹钟会调用onPause()停止录音,不停止该如何处理?谢谢~(还附加了调用关系) protected void onPause() {
// Stop listening for phone state changes.
TelephonyManager telephonyManager = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
telephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
if(Recorder.PLAYING_STATE != mRecorder.state())
{
mSampleInterrupted = mRecorder.state() == Recorder.RECORDING_STATE;
mRecorder.stop();
}
super.onPause();
}SoundRecorder.onPause() line: 711
SoundRecorder(Activity).performPause() line: 3842
Instrumentation.callActivityOnPause(Activity) line: 1190
ActivityThread.performPauseActivity(ActivityThread$ActivityRecord, boolean, boolean) line: 3335
ActivityThread.performPauseActivity(IBinder, boolean, boolean) line: 3305
ActivityThread.handlePauseActivity(IBinder, boolean, boolean, int) line: 3288
ActivityThread.access$2500(ActivityThread, IBinder, boolean, boolean, int) line: 125
ActivityThread$H.handleMessage(Message) line: 2040
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 4627
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521
ZygoteInit$MethodAndArgsCaller.run() line: 878
ZygoteInit.main(String[]) line: 636
NativeStart.main(String[]) line: not available [native method]
// Stop listening for phone state changes.
TelephonyManager telephonyManager = (TelephonyManager) getSystemService(TELEPHONY_SERVICE);
telephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
if(Recorder.PLAYING_STATE != mRecorder.state())
{
mSampleInterrupted = mRecorder.state() == Recorder.RECORDING_STATE;
mRecorder.stop();
}
super.onPause();
}SoundRecorder.onPause() line: 711
SoundRecorder(Activity).performPause() line: 3842
Instrumentation.callActivityOnPause(Activity) line: 1190
ActivityThread.performPauseActivity(ActivityThread$ActivityRecord, boolean, boolean) line: 3335
ActivityThread.performPauseActivity(IBinder, boolean, boolean) line: 3305
ActivityThread.handlePauseActivity(IBinder, boolean, boolean, int) line: 3288
ActivityThread.access$2500(ActivityThread, IBinder, boolean, boolean, int) line: 125
ActivityThread$H.handleMessage(Message) line: 2040
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 123
ActivityThread.main(String[]) line: 4627
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 521
ZygoteInit$MethodAndArgsCaller.run() line: 878
ZygoteInit.main(String[]) line: 636
NativeStart.main(String[]) line: not available [native method]
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货