package com.vackosar.searchbasedlauncher.entity;

import com.google.gson.annotations.Expose;

public class App implements Comparable<App> {

    @Expose private final String name;
    @Expose private String nick;
    @Expose private final String activity;

    public App(String name, String nick, String activity) {
        this.name = name;
        this.nick = nick;
        this.activity = activity;
    }

    public String getName() {
        return name;
    }

    public String getActivity() {
        return activity;
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        App app = (App) o;

        return activity.equals(app.activity);

    }

    @Override
    public int hashCode() {
        return activity.hashCode();
    }

    @Override
    public int compareTo(App another) {
        if (another == null) {
            return nick.compareTo(null);
        }
        return nick.compareTo(another.getNick());
    }
}

@@ -841,38 +841,141 @@
 pp) o;%0A%0A        
-return
+if (name != null ? !name.equals(app.name) : app.name != null) return false;%0A        return activity != null ?
  activity.equals
@@ -988,16 +988,39 @@
 ctivity)
+ : app.activity == null
 ;%0A%0A    %7D
@@ -1075,34 +1075,155 @@
     
-return activity.hashCode()
+int result = name != null ? name.hashCode() : 0;%0A        result = 31 * result + (activity != null ? activity.hashCode() : 0);%0A        return result
 ;%0A  

Fix not-showing apps with similar activities.