Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e5ace70 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Android Git Automerger
Browse files

am 4bc873e6: am 7944704e: Merge "Switch camera sounds to always use the system...

am 4bc873e6: am 7944704e: Merge "Switch camera sounds to always use the system enforced audio stream." into ics-mr1

* commit '4bc873e6ff73200af866f8c9efca66ad8ed23682':
  Switch camera sounds to always use the system enforced audio stream.
parents 5ff1dd57 afb3f7fd
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -97,16 +97,6 @@ void CameraService::onFirstRef()
            setCameraFree(i);
        }
    }

    // Read the system property to determine if we have to use the
    // AUDIO_STREAM_ENFORCED_AUDIBLE type.
    char value[PROPERTY_VALUE_MAX];
    property_get("ro.camera.sound.forced", value, "0");
    if (strcmp(value, "0") != 0) {
        mAudioStreamType = AUDIO_STREAM_ENFORCED_AUDIBLE;
    } else {
        mAudioStreamType = AUDIO_STREAM_MUSIC;
    }
}

CameraService::~CameraService() {
@@ -295,7 +285,7 @@ void CameraService::setCameraFree(int cameraId) {
MediaPlayer* CameraService::newMediaPlayer(const char *file) {
    MediaPlayer* mp = new MediaPlayer();
    if (mp->setDataSource(file, NULL) == NO_ERROR) {
        mp->setAudioStreamType(mAudioStreamType);
        mp->setAudioStreamType(AUDIO_STREAM_ENFORCED_AUDIBLE);
        mp->prepare();
    } else {
        LOGE("Failed to load CameraService sounds: %s", file);
+0 −1
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@ private:
    void                setCameraFree(int cameraId);

    // sounds
    audio_stream_type_t mAudioStreamType;
    MediaPlayer*        newMediaPlayer(const char *file);

    Mutex               mSoundLock;