Loading media/java/android/media/AudioManager.java +5 −5 Original line number Diff line number Diff line Loading @@ -6752,7 +6752,7 @@ public class AudioManager { /** * @hide * Lower media volume to RS1 * Lower media volume to RS1 interval */ public void lowerVolumeToRs1() { try { Loading @@ -6764,13 +6764,13 @@ public class AudioManager { /** * @hide * @return the RS2 value used for momentary exposure warnings * @return the RS2 upper bound used for momentary exposure warnings */ @TestApi @RequiresPermission(Manifest.permission.MODIFY_AUDIO_SETTINGS_PRIVILEGED) public float getRs2Value() { try { return getService().getRs2Value(); return getService().getOutputRs2UpperBound(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading @@ -6778,13 +6778,13 @@ public class AudioManager { /** * @hide * Sets the RS2 value used for momentary exposure warnings * Sets the RS2 upper bound used for momentary exposure warnings */ @TestApi @RequiresPermission(Manifest.permission.MODIFY_AUDIO_SETTINGS_PRIVILEGED) public void setRs2Value(float rs2Value) { try { getService().setRs2Value(rs2Value); getService().setOutputRs2UpperBound(rs2Value); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading media/java/android/media/IAudioService.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -296,10 +296,10 @@ interface IAudioService { void lowerVolumeToRs1(String callingPackage); @EnforcePermission("MODIFY_AUDIO_SETTINGS_PRIVILEGED") float getRs2Value(); float getOutputRs2UpperBound(); @EnforcePermission("MODIFY_AUDIO_SETTINGS_PRIVILEGED") oneway void setRs2Value(float rs2Value); oneway void setOutputRs2UpperBound(float rs2Value); @EnforcePermission("MODIFY_AUDIO_SETTINGS_PRIVILEGED") float getCsd(); Loading services/core/java/com/android/server/audio/AudioService.java +6 −6 Original line number Diff line number Diff line Loading @@ -10471,16 +10471,16 @@ public class AudioService extends IAudioService.Stub @Override @android.annotation.EnforcePermission(android.Manifest.permission.MODIFY_AUDIO_SETTINGS_PRIVILEGED) public float getRs2Value() { super.getRs2Value_enforcePermission(); return mSoundDoseHelper.getRs2Value(); public float getOutputRs2UpperBound() { super.getOutputRs2UpperBound_enforcePermission(); return mSoundDoseHelper.getOutputRs2UpperBound(); } @Override @android.annotation.EnforcePermission(android.Manifest.permission.MODIFY_AUDIO_SETTINGS_PRIVILEGED) public void setRs2Value(float rs2Value) { super.setRs2Value_enforcePermission(); mSoundDoseHelper.setRs2Value(rs2Value); public void setOutputRs2UpperBound(float rs2Value) { super.setOutputRs2UpperBound_enforcePermission(); mSoundDoseHelper.setOutputRs2UpperBound(rs2Value); } @Override Loading services/core/java/com/android/server/audio/SoundDoseHelper.java +4 −4 Original line number Diff line number Diff line Loading @@ -300,7 +300,7 @@ public class SoundDoseHelper { SAFE_MEDIA_VOLUME_UNINITIALIZED); } float getRs2Value() { float getOutputRs2UpperBound() { if (!mEnableCsd) { return 0.f; } Loading @@ -312,14 +312,14 @@ public class SoundDoseHelper { } try { return soundDose.getOutputRs2(); return soundDose.getOutputRs2UpperBound(); } catch (RemoteException e) { Log.e(TAG, "Exception while getting the RS2 exposure value", e); return 0.f; } } void setRs2Value(float rs2Value) { void setOutputRs2UpperBound(float rs2Value) { if (!mEnableCsd) { return; } Loading @@ -331,7 +331,7 @@ public class SoundDoseHelper { } try { soundDose.setOutputRs2(rs2Value); soundDose.setOutputRs2UpperBound(rs2Value); } catch (RemoteException e) { Log.e(TAG, "Exception while setting the RS2 exposure value", e); } Loading Loading
media/java/android/media/AudioManager.java +5 −5 Original line number Diff line number Diff line Loading @@ -6752,7 +6752,7 @@ public class AudioManager { /** * @hide * Lower media volume to RS1 * Lower media volume to RS1 interval */ public void lowerVolumeToRs1() { try { Loading @@ -6764,13 +6764,13 @@ public class AudioManager { /** * @hide * @return the RS2 value used for momentary exposure warnings * @return the RS2 upper bound used for momentary exposure warnings */ @TestApi @RequiresPermission(Manifest.permission.MODIFY_AUDIO_SETTINGS_PRIVILEGED) public float getRs2Value() { try { return getService().getRs2Value(); return getService().getOutputRs2UpperBound(); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading @@ -6778,13 +6778,13 @@ public class AudioManager { /** * @hide * Sets the RS2 value used for momentary exposure warnings * Sets the RS2 upper bound used for momentary exposure warnings */ @TestApi @RequiresPermission(Manifest.permission.MODIFY_AUDIO_SETTINGS_PRIVILEGED) public void setRs2Value(float rs2Value) { try { getService().setRs2Value(rs2Value); getService().setOutputRs2UpperBound(rs2Value); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } Loading
media/java/android/media/IAudioService.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -296,10 +296,10 @@ interface IAudioService { void lowerVolumeToRs1(String callingPackage); @EnforcePermission("MODIFY_AUDIO_SETTINGS_PRIVILEGED") float getRs2Value(); float getOutputRs2UpperBound(); @EnforcePermission("MODIFY_AUDIO_SETTINGS_PRIVILEGED") oneway void setRs2Value(float rs2Value); oneway void setOutputRs2UpperBound(float rs2Value); @EnforcePermission("MODIFY_AUDIO_SETTINGS_PRIVILEGED") float getCsd(); Loading
services/core/java/com/android/server/audio/AudioService.java +6 −6 Original line number Diff line number Diff line Loading @@ -10471,16 +10471,16 @@ public class AudioService extends IAudioService.Stub @Override @android.annotation.EnforcePermission(android.Manifest.permission.MODIFY_AUDIO_SETTINGS_PRIVILEGED) public float getRs2Value() { super.getRs2Value_enforcePermission(); return mSoundDoseHelper.getRs2Value(); public float getOutputRs2UpperBound() { super.getOutputRs2UpperBound_enforcePermission(); return mSoundDoseHelper.getOutputRs2UpperBound(); } @Override @android.annotation.EnforcePermission(android.Manifest.permission.MODIFY_AUDIO_SETTINGS_PRIVILEGED) public void setRs2Value(float rs2Value) { super.setRs2Value_enforcePermission(); mSoundDoseHelper.setRs2Value(rs2Value); public void setOutputRs2UpperBound(float rs2Value) { super.setOutputRs2UpperBound_enforcePermission(); mSoundDoseHelper.setOutputRs2UpperBound(rs2Value); } @Override Loading
services/core/java/com/android/server/audio/SoundDoseHelper.java +4 −4 Original line number Diff line number Diff line Loading @@ -300,7 +300,7 @@ public class SoundDoseHelper { SAFE_MEDIA_VOLUME_UNINITIALIZED); } float getRs2Value() { float getOutputRs2UpperBound() { if (!mEnableCsd) { return 0.f; } Loading @@ -312,14 +312,14 @@ public class SoundDoseHelper { } try { return soundDose.getOutputRs2(); return soundDose.getOutputRs2UpperBound(); } catch (RemoteException e) { Log.e(TAG, "Exception while getting the RS2 exposure value", e); return 0.f; } } void setRs2Value(float rs2Value) { void setOutputRs2UpperBound(float rs2Value) { if (!mEnableCsd) { return; } Loading @@ -331,7 +331,7 @@ public class SoundDoseHelper { } try { soundDose.setOutputRs2(rs2Value); soundDose.setOutputRs2UpperBound(rs2Value); } catch (RemoteException e) { Log.e(TAG, "Exception while setting the RS2 exposure value", e); } Loading