Revert "增加最右推广接口调用"

This reverts commit e6854121
This commit is contained in:
huangjian
2020-12-17 18:53:44 +08:00
parent 69da0e46bb
commit 634bffccce
5 changed files with 15 additions and 75 deletions

View File

@@ -67,7 +67,6 @@ import com.yizhuan.xchat_android_core.Env;
import com.yizhuan.xchat_android_core.UriProvider;
import com.yizhuan.xchat_android_core.auth.AuthModel;
import com.yizhuan.xchat_android_core.channel.ChannelModel;
import com.yizhuan.xchat_android_core.channel_page.model.ChannelPageModel;
import com.yizhuan.xchat_android_core.customer_server.CustomerServerModel;
import com.yizhuan.xchat_android_core.family.model.FamilyModel;
import com.yizhuan.xchat_android_core.gift.GiftModel;
@@ -742,7 +741,6 @@ public class XChatApplication extends Application {
GlobalHandleManager.get().init();
InitialModel.get().init(true).subscribe();
ChannelPageModel.get().checkZuiyouAd(oaid);
}

View File

@@ -6,16 +6,9 @@ import com.yizhuan.xchat_android_core.channel_page.bean.ChannelPageInfo;
import com.yizhuan.xchat_android_core.user.bean.InviteUserInfo;
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
import com.yizhuan.xchat_android_library.net.rxnet.RxNet;
import com.yizhuan.xchat_android_library.utils.DeviceUuidFactory;
import com.yizhuan.xchat_android_library.utils.NetworkUtils;
import com.yizhuan.xchat_android_library.utils.codec.MD5Utils;
import com.yizhuan.xchat_android_library.utils.config.BasicConfig;
import io.reactivex.Single;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
/**
@@ -68,21 +61,6 @@ public class ChannelPageModel extends BaseModel implements IChannelPageModel {
.compose(RxHelper.handleSchAndExce());
}
@Override
public void checkZuiyouAd(String oaid) {
try {
api.checkZuiyouAd(DeviceUuidFactory.getDeviceId(BasicConfig.INSTANCE.getAppContext()),
NetworkUtils.getIPAddress(BasicConfig.INSTANCE.getAppContext()),
"0",
System.getProperty("http.agent"))
.compose(RxHelper.handleSchedulers())
.subscribe();
} catch (Exception e) {
e.printStackTrace();
}
}
private interface Api {
/**
@@ -96,18 +74,6 @@ public class ChannelPageModel extends BaseModel implements IChannelPageModel {
*/
@GET("/user/v2/checkInviteUserInRoom")
Single<ServiceResult<InviteUserInfo>> checkInviteUserInRoom(@Query("inviteCode") String inviteCode);
/**
* 最右推广接口
*/
@FormUrlEncoded
@POST("/zuiyouAd/activeTrack")
Single<ServiceResult<ChannelPageInfo>> checkZuiyouAd(@Field("adroidId") String adroidId,
@Field("ip") String ip,
@Field("platformOs") String platformOs,
@Field("ua") String ua);
}
}

View File

@@ -14,6 +14,4 @@ public interface IChannelPageModel {
Single<ChannelPageInfo> getChannelPage();
Single<InviteUserInfo> checkInviteUserInRoom(String inviteCode);
void checkZuiyouAd(String oaid);
}

View File

@@ -21,5 +21,5 @@ with_jenkins=false
#\u6253\u652F\u6301x86\u7684\u6A21\u62DF\u5668\u5305\u4F7F\u7528
ndk_abi_filters=arm
version_name=2.0.3
version_code=203
version_name=2.0.0
version_code=200

View File

@@ -39,30 +39,6 @@ public class NetworkUtils {
return sWifiLocker;
}
public String getLocalHostIp() {
String ipaddress = "";
try {
Enumeration<NetworkInterface> en = NetworkInterface
.getNetworkInterfaces();
// 遍历所用的网络接口
while (en.hasMoreElements()) {
NetworkInterface nif = en.nextElement();// 得到每一个网络接口绑定的所有ip
Enumeration<InetAddress> inet = nif.getInetAddresses();
// 遍历每一个接口绑定的所有ip
while (inet.hasMoreElements()) {
InetAddress ip = inet.nextElement();
if (!ip.isLoopbackAddress()) {
return ip.getHostAddress();
}
}
}
} catch (SocketException e) {
e.printStackTrace();
}
return ipaddress;
}
public static void lockWifi(Context c) {
Log.d(TAG, "lock wifi");
if (!wifiLocker(c).isHeld())
@@ -456,7 +432,8 @@ public class NetworkUtils {
} else if (sim.startsWith("46000") || sim.startsWith("46002")
|| sim.startsWith("46007") || sim.startsWith("46020")){
return ChinaOperator.CMCC;
} else {
}
else {
return ChinaOperator.UNKNOWN;
}
}
@@ -474,12 +451,13 @@ public class NetworkUtils {
NetworkInterface intf = en.nextElement();
for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) {
InetAddress inetAddress = enumIpAddr.nextElement();
if (!inetAddress.isLoopbackAddress() && inetAddress instanceof Inet4Address) {
return inetAddress.getHostAddress();
if (!inetAddress.isLoopbackAddress()) {
return inetAddress.getHostAddress().toString();
}
}
}
} catch (SocketException ex) {
Log.e("NetworkUtils getLocalIpAddress:", ex.toString());
}
return null;
}