mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-22 18:07:55 +00:00
Remove setting to disable UDP broadcast
This commit is contained in:
parent
1236cbe4e3
commit
05e14bb81c
@ -420,12 +420,6 @@ public class LanLinkProvider extends BaseLinkProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void broadcastUdpIdentityPacket(@Nullable Network network) {
|
private void broadcastUdpIdentityPacket(@Nullable Network network) {
|
||||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
|
|
||||||
if (!preferences.getBoolean(SettingsFragment.KEY_UDP_BROADCAST_ENABLED, true)) {
|
|
||||||
Log.i("LanLinkProvider", "UDP broadcast is disabled in settings. Skipping.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ThreadHelper.execute(() -> {
|
ThreadHelper.execute(() -> {
|
||||||
List<DeviceHost> hostList = CustomDevicesActivity
|
List<DeviceHost> hostList = CustomDevicesActivity
|
||||||
.getCustomDeviceList(context);
|
.getCustomDeviceList(context);
|
||||||
|
@ -64,7 +64,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
|||||||
persistentNotificationPref(context),
|
persistentNotificationPref(context),
|
||||||
trustedNetworkPref(context),
|
trustedNetworkPref(context),
|
||||||
devicesByIpPref(context),
|
devicesByIpPref(context),
|
||||||
udpBroadcastPref(context),
|
|
||||||
bluetoothSupportPref(context),
|
bluetoothSupportPref(context),
|
||||||
exportLogsPref(context),
|
exportLogsPref(context),
|
||||||
moreSettingsPref(context),
|
moreSettingsPref(context),
|
||||||
@ -200,12 +199,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun udpBroadcastPref(context: Context) = SwitchPreference(context).apply {
|
|
||||||
setDefaultValue(true)
|
|
||||||
key = KEY_UDP_BROADCAST_ENABLED
|
|
||||||
setTitle(R.string.enable_udp_broadcast)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun bluetoothSupportPref(context: Context) = SwitchPreference(context).apply {
|
private fun bluetoothSupportPref(context: Context) = SwitchPreference(context).apply {
|
||||||
setDefaultValue(false)
|
setDefaultValue(false)
|
||||||
key = KEY_BLUETOOTH_ENABLED
|
key = KEY_BLUETOOTH_ENABLED
|
||||||
@ -262,7 +255,6 @@ class SettingsFragment : PreferenceFragmentCompat() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val KEY_UDP_BROADCAST_ENABLED: String = "udp_broadcast_enabled"
|
|
||||||
const val KEY_BLUETOOTH_ENABLED: String = "bluetooth_enabled"
|
const val KEY_BLUETOOTH_ENABLED: String = "bluetooth_enabled"
|
||||||
const val KEY_APP_THEME: String = "theme_pref"
|
const val KEY_APP_THEME: String = "theme_pref"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user