移除废弃的广点通部分代码

This commit is contained in:
juntao
2022-05-07 15:18:05 +08:00
parent b4a8e5c68d
commit 01966a87ec
16 changed files with 6 additions and 181 deletions

View File

@ -356,10 +356,6 @@ public class NewsDetailActivity extends ToolBarActivity implements OnClickListen
new CollectionUtils.OnCollectionListener() {
@Override
public void onSuccess() {
// GdtHelper.INSTANCE.logAction(ActionType.ADD_TO_WISHLIST,
// GdtHelper.CONTENT_TYPE, "ARTICLE",
// GdtHelper.CONTENT_ID, newsDetailEntity.getId());
newsDetailEntity.getMe().setArticleFavorite(false);
mNewsCollection.setEnabled(true);
mNewsCollection.setIcon(R.drawable.community_content_detail_collect_unselect);
@ -667,10 +663,6 @@ public class NewsDetailActivity extends ToolBarActivity implements OnClickListen
} else {
mDetailBottomLl.setVisibility(View.GONE);
}
// GdtHelper.INSTANCE.logAction(ActionType.PAGE_VIEW,
// GdtHelper.CONTENT_TYPE, "ARTICLE",
// GdtHelper.CONTENT_ID, response.getId());
}
});
}

View File

@ -29,7 +29,6 @@ import com.gh.common.dialog.PrivacyPolicyDialogFragment;
import com.gh.common.tracker.TrackerLogger;
import com.gh.common.util.AdHelper;
import com.gh.common.util.DeviceTokenUtils;
import com.gh.common.util.DeviceUtils;
import com.gh.common.util.DialogHelper;
import com.gh.common.util.DialogUtils;
import com.gh.common.util.DisplayUtils;
@ -60,7 +59,6 @@ import org.jetbrains.annotations.NotNull;
import org.json.JSONObject;
import java.io.File;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
@ -386,8 +384,6 @@ public class SplashScreenActivity extends BaseActivity {
getAd();
prefetchData();
uploadTeaAndGdtData();
Bundle bundle = getIntent().getExtras();
Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);
if (bundle != null) {
@ -397,7 +393,7 @@ public class SplashScreenActivity extends BaseActivity {
overridePendingTransition(0, 0);
startActivity(intent);
uploadTeaAndGdtData();
uploadTeaData();
finish();
}
@ -407,7 +403,7 @@ public class SplashScreenActivity extends BaseActivity {
AdHelper.getStartUpAd();
}
private void uploadTeaAndGdtData() {
private void uploadTeaData() {
if ("tea".equals(BuildConfig.FLAVOR)) {
// 在可能获取了相关权限后才初始化SDK/发送激活数据
// TeaHelper.init(getApplication(), HaloApp.getInstance().getChannel());
@ -419,23 +415,6 @@ public class SplashScreenActivity extends BaseActivity {
e.printStackTrace();
}
}
// GdtHelper.INSTANCE.logAction(ActionType.START_APP, GdtHelper.NETWORK_TYPE, DeviceUtils.getNetwork(this));
if ("gdt".equals(BuildConfig.FLAVOR)) {
try {
Class<?> clazz = Class.forName("com.gh.gamecenter.GdtHelper");
Field field = clazz.getDeclaredField("NETWORK_TYPE");
String type = (String) field.get(null);
Method method = clazz.getMethod("logAction", String.class, String[].class);
Class<?> actionTypeClazz = Class.forName("com.qq.gdt.action.ActionType");
Field typeField = actionTypeClazz.getDeclaredField("START_APP");
String actionType = (String) typeField.get(null);
method.invoke(null, actionType, new String[]{type, DeviceUtils.getNetwork(this)});
} catch (Exception e) {
e.printStackTrace();
}
}
}
private void prefetchData() {

View File

@ -563,9 +563,6 @@ class GameUpdateFragmentAdapter extends BaseRecyclerAdapter<ViewHolder> implemen
// 收集下载数据
DataCollectionUtils.uploadDownload(mContext, downloadEntity, "开始");
// GdtHelper.INSTANCE.logAction(ActionType.DOWNLOAD_APP,
// GdtHelper.GAME_ID, downloadEntity.getGameId(),
// GdtHelper.PLATFORM, downloadEntity.getPlatform());
notifyItemChanged(0);
EventBus.getDefault().post(new EBSkip(DownloadManagerActivity.TAG, DownloadManagerActivity.INDEX_DOWNLOAD));

View File

@ -435,10 +435,6 @@ class GameDetailFragment : NormalFragment() {
DataLogUtils.uploadGameLog(context, mGameEntity!!.id, mGameEntity!!.name, mEntrance)
// GdtHelper.logAction(ActionType.PAGE_VIEW,
// GdtHelper.CONTENT_TYPE, "GAME",
// GdtHelper.CONTENT_ID, mGameEntity!!.id)
mNewGameDetailEntity = data
showAlertDialogIfNeeded(data)
@ -495,7 +491,6 @@ class GameDetailFragment : NormalFragment() {
mGameEntity!!.id,
"关注"
)
// GdtHelper.logAction(ActionType.ADD_TO_WISHLIST, GdtHelper.CONTENT_TYPE, "GAME", GdtHelper.CONTENT_ID, mGameEntity!!.id)
updateConcernMenuIcon(isConcerned = true)
toast(R.string.concern_success)

View File

@ -235,9 +235,6 @@ class RatingEditActivity : ToolBarActivity(), KeyboardHeightObserver {
MtaHelper.onEvent("发表评论", "提交", mGame?.name)
setResult(Activity.RESULT_OK)
toast("提交成功")
// GdtHelper.logAction(ActionType.RATE,
// GdtHelper.GAME_ID, mGame.id,
// GdtHelper.PLATFORM, mBinding.ratingScore.rating.toString())
if (mFromAmway) {
if (mIsSkipSuccessPage) {

View File

@ -254,8 +254,6 @@ open class AnswerDetailFragment : NormalFragment() {
mSkeletonScreen?.hide()
}
}, if (fragmentIsVisible()) 0 else 1000L)
// GdtHelper.logAction(ActionType.PAGE_VIEW, GdtHelper.CONTENT_TYPE, "ANSWER", GdtHelper.CONTENT_ID, mAnswerId)
} else if (apiResponse.httpException != null) {
val e = apiResponse.httpException
mSkeletonScreen?.hide()
@ -896,10 +894,6 @@ open class AnswerDetailFragment : NormalFragment() {
}
private fun shareAnswer() {
// GdtHelper.logAction(ActionType.SHARE,
// GdtHelper.CONTENT_TYPE, "ANSWER",
// GdtHelper.CONTENT_ID, mAnswerId)
val shareIcon: String = if (mAnswersImages!!.size > 0) {
mAnswersImages[0]
} else {

View File

@ -27,7 +27,6 @@ import okhttp3.ResponseBody
import org.greenrobot.eventbus.EventBus
import org.json.JSONObject
import retrofit2.HttpException
import java.util.*
class AnswerDetailViewModel(application: Application) : AndroidViewModel(application) {
@ -187,10 +186,6 @@ class AnswerDetailViewModel(application: Application) : AndroidViewModel(applica
override fun onSuccess() {
collect.postValue(true)
answerDetail?.me?.isAnswerFavorite = true
// GdtHelper.logAction(ActionType.ADD_TO_WISHLIST,
// GdtHelper.CONTENT_TYPE, "ANSWER",
// GdtHelper.CONTENT_ID, answerId)
}
override fun onError() {

View File

@ -308,9 +308,6 @@ class ArticleDetailFragment : BaseCommentFragment<CommentItemData, ArticleDetail
showSkeleton(false)
mBinding.root.setBackgroundColor(Color.TRANSPARENT)
updateView()
// GdtHelper.logAction(ActionType.PAGE_VIEW,
// GdtHelper.CONTENT_TYPE, "QA_ARTICLE",
// GdtHelper.CONTENT_ID, mViewModel.articleId)
}
else -> {
if (it == BaseCommentViewModel.LoadResult.DELETED) {

View File

@ -14,11 +14,11 @@ import com.gh.gamecenter.baselist.LoadType
import com.gh.gamecenter.databinding.FragmentArticleDetailCommentBinding
import com.gh.gamecenter.entity.CommentEntity
import com.gh.gamecenter.manager.UserManager
import com.gh.gamecenter.qa.article.detail.CommentItemData
import com.gh.gamecenter.qa.comment.CommentActivity
import com.gh.gamecenter.qa.comment.base.BaseCommentAdapter
import com.gh.gamecenter.qa.comment.base.BaseCommentFragment
import com.gh.gamecenter.qa.comment.base.BaseCommentViewModel
import com.gh.gamecenter.qa.article.detail.CommentItemData
import com.gh.gamecenter.qa.comment.CommentActivity
import com.halo.assistant.HaloApp
@Deprecated("v5.0.0废弃")
@ -114,11 +114,6 @@ class ArticleDetailCommentFragment : BaseCommentFragment<CommentItemData, Articl
BaseCommentViewModel.LoadResult.SUCCESS -> {
mReuseNoConn?.visibility = View.GONE
mListLoading?.visibility = View.GONE
// GdtHelper.logAction(ActionType.PAGE_VIEW,
// GdtHelper.CONTENT_TYPE, "QA_ARTICLE",
// GdtHelper.CONTENT_ID, mViewModel.articleId)
val showKeyboard = arguments?.getBoolean(EntranceUtils.KEY_SHOW_KEYBOARD_IF_NEEDED)
?: false
if (showKeyboard) {

View File

@ -190,7 +190,6 @@
// mAdapter?.setQuestionsEntity(it)
//
// updateFab()
//// GdtHelper.logAction(ActionType.PAGE_VIEW, GdtHelper.CONTENT_TYPE, "QUESTION", GdtHelper.CONTENT_ID, mQuestionsId)
//
// setNavigationTitle(mQuestionsDetailEntity!!.community.name + " - 问题详情")
// MtaHelper.onEvent("详情页面", "问题详情", it.title)
@ -348,10 +347,6 @@
// mQuestionsDetailEntity!!.setFollowCount(mQuestionsDetailEntity!!.getFollowCount() + 1)
// mAdapter!!.notifyItemChanged(0)
//
//// GdtHelper.logAction(ActionType.ADD_TO_WISHLIST,
//// GdtHelper.CONTENT_TYPE, "QUESTION",
//// GdtHelper.CONTENT_ID, mQuestionsId)
//
// toast("已关注 ")
// }
//

View File

@ -289,19 +289,6 @@ public class HaloApp extends MultiDexApplication implements Configuration.Provid
private void initThirdPartySdk() {
DataUtils.init(this, mChannel);
initGdt();
}
private void initGdt() {
try {
if ("gdt".equals(BuildConfig.FLAVOR)) {
Class<?> clazz = Class.forName("com.gh.gamecenter.GdtHelper");
Method method = clazz.getMethod("init", Application.class, String.class);
method.invoke(null, getApplication(), HaloApp.getInstance().getChannel());
}
} catch (Exception e) {
e.printStackTrace();
}
}
private void initDataHelper() {