Commit e882bebe authored by Nicolas Fella's avatar Nicolas Fella

Simplify switch

parent d1565702
...@@ -347,15 +347,13 @@ public class MainActivity extends AppCompatActivity implements SharedPreferences ...@@ -347,15 +347,13 @@ 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(); });
}); } else {
break; super.onActivityResult(requestCode, resultCode, data);
default:
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