In short: An Android Open Source Project (AOSP) commit suggests in a future version of Android Google will enable a feature that ensures a smartphone does not ring unnecessarily loud when the device is in close proximity to the ear, and a current call is on hold at the same time.
Background: Android is in a constant state of evolution and while big features are announced as and when they are ready for user engagement, all of them take time to reach that state and most often first appear in earlier versions of Android in trace form while the groundwork for those features are laid. This is an example of one of those cases with a commit having been spotted that effectively confirms this as an in development feature. While this does not necessarily guarantee the feature will arrive in the very next version of the operating system, "Android Q," that is the current assumption at present. The AOSP commit, "Suppress ringtone when the device is on ear," has now been merged and indicates the feature will make use of position sensors to determine the exact location of the phone at a given time. If determined to be close to the ear, and an established call is already on hold, then the ring volume of a secondary incoming call will be suppressed.
The impact: This is a very niche feature which will likely only prove beneficial in very specific cases, as it not only relies on the smartphone being close to the ear at the time, but also an ongoing phone call to be in place, and that call to be on hold. This is all in addition to another call in the process of coming through at the same time. Therefore this is far more likely to be a feature that is less often encountered compared to others. However, in those instances, it's likely to prove to be a very welcomed feature which not only reduces the frustration associated with a loud sound played in the ear, but also one which will help to mitigate against the likelihood of any damage occurring to the ear.