fixed R8 weirdness
This commit is contained in:
parent
28a2686620
commit
f976ebae8a
3 changed files with 8 additions and 5 deletions
4
proguard-rules.pro
vendored
4
proguard-rules.pro
vendored
|
@ -22,6 +22,10 @@
|
|||
-dontwarn java.lang.**
|
||||
-dontwarn javax.lang.**
|
||||
|
||||
-keepclassmembers class de.pixart.messenger.http.services.** {
|
||||
!transient <fields>;
|
||||
}
|
||||
|
||||
# JSR 305 annotations are for embedding nullability information.
|
||||
-dontwarn javax.annotation.**
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ public interface MuclumbusService {
|
|||
}
|
||||
|
||||
class SearchRequest {
|
||||
public Set<String> keywords;
|
||||
public final Set<String> keywords;
|
||||
|
||||
public SearchRequest(String keyword) {
|
||||
this.keywords = Collections.singleton(keyword);
|
||||
|
|
|
@ -41,7 +41,7 @@ public class ChannelDiscoveryService {
|
|||
}
|
||||
|
||||
void initializeMuclumbusService() {
|
||||
OkHttpClient.Builder builder = new OkHttpClient.Builder();
|
||||
final OkHttpClient.Builder builder = new OkHttpClient.Builder();
|
||||
if (service.useTorToConnect()) {
|
||||
try {
|
||||
builder.proxy(HttpConnectionManager.getProxy());
|
||||
|
@ -61,7 +61,6 @@ public class ChannelDiscoveryService {
|
|||
|
||||
void discover(String query, OnChannelSearchResultsFound onChannelSearchResultsFound) {
|
||||
final boolean all = query == null || query.trim().isEmpty();
|
||||
Log.d(Config.LOGTAG, "discover channels. query=" + query);
|
||||
List<MuclumbusService.Room> result = cache.getIfPresent(all ? "" : query);
|
||||
if (result != null) {
|
||||
onChannelSearchResultsFound.onChannelSearchResultsFound(result);
|
||||
|
@ -102,8 +101,8 @@ public class ChannelDiscoveryService {
|
|||
}
|
||||
|
||||
private void discoverChannels(final String query, OnChannelSearchResultsFound listener) {
|
||||
Call<MuclumbusService.SearchResult> searchResultCall = muclumbusService.search(new MuclumbusService.SearchRequest(query));
|
||||
|
||||
MuclumbusService.SearchRequest searchRequest = new MuclumbusService.SearchRequest(query);
|
||||
Call<MuclumbusService.SearchResult> searchResultCall = muclumbusService.search(searchRequest);
|
||||
searchResultCall.enqueue(new Callback<MuclumbusService.SearchResult>() {
|
||||
@Override
|
||||
public void onResponse(@NonNull Call<MuclumbusService.SearchResult> call, @NonNull Response<MuclumbusService.SearchResult> response) {
|
||||
|
|
Reference in a new issue