Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(786)

Unified Diff: media/audio/android/audio_manager_android.h

Issue 12571006: Add MODIFY_AUDIO_SETTINGS permission in Android manifest and implementation in audio manager. (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: rebase Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/audio/android/audio_manager_android.h
===================================================================
--- media/audio/android/audio_manager_android.h (revision 187380)
+++ media/audio/android/audio_manager_android.h (working copy)
@@ -5,6 +5,7 @@
#ifndef MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_
#define MEDIA_AUDIO_ANDROID_AUDIO_MANAGER_ANDROID_H_
+#include "base/android/jni_android.h"
#include "media/audio/audio_manager_base.h"
namespace media {
@@ -12,6 +13,11 @@
// Android implemention of AudioManager.
class MEDIA_EXPORT AudioManagerAndroid : public AudioManagerBase {
public:
+ static const int kAudioModeNormal = 0x00000000;
+ static const int kAudioModeRingtone = 0x00000001;
qinmin 2013/03/11 23:09:56 be specific, i don't think it is proper for chrome
leozwang1 2013/03/12 22:23:00 Done.
+ static const int kAudioModeInCall = 0x00000002;
+ static const int kAudioModeInCommunication = 0x00000003;
+
AudioManagerAndroid();
// Implementation of AudioManager.
@@ -32,11 +38,14 @@
virtual AudioInputStream* MakeLowLatencyInputStream(
const AudioParameters& params, const std::string& device_id) OVERRIDE;
+ static bool RegisterAudioManager(JNIEnv* env);
+
protected:
virtual ~AudioManagerAndroid();
virtual AudioParameters GetPreferredOutputStreamParameters(
const AudioParameters& input_params) OVERRIDE;
+ void SetAudioMode(int mode);
private:
DISALLOW_COPY_AND_ASSIGN(AudioManagerAndroid);

Powered by Google App Engine
This is Rietveld 408576698