Commit e882bebe authored by Nicolas Fella's avatar Nicolas Fella

Simplify switch

parent d1565702
...@@ -347,14 +347,12 @@ public class MainActivity extends AppCompatActivity implements SharedPreferences ...@@ -347,14 +347,12 @@ public class MainActivity extends AppCompatActivity implements SharedPreferences
@Override @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) { protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) { if (requestCode == RESULT_NEEDS_RELOAD) {
case RESULT_NEEDS_RELOAD:
BackgroundService.RunCommand(this, service -> { BackgroundService.RunCommand(this, service -> {
Device device = service.getDevice(mCurrentDevice); Device device = service.getDevice(mCurrentDevice);
device.reloadPluginsFromSettings(); device.reloadPluginsFromSettings();
}); });
break; } else {
default:
super.onActivityResult(requestCode, resultCode, data); super.onActivityResult(requestCode, resultCode, data);
} }
} }
......
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