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

Commit a1a76a37 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove mUsePbapPce and mUseMapClient"

parents b11dd14d a87f923a
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -3352,9 +3352,6 @@
         to occur. The expand button will have increased touch boundaries to accomodate this. -->
         to occur. The expand button will have increased touch boundaries to accomodate this. -->
    <bool name="config_notificationHeaderClickableForExpand">false</bool>
    <bool name="config_notificationHeaderClickableForExpand">false</bool>


    <!-- Configuration for automotive -->
    <bool name="enable_pbap_pce_profile">false</bool>

    <!-- Default data warning level in mb -->
    <!-- Default data warning level in mb -->
    <integer name="default_data_warning_level_mb">2048</integer>
    <integer name="default_data_warning_level_mb">2048</integer>


+0 −2
Original line number Original line Diff line number Diff line
@@ -3259,8 +3259,6 @@


  <java-symbol type="style" name="Theme.DeviceDefault.QuickSettings" />
  <java-symbol type="style" name="Theme.DeviceDefault.QuickSettings" />


  <java-symbol type="bool" name="enable_pbap_pce_profile" />

  <java-symbol type="integer" name="default_data_warning_level_mb" />
  <java-symbol type="integer" name="default_data_warning_level_mb" />
  <java-symbol type="bool" name="config_useVideoPauseWorkaround" />
  <java-symbol type="bool" name="config_useVideoPauseWorkaround" />
  <java-symbol type="bool" name="config_sendPackageName" />
  <java-symbol type="bool" name="config_sendPackageName" />
+23 −29
Original line number Original line Diff line number Diff line
@@ -97,8 +97,6 @@ public class LocalBluetoothProfileManager {
    private PanProfile mPanProfile;
    private PanProfile mPanProfile;
    private PbapClientProfile mPbapClientProfile;
    private PbapClientProfile mPbapClientProfile;
    private PbapServerProfile mPbapProfile;
    private PbapServerProfile mPbapProfile;
    private final boolean mUsePbapPce;
    private final boolean mUseMapClient;
    private HearingAidProfile mHearingAidProfile;
    private HearingAidProfile mHearingAidProfile;


    /**
    /**
@@ -115,9 +113,6 @@ public class LocalBluetoothProfileManager {


        mDeviceManager = deviceManager;
        mDeviceManager = deviceManager;
        mEventManager = eventManager;
        mEventManager = eventManager;
        mUsePbapPce = mContext.getResources().getBoolean(R.bool.enable_pbap_pce_profile);
        // MAP Client is typically used in the same situations as PBAP Client
        mUseMapClient = mContext.getResources().getBoolean(R.bool.enable_pbap_pce_profile);
        // pass this reference to adapter and event manager (circular dependency)
        // pass this reference to adapter and event manager (circular dependency)
        adapter.setProfileManager(this);
        adapter.setProfileManager(this);


@@ -161,15 +156,13 @@ public class LocalBluetoothProfileManager {
                    BluetoothHeadsetClient.ACTION_AUDIO_STATE_CHANGED,
                    BluetoothHeadsetClient.ACTION_AUDIO_STATE_CHANGED,
                    BluetoothHeadsetClient.STATE_AUDIO_DISCONNECTED);
                    BluetoothHeadsetClient.STATE_AUDIO_DISCONNECTED);
        }
        }
        if (mUseMapClient) {
        if (mMapClientProfile == null && supportedList.contains(BluetoothProfile.MAP_CLIENT)) {
        if (mMapClientProfile == null && supportedList.contains(BluetoothProfile.MAP_CLIENT)) {
            if (DEBUG) Log.d(TAG, "Adding local MAP CLIENT profile");
            if (DEBUG) Log.d(TAG, "Adding local MAP CLIENT profile");
                mMapClientProfile =
            mMapClientProfile = new MapClientProfile(mContext, mDeviceManager,this);
                        new MapClientProfile(mContext, mDeviceManager,this);
            addProfile(mMapClientProfile, MapClientProfile.NAME,
            addProfile(mMapClientProfile, MapClientProfile.NAME,
                    BluetoothMapClient.ACTION_CONNECTION_STATE_CHANGED);
                    BluetoothMapClient.ACTION_CONNECTION_STATE_CHANGED);
        }
        }
        } else if (mMapProfile == null && supportedList.contains(BluetoothProfile.MAP)) {
        if (mMapProfile == null && supportedList.contains(BluetoothProfile.MAP)) {
            if (DEBUG) Log.d(TAG, "Adding local MAP profile");
            if (DEBUG) Log.d(TAG, "Adding local MAP profile");
            mMapProfile = new MapProfile(mContext, mDeviceManager, this);
            mMapProfile = new MapProfile(mContext, mDeviceManager, this);
            addProfile(mMapProfile, MapProfile.NAME, BluetoothMap.ACTION_CONNECTION_STATE_CHANGED);
            addProfile(mMapProfile, MapProfile.NAME, BluetoothMap.ACTION_CONNECTION_STATE_CHANGED);
@@ -211,8 +204,7 @@ public class LocalBluetoothProfileManager {
            addProfile(mPbapProfile, PbapServerProfile.NAME,
            addProfile(mPbapProfile, PbapServerProfile.NAME,
                    BluetoothPbap.ACTION_CONNECTION_STATE_CHANGED);
                    BluetoothPbap.ACTION_CONNECTION_STATE_CHANGED);
        }
        }
        if (mUsePbapPce && mPbapClientProfile == null && supportedList.contains(
        if (mPbapClientProfile == null && supportedList.contains(BluetoothProfile.PBAP_CLIENT)) {
                BluetoothProfile.PBAP_CLIENT)) {
            if (DEBUG) Log.d(TAG, "Adding local PBAP Client profile");
            if (DEBUG) Log.d(TAG, "Adding local PBAP Client profile");
            mPbapClientProfile = new PbapClientProfile(mContext, mDeviceManager,this);
            mPbapClientProfile = new PbapClientProfile(mContext, mDeviceManager,this);
            addProfile(mPbapClientProfile, PbapClientProfile.NAME,
            addProfile(mPbapClientProfile, PbapClientProfile.NAME,
@@ -544,7 +536,9 @@ public class LocalBluetoothProfileManager {
            removedProfiles.remove(mMapClientProfile);
            removedProfiles.remove(mMapClientProfile);
        }
        }


        if (mUsePbapPce) {
        if ((mPbapClientProfile != null) &&
                BluetoothUuid.isUuidPresent(localUuids, BluetoothUuid.PBAP_PCE) &&
                BluetoothUuid.containsAnyUuid(uuids, PbapClientProfile.SRC_UUIDS)) {
            profiles.add(mPbapClientProfile);
            profiles.add(mPbapClientProfile);
            removedProfiles.remove(mPbapClientProfile);
            removedProfiles.remove(mPbapClientProfile);
        }
        }