Skip to content

Commit

Permalink
remove LeakCanary
Browse files Browse the repository at this point in the history
  • Loading branch information
c99koder committed Mar 31, 2017
1 parent 51bd390 commit 36f73d4
Show file tree
Hide file tree
Showing 22 changed files with 6 additions and 52 deletions.
6 changes: 0 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,4 @@ dependencies {
transitive = true;
}
compile fileTree(include: ['*.jar'], dir: 'libs')
//debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-SNAPSHOT'

//enterprisedebugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-SNAPSHOT'
compile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4'
enterprisereleaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4'
debugTestCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4'
}
1 change: 0 additions & 1 deletion irccloud-android.iml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
<orderEntry type="library" exported="" name="handy-uri-templates-2.0.2" level="project" />
<orderEntry type="library" exported="" name="play-services-basement-10.0.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-25.2.0" level="project" />
<orderEntry type="library" exported="" name="leakcanary-android-no-op-1.4" level="project" />
<orderEntry type="library" exported="" name="recyclerview-v7-25.2.0" level="project" />
<orderEntry type="library" exported="" name="play-services-gcm-10.0.1" level="project" />
<orderEntry type="library" exported="" name="animated-vector-drawable-25.2.0" level="project" />
Expand Down
5 changes: 0 additions & 5 deletions release-src/com/irccloud/android/IRCCloudApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.irccloud.android;

import android.content.Context;
import com.squareup.leakcanary.RefWatcher;

@SuppressWarnings("unused")
public class IRCCloudApplication extends IRCCloudApplicationBase {
Expand All @@ -31,10 +30,6 @@ public static IRCCloudApplication getInstance() {
}
}

public static RefWatcher getRefWatcher(Context context) {
return RefWatcher.DISABLED;
}

@Override
public void onCreate() {
instance = this;
Expand Down
6 changes: 0 additions & 6 deletions res/xml/preferences_debug.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

<PreferenceCategory android:title="Debugging">
<com.cgollner.unclouded.preferences.SwitchPreferenceCompat
android:key="detect_leaks"
android:defaultValue="true"
android:summaryOn="Memory leaks will be caught and automatically reported via Crashlytics"
android:summaryOff="Memory leaks will be ignored"
android:title="Detect Memory Leaks" />
<!--<com.cgollner.unclouded.preferences.SwitchPreferenceCompat
android:key="background_sync"
android:defaultValue="true"
Expand Down
2 changes: 1 addition & 1 deletion src/com/irccloud/android/NetworkConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -3094,7 +3094,7 @@ public String fetch(URL url, String postdata, String sk, String token, HashMap<S
HttpsURLConnection https = (HttpsURLConnection) ((proxy != null) ? url.openConnection(proxy) : url.openConnection(Proxy.NO_PROXY));
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1 && url.getHost().equals(IRCCLOUD_HOST))
https.setSSLSocketFactory(IRCCloudSocketFactory);
else
else if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1)
https.setSSLSocketFactory(TrustKit.getInstance().getSSLSocketFactory(url.getHost()));
conn = https;
} else {
Expand Down
8 changes: 0 additions & 8 deletions src/com/irccloud/android/RemoteInputService.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import com.crashlytics.android.Crashlytics;
import com.irccloud.android.data.collection.NotificationsList;
import com.irccloud.android.data.collection.RecentConversationsList;
import com.squareup.leakcanary.RefWatcher;

import org.json.JSONObject;

Expand Down Expand Up @@ -86,11 +85,4 @@ protected void onHandleIntent(Intent intent) {
}
}
}

@Override public void onDestroy() {
super.onDestroy();
RefWatcher refWatcher = IRCCloudApplication.getRefWatcher(this);
if(refWatcher != null)
refWatcher.watch(this);
}
}
2 changes: 1 addition & 1 deletion src/com/irccloud/android/activity/PreferencesActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public void onClick(View v) {
if (foundSony)
findPreference("notify_sony").setOnPreferenceChangeListener(sonytoggle);
if(BuildConfig.DEBUG) {
addPreferencesFromResource(R.xml.preferences_debug);
//addPreferencesFromResource(R.xml.preferences_debug);
/*findPreference("enable_cache").setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object o) {
Expand Down
1 change: 0 additions & 1 deletion src/com/irccloud/android/fragment/AcceptListFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import com.irccloud.android.data.model.Server;
import com.irccloud.android.data.collection.ServersList;
import com.irccloud.android.databinding.RowAcceptlistBinding;
import com.squareup.leakcanary.RefWatcher;

import org.solovyev.android.views.llm.LinearLayoutManager;

Expand Down
1 change: 0 additions & 1 deletion src/com/irccloud/android/fragment/AddChannelFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import com.irccloud.android.activity.EditConnectionActivity;
import com.irccloud.android.data.model.Server;
import com.irccloud.android.data.collection.ServersList;
import com.squareup.leakcanary.RefWatcher;

import java.util.ArrayList;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import com.irccloud.android.IRCCloudApplication;
import com.irccloud.android.NetworkConnection;
import com.irccloud.android.R;
import com.squareup.leakcanary.RefWatcher;

import org.json.JSONException;
import org.json.JSONObject;@SuppressLint("ValidFragment")
Expand Down
4 changes: 0 additions & 4 deletions src/com/irccloud/android/fragment/BuffersListFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import com.irccloud.android.data.model.Server;
import com.irccloud.android.data.collection.ServersList;
import com.irccloud.android.databinding.RowBufferBinding;
import com.squareup.leakcanary.RefWatcher;

import java.util.ArrayList;
import java.util.Collections;
Expand Down Expand Up @@ -675,9 +674,6 @@ public void onResume() {
super.onDestroy();
if (conn != null)
conn.removeHandler(this);
RefWatcher refWatcher = IRCCloudApplication.getRefWatcher(getActivity());
if(refWatcher != null)
refWatcher.watch(this);
}

@Override
Expand Down
1 change: 0 additions & 1 deletion src/com/irccloud/android/fragment/ChannelListFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import com.irccloud.android.data.model.Server;
import com.irccloud.android.data.collection.ServersList;
import com.irccloud.android.databinding.RowChannelBinding;
import com.squareup.leakcanary.RefWatcher;

import org.solovyev.android.views.llm.LinearLayoutManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
import com.irccloud.android.data.model.User;
import com.irccloud.android.data.collection.UsersList;
import com.irccloud.android.databinding.RowChannelmodeBinding;
import com.squareup.leakcanary.RefWatcher;

import org.solovyev.android.views.llm.LinearLayoutManager;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import com.irccloud.android.IRCCloudApplication;
import com.irccloud.android.NetworkConnection;
import com.irccloud.android.R;
import com.squareup.leakcanary.RefWatcher;

import org.json.JSONException;
import org.json.JSONObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import com.irccloud.android.R;
import com.irccloud.android.data.model.Server;
import com.irccloud.android.data.collection.ServersList;
import com.squareup.leakcanary.RefWatcher;

import org.json.JSONArray;
import org.json.JSONException;
Expand Down
1 change: 0 additions & 1 deletion src/com/irccloud/android/fragment/IgnoreListFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import com.irccloud.android.data.model.Server;
import com.irccloud.android.data.collection.ServersList;
import com.irccloud.android.databinding.RowHostmaskBinding;
import com.squareup.leakcanary.RefWatcher;

import org.solovyev.android.views.llm.LinearLayoutManager;

Expand Down
4 changes: 0 additions & 4 deletions src/com/irccloud/android/fragment/MessageViewFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
import com.irccloud.android.data.collection.EventsList;
import com.irccloud.android.data.model.Server;
import com.irccloud.android.fragment.BuffersListFragment.OnBufferSelectedListener;
import com.squareup.leakcanary.RefWatcher;

import org.json.JSONException;
import org.json.JSONObject;
Expand Down Expand Up @@ -2056,9 +2055,6 @@ public void onStart() {
@Override
public void onDestroy() {
super.onDestroy();
RefWatcher refWatcher = IRCCloudApplication.getRefWatcher(getActivity());
if (refWatcher != null)
refWatcher.watch(this);
if (tapTimer != null) {
tapTimer.cancel();
tapTimer = null;
Expand Down
1 change: 0 additions & 1 deletion src/com/irccloud/android/fragment/NamesListFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import com.irccloud.android.NetworkConnection;
import com.irccloud.android.R;
import com.irccloud.android.databinding.RowWhoBinding;
import com.squareup.leakcanary.RefWatcher;

import org.solovyev.android.views.llm.LinearLayoutManager;

Expand Down
3 changes: 2 additions & 1 deletion src/com/irccloud/android/fragment/NickservFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
import com.irccloud.android.R;
import com.irccloud.android.data.model.Server;
import com.irccloud.android.data.collection.ServersList;
import com.squareup.leakcanary.RefWatcher;public class NickservFragment extends DialogFragment {

public class NickservFragment extends DialogFragment {
Server server;
EditText pass;
TextView nick;
Expand Down
4 changes: 0 additions & 4 deletions src/com/irccloud/android/fragment/UsersListFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import com.irccloud.android.data.model.User;
import com.irccloud.android.data.collection.UsersList;
import com.irccloud.android.databinding.RowUserBinding;
import com.squareup.leakcanary.RefWatcher;

import org.json.JSONException;
import org.json.JSONObject;
Expand Down Expand Up @@ -347,9 +346,6 @@ public void onResume() {
@Override
public void onDestroy() {
super.onDestroy();
RefWatcher refWatcher = IRCCloudApplication.getRefWatcher(getActivity());
if (refWatcher != null)
refWatcher.watch(this);
if (tapTimer != null) {
tapTimer.cancel();
tapTimer = null;
Expand Down
1 change: 0 additions & 1 deletion src/com/irccloud/android/fragment/WhoListFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import com.irccloud.android.NetworkConnection;
import com.irccloud.android.R;
import com.irccloud.android.databinding.RowWhoBinding;
import com.squareup.leakcanary.RefWatcher;

import org.solovyev.android.views.llm.LinearLayoutManager;

Expand Down
3 changes: 2 additions & 1 deletion src/com/irccloud/android/fragment/WhoisFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
import com.irccloud.android.IRCCloudLinkMovementMethod;
import com.irccloud.android.R;
import com.irccloud.android.data.collection.ServersList;
import com.squareup.leakcanary.RefWatcher;public class WhoisFragment extends DialogFragment {

public class WhoisFragment extends DialogFragment {
IRCCloudJSONObject event;
TextView extra, name, mask, server, time, timeTitle, channels, channelsTitle, opChannels, opTitle,
operChannels, operTitle, ownerChannels, ownerTitle, adminChannels, adminTitle, halfopChannels, halfopTitle, voicedChannels, voicedTitle, awayTitle, away;
Expand Down

0 comments on commit 36f73d4

Please sign in to comment.