Commit d1565702 authored by Nicolas Fella's avatar Nicolas Fella

Simplify switch

parent 1b8763db
......@@ -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);
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment