|
|
@@ -36,13 +36,14 @@ import static com.sheep.jiuyan.samllsheep.utils.ClassFileHelper.DIR;
|
|
|
|
|
|
public class AdHelper {
|
|
|
|
|
|
- public static void goAdLink(Activity activity, SheepAd advertising) {
|
|
|
+ // 返回true 为apk下载
|
|
|
+ public static boolean goAdLink(Activity activity, SheepAd advertising) {
|
|
|
if (TextUtils.isEmpty(SpUtils.getToken(SheepApp.getInstance()))) {
|
|
|
Jump2View.getInstance().goLoginView(activity, null);
|
|
|
if (activity instanceof SplashAct) {
|
|
|
activity.finish();
|
|
|
}
|
|
|
- return;
|
|
|
+ return false;
|
|
|
}
|
|
|
if (advertising.getJump_type() == 1) {
|
|
|
if (advertising.getJump_form() == 1) {
|
|
|
@@ -51,7 +52,7 @@ public class AdHelper {
|
|
|
Jump2View.getInstance().goWeb(activity, advertising.getJump_url());
|
|
|
}
|
|
|
AdHelper.stat(advertising.getAd_id(), 2);
|
|
|
- return;
|
|
|
+ return false;
|
|
|
} else if (advertising.getJump_type() == 2) {
|
|
|
if(advertising.getJump_form() == 1) {
|
|
|
String fileName = FileUtil.getLastSplitEnd(advertising.getJump_url(), '/');
|
|
|
@@ -62,9 +63,10 @@ public class AdHelper {
|
|
|
Jump2View.getInstance().goWeb(activity, advertising.getJump_url());
|
|
|
}
|
|
|
AdHelper.stat(advertising.getAd_id(), 3);
|
|
|
- return;
|
|
|
+ return advertising.getJump_form() == 1;
|
|
|
}
|
|
|
CommonUtil.getInstance().clickAd(activity, advertising.getId(), advertising.getLink_type(), advertising.getLink_id());
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
public static void stat(long adId, int type) {
|