Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7dabc0a7 authored by Amit Kumar's avatar Amit Kumar
Browse files

Use browser settings for search suggestions and search engine

parent 56159132
Loading
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
package foundation.e.blisslauncher.features.suggestions;
package foundation.e.blisslauncher.core.network.duckduckgo;

public class AutoCompleteServiceRawResult {
public class DuckDuckGoResult {

    private String phrase;

    public AutoCompleteServiceRawResult(String phrase){
    public DuckDuckGoResult(String phrase){
        this.phrase = phrase;
    }

+12 −0
Original line number Diff line number Diff line
package foundation.e.blisslauncher.features.suggestions;
package foundation.e.blisslauncher.core.network.duckduckgo;

import java.util.List;

@@ -6,8 +6,7 @@ import io.reactivex.Observable;
import retrofit2.http.GET;
import retrofit2.http.Query;

public interface AutoCompleteService {

public interface DuckDuckGoSuggestionService {
    @GET("/ac/")
    Observable<List<AutoCompleteServiceRawResult>> query(@Query("q") String query);
    Observable<List<DuckDuckGoResult>> query(@Query("q") String query);
}
+20 −0
Original line number Diff line number Diff line
package foundation.e.blisslauncher.core.network.qwant;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.util.List;

public class QwantData {
    @SerializedName("items")
    @Expose
    private List<QwantItem> items = null;

    public List<QwantItem> getItems() {
        return items;
    }

    public void setItems(List<QwantItem> items) {
        this.items = items;
    }
}
+29 −0
Original line number Diff line number Diff line
package foundation.e.blisslauncher.core.network.qwant;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

public class QwantItem {
    @SerializedName("value")
    @Expose
    private String value;
    @SerializedName("suggestType")
    @Expose
    private Integer suggestType;

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public Integer getSuggestType() {
        return suggestType;
    }

    public void setSuggestType(Integer suggestType) {
        this.suggestType = suggestType;
    }
}
+29 −0
Original line number Diff line number Diff line
package foundation.e.blisslauncher.core.network.qwant;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

public class QwantResult {
    @SerializedName("status")
    @Expose
    private String status;
    @SerializedName("data")
    @Expose
    private QwantData data;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public QwantData getData() {
        return data;
    }

    public void setData(QwantData data) {
        this.data = data;
    }
}
Loading