处理 SonarQube 问题:

双重检查锁方式实现的单例,改为使用静态内部类方式
This commit is contained in:
lyr
2021-12-21 16:51:44 +08:00
parent 27f14ac914
commit 9feb4e774a
330 changed files with 828 additions and 885 deletions

View File

@ -290,7 +290,7 @@ public class Config {
@SuppressLint("CheckResult")
public static void getGhzsSettings() {
String channel = HaloApp.getInstance().getChannel();
RetrofitManager.getInstance(HaloApp.getInstance().getApplication())
RetrofitManager.getInstance()
.getApi().getSettings(PackageUtils.getGhVersionName(), channel)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -314,7 +314,7 @@ public class Config {
}
});
RetrofitManager.getInstance(HaloApp.getInstance().getApplication())
RetrofitManager.getInstance()
.getApi().getNewSettings(Build.MANUFACTURER, Build.MODEL, channel, Build.VERSION.SDK_INT, BuildConfig.VERSION_NAME)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
@ -326,7 +326,7 @@ public class Config {
}
});
RetrofitManager.getInstance(HaloApp.getInstance().getApplication())
RetrofitManager.getInstance()
.getApi().getGameGuidePopup(Build.MANUFACTURER, Build.VERSION.RELEASE, Build.MODEL, channel, BuildConfig.VERSION_NAME)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())