Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5bd60a0 authored by Yiyi Shen's avatar Yiyi Shen
Browse files

[Audiosharing] Migrate feature from overlay to Settings

Bug: 340379827
Test: atest
Change-Id: I3a88ac1d2f575f3be1f26f617479bbfd25cf6a8e
parent a719e78a
Loading
Loading
Loading
Loading
+50 −0
Original line number Diff line number Diff line
@@ -5194,6 +5194,56 @@
            android:theme="@style/Theme.SpaLib.Dialog">
        </activity>

        <activity
            android:name="com.android.settings.connecteddevice.audiosharing.AudioSharingActivity"
            android:label="@string/audio_sharing_title"
            android:exported="true">
            <intent-filter>
                <action android:name="com.android.settings.BLUETOOTH_AUDIO_SHARING_SETTINGS" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.connecteddevice.audiosharing.AudioSharingDashboardFragment"/>
        </activity>

        <activity
            android:name="com.android.settings.connecteddevice.audiosharing.audiostreams.qrcode.QrCodeScanModeActivity"
            android:permission="android.permission.BLUETOOTH_CONNECT"
            android:screenOrientation="portrait"
            android:exported="false">
            <intent-filter>
                <action android:name="android.settings.BLUETOOTH_LE_AUDIO_QR_CODE_SCANNER"/>
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
        </activity>

        <activity
            android:name="com.android.settings.connecteddevice.audiosharing.audiostreams.AudioStreamConfirmDialogActivity"
            android:exported="true"
            android:theme="@style/Transparent"
            android:configChanges="orientation|keyboardHidden|screenSize">
            <intent-filter android:priority="1">
                <action android:name="android.settings.AUDIO_STREAM_DIALOG" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
                android:value="com.android.settings.connecteddevice.audiosharing.audiostreams.AudioStreamConfirmDialog" />
        </activity>

        <service
            android:name="com.android.settings.connecteddevice.audiosharing.audiostreams.AudioStreamMediaService"
            android:foregroundServiceType="mediaPlayback"
            android:enabled="true"
            android:exported="false" />

        <receiver android:name="com.android.settings.connecteddevice.audiosharing.AudioSharingReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="com.android.settings.action.BLUETOOTH_LE_AUDIO_SHARING_STATE_CHANGE" />
                <action android:name="com.android.settings.action.BLUETOOTH_LE_AUDIO_SHARING_STOP" />
            </intent-filter>
        </receiver>

        <!-- This is the longest AndroidManifest.xml ever. -->
    </application>
</manifest>
+13 −0
Original line number Diff line number Diff line
@@ -745,4 +745,17 @@
    <string name="spatial_audio_speaker" product="tablet">Tablet speakers</string>
    <!-- Output device type for the phone speaker that is available for spatializer effect. [CHAR LIMIT=NONE]-->
    <string name="spatial_audio_speaker" product="device">Device speakers</string>

    <!-- Content for audio sharing share dialog [CHAR LIMIT=none]-->
    <string name="audio_sharing_dialog_share_content" product="default">This phone\'s music and videos will play on both pairs of headphones</string>
    <string name="audio_sharing_dialog_share_content" product="tablet">This tablet\'s music and videos will play on both pairs of headphones</string>
    <string name="audio_sharing_dialog_share_content" product="device">This device\'s music and videos will play on both pairs of headphones</string>
    <!-- Content for audio sharing share dialog with more devices [CHAR LIMIT=none]-->
    <string name="audio_sharing_dialog_share_more_content" product="default">This phone\'s music and videos will play on the headphones you connect</string>
    <string name="audio_sharing_dialog_share_more_content" product="tablet">This tablet\'s music and videos will play on the headphones you connect</string>
    <string name="audio_sharing_dialog_share_more_content" product="device">This device\'s music and videos will play on the headphones you connect</string>
    <!-- Le audio streams no le device dialog subtitle [CHAR LIMIT=NONE] -->
    <string name="audio_streams_dialog_no_le_device_subtitle" product="default">To listen to an audio stream, first connect headphones that support LE Audio to this phone.</string>
    <string name="audio_streams_dialog_no_le_device_subtitle" product="tablet">To listen to an audio stream, first connect headphones that support LE Audio to this tablet.</string>
    <string name="audio_streams_dialog_no_le_device_subtitle" product="device">To listen to an audio stream, first connect headphones that support LE Audio to this device.</string>
</resources>
+3.04 KiB
Loading image diff...
+22 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2023 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.
  -->

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid android:color="?android:colorButtonNormal" />
    <corners android:radius="12dp" />
</shape>
 No newline at end of file
+21 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2023 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.
  -->

<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:attr/colorControlHighlight">
    <item android:drawable="@drawable/audio_sharing_rounded_bg"/>
</ripple>
 No newline at end of file
Loading