Merge pull request #9989 from osmandapp/fix_configure_profile
Fix import profile by AIDL
This commit is contained in:
commit
103530568b
2 changed files with 15 additions and 6 deletions
|
@ -137,14 +137,18 @@ public class ContextMenuAdapter {
|
||||||
Collections.sort(items, new Comparator<ContextMenuItem>() {
|
Collections.sort(items, new Comparator<ContextMenuItem>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare(ContextMenuItem item1, ContextMenuItem item2) {
|
public int compare(ContextMenuItem item1, ContextMenuItem item2) {
|
||||||
if (DRAWER_SWITCH_PROFILE_ID.equals(item1.getId())) {
|
if (DRAWER_CONFIGURE_PROFILE_ID.equals(item1.getId())
|
||||||
return -1;
|
&& DRAWER_SWITCH_PROFILE_ID.equals(item2.getId())) {
|
||||||
}
|
|
||||||
if (DRAWER_CONFIGURE_PROFILE_ID.equals(item1.getId()) && DRAWER_SWITCH_PROFILE_ID.equals(item2.getId())) {
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
} else if (DRAWER_SWITCH_PROFILE_ID.equals(item1.getId())
|
||||||
if (DRAWER_CONFIGURE_PROFILE_ID.equals(item1.getId())) {
|
&& DRAWER_CONFIGURE_PROFILE_ID.equals(item2.getId())) {
|
||||||
return -1;
|
return -1;
|
||||||
|
} else if (DRAWER_SWITCH_PROFILE_ID.equals(item1.getId())
|
||||||
|
|| DRAWER_CONFIGURE_PROFILE_ID.equals(item1.getId())) {
|
||||||
|
return -1;
|
||||||
|
} else if (DRAWER_SWITCH_PROFILE_ID.equals(item2.getId())
|
||||||
|
|| DRAWER_CONFIGURE_PROFILE_ID.equals(item2.getId())) {
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
int order1 = item1.getOrder();
|
int order1 = item1.getOrder();
|
||||||
int order2 = item2.getOrder();
|
int order2 = item2.getOrder();
|
||||||
|
|
|
@ -2937,6 +2937,11 @@ public class SettingsHelper {
|
||||||
for (ExportSettingsType settingsType : settingsTypes) {
|
for (ExportSettingsType settingsType : settingsTypes) {
|
||||||
List<?> settingsDataObjects = additionalData.get(settingsType);
|
List<?> settingsDataObjects = additionalData.get(settingsType);
|
||||||
if (settingsDataObjects != null) {
|
if (settingsDataObjects != null) {
|
||||||
|
for (Object object : settingsDataObjects) {
|
||||||
|
if (object instanceof ApplicationModeBean) {
|
||||||
|
settingsItems.add(new ProfileSettingsItem(app, null, (ApplicationModeBean) object));
|
||||||
|
}
|
||||||
|
}
|
||||||
settingsItems.addAll(prepareAdditionalSettingsItems(new ArrayList<>(settingsDataObjects)));
|
settingsItems.addAll(prepareAdditionalSettingsItems(new ArrayList<>(settingsDataObjects)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue