diff options
author | Geoffrey Pitsch <gpitsch@google.com> | 2016-08-09 17:31:06 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-08-09 17:31:06 +0000 |
commit | d6536e4d22b910864431c2f4999230b15df9620d (patch) | |
tree | 35bee2c1326762006324e15963e83ae91511f5eb /cmds/bootanimation/BootAnimation.cpp | |
parent | a88fdbb46b640cfb37c002bf58ef135c19725295 (diff) | |
parent | 5e8bb86e8cca04a810806d650f544908726b6c50 (diff) |
BootAnimation system property to play sound. am: 305087991d am: 8e4b8a988f
am: 5e8bb86e8c
Change-Id: Ibcf73b3245b63492c1feaa1494271c181c86c59e
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
-rw-r--r-- | cmds/bootanimation/BootAnimation.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 3087098bb0cc..54c3d1a8d563 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -75,6 +75,7 @@ static const char ACCURATE_TIME_FLAG_FILE_PATH[] = "/data/system/time/time_is_ac // Java timestamp format. Don't show the clock if the date is before 2000-01-01 00:00:00. static const long long ACCURATE_TIME_EPOCH = 946684800000; static const char EXIT_PROP_NAME[] = "service.bootanim.exit"; +static const char PLAY_SOUND_PROP_NAME[] = "persist.sys.bootanim.play_sound"; static const int ANIM_ENTRY_NAME_MAX = 256; // --------------------------------------------------------------------------- @@ -776,8 +777,12 @@ bool BootAnimation::playAnimation(const Animation& animation) // only play audio file the first time we animate the part if (r == 0 && part.audioData) { - ALOGD("playing clip for part%d, size=%d", (int) i, part.audioLength); - audioplay::playClip(part.audioData, part.audioLength); + // Read the system property to see if we should play the sound. + // If not present, default to playing it. + if (property_get_bool(PLAY_SOUND_PROP_NAME, 1)) { + ALOGD("playing clip for part%d, size=%d", (int) i, part.audioLength); + audioplay::playClip(part.audioData, part.audioLength); + } } glClearColor( |