From 3fab58955ca812bc4279023a6946e7a7fb5fdb88 Mon Sep 17 00:00:00 2001 From: Anthony Restaino Date: Wed, 9 Sep 2015 22:18:20 -0400 Subject: [PATCH] Removed need for passing a Context to the ProxyUtils singleton --- .../java/acr/browser/lightning/utils/ProxyUtils.java | 4 ++-- .../java/acr/browser/lightning/activity/BrowserActivity.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/LightningPlus/java/acr/browser/lightning/utils/ProxyUtils.java b/app/src/LightningPlus/java/acr/browser/lightning/utils/ProxyUtils.java index bef4311..269c185 100644 --- a/app/src/LightningPlus/java/acr/browser/lightning/utils/ProxyUtils.java +++ b/app/src/LightningPlus/java/acr/browser/lightning/utils/ProxyUtils.java @@ -32,9 +32,9 @@ public class ProxyUtils { mI2PHelper = new I2PAndroidHelper(context.getApplicationContext()); } - public static ProxyUtils getInstance(@NonNull Context context) { + public static ProxyUtils getInstance() { if (mInstance == null) { - mInstance = new ProxyUtils(context); + mInstance = new ProxyUtils(BrowserApp.getAppContext()); } return mInstance; } diff --git a/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java b/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java index f05bb87..7c3dfde 100644 --- a/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java +++ b/app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java @@ -321,7 +321,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements } arrowButton.setOnClickListener(this); - mProxyUtils = ProxyUtils.getInstance(this); + mProxyUtils = ProxyUtils.getInstance(); setupFrameLayoutButton(R.id.action_back, R.id.icon_back); setupFrameLayoutButton(R.id.action_forward, R.id.icon_forward);