Fix compilation

This commit is contained in:
Victor Shcherb 2020-03-21 23:26:17 +01:00
parent 865f4c00a7
commit 716705472e
3 changed files with 3 additions and 13 deletions

View file

@ -943,13 +943,12 @@ public class SettingsHelper {
String name = object.getString("name");
// FIXME QA: make type string
int actionType = object.getInt("type");
QuickActionType tp = QuickActionRegistry.getActionTypeById(actionType);
if(tp != null) {
QuickAction quickAction = QuickActionRegistry.newActionByType(actionType);
if (quickAction.getType() != 0) {
String paramsString = object.getString("params");
HashMap<String, String> params = gson.fromJson(paramsString, type);
QuickAction quickAction = new QuickAction(actionType);
if (!name.isEmpty()) {
quickAction.setName(name);
}

View file

@ -65,7 +65,7 @@ public class QuickAction {
return id;
}
public long getType() {
public int getType() {
return type;
}

View file

@ -258,15 +258,6 @@ public class QuickActionRegistry {
}
}
public static QuickActionType getActionTypeById(int type) {
for (QuickActionType t : getActionTypes()) {
if (t.getId() == type) {
return t;
}
}
return null;
}
public static QuickAction newActionByType(int type) {
for (QuickActionType t : getActionTypes()) {
if (t.getId() == type) {