Fix authorization osmo
This commit is contained in:
parent
3c7a418707
commit
04a2acf5a1
2 changed files with 8 additions and 5 deletions
|
@ -100,6 +100,9 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer
|
|||
};
|
||||
@Override
|
||||
protected void onPostExecute(Exception result) {
|
||||
if(dlg.isShowing()) {
|
||||
dlg.dismiss();
|
||||
}
|
||||
if (result != null) {
|
||||
result.printStackTrace();
|
||||
app.showToastMessage(app.getString(R.string.osmo_io_error) + result.getMessage());
|
||||
|
@ -110,10 +113,7 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer
|
|||
|
||||
@Override
|
||||
protected Exception doInBackground(Void... params) {
|
||||
if(dlg.isShowing()) {
|
||||
dlg.dismiss();
|
||||
}
|
||||
return OsmandPlugin.getEnabledPlugin(OsMoPlugin.class).registerOsmoDeviceKey();
|
||||
return registerOsmoDeviceKey();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ public class SettingsOsMoActivity extends SettingsBaseActivity {
|
|||
uuid = new Preference(this);
|
||||
uuid.setTitle(R.string.osmo_settings_uuid);
|
||||
uuid.setSummary(getMyApplication().getSettings().OSMO_DEVICE_KEY.get().toUpperCase());
|
||||
uuid.setOnPreferenceClickListener(this);
|
||||
|
||||
grp.addPreference(uuid);
|
||||
|
||||
|
@ -40,8 +41,10 @@ public class SettingsOsMoActivity extends SettingsBaseActivity {
|
|||
@Override
|
||||
public void run() {
|
||||
updateAllSettings();
|
||||
uuid.setSummary(getMyApplication().getSettings().OSMO_DEVICE_KEY.get().toUpperCase());
|
||||
}
|
||||
}).execute();
|
||||
return true;
|
||||
}
|
||||
return super.onPreferenceClick(preference);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue