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

Commit b4f01b96 authored by John Spurlock's avatar John Spurlock
Browse files

Remove the ability to disable audio service.

Running in a configuration without audio service is not fully tested.
Remove the configuration option for now. Also remove unused delegation
layer in SoundPool.

Bug: 19891112
Change-Id: I47be0e32d54b8ef8fa25cf47b85eacf8a4969500
parent 1cef4196
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -118,7 +118,6 @@ public final class ViewRootImpl implements ViewParent,
     * at 60 Hz. This can be used to measure the potential framerate.
     */
    private static final String PROPERTY_PROFILE_RENDERING = "viewroot.profile_rendering";
    private static final String PROPERTY_MEDIA_DISABLED = "config.disable_media";

    // properties used by emulator to determine display shape
    public static final String PROPERTY_EMULATOR_CIRCULAR = "ro.emulator.circular";
@@ -301,8 +300,6 @@ public final class ViewRootImpl implements ViewParent,
    private Choreographer.FrameCallback mRenderProfiler;
    private boolean mRenderProfilingEnabled;

    private boolean mMediaDisabled;

    // Variables to track frames per second, enabled via DEBUG_FPS flag
    private long mFpsStartTime = -1;
    private long mFpsPrevTime = -1;
@@ -5360,10 +5357,6 @@ public final class ViewRootImpl implements ViewParent,
    public void playSoundEffect(int effectId) {
        checkThread();

        if (mMediaDisabled) {
            return;
        }

        try {
            final AudioManager audioManager = getAudioManager();

@@ -5570,9 +5563,6 @@ public final class ViewRootImpl implements ViewParent,
                mProfileRendering = SystemProperties.getBoolean(PROPERTY_PROFILE_RENDERING, false);
                profileRendering(mAttachInfo.mHasWindowFocus);

                // Media (used by sound effects)
                mMediaDisabled = SystemProperties.getBoolean(PROPERTY_MEDIA_DISABLED, false);

                // Hardware rendering
                if (mAttachInfo.mHardwareRenderer != null) {
                    if (mAttachInfo.mHardwareRenderer.loadSystemProperties()) {