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

Commit e7d5130f authored by Ajay Panicker's avatar Ajay Panicker
Browse files

Add the AVRCP Target Service (1/2)

The AVRCP Target Service is started by Bluetooth Adapter like a normal
service instead of being started by A2DP like the old service. All it
does is initializes the player list and helps communicate data between
the Media Framework and the Native Interface.

Bug: 68854188
Test: Compiles and local test with service enabled
Change-Id: Ifb26f0fa3fac37686924bd6835e1d346ebf68bf1
parent 79fefe05
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -316,6 +316,14 @@
                <action android:name="android.media.browse.MediaBrowserService" />
            </intent-filter>
        </service>
        <service
            android:process="@string/process"
            android:name = ".avrcp.AvrcpTargetService"
            android:enabled = "@bool/profile_supported_avrcp_target" >
            <intent-filter>
                <action android:name="android.bluetooth.IBluetoothAvrcp" />
            </intent-filter>
        </service>
        <service
            android:process="@string/process"
            android:name = ".avrcpcontroller.AvrcpControllerService"
+2 −0
Original line number Diff line number Diff line
@@ -81,6 +81,8 @@ int register_com_android_bluetooth_a2dp_sink(JNIEnv* env);

int register_com_android_bluetooth_avrcp(JNIEnv* env);

int register_com_android_bluetooth_avrcp_target(JNIEnv* env);

int register_com_android_bluetooth_avrcp_controller(JNIEnv* env);

int register_com_android_bluetooth_hid_host(JNIEnv* env);
+5 −0
Original line number Diff line number Diff line
@@ -1312,6 +1312,11 @@ jint JNI_OnLoad(JavaVM* jvm, void* reserved) {
    return JNI_ERR;
  }

  status = android::register_com_android_bluetooth_avrcp_target(e);
  if (status < 0) {
    ALOGE("jni new avrcp target registration failure: %d", status);
  }

  status = android::register_com_android_bluetooth_avrcp_controller(e);
  if (status < 0) {
    ALOGE("jni avrcp controller registration failure: %d", status);
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
    <bool name="pbap_include_photos_in_vcard">true</bool>
    <bool name="pbap_use_profile_for_owner_vcard">true</bool>
    <bool name="profile_supported_map">true</bool>
    <bool name="profile_supported_avrcp_target">false</bool>
    <bool name="profile_supported_avrcp_controller">false</bool>
    <bool name="profile_supported_sap">false</bool>
    <bool name="profile_supported_pbapclient">false</bool>
+3 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.util.Log;
import com.android.bluetooth.R;
import com.android.bluetooth.a2dp.A2dpService;
import com.android.bluetooth.a2dpsink.A2dpSinkService;
import com.android.bluetooth.avrcp.AvrcpTargetService;
import com.android.bluetooth.avrcpcontroller.AvrcpControllerService;
import com.android.bluetooth.gatt.GattService;
import com.android.bluetooth.hdp.HealthService;
@@ -81,6 +82,8 @@ public class Config {
                    (1 << BluetoothProfile.MAP)),
            new ProfileConfig(HeadsetClientService.class, R.bool.profile_supported_hfpclient,
                    (1 << BluetoothProfile.HEADSET_CLIENT)),
            new ProfileConfig(AvrcpTargetService.class, R.bool.profile_supported_avrcp_target,
                    (1 << BluetoothProfile.AVRCP)),
            new ProfileConfig(AvrcpControllerService.class,
                    R.bool.profile_supported_avrcp_controller,
                    (1 << BluetoothProfile.AVRCP_CONTROLLER)),
Loading