Loading android/app/res/values/config.xml +14 −3 Original line number Diff line number Diff line Loading @@ -35,14 +35,25 @@ of the location permissions. --> <bool name="strict_location_check">true</bool> <!-- Specifies the min/max connection interval parameters for high priority and low power GATT configurations. These values are in multiples of 1.25ms. --> <!-- Specifies the min/max connection interval parameters for high priority, balanced and low power GATT configurations. These values are in multiples of 1.25ms. --> <integer name="gatt_high_priority_min_interval">9</integer> <integer name="gatt_high_priority_max_interval">12</integer> <!-- Default specs recommended interval is 30 (24 * 1.25) -> 50 (40 * 1.25) ms. --> <integer name="gatt_balanced_priority_min_interval">24</integer> <integer name="gatt_balanced_priority_max_interval">40</integer> <integer name="gatt_low_power_min_interval">80</integer> <integer name="gatt_low_power_max_interval">100</integer> <!-- Specifies latency parameters for high priority, balanced and low power GATT configurations. These values represents the number of packets a slave device is allowed to skip. --> <integer name="gatt_high_priority_latency">0</integer> <integer name="gatt_balanced_priority_latency">0</integer> <integer name="gatt_low_power_latency">2</integer> <bool name="headset_client_initial_audio_route_allowed">true</bool> <!-- For AVRCP absolute volume feature. If the threshold is non-zero, Loading android/app/src/com/android/bluetooth/gatt/GattService.java +14 −5 Original line number Diff line number Diff line Loading @@ -1594,12 +1594,11 @@ public class GattService extends ProfileService { void connectionParameterUpdate(int clientIf, String address, int connectionPriority) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); // Default spec recommended interval is 30->50 ms int minInterval = 24; // 24 * 1.25ms = 30ms int maxInterval = 40; // 40 * 1.25ms = 50ms int minInterval; int maxInterval; // Slave latency int latency = 0; int latency; // Link supervision timeout is measured in N * 10ms int timeout = 2000; // 20s Loading @@ -1609,12 +1608,22 @@ public class GattService extends ProfileService { case BluetoothGatt.CONNECTION_PRIORITY_HIGH: minInterval = getResources().getInteger(R.integer.gatt_high_priority_min_interval); maxInterval = getResources().getInteger(R.integer.gatt_high_priority_max_interval); latency = getResources().getInteger(R.integer.gatt_high_priority_latency); break; case BluetoothGatt.CONNECTION_PRIORITY_LOW_POWER: minInterval = getResources().getInteger(R.integer.gatt_low_power_min_interval); maxInterval = getResources().getInteger(R.integer.gatt_low_power_max_interval); latency = 2; latency = getResources().getInteger(R.integer.gatt_low_power_latency); break; default: // Using the values for CONNECTION_PRIORITY_BALANCED. minInterval = getResources().getInteger(R.integer.gatt_balanced_priority_min_interval); maxInterval = getResources().getInteger(R.integer.gatt_balanced_priority_max_interval); latency = getResources().getInteger(R.integer.gatt_balanced_priority_latency); break; } Loading Loading
android/app/res/values/config.xml +14 −3 Original line number Diff line number Diff line Loading @@ -35,14 +35,25 @@ of the location permissions. --> <bool name="strict_location_check">true</bool> <!-- Specifies the min/max connection interval parameters for high priority and low power GATT configurations. These values are in multiples of 1.25ms. --> <!-- Specifies the min/max connection interval parameters for high priority, balanced and low power GATT configurations. These values are in multiples of 1.25ms. --> <integer name="gatt_high_priority_min_interval">9</integer> <integer name="gatt_high_priority_max_interval">12</integer> <!-- Default specs recommended interval is 30 (24 * 1.25) -> 50 (40 * 1.25) ms. --> <integer name="gatt_balanced_priority_min_interval">24</integer> <integer name="gatt_balanced_priority_max_interval">40</integer> <integer name="gatt_low_power_min_interval">80</integer> <integer name="gatt_low_power_max_interval">100</integer> <!-- Specifies latency parameters for high priority, balanced and low power GATT configurations. These values represents the number of packets a slave device is allowed to skip. --> <integer name="gatt_high_priority_latency">0</integer> <integer name="gatt_balanced_priority_latency">0</integer> <integer name="gatt_low_power_latency">2</integer> <bool name="headset_client_initial_audio_route_allowed">true</bool> <!-- For AVRCP absolute volume feature. If the threshold is non-zero, Loading
android/app/src/com/android/bluetooth/gatt/GattService.java +14 −5 Original line number Diff line number Diff line Loading @@ -1594,12 +1594,11 @@ public class GattService extends ProfileService { void connectionParameterUpdate(int clientIf, String address, int connectionPriority) { enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission"); // Default spec recommended interval is 30->50 ms int minInterval = 24; // 24 * 1.25ms = 30ms int maxInterval = 40; // 40 * 1.25ms = 50ms int minInterval; int maxInterval; // Slave latency int latency = 0; int latency; // Link supervision timeout is measured in N * 10ms int timeout = 2000; // 20s Loading @@ -1609,12 +1608,22 @@ public class GattService extends ProfileService { case BluetoothGatt.CONNECTION_PRIORITY_HIGH: minInterval = getResources().getInteger(R.integer.gatt_high_priority_min_interval); maxInterval = getResources().getInteger(R.integer.gatt_high_priority_max_interval); latency = getResources().getInteger(R.integer.gatt_high_priority_latency); break; case BluetoothGatt.CONNECTION_PRIORITY_LOW_POWER: minInterval = getResources().getInteger(R.integer.gatt_low_power_min_interval); maxInterval = getResources().getInteger(R.integer.gatt_low_power_max_interval); latency = 2; latency = getResources().getInteger(R.integer.gatt_low_power_latency); break; default: // Using the values for CONNECTION_PRIORITY_BALANCED. minInterval = getResources().getInteger(R.integer.gatt_balanced_priority_min_interval); maxInterval = getResources().getInteger(R.integer.gatt_balanced_priority_max_interval); latency = getResources().getInteger(R.integer.gatt_balanced_priority_latency); break; } Loading