mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Fix some codacy issues
This commit is contained in:
parent
c712b561d4
commit
1785e9b179
2 changed files with 11 additions and 7 deletions
|
|
@ -98,14 +98,14 @@ public class CommonsApplication extends Application {
|
|||
}
|
||||
|
||||
public static CommonsApplication getInstance() {
|
||||
if(instance == null) {
|
||||
if (instance == null) {
|
||||
instance = new CommonsApplication();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public AbstractHttpClient getHttpClient() {
|
||||
if(httpClient == null) {
|
||||
if (httpClient == null) {
|
||||
httpClient = newHttpClient();
|
||||
}
|
||||
return httpClient;
|
||||
|
|
@ -123,7 +123,7 @@ public class CommonsApplication extends Application {
|
|||
}
|
||||
|
||||
public MWApi getMWApi() {
|
||||
if(api == null) {
|
||||
if (api == null) {
|
||||
api = newMWApi();
|
||||
}
|
||||
return api;
|
||||
|
|
@ -134,14 +134,14 @@ public class CommonsApplication extends Application {
|
|||
}
|
||||
|
||||
public CacheController getCacheData() {
|
||||
if(cacheData == null) {
|
||||
if (cacheData == null) {
|
||||
cacheData = new CacheController();
|
||||
}
|
||||
return cacheData;
|
||||
}
|
||||
|
||||
public RequestQueue getVolleyQueue() {
|
||||
if(volleyQueue == null) {
|
||||
if (volleyQueue == null) {
|
||||
DiskBasedCache cache = new DiskBasedCache(getCacheDir(), 16 * 1024 * 1024);
|
||||
volleyQueue = new RequestQueue(cache, new BasicNetwork(new HurlStack()));
|
||||
volleyQueue.start();
|
||||
|
|
@ -150,7 +150,7 @@ public class CommonsApplication extends Application {
|
|||
}
|
||||
|
||||
public synchronized DBOpenHelper getDBOpenHelper() {
|
||||
if(dbOpenHelper == null) {
|
||||
if (dbOpenHelper == null) {
|
||||
dbOpenHelper = new DBOpenHelper(this);
|
||||
}
|
||||
return dbOpenHelper;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,11 @@ public class SignupActivity extends BaseActivity {
|
|||
//Signup success, so clear cookies, notify user, and load LoginActivity again
|
||||
Timber.d("Overriding URL %s", url);
|
||||
|
||||
Toast toast = Toast.makeText(CommonsApplication.getInstance(), "Account created!", Toast.LENGTH_LONG);
|
||||
Toast toast = Toast.makeText(
|
||||
CommonsApplication.getInstance(),
|
||||
"Account created!",
|
||||
Toast.LENGTH_LONG
|
||||
);
|
||||
toast.show();
|
||||
|
||||
Intent intent = new Intent(CommonsApplication.getInstance(), LoginActivity.class);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue