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

Commit d06ba1aa authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "AudioService Spatializer: disable by default" into sc-v2-dev am: a809ca14 am: 2cd88e83

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15827803

Change-Id: I53929bf3d8f6475e220558e0acc090143f490ead
parents 9931f5a6 2cd88e83
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1433,7 +1433,7 @@ public class AudioService extends IAudioService.Stub
        }

        // TODO check property if feature enabled
        mSpatializerHelper.reset(/* featureEnabled */ true);
        mSpatializerHelper.reset(/* featureEnabled */ SPATIALIZER_FEATURE_ENABLED_DEFAULT);

        onIndicateSystemReady();
        // indicate the end of reconfiguration phase to audio HAL
@@ -7579,7 +7579,7 @@ public class AudioService extends IAudioService.Stub
                case MSG_INIT_SPATIALIZER:
                    mSpatializerHelper.init();
                    // TODO read property to see if enabled
                    mSpatializerHelper.setFeatureEnabled(true);
                    mSpatializerHelper.setFeatureEnabled(SPATIALIZER_FEATURE_ENABLED_DEFAULT);
                    mAudioEventWakeLock.release();
                    break;

@@ -8288,6 +8288,7 @@ public class AudioService extends IAudioService.Stub

    //==========================================================================================
    private final @NonNull SpatializerHelper mSpatializerHelper;
    private static final boolean SPATIALIZER_FEATURE_ENABLED_DEFAULT = false;

    private void enforceModifyDefaultAudioEffectsPermission() {
        if (mContext.checkCallingOrSelfPermission(
+9 −1
Original line number Diff line number Diff line
@@ -124,7 +124,15 @@ public class SpatializerHelper {
                    break;
                }
            }
        } catch (RemoteException e) {
            /* capable level remains at NONE*/
        } finally {
            if (spat != null) {
                try {
                    spat.release();
                } catch (RemoteException e) { /* capable level remains at NONE*/ }
            }
        }
        if (mCapableSpatLevel == Spatializer.SPATIALIZER_IMMERSIVE_LEVEL_NONE) {
            mState = STATE_NOT_SUPPORTED;
            return;