diff options
| author | 2024-09-19 19:31:51 +0000 | |
|---|---|---|
| committer | 2024-09-19 21:43:09 +0000 | |
| commit | e8921d8a7ecefffb19d0353e57d6e86c73268c5b (patch) | |
| tree | 79212773fc6865329656aec6ce91b998592aa543 | |
| parent | 78815535338050dc3e23925826b625cc1bbc50d4 (diff) | |
audio: Add microphone icon to input settings
Screenshot: https://screenshot.googleplex.com/BMpu3TgWfEkxZA5
Bug: b/355684672
Test: atest InputMediaDeviceTest
Flag:
com.android.media.flags.enable_audio_input_device_routing_and_volume_control
Change-Id: Icc80aad156e6f15d8a82326c6984ffa0c9bb2d99
3 files changed, 27 insertions, 6 deletions
diff --git a/packages/SettingsLib/res/drawable/ic_media_microphone.xml b/packages/SettingsLib/res/drawable/ic_media_microphone.xml new file mode 100644 index 000000000000..209dea515802 --- /dev/null +++ b/packages/SettingsLib/res/drawable/ic_media_microphone.xml @@ -0,0 +1,25 @@ +<!-- +    Copyright (C) 2024 The Android Open Source Project + +    Licensed under the Apache License, Version 2.0 (the "License"); +    you may not use this file except in compliance with the License. +    You may obtain a copy of the License at + +         http://www.apache.org/licenses/LICENSE-2.0 + +    Unless required by applicable law or agreed to in writing, software +    distributed under the License is distributed on an "AS IS" BASIS, +    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +    See the License for the specific language governing permissions and +    limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" +        android:width="24dp" +        android:height="24dp" +        android:tint="?attr/colorControlNormal" +        android:viewportHeight="960" +        android:viewportWidth="960"> +    <path +        android:fillColor="@android:color/white" +        android:pathData="M480,560Q430,560 395,525Q360,490 360,440L360,200Q360,150 395,115Q430,80 480,80Q530,80 565,115Q600,150 600,200L600,440Q600,490 565,525Q530,560 480,560ZM480,320Q480,320 480,320Q480,320 480,320L480,320Q480,320 480,320Q480,320 480,320Q480,320 480,320Q480,320 480,320L480,320Q480,320 480,320Q480,320 480,320ZM440,840L440,717Q336,703 268,624Q200,545 200,440L280,440Q280,523 338.5,581.5Q397,640 480,640Q563,640 621.5,581.5Q680,523 680,440L760,440Q760,545 692,624Q624,703 520,717L520,840L440,840ZM480,480Q497,480 508.5,468.5Q520,457 520,440L520,200Q520,183 508.5,171.5Q497,160 480,160Q463,160 451.5,171.5Q440,183 440,200L440,440Q440,457 451.5,468.5Q463,480 480,480Z" /> +</vector>
\ No newline at end of file diff --git a/packages/SettingsLib/src/com/android/settingslib/media/InputMediaDevice.java b/packages/SettingsLib/src/com/android/settingslib/media/InputMediaDevice.java index 766cd438a811..d634dd847bd0 100644 --- a/packages/SettingsLib/src/com/android/settingslib/media/InputMediaDevice.java +++ b/packages/SettingsLib/src/com/android/settingslib/media/InputMediaDevice.java @@ -128,8 +128,7 @@ public class InputMediaDevice extends MediaDevice {      @VisibleForTesting      int getDrawableResId() { -        // TODO(b/357122624): check with UX to obtain the icon for desktop devices. -        return R.drawable.ic_media_tablet; +        return R.drawable.ic_media_microphone;      }      @Override diff --git a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/InputMediaDeviceTest.java b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/InputMediaDeviceTest.java index bc1ea6c42fa3..088d554326e7 100644 --- a/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/InputMediaDeviceTest.java +++ b/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/InputMediaDeviceTest.java @@ -18,9 +18,6 @@ package com.android.settingslib.media;  import static com.google.common.truth.Truth.assertThat; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; -  import android.content.Context;  import android.media.AudioDeviceInfo;  import android.platform.test.flag.junit.SetFlagsRule; @@ -64,7 +61,7 @@ public class InputMediaDeviceTest {                          CURRENT_VOLUME,                          IS_VOLUME_FIXED);          assertThat(builtinMediaDevice).isNotNull(); -        assertThat(builtinMediaDevice.getDrawableResId()).isEqualTo(R.drawable.ic_media_tablet); +        assertThat(builtinMediaDevice.getDrawableResId()).isEqualTo(R.drawable.ic_media_microphone);      }      @Test  |