Merge "AudioService Spatializer: disable by default" into sc-v2-dev am: a809ca140a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15827803 Change-Id: I63e86977905e6f492a4918fa5f17a664d6e36ade
This commit is contained in:
@@ -1431,7 +1431,7 @@ public class AudioService extends IAudioService.Stub
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO check property if feature enabled
|
// TODO check property if feature enabled
|
||||||
mSpatializerHelper.reset(/* featureEnabled */ true);
|
mSpatializerHelper.reset(/* featureEnabled */ SPATIALIZER_FEATURE_ENABLED_DEFAULT);
|
||||||
|
|
||||||
onIndicateSystemReady();
|
onIndicateSystemReady();
|
||||||
// indicate the end of reconfiguration phase to audio HAL
|
// indicate the end of reconfiguration phase to audio HAL
|
||||||
@@ -7601,7 +7601,7 @@ public class AudioService extends IAudioService.Stub
|
|||||||
case MSG_INIT_SPATIALIZER:
|
case MSG_INIT_SPATIALIZER:
|
||||||
mSpatializerHelper.init();
|
mSpatializerHelper.init();
|
||||||
// TODO read property to see if enabled
|
// TODO read property to see if enabled
|
||||||
mSpatializerHelper.setFeatureEnabled(true);
|
mSpatializerHelper.setFeatureEnabled(SPATIALIZER_FEATURE_ENABLED_DEFAULT);
|
||||||
mAudioEventWakeLock.release();
|
mAudioEventWakeLock.release();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -8310,6 +8310,7 @@ public class AudioService extends IAudioService.Stub
|
|||||||
|
|
||||||
//==========================================================================================
|
//==========================================================================================
|
||||||
private final @NonNull SpatializerHelper mSpatializerHelper;
|
private final @NonNull SpatializerHelper mSpatializerHelper;
|
||||||
|
private static final boolean SPATIALIZER_FEATURE_ENABLED_DEFAULT = false;
|
||||||
|
|
||||||
private void enforceModifyDefaultAudioEffectsPermission() {
|
private void enforceModifyDefaultAudioEffectsPermission() {
|
||||||
if (mContext.checkCallingOrSelfPermission(
|
if (mContext.checkCallingOrSelfPermission(
|
||||||
|
|||||||
@@ -124,7 +124,15 @@ public class SpatializerHelper {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
/* capable level remains at NONE*/
|
||||||
|
} finally {
|
||||||
|
if (spat != null) {
|
||||||
|
try {
|
||||||
|
spat.release();
|
||||||
} catch (RemoteException e) { /* capable level remains at NONE*/ }
|
} catch (RemoteException e) { /* capable level remains at NONE*/ }
|
||||||
|
}
|
||||||
|
}
|
||||||
if (mCapableSpatLevel == Spatializer.SPATIALIZER_IMMERSIVE_LEVEL_NONE) {
|
if (mCapableSpatLevel == Spatializer.SPATIALIZER_IMMERSIVE_LEVEL_NONE) {
|
||||||
mState = STATE_NOT_SUPPORTED;
|
mState = STATE_NOT_SUPPORTED;
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user