2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 06:05:12 +00:00

Simplify switch

This commit is contained in:
Nicolas Fella
2019-04-20 22:38:44 +02:00
parent d1565702cc
commit e882bebe4e

View File

@@ -347,15 +347,13 @@ public class MainActivity extends AppCompatActivity implements SharedPreferences
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
switch (requestCode) {
case RESULT_NEEDS_RELOAD:
BackgroundService.RunCommand(this, service -> {
Device device = service.getDevice(mCurrentDevice);
device.reloadPluginsFromSettings();
});
break;
default:
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RESULT_NEEDS_RELOAD) {
BackgroundService.RunCommand(this, service -> {
Device device = service.getDevice(mCurrentDevice);
device.reloadPluginsFromSettings();
});
} else {
super.onActivityResult(requestCode, resultCode, data);
}
}