add test
This commit is contained in:
@ -52,7 +52,6 @@ import com.gh.gamecenter.manager.FilterManager;
|
||||
import com.gh.gamecenter.manager.GameManager;
|
||||
import com.gh.gamecenter.manager.PackageManager;
|
||||
import com.gh.gamecenter.manager.UpdateManager;
|
||||
import com.gh.gamecenter.retrofit.JSONObjectResponse;
|
||||
import com.gh.gamecenter.retrofit.ObservableUtil;
|
||||
import com.gh.gamecenter.retrofit.Response;
|
||||
import com.gh.gamecenter.retrofit.RetrofitManager;
|
||||
@ -1015,27 +1014,4 @@ public class MainActivity extends BaseActivity {
|
||||
});
|
||||
}
|
||||
|
||||
// 提交默认头像
|
||||
private void postDefaultIcon(final int i) { // TODO 是否删除
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("icon_key", "icon" + i);
|
||||
RequestBody body = RequestBody.create(MediaType.parse("application/json"),
|
||||
new JSONObject(params).toString());
|
||||
RetrofitManager.getInstance(mContext).getApi()
|
||||
.postDefaultIcon(LoginUtils.getToken(this), body)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new JSONObjectResponse() {
|
||||
@Override
|
||||
public void onResponse(JSONObject response) {
|
||||
sp.edit().putBoolean("changeDefaultIcon", false).apply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(HttpException e) {
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user