Browse Source

Removed need for passing a Context to the ProxyUtils singleton

master
Anthony Restaino 9 years ago
parent
commit
3fab58955c
  1. 4
      app/src/LightningPlus/java/acr/browser/lightning/utils/ProxyUtils.java
  2. 2
      app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java

4
app/src/LightningPlus/java/acr/browser/lightning/utils/ProxyUtils.java

@ -32,9 +32,9 @@ public class ProxyUtils { @@ -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;
}

2
app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java

@ -321,7 +321,7 @@ public abstract class BrowserActivity extends ThemableBrowserActivity implements @@ -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);

Loading…
Cancel
Save