欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

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

程序员文章站 2022-03-30 10:20:01
通过最直观的字符“免提”packages/apps/Dialer/java/com/android/incallui/audioroute/res/values-zh-rCN/strings.xml: "免提"找到对应的文件:packages/apps/Dialer/java/com/android/incallui/audio...

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

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