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

Fixed crash

This commit is contained in:
Albert Vaca 2016-01-18 02:37:22 -08:00
parent c647cbd93c
commit 8a0e4caaff

View File

@ -50,6 +50,15 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
@Override
public void onServiceStart(BackgroundService service) {
final Device device = service.getDevice(deviceId);
if (device == null) {
SettingsActivity.this.runOnUiThread(new Runnable() {
@Override
public void run() {
SettingsActivity.this.finish();
}
});
return;
}
Set<String> plugins = PluginFactory.getAvailablePlugins();
for (final String pluginKey : plugins) {
PluginPreference pref = new PluginPreference(SettingsActivity.this, pluginKey, device);