Merge branch 'fix-GHZS-1622' into 'dev'

fix: OPPO手机拦截安装相关优化—0314测试 (更正接口调用) https://jira.shanqu.cc/browse/GHZS-1622

See merge request halo/android/assistant-android!796
This commit is contained in:
陈君陶
2023-03-15 09:24:07 +08:00
2 changed files with 13 additions and 10 deletions

View File

@ -21,6 +21,7 @@ import com.gh.gamecenter.common.utils.DarkModeUtils;
import com.gh.gamecenter.common.utils.EnvHelper;
import com.gh.gamecenter.core.utils.GsonUtils;
import com.gh.gamecenter.core.utils.SPUtils;
import com.gh.gamecenter.core.utils.UrlFilterUtils;
import com.gh.gamecenter.entity.GameGuidePopupEntity;
import com.gh.gamecenter.entity.NewApiSettingsEntity;
import com.gh.gamecenter.entity.NewSettingsEntity;
@ -358,7 +359,7 @@ public class Config {
getNewSettings(channel);
RetrofitManager.getInstance()
.getApi().getSettings(PackageUtils.getGhVersionName(), channel, Build.MANUFACTURER, Build.MODEL, Build.VERSION.SDK_INT)
.getApi().getSettings(PackageUtils.getGhVersionName(), channel)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Response<SettingsEntity>() {
@ -442,8 +443,13 @@ public class Config {
private static void getNewSettings(String channel) {
if (mNewApiSettingsEntity == null) {
String filterString = UrlFilterUtils.getFilterQuery(
"manufacturer", Build.MANUFACTURER,
"model", Build.MODEL,
"android_sdk_version", String.valueOf(Build.VERSION.SDK_INT));
RetrofitManager.getInstance()
.getNewApi().getNewSettings(PackageUtils.getGhVersionName(), channel)
.getNewApi().getNewSettings(PackageUtils.getGhVersionName(), channel, filterString)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new BiResponse<NewApiSettingsEntity>() {

View File

@ -809,19 +809,16 @@ public interface ApiService {
@GET("settings")
Observable<SettingsEntity> getSettings(
@Query("version") String version,
@Query("channel") String channel,
@Query("manufacture") String manufacture,
@Query("model") String model,
@Query("android_sdk_version") int androidSdkVersion
);
Observable<SettingsEntity> getSettings(@Query("version") String version, @Query("channel") String channel);
/**
* 新的设置接口
*/
@GET("settings")
Single<NewApiSettingsEntity> getNewSettings(@Query("version") String version, @Query("channel") String channel);
Single<NewApiSettingsEntity> getNewSettings(
@Query("version") String version,
@Query("channel") String channel,
@Query("device") String device);
/**
* 获取新的配置信息,因为旧的已经太大了避免冲突