2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 05:37:43 +00:00

Simplify switch

This commit is contained in:
Nicolas Fella 2019-04-20 22:37:06 +02:00
parent 1b8763db61
commit d1565702cc

View File

@ -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);
}
}
}