mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 21:55:10 +00:00
Fixed crash
This commit is contained in:
@@ -50,6 +50,15 @@ public class SettingsActivity extends AppCompatPreferenceActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onServiceStart(BackgroundService service) {
|
public void onServiceStart(BackgroundService service) {
|
||||||
final Device device = service.getDevice(deviceId);
|
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();
|
Set<String> plugins = PluginFactory.getAvailablePlugins();
|
||||||
for (final String pluginKey : plugins) {
|
for (final String pluginKey : plugins) {
|
||||||
PluginPreference pref = new PluginPreference(SettingsActivity.this, pluginKey, device);
|
PluginPreference pref = new PluginPreference(SettingsActivity.this, pluginKey, device);
|
||||||
|
Reference in New Issue
Block a user