Loading Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ LOCAL_STATIC_ANDROID_LIBRARIES := \ androidx.core_core \ androidx.legacy_legacy-support-v4 \ androidx.lifecycle_lifecycle-livedata \ androidx.room_room-runtime \ Loading AndroidManifest.xml +10 −0 Original line number Diff line number Diff line Loading @@ -320,6 +320,16 @@ <action android:name="android.media.browse.MediaBrowserService" /> </intent-filter> </service> <activity android:name=".BluetoothPrefs" android:exported="@bool/profile_supported_a2dp_sink" android:enabled="@bool/profile_supported_a2dp_sink"> <intent-filter> <action android:name="android.intent.action.APPLICATION_PREFERENCES"/> </intent-filter> </activity> <service android:process="@string/process" android:name = ".avrcp.AvrcpTargetService" Loading res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -249,4 +249,5 @@ <string name="bluetooth_disconnected">Bluetooth audio disconnected"</string> <string name="a2dp_sink_mbs_label">Bluetooth Audio</string> <string name="bluetooth_opp_file_limit_exceeded">Files bigger than 4GB cannot be transferred</string> <string name="bluetooth_connect_action">Connect to Bluetooth</string> </resources> src/com/android/bluetooth/BluetoothPrefs.java 0 → 100644 +40 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 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. */ package com.android.bluetooth; import android.app.Activity; import android.content.Intent; import android.os.Bundle; /** * Activity that routes to Bluetooth settings when launched */ public class BluetoothPrefs extends Activity { public static final String BLUETOOTH_SETTING_ACTION = "android.settings.BLUETOOTH_SETTINGS"; public static final String BLUETOOTH_SETTING_CATEGORY = "android.intent.category.DEFAULT"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent launchIntent = new Intent(); launchIntent.setAction(BLUETOOTH_SETTING_ACTION); launchIntent.addCategory(BLUETOOTH_SETTING_CATEGORY); startActivity(launchIntent); finish(); } } src/com/android/bluetooth/a2dpsink/A2dpSinkService.java +2 −1 Original line number Diff line number Diff line Loading @@ -413,7 +413,8 @@ public class A2dpSinkService extends ProfileService { if (state == StackEvent.AUDIO_STATE_STARTED) { mA2dpSinkStreamHandler.obtainMessage( A2dpSinkStreamHandler.SRC_STR_START).sendToTarget(); } else if (state == StackEvent.AUDIO_STATE_STOPPED) { } else if (state == StackEvent.AUDIO_STATE_STOPPED || state == StackEvent.AUDIO_STATE_REMOTE_SUSPEND) { mA2dpSinkStreamHandler.obtainMessage( A2dpSinkStreamHandler.SRC_STR_STOP).sendToTarget(); } Loading Loading
Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ LOCAL_STATIC_JAVA_LIBRARIES := \ LOCAL_STATIC_ANDROID_LIBRARIES := \ androidx.core_core \ androidx.legacy_legacy-support-v4 \ androidx.lifecycle_lifecycle-livedata \ androidx.room_room-runtime \ Loading
AndroidManifest.xml +10 −0 Original line number Diff line number Diff line Loading @@ -320,6 +320,16 @@ <action android:name="android.media.browse.MediaBrowserService" /> </intent-filter> </service> <activity android:name=".BluetoothPrefs" android:exported="@bool/profile_supported_a2dp_sink" android:enabled="@bool/profile_supported_a2dp_sink"> <intent-filter> <action android:name="android.intent.action.APPLICATION_PREFERENCES"/> </intent-filter> </activity> <service android:process="@string/process" android:name = ".avrcp.AvrcpTargetService" Loading
res/values/strings.xml +1 −0 Original line number Diff line number Diff line Loading @@ -249,4 +249,5 @@ <string name="bluetooth_disconnected">Bluetooth audio disconnected"</string> <string name="a2dp_sink_mbs_label">Bluetooth Audio</string> <string name="bluetooth_opp_file_limit_exceeded">Files bigger than 4GB cannot be transferred</string> <string name="bluetooth_connect_action">Connect to Bluetooth</string> </resources>
src/com/android/bluetooth/BluetoothPrefs.java 0 → 100644 +40 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 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. */ package com.android.bluetooth; import android.app.Activity; import android.content.Intent; import android.os.Bundle; /** * Activity that routes to Bluetooth settings when launched */ public class BluetoothPrefs extends Activity { public static final String BLUETOOTH_SETTING_ACTION = "android.settings.BLUETOOTH_SETTINGS"; public static final String BLUETOOTH_SETTING_CATEGORY = "android.intent.category.DEFAULT"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent launchIntent = new Intent(); launchIntent.setAction(BLUETOOTH_SETTING_ACTION); launchIntent.addCategory(BLUETOOTH_SETTING_CATEGORY); startActivity(launchIntent); finish(); } }
src/com/android/bluetooth/a2dpsink/A2dpSinkService.java +2 −1 Original line number Diff line number Diff line Loading @@ -413,7 +413,8 @@ public class A2dpSinkService extends ProfileService { if (state == StackEvent.AUDIO_STATE_STARTED) { mA2dpSinkStreamHandler.obtainMessage( A2dpSinkStreamHandler.SRC_STR_START).sendToTarget(); } else if (state == StackEvent.AUDIO_STATE_STOPPED) { } else if (state == StackEvent.AUDIO_STATE_STOPPED || state == StackEvent.AUDIO_STATE_REMOTE_SUSPEND) { mA2dpSinkStreamHandler.obtainMessage( A2dpSinkStreamHandler.SRC_STR_STOP).sendToTarget(); } Loading