自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
耳机测试
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
为了确保您的耳机与所要求的基本功能兼容,请执行以下测试。
耳机插入
- 先关闭 Android 设备。
- 插入耳机。
- 启动设备。
- 解锁。
- 打开开源通用音乐播放器。
- 按设备音量按钮以将媒体音量调至最大。
- 开始播放音乐,确认耳机有声音。
- 在播放音乐时拔出耳机,确认音乐停止。
- 重新连接耳机,再次播放音乐,确认耳机是否有声音。
- 播放音乐,并确保耳机有声音。
- 按音量调低按钮。确认音量面板显示媒体音量降一个等级,且音量输出如预期降低。
- 长按音量调低按钮。确认音量面板显示媒体音量一直降低,且音量输出逐渐降至静音。
- 按音量调高按钮。确认音量面板显示媒体音量升一个等级,且音量输出如预期升高。
- 长按音量调高按钮。确认音量面板显示媒体音量一直升至最高,且音量输出如预期升高。
针对音乐的播放/暂停操作
快速按下播放/暂停按钮,确认耳机中的音乐停止播放。如果音乐尚未播放,则应开始从耳机中播放出来。
针对电话的播放/暂停操作
不同 Android 设备上的静音和挂断电话操作可能有所不同。本测试记录了最常见的行为。
- 拨打电话。
- 在通话过程中长按播放/暂停按钮。
- 确认麦克风处于静音状态。如果您再次长按,则麦克风应取消静音。
- 在通话过程中,短按播放/暂停按钮。
- 确认短按可结束通话。
- 在 Android 设备上接听电话。
- 在响铃时短按播放/暂停按钮,确认电话已接听。
- 在 Android 设备上再次接听电话。
- 在电话响铃时长按播放/暂停按钮,确认电话已被拒接。
针对语音指令和麦克风的播放/暂停操作
- 解锁 Android 设备并进入主屏幕。
- 长按播放/暂停按钮。
- 确认:
- 您听到提示音,之后应能够进行语音搜索查询,如“现在几点?”
- 您听到“现在的时间是…”这样的回应。
"voice_button_for_voice_commands_microphone">适用于语音指令和麦克风的语音指令按钮
- 解锁 Android 设备并进入主屏幕。
- 短按语音指令按钮。
- 确认:
- 您听到提示音,之后应能够进行搜索查询,如“现在几点?”
- 您听到“现在的时间是…”这样的回应。
重要提示:按下语音指令按钮可启动任何搜索应用,例如 Google 搜索。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Headset testing\n\nTo ensure your headset is compatible with the minimally required\nfunctionality, conduct these tests.\n\nHeadset insertion\n-----------------\n\n1. Start with the Android device turned off.\n2. Plug in the headset.\n3. Turn the device on.\n4. Unlock.\n5. Open the [open\n source](https://github.com/googlesamples/android-UniversalMusicPlayer) [Universal\n Music Player](https://android-developers.blogspot.com/2015/03/a-new-reference-app-for-multi-device.html).\n6. Press the device volume buttons to maximize media volume.\n7. Start playing music and verify audio comes out of the headset.\n8. While music is playing, disconnect the headset and verify music stops.\n9. Reconnect the headset, start playing music again, and verify audio comes out of the headset.\n\nVolume buttons\n--------------\n\n1. Play music and ensure it is coming out of the headset.\n2. Press the volume-down button. Verify the volume panel displays the media volume decrease by one notch and the volume output is reduced as expected.\n3. Long press the volume-down button. Verify the volume panel shows media volume going all the way down and volume output is reduced gradually to muted.\n4. Press the volume-up button. Verify the volume panel displays the media volume go up one notch and the volume output is increased as expected.\n5. Long press the volume-up button. Verify the volume panel shows the media volume go all the way up to maximum and the volume output is increased as expected.\n\nPlay/pause for music\n--------------------\n\nPress quickly on the play/pause button and verify music stops playing out of\nthe headset. If music was not already playing, then it should start playing out\nof the headset.\n\nPlay/pause for telephony\n------------------------\n\nThe actions to mute and hang up a phone call may differ across Android\ndevices. This test documents the most common behavior.\n\n1. Make a phone call.\n2. Long press the play/pause button while in the call.\n3. Verify the microphone mutes. And if you long press again, the microphone should un-mute.\n4. While still in the call, short press the play/pause button.\n5. Verify the short press ends the telephone call.\n6. Receive a phone call on the Android device.\n7. Short press the play/pause button while the phone is ringing and verify the call is accepted.\n8. Receive another phone call on the Android device.\n9. Long press the play/pause button while the phone is ringing and verify the call is rejected.\n\nPlay/pause for voice commands and microphone\n--------------------------------------------\n\n1. Unlock the Android device and go to the home screen.\n2. Long press the play/pause button.\n3. Verify:\n 1. you hear a beep after which you should be able to make a voice search query, such as \"What time is it?\"\n 2. you hear a response, such as \"The time is ...\"\n\n\"voice_button_for_voice_commands_microphone\"\\\u003eVoice command button for voice commands and microphone\n\n\u003c!-- --\u003e\n\n1. Unlock the Android device and go to the home screen.\n2. Short press the voice command button.\n3. Verify:\n 1. you hear a beep after which you should be able to make a search query, such as \"What time is it?\"\n 2. you hear a response, such as \"The time is ...\"\n\n**Important**: A press on the voice command button can launch any search app, for example\nGoogle search."]]