Merge commit '2867746d7b59579ecf7b2de41e42fc1ca88d04d9' into eclair-release
This commit is contained in:
@@ -42,7 +42,8 @@ enum audio_source {
|
||||
AUDIO_SOURCE_VOICE_DOWNLINK = 3,
|
||||
AUDIO_SOURCE_VOICE_CALL = 4,
|
||||
AUDIO_SOURCE_CAMCORDER = 5,
|
||||
AUDIO_SOURCE_MAX = AUDIO_SOURCE_CAMCORDER,
|
||||
AUDIO_SOURCE_VOICE_RECOGNITION = 6,
|
||||
AUDIO_SOURCE_MAX = AUDIO_SOURCE_VOICE_RECOGNITION,
|
||||
|
||||
AUDIO_SOURCE_LIST_END // must be last - used to validate audio source type
|
||||
};
|
||||
|
||||
@@ -422,31 +422,13 @@ void IPCThreadState::joinThreadPool(bool isMain)
|
||||
<< getReturnString(cmd) << endl;
|
||||
}
|
||||
|
||||
bool isTainted = false;
|
||||
|
||||
{
|
||||
SchedPolicy policy;
|
||||
get_sched_policy(getpid(), &policy);
|
||||
|
||||
if (policy == SP_BACKGROUND) {
|
||||
isTainted = true;
|
||||
}
|
||||
}
|
||||
|
||||
result = executeCommand(cmd);
|
||||
|
||||
// Make sure that after executing the commands that we put the thread back into the
|
||||
// default cgroup.
|
||||
{
|
||||
int pid = getpid();
|
||||
SchedPolicy policy;
|
||||
get_sched_policy(pid, &policy);
|
||||
|
||||
if (!isTainted && policy == SP_BACKGROUND) {
|
||||
LOGW("*** THREAD %p (PID %p) was left in SP_BACKGROUND with a priority of %d\n",
|
||||
(void*)pthread_self(), pid, getpriority(PRIO_PROCESS, pid));
|
||||
}
|
||||
}
|
||||
// Make sure that after executing the command that we put the thread back into the
|
||||
// default cgroup. This is just a failsafe incase the thread's priority or cgroup was
|
||||
// not properly restored.
|
||||
set_sched_policy(getpid(), SP_FOREGROUND);
|
||||
}
|
||||
|
||||
// Let this thread exit the thread pool if it is no longer
|
||||
|
||||
@@ -135,6 +135,12 @@ public class MediaRecorder
|
||||
|
||||
/** Voice call uplink + downlink audio source */
|
||||
public static final int VOICE_CALL = 4;
|
||||
|
||||
/** @hide Microphone audio source with same orientation as camera */
|
||||
public static final int CAMCORDER = 5;
|
||||
|
||||
/** @hide Microphone audio source tuned for voice recognition */
|
||||
public static final int VOICE_RECOGNITION = 6;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -274,7 +280,7 @@ public class MediaRecorder
|
||||
* Gets the maximum value for audio sources.
|
||||
* @see android.media.MediaRecorder.AudioSource
|
||||
*/
|
||||
public static final int getAudioSourceMax() { return AudioSource.VOICE_CALL; }
|
||||
public static final int getAudioSourceMax() { return AudioSource.VOICE_RECOGNITION; }
|
||||
|
||||
/**
|
||||
* Sets the video source to be used for recording. If this method is not
|
||||
|
||||
Reference in New Issue
Block a user