mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Fix linter
This commit is contained in:
+21
-9
@@ -5,6 +5,9 @@ import android.bluetooth.BluetoothDevice;
|
|||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import nodomain.freeyourgadget.gadgetbridge.GBException;
|
import nodomain.freeyourgadget.gadgetbridge.GBException;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpecificSettings;
|
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSpecificSettings;
|
||||||
@@ -17,6 +20,8 @@ import nodomain.freeyourgadget.gadgetbridge.service.DeviceSupport;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.generic_headphones.GenericHeadphonesSupport;
|
import nodomain.freeyourgadget.gadgetbridge.service.devices.generic_headphones.GenericHeadphonesSupport;
|
||||||
|
|
||||||
public class GenericHeadphonesCoordinator extends AbstractDeviceCoordinator {
|
public class GenericHeadphonesCoordinator extends AbstractDeviceCoordinator {
|
||||||
|
private static final Logger LOG = LoggerFactory.getLogger(GenericHeadphonesCoordinator.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getOrderPriority() {
|
public int getOrderPriority() {
|
||||||
return Integer.MAX_VALUE;
|
return Integer.MAX_VALUE;
|
||||||
@@ -34,15 +39,22 @@ public class GenericHeadphonesCoordinator extends AbstractDeviceCoordinator {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean supports(GBDeviceCandidate candidate) {
|
public boolean supports(GBDeviceCandidate candidate) {
|
||||||
BluetoothDevice device = candidate.getDevice();
|
try {
|
||||||
BluetoothClass deviceClass = device.getBluetoothClass();
|
final BluetoothDevice device = candidate.getDevice();
|
||||||
int deviceType = deviceClass.getDeviceClass();
|
final BluetoothClass deviceClass = device.getBluetoothClass();
|
||||||
return deviceType == BluetoothClass.Device.AUDIO_VIDEO_WEARABLE_HEADSET ||
|
int deviceType = deviceClass.getDeviceClass();
|
||||||
deviceType == BluetoothClass.Device.AUDIO_VIDEO_HEADPHONES ||
|
return deviceType == BluetoothClass.Device.AUDIO_VIDEO_WEARABLE_HEADSET ||
|
||||||
deviceType == BluetoothClass.Device.AUDIO_VIDEO_LOUDSPEAKER ||
|
deviceType == BluetoothClass.Device.AUDIO_VIDEO_HEADPHONES ||
|
||||||
deviceType == BluetoothClass.Device.AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER ||
|
deviceType == BluetoothClass.Device.AUDIO_VIDEO_LOUDSPEAKER ||
|
||||||
deviceType == BluetoothClass.Device.AUDIO_VIDEO_CAR_AUDIO ||
|
deviceType == BluetoothClass.Device.AUDIO_VIDEO_VIDEO_DISPLAY_AND_LOUDSPEAKER ||
|
||||||
deviceType == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE;
|
deviceType == BluetoothClass.Device.AUDIO_VIDEO_CAR_AUDIO ||
|
||||||
|
deviceType == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE;
|
||||||
|
} catch (final SecurityException e) {
|
||||||
|
// Should never happen - we must have bluetooth permissions
|
||||||
|
LOG.error("Failed to check bluetooth class", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -895,7 +895,7 @@
|
|||||||
<string name="pref_dashboard_widget_settings">Vidina seaded</string>
|
<string name="pref_dashboard_widget_settings">Vidina seaded</string>
|
||||||
<string name="pref_dashboard_widget_double_size_summary">Luba vidinal juhtpaneelil hõivata kaks tulpa</string>
|
<string name="pref_dashboard_widget_double_size_summary">Luba vidinal juhtpaneelil hõivata kaks tulpa</string>
|
||||||
<string name="pref_dashboard_widget_today_24h_summary">Kuva aktiivsust kahe 12h ringi asemel ühes 24h ringis</string>
|
<string name="pref_dashboard_widget_today_24h_summary">Kuva aktiivsust kahe 12h ringi asemel ühes 24h ringis</string>
|
||||||
<string name="dashboard_calendar_month_goals_reached_title">% sammudest eesmärgini saavutatud</string>
|
<string name="dashboard_calendar_month_goals_reached_title">%% sammudest eesmärgini saavutatud</string>
|
||||||
<string name="first_start_intro_tag_line">Vabasta end nutiseadmete tootjate patenteeritud rakendustest ja pilveteenustest.</string>
|
<string name="first_start_intro_tag_line">Vabasta end nutiseadmete tootjate patenteeritud rakendustest ja pilveteenustest.</string>
|
||||||
<string name="pref_dashboard_widget_today_upside_down_title">Kesköö all</string>
|
<string name="pref_dashboard_widget_today_upside_down_title">Kesköö all</string>
|
||||||
<string name="pref_dashboard_all_devices_title">Kõik seadmed</string>
|
<string name="pref_dashboard_all_devices_title">Kõik seadmed</string>
|
||||||
|
|||||||
@@ -552,7 +552,7 @@
|
|||||||
<string name="calendar_three_months">3 mesiace</string>
|
<string name="calendar_three_months">3 mesiace</string>
|
||||||
<string name="pref_header_calendar">Kalendár</string>
|
<string name="pref_header_calendar">Kalendár</string>
|
||||||
<string name="activity_type_fitness_exercises">Fitness cvičenie</string>
|
<string name="activity_type_fitness_exercises">Fitness cvičenie</string>
|
||||||
<string name="dashboard_calendar_month_goals_reached_title">Dosiahnuté % cieľa krokov</string>
|
<string name="dashboard_calendar_month_goals_reached_title">Dosiahnuté %% cieľa krokov</string>
|
||||||
<string name="maximum_duration">Dĺžka</string>
|
<string name="maximum_duration">Dĺžka</string>
|
||||||
<string name="calendar_week">Týždeň</string>
|
<string name="calendar_week">Týždeň</string>
|
||||||
<string name="calendar_day">Deň</string>
|
<string name="calendar_day">Deň</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user