Skip to content

Commit

Permalink
fixed R8 weirdness
Browse files Browse the repository at this point in the history
  • Loading branch information
iNPUTmice committed Sep 18, 2019
1 parent 02351dc commit af74c36
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
-dontwarn java.lang.**
-dontwarn javax.lang.**

-keepclassmembers class eu.siacs.conversations.http.services.** {
!transient <fields>;
}

# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
# EnclosingMethod is required to use InnerClasses.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;

import eu.siacs.conversations.services.AvatarService;
Expand Down Expand Up @@ -83,7 +82,7 @@ public int hashCode() {

class SearchRequest {

public Set<String> keywords;
public final Set<String> keywords;

public SearchRequest(String keyword) {
this.keywords = Collections.singleton(keyword);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ 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());
Expand All @@ -57,7 +58,6 @@ void initializeMuclumbusService() {

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);
Expand Down Expand Up @@ -98,7 +98,8 @@ public void onFailure(@NonNull Call<MuclumbusService.Rooms> call, @NonNull Throw
}

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
Expand Down

0 comments on commit af74c36

Please sign in to comment.