mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 05:37:43 +00:00
Simplify switch
This commit is contained in:
parent
1b8763db61
commit
d1565702cc
@ -379,13 +379,9 @@ public class MainActivity extends AppCompatActivity implements SharedPreferences
|
||||
|
||||
@Override
|
||||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
||||
switch (key) {
|
||||
case DeviceHelper.KEY_DEVICE_NAME_PREFERENCE:
|
||||
mNavViewDeviceName.setText(DeviceHelper.getDeviceName(this));
|
||||
BackgroundService.RunCommand(this, BackgroundService::onNetworkChange);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
if (DeviceHelper.KEY_DEVICE_NAME_PREFERENCE.equals(key)) {
|
||||
mNavViewDeviceName.setText(DeviceHelper.getDeviceName(this));
|
||||
BackgroundService.RunCommand(this, BackgroundService::onNetworkChange);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user