Android P 通话中蓝牙耳机连接时候音频通道选择弹出框

2022-08-08,,,,

通过最直观的字符“免提”

packages/apps/Dialer/java/com/android/incallui/audioroute/res/values-zh-rCN/strings.xml:
    <string name="audioroute_speaker" msgid="3269659224838962927">"免提"</string>

找到对应的文件:
packages/apps/Dialer/java/com/android/incallui/audioroute/res/layout/audioroute_selector.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:orientation="vertical"
  tools:layout_gravity="bottom">
  <TextView
    android:id="@+id/audioroute_bluetooth"
    style="@style/AudioRouteItem"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:drawableStart="@drawable/quantum_ic_bluetooth_audio_grey600_24"
    android:text="@string/audioroute_bluetooth"/>
  <TextView
    android:id="@+id/audioroute_speaker"
    style="@style/AudioRouteItem"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:drawableStart="@drawable/quantum_ic_volume_up_grey600_24"
    android:text="@string/audioroute_speaker"/>
<TextView
    android:id="@+id/audioroute_earpiece"
    style="@style/AudioRouteItem"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:drawableStart="@drawable/ic_phone_audio_grey600_24dp"
    android:text="@string/audioroute_phone"/>
  <TextView
    android:id="@+id/audioroute_headset"
    style="@style/AudioRouteItem"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:drawableStart="@drawable/quantum_ic_headset_grey600_24"
    android:text="@string/audioroute_headset"/>

</LinearLayout>

可以清晰看到对各个通道菜单的显示;

本文地址:https://blog.csdn.net/liuminx/article/details/107178131

《Android P 通话中蓝牙耳机连接时候音频通道选择弹出框.doc》

下载本文的Word格式文档,以方便收藏与打印。