From 116702f7f09ac23b248ce99d19f54b6c91d4537a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=8E=89=E4=B9=85?= Date: Tue, 17 May 2022 17:34:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=9D=97/=E7=BB=84=E4=BB=B6=E5=8C=96?= =?UTF-8?q?=E5=89=8D=E6=9C=9F=E6=94=B9=E9=80=A0=20https://git.shanqu.cc/ha?= =?UTF-8?q?lo/android/assistant-android/-/issues/64?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 10 +- .../com/gh/base/BaseRichEditorActivity.kt | 2 + .../com/gh/base/BaseRichEditorViewModel.kt | 2 +- .../java/com/gh/base/ToolBarActivity.java | 1 + .../main/java/com/gh/common/DefaultJsApi.kt | 5 +- .../java/com/gh/common/FixedRateJobHelper.kt | 4 +- .../java/com/gh/common/constant/Config.java | 4 +- .../dialog/PackageCheckDialogFragment.kt | 1 + .../gh/common/exposure/ExposureConverters.kt | 1 + .../com/gh/common/exposure/ExposureEvent.kt | 1 + .../com/gh/common/exposure/ExposureManager.kt | 2 +- .../gh/common/filter/RegionSettingHelper.kt | 2 +- .../com/gh/common/provider/AppProviderImpl.kt | 17 ++ .../gh/common/provider/ConfigProviderImpl.kt | 12 + .../provider/DialogUtilsProviderImpl.kt | 7 +- .../gh/common/provider/DirectProviderImpl.kt | 4 + .../provider/DownloadManagerProviderImpl.kt | 21 ++ .../common/provider/EnergyTaskProviderImpl.kt | 23 ++ .../provider/EntranceUtilsProviderImpl.kt | 23 ++ .../provider/PackageHelperProviderImpl.kt | 19 ++ .../provider/PackageInstallerProviderImpl.kt | 24 ++ .../provider/PackageUtilsProviderImpl.kt | 13 + .../common/provider/QuickLoginProviderImpl.kt | 19 ++ .../provider/UserManagerProviderImpl.kt | 16 ++ .../repository/ReservationRepository.kt | 2 +- .../simulator/SimulatorDownloadManager.kt | 1 + .../common/simulator/SimulatorGameManager.kt | 7 +- .../com/gh/common/util/ActivationHelper.kt | 2 +- .../main/java/com/gh/common/util/AdHelper.kt | 2 +- .../com/gh/common/util/BbsReportHelper.kt | 2 +- .../com/gh/common/util/BbsStayTimeHelper.kt | 2 +- .../com/gh/common/util/CollectionUtils.kt | 2 +- .../java/com/gh/common/util/CommentHelper.kt | 2 +- .../java/com/gh/common/util/CommentUtils.java | 4 +- .../java/com/gh/common/util/ConcernUtils.kt | 2 +- .../java/com/gh/common/util/DataLogUtils.java | 2 +- .../java/com/gh/common/util/DataUtils.java | 2 +- .../com/gh/common/util/DeviceTokenUtils.kt | 2 +- .../java/com/gh/common/util/DialogUtils.java | 131 +--------- .../java/com/gh/common/util/DirectUtils.kt | 10 +- .../java/com/gh/common/util/DownloadHelper.kt | 2 +- .../com/gh/common/util/DownloadObserver.kt | 27 +- .../com/gh/common/util/EnergyTaskHelper.kt | 2 +- .../common/util/GameActivityDownloadHelper.kt | 6 +- .../GameCollectionSquareBrowseTaskHelper.kt | 2 +- .../util/GameSubstituteRepositoryHelper.kt | 4 +- .../com/gh/common/util/IntegralLogHelper.kt | 6 +- .../java/com/gh/common/util/LibaoUtils.java | 4 +- .../java/com/gh/common/util/LogUtils.java | 99 +------- .../java/com/gh/common/util/LoginUtils.java | 4 +- .../com/gh/common/util/MessageShareUtils.java | 1 + .../java/com/gh/common/util/NewLogUtils.kt | 51 +--- .../java/com/gh/common/util/NewsUtils.java | 4 +- .../com/gh/common/util/PackageInstaller.kt | 10 +- .../com/gh/common/util/PlatformUtils.java | 2 +- .../com/gh/common/util/PostCommentUtils.java | 4 +- .../java/com/gh/common/util/QRCodeUtils.java | 2 +- .../com/gh/common/util/QuickLoginHelper.kt | 234 +++++++++--------- .../com/gh/common/util/ReservationHelper.kt | 19 +- .../com/gh/common/util/SimpleRequestHelper.kt | 2 +- .../java/com/gh/common/util/TagUtils.java | 2 +- .../com/gh/common/util/UploadImageUtils.kt | 6 +- .../com/gh/common/util/UsageStatsHelper.kt | 2 +- .../com/gh/common/util/WechatBindHelper.kt | 2 +- .../gh/common/videolog/VideoRecordUtils.kt | 2 +- .../com/gh/download/DownloadDataHelper.kt | 2 +- .../java/com/gh/download/PackageObserver.kt | 7 +- .../dialog/DownloadDialogItemViewHolder.kt | 3 +- .../download/server/BrowserInstallHelper.kt | 4 +- .../gh/flutter/FlutterLogHubServiceImplAop.kt | 4 +- .../gh/gamecenter/FullScreenWebActivity.kt | 2 +- .../com/gh/gamecenter/ImageViewerActivity.kt | 4 +- .../gh/gamecenter/LibaoDetailActivity.java | 2 +- .../java/com/gh/gamecenter/LoginActivity.java | 13 +- .../java/com/gh/gamecenter/MainActivity.java | 8 +- .../gh/gamecenter/NetworkDiagnosisActivity.kt | 2 +- .../com/gh/gamecenter/NewsDetailActivity.java | 8 +- .../java/com/gh/gamecenter/SearchActivity.kt | 2 +- .../gh/gamecenter/ShareCardPicActivity.java | 2 +- .../com/gh/gamecenter/ShareGhActivity.java | 2 +- .../java/com/gh/gamecenter/SkipActivity.java | 2 +- .../gh/gamecenter/SplashScreenActivity.java | 11 +- .../com/gh/gamecenter/SuggestionActivity.java | 4 +- .../java/com/gh/gamecenter/WebActivity.kt | 30 ++- .../com/gh/gamecenter/WeiBoShareActivity.java | 37 ++- .../gamecenter/adapter/CleanApkAdapter.java | 2 +- .../adapter/CommentDetailAdapter.java | 2 +- .../gamecenter/adapter/GameNewsAdapter.java | 2 +- .../gamecenter/adapter/ImagePagerAdapter.java | 2 +- .../adapter/LibaoDetailAdapter.java | 2 +- .../adapter/MessageDetailAdapter.java | 6 +- .../gamecenter/adapter/ToolBoxRvAdapter.java | 2 +- .../com/gh/gamecenter/amway/AmwayActivity.kt | 2 +- .../com/gh/gamecenter/amway/AmwayAdapter.kt | 1 + .../com/gh/gamecenter/amway/AmwayFragment.kt | 1 + .../com/gh/gamecenter/amway/AmwayViewModel.kt | 4 +- .../amway/search/AmwaySearchViewModel.kt | 4 +- .../baselist/ListHeadViewModel.java | 2 +- .../gh/gamecenter/baselist/ListViewModel.java | 4 +- .../gh/gamecenter/catalog/CatalogViewModel.kt | 2 +- .../catalog/NewCatalogListViewModel.kt | 2 +- .../catalog/SpecialCatalogViewModel.kt | 2 +- .../gamecenter/catalog/SubCatalogViewModel.kt | 2 +- .../category/CategoryDirectoryAdapter.kt | 10 +- .../category2/CategoryV2Fragment.kt | 1 + .../category2/CategoryV2ListFragment.kt | 1 + .../category2/CategoryV2ListViewModel.kt | 2 +- .../category2/CategoryV2ViewModel.kt | 2 +- .../gamecenter/collection/AnswerViewModel.kt | 2 +- .../gamecenter/collection/ArticleAdapter.java | 2 +- .../collection/CommunityArticleViewModel.kt | 4 +- .../collection/GamesCollectionAdapter.kt | 1 + .../collection/GamesCollectionViewModel.kt | 4 +- .../download/GameUpdateFragmentAdapter.java | 5 +- .../download/InstalledGameViewModel.kt | 2 +- .../download/UpdatableGameAdapter.kt | 1 + .../download/UpdatableGameViewModel.kt | 2 +- .../gamecenter/energy/EnergyCenterFragment.kt | 1 + .../energy/EnergyCenterViewModel.kt | 2 +- .../gamecenter/energy/EnergyHouseViewModel.kt | 3 +- .../com/gh/gamecenter/energy/TaskAdapter.kt | 1 + .../detail/ForumArticleAskListAdapter.kt | 3 +- .../detail/ForumArticleAskListFragment.kt | 1 + .../forum/detail/ForumDetailActivity.kt | 2 +- .../forum/detail/ForumDetailFragment.kt | 2 + .../forum/detail/ForumDetailViewModel.kt | 6 +- .../forum/home/ArticleItemVideoView.kt | 1 - .../forum/home/CommunityHomeFragment.kt | 1 + .../forum/home/CommunityHomeViewModel.kt | 2 +- .../forum/home/ForumActivityAdapter.kt | 1 + .../forum/home/ForumActivityViewModel.kt | 2 +- .../home/ForumArticleAskItemViewHolder.kt | 5 +- .../forum/home/ForumArticleListAdapter.kt | 4 +- .../forum/home/ForumArticleListViewModel.kt | 2 +- .../gh/gamecenter/forum/home/ForumFragment.kt | 1 + .../forum/home/ForumHomeViewModel.kt | 2 +- .../gamecenter/forum/home/ForumViewModel.kt | 4 +- .../forum/home/HorizontalForumsAdapter.kt | 1 + .../forum/list/ForumListVIewModel.kt | 2 +- .../moderator/ApplyModeratorViewModel.kt | 2 +- .../forum/moderator/ModeratorListAdapter.kt | 1 + .../forum/moderator/ModeratorListViewModel.kt | 4 +- .../search/ForumContentSearchListAdapter.kt | 3 +- .../ForumOrUserSearchDefaultViewModel.kt | 2 +- .../forum/search/UserSearchListViewModel.kt | 2 +- .../forum/select/ForumSelectViewModel.kt | 4 +- .../fragment/HomeSearchToolWrapperFragment.kt | 2 + .../HomeSearchToolWrapperViewModel.kt | 2 +- .../gh/gamecenter/fragment/LoginFragment.java | 39 ++- .../fragment/MainWrapperFragment.java | 2 +- .../fragment/MainWrapperRepository.kt | 2 +- .../fragment/MainWrapperViewModel.kt | 5 +- .../gh/gamecenter/game/GameFragmentAdapter.kt | 3 + .../gamecenter/game/GameNavigationAdapter.kt | 1 + .../com/gh/gamecenter/game/GameViewModel.kt | 6 +- .../detail/ColumnCollectionDetailViewModel.kt | 2 +- .../game/upload/GameSubmissionActivity.kt | 2 +- .../game/upload/GameUploadViewModel.kt | 6 +- .../detail/GameCollectionDetailAdapter.kt | 1 + .../detail/GameCollectionDetailFragment.kt | 16 +- .../detail/GameCollectionDetailViewModel.kt | 6 +- .../detail/GameCollectionPosterViewModel.kt | 2 +- .../detail/GameCollectionShareDialog.kt | 7 +- ...eCollectionCommentConversationViewModel.kt | 2 +- .../mine/MyGameCollectionViewModel.kt | 2 +- .../ChooseGameCollectionDefaultCoverDialog.kt | 1 + ...ooseGameCollectionDefaultCoverViewModel.kt | 2 +- .../GameCollectionActivityLabelViewModel.kt | 2 +- .../publish/GameCollectionEditActivity.kt | 4 +- .../publish/GameCollectionEditViewModel.kt | 4 +- .../square/GameCollectionBannerAdapter.kt | 1 + .../square/GameCollectionSquareActivity.kt | 2 +- .../square/GameCollectionSquareAdapter.kt | 4 +- .../square/GameCollectionSquareFragment.kt | 2 + .../square/GameCollectionSquareViewModel.kt | 2 +- .../tag/GameCollectionTagViewModel.kt | 2 +- .../gamedetail/GameDetailFragment.kt | 3 + .../gamedetail/GameDetailViewModel.kt | 4 +- .../gamecenter/gamedetail/desc/DescAdapter.kt | 3 + .../gamedetail/desc/DescCommentsAdapter.kt | 3 +- .../gamedetail/desc/DescViewModel.kt | 2 +- .../desc/GameDetailInfoItemAdapter.kt | 1 + .../gamedetail/desc/GameRaidersAdapter.kt | 1 + .../gamedetail/dialog/GameDetailMoreDialog.kt | 2 +- .../gamedetail/dialog/InviteCodeDialog.kt | 2 +- .../gamedetail/fuli/FuLiFragment.kt | 1 + .../fuli/kaifu/ServersCalendarViewModel.kt | 2 +- .../history/HistoryApkListActivity.kt | 2 +- .../history/HistoryApkListViewModel.kt | 2 +- .../gamedetail/myrating/MyRatingActivity.kt | 2 +- .../gamedetail/myrating/MyRatingViewModel.kt | 2 +- .../gamedetail/rating/RatingAdapter.kt | 2 + .../rating/RatingCommentItemViewHolder.kt | 5 +- .../gamedetail/rating/RatingReplyActivity.kt | 1 + .../gamedetail/rating/RatingReplyAdapter.kt | 4 +- .../gamedetail/rating/RatingReplyViewModel.kt | 2 +- .../gamedetail/rating/RatingViewModel.kt | 2 +- .../rating/edit/RatingEditActivity.kt | 35 +-- .../rating/edit/RatingEditViewModel.kt | 4 +- .../gh/gamecenter/geetest/GeetestUtils.java | 2 +- .../gamecenter/help/HelpContainerViewModel.kt | 2 +- .../help/HelpQaCategoryViewModel.kt | 2 +- .../gh/gamecenter/help/QaFeedbackViewModel.kt | 2 +- .../com/gh/gamecenter/home/HomeFragment.kt | 1 + .../com/gh/gamecenter/home/HomeViewModel.kt | 4 +- .../LegacyHomeFragmentAdapterAssistant.kt | 2 + .../HomeGameCollectionAdapter.kt | 2 +- .../home/skip/PackageSkipActivity.kt | 2 +- .../gh/gamecenter/info/ConcernAdapter.java | 6 +- .../gh/gamecenter/info/ConcernFragment.java | 2 +- .../com/gh/gamecenter/info/InfoAdapter.java | 2 +- .../gamecenter/info/NewsViewsRepository.java | 2 +- .../gh/gamecenter/info/OriginalAdapter.java | 2 +- .../gh/gamecenter/info/StrategyAdapter.java | 2 +- .../gh/gamecenter/info/StrategyFragment.java | 2 +- .../libao/Libao2FragmentAdapter.java | 2 +- .../libao/Libao3FragmentAdapter.java | 2 +- .../gamecenter/libao/LibaoHistoryAdapter.java | 2 +- .../gh/gamecenter/libao/LibaoNewAdapter.kt | 2 +- .../gh/gamecenter/libao/LibaoSearchAdapter.kt | 2 +- .../gh/gamecenter/manager/CommentManager.java | 4 +- .../manager/DataCollectionManager.java | 2 +- .../gh/gamecenter/manager/UpdateManager.java | 2 +- .../gh/gamecenter/manager/UserManager.java | 11 +- .../gh/gamecenter/manager/VisitManager.java | 4 +- .../gh/gamecenter/message/KeFuViewModel.kt | 2 +- .../message/MessageDetailFragment.java | 6 +- .../message/MessageItemViewHolder.java | 24 +- .../message/MessageNormalViewModel.kt | 2 +- .../message/MessageUnreadRepository.kt | 4 +- .../gh/gamecenter/message/MessageViewModel.kt | 2 +- .../gamecenter/mvvm/NetworkBoundResource.java | 2 +- .../mygame/MyReservationViewModel.kt | 2 +- .../gamecenter/mygame/PlayedGameActivity.kt | 2 +- .../gh/gamecenter/mygame/PlayedGameAdapter.kt | 10 +- .../gamecenter/mygame/PlayedGameViewModel.kt | 2 +- .../newsdetail/NewsDetailAdapter.java | 5 +- .../packagehelper/PackageFilterManager.kt | 2 +- .../packagehelper/PackageRepository.kt | 8 +- .../personal/NewPersonalFragment.kt | 9 +- .../gamecenter/personal/PersonalFragment.kt | 11 +- .../gamecenter/personal/PersonalViewModel.kt | 4 +- .../personalhome/FollowersOrFansViewModel.kt | 2 +- .../personalhome/InstalledGameDialog.kt | 2 +- .../personalhome/UserHomeActivity.kt | 2 +- .../personalhome/UserHomeFragment.kt | 2 +- .../personalhome/UserHomeViewModel.kt | 11 +- .../background/BackgroundClipActivity.kt | 2 +- .../background/BackgroundPreviewActivity.kt | 2 +- .../PersonalityBackgroundViewModel.kt | 2 +- .../border/AvatarBorderActivity.kt | 3 +- .../border/AvatarBorderViewModel.kt | 2 +- .../border/ChooseAvatarBorderViewModel.kt | 2 +- .../personalhome/fans/FansActivity.kt | 2 +- .../followers/FollowersActivity.kt | 2 +- .../personalhome/home/UserHistoryAdapter.kt | 1 + .../personalhome/home/UserHistoryViewModel.kt | 8 +- .../home/game/UserCommentHistoryViewModel.kt | 2 +- .../home/game/UserGameViewModel.kt | 5 +- .../personalhome/rating/RatingActivity.kt | 2 +- .../BaseAnswerOrArticleItemViewHolder.kt | 5 +- .../answer/CommunityAnswerItemViewHolder.kt | 1 + .../qa/answer/detail/AnswerDetailFragment.kt | 3 + .../qa/answer/detail/AnswerDetailViewModel.kt | 4 +- .../detail/SimpleAnswerDetailActivity.kt | 2 +- .../qa/answer/draft/AnswerDraftAdapter.java | 2 +- .../qa/answer/edit/AnswerEditActivity.kt | 1 + .../qa/answer/edit/AnswerEditViewModel.kt | 2 +- .../qa/article/MyArticleActivity.kt | 2 +- .../qa/article/SimpleArticleListActivity.kt | 2 +- .../detail/ArticleDetailContentViewHolder.kt | 3 + .../article/detail/ArticleDetailFragment.kt | 4 + .../article/detail/ArticleDetailViewModel.kt | 2 +- .../comment/ArticleDetailCommentViewModel.kt | 2 +- .../qa/article/draft/ArticleDraftFragment.kt | 2 +- .../qa/article/edit/ArticleEditActivity.kt | 10 +- .../qa/article/edit/ArticleEditViewModel.kt | 2 +- .../qa/column/AskColumnRepository.java | 4 +- .../gamecenter/qa/comment/CommentActivity.kt | 2 +- .../qa/comment/NewCommentFragment.kt | 1 + .../qa/comment/NewCommentViewModel.kt | 6 +- .../qa/comment/base/BaseCommentAdapter.kt | 2 + .../qa/comment/base/BaseCommentViewModel.kt | 2 +- .../CommentConversationViewModel.kt | 3 +- .../qa/dialog/ChooseForumActivity.kt | 2 +- .../qa/dialog/MoreFunctionPanelDialog.kt | 3 +- .../qa/editor/FullScreenVideoActivity.kt | 2 +- .../gh/gamecenter/qa/editor/GameFragment.kt | 2 +- .../qa/editor/OnLinkClickListener.kt | 2 +- .../qa/editor/PreviewVideoActivity.kt | 2 +- .../detail/QuestionsDetailFragment.kt | 2 +- .../detail/QuestionsDetailViewModel.kt | 2 +- .../questions/draft/QuestionDraftViewModel.kt | 4 +- .../qa/questions/edit/QuestionEditActivity.kt | 8 +- .../questions/edit/QuestionEditViewModel.kt | 4 +- .../qa/questions/edit/TagsSelectFragment.kt | 13 +- .../edit/tip/QuestionTitleTipAdapter.kt | 2 +- .../invite/QuestionsInviteViewModel.kt | 2 +- .../QuestionsInviteWrapperFragment.java | 2 +- .../newdetail/NewQuestionDetailFragment.kt | 4 + .../newdetail/NewQuestionDetailViewModel.kt | 4 +- .../QuestionDetailContentViewHolder.kt | 3 + .../AskRecommendSubjectViewModel.kt | 2 +- .../qa/tags/AskQuestionsNewRepository.java | 4 +- .../qa/video/detail/ForumTopVideoView.kt | 1 - .../video/detail/ForumVideoDetailActivity.kt | 2 +- .../video/detail/ForumVideoDetailFragment.kt | 3 + .../video/detail/ForumVideoDetailViewModel.kt | 4 +- .../detail/comment/VideoCommentFragment.kt | 1 + .../qa/video/detail/desc/VideoDescFragment.kt | 4 +- .../detail/desc/VideoDescTopViewHolder.kt | 2 + .../video/detail/desc/VideoDescViewModel.kt | 4 +- .../qa/video/publish/VideoPublishFragment.kt | 1 + .../qa/video/publish/VideoPublishViewModel.kt | 6 +- .../gamecenter/retrofit/RetrofitManager.java | 41 +-- .../search/SearchGameIndexAdapter.kt | 2 + .../search/SearchGameResultAdapter.kt | 2 + .../gamecenter/security/BindPhoneFragment.kt | 1 + .../gamecenter/security/BindPhoneViewModel.kt | 2 +- .../servers/GameServersContentFragment.kt | 1 + .../servers/GameServersContentViewModel.kt | 2 +- .../servers/GameServersPublishFragment.kt | 2 +- .../servers/GameServersTestViewModel.kt | 4 +- .../servers/add/AddKaiFuViewModel.kt | 2 +- .../servers/patch/PatchKaifuViewModel.kt | 2 +- .../simulatorgame/SimulatorGameListAdapter.kt | 1 + .../subject/SubjectListViewModel.kt | 2 +- .../gh/gamecenter/subject/SubjectViewModel.kt | 4 +- .../suggest/SuggestSelectFragment.java | 2 +- .../suggest/SuggestSelectGameAdapter.java | 2 +- .../com/gh/gamecenter/tag/TagsActivity.kt | 2 +- .../gh/gamecenter/tag/TagsListViewModel.kt | 2 +- .../teenagermode/TeenagerModeActivity.kt | 2 +- .../teenagermode/TeenagerModeViewModel.kt | 2 +- .../gh/gamecenter/toolbox/ToolBoxViewModel.kt | 3 +- .../gh/gamecenter/user/UserRepository.java | 8 +- .../com/gh/gamecenter/user/UserViewModel.java | 1 + .../video/data/VideoDataActivity.kt | 2 +- .../video/data/VideoDataViewModel.kt | 2 +- .../video/detail/DetailPlayerView.kt | 2 + .../gamecenter/video/detail/VideoAdapter.kt | 2 +- .../video/detail/VideoDetailActivity.kt | 2 +- .../detail/VideoDetailContainerFragment.kt | 2 + .../detail/VideoDetailContainerViewModel.kt | 10 +- .../video/game/GameVideoActivity.kt | 2 +- .../video/game/GameVideoViewModel.kt | 2 +- .../video/label/VideoLabelViewModel.kt | 2 +- .../gamecenter/video/upload/UploadManager.kt | 2 +- .../video/upload/view/UploadVideoActivity.kt | 17 +- .../video/upload/view/UploadVideoViewModel.kt | 4 +- .../video/videomanager/VideoDraftViewModel.kt | 2 +- .../videomanager/VideoManagerActivity.kt | 2 +- .../video/videomanager/VideoVerifyAdapter.kt | 1 + .../videomanager/VideoVerifyViewModel.kt | 2 +- .../gh/gamecenter/wxapi/WXEntryActivity.java | 20 +- .../main/java/com/halo/assistant/HaloApp.java | 4 +- .../assistant/fragment/SettingsFragment.kt | 10 +- .../halo/assistant/fragment/VoteFragment.java | 2 +- .../halo/assistant/fragment/WebFragment.kt | 9 +- .../fragment/game/GameNewsSearchFragment.java | 2 +- .../game/GameNewsSearchResultFragment.java | 2 +- .../fragment/myconcern/MyConcernAdapter.java | 5 +- .../myconcern/MyConcernRecommendAdapter.java | 5 +- .../user/ManuallyRealNameViewModel.kt | 2 +- .../fragment/user/RealNameInfoViewModel.kt | 2 +- .../fragment/user/SelectRegionFragment.java | 2 +- .../fragment/user/UserInfoEditFragment.kt | 4 +- .../fragment/user/UserInfoFragment.kt | 2 +- .../user/UserPortraitCropImageActivity.java | 2 +- app/src/main/res/values-night/styles.xml | 4 - app/src/main/res/values/strings.xml | 17 +- app/src/main/res/values/styles.xml | 3 - module_common/build.gradle | 9 + .../java/com/gh/gamecenter/Injection.java | 0 module_common/src/main/AndroidManifest.xml | 2 + .../gamecenter/common}/base/BaseActivity.java | 75 +++--- .../common/callback/CancelListener.kt | 5 + .../common/constant/EntranceConsts.java | 7 +- .../gamecenter/common/constant/RouteConsts.kt | 15 +- .../common/entity}/ExposureEntity.kt | 2 +- .../common}/entity/NormalShareEntity.kt | 4 +- .../gamecenter/common}/entity/ShareEntity.kt | 2 +- .../gamecenter/common}/eventbus/EBShare.java | 4 +- .../common}/eventbus/EBShowDialog.java | 2 +- .../common/loghub/LoghubDatabase.kt | 2 +- .../gamecenter}/common/loghub/LoghubEvent.kt | 2 +- .../common/loghub/LoghubEventDao.kt | 2 +- .../gamecenter}/common/loghub/LoghubHelper.kt | 6 +- .../gamecenter}/common/loghub/LoghubUtils.kt | 14 +- .../common/retrofit}/ApiResponse.java | 2 +- .../gamecenter/common/retrofit/ApiService.kt | 22 ++ .../common/retrofit/BaseRetrofitManager.java | 53 ++++ .../gamecenter/common}/retrofit/BiResponse.kt | 2 +- .../common}/retrofit/EmptyResponse.kt | 2 +- .../common}/retrofit/FileRequestBody.java | 2 +- .../common}/retrofit/JSONArrayResponse.java | 2 +- .../common}/retrofit/JSONObjectResponse.java | 2 +- .../common}/retrofit/ObservableUtil.java | 2 +- .../common}/retrofit/OkHttpCache.java | 2 +- .../retrofit/OkHttpCacheInterceptor.java | 52 ++-- .../retrofit/OkHttpNetworkInterceptor.java | 6 +- .../retrofit/OkHttpRetryInterceptor.kt | 66 ++--- .../gamecenter/common}/retrofit/Response.java | 5 +- .../common}/retrofit/RetrofitCallback.java | 2 +- .../common/retrofit/RetrofitManager.java | 41 +++ .../common}/retrofit/StringResponse.java | 2 +- .../tracker/ActivityLifecycleWatcher.kt | 2 +- .../common/tracker/AppLifecycleWatcher.kt | 2 +- .../gamecenter}/common/tracker/IBusiness.kt | 2 +- .../gh/gamecenter}/common/tracker/ITrack.kt | 2 +- .../gh/gamecenter}/common/tracker/Tracker.kt | 2 +- .../common/tracker/TrackerLogger.kt | 40 +-- .../gamecenter/common/utils/DialogUtils.java | 150 +++++++++++ .../gh/gamecenter/common/utils/LogUtils.java | 168 +++++++++++++ .../gh/gamecenter/common/utils/NewLogUtils.kt | 71 ++++++ .../gamecenter/common/utils}/ShareUtils.java | 76 +++--- .../src/main/res/anim/pophidden_anim.xml | 0 .../src/main/res/anim/popshow_anim.xml | 0 .../src/main/res/anim/popshow_anim_scale.xml | 0 .../res/drawable-hdpi/share_cancel_logo.webp | Bin .../drawable-hdpi/share_copyfont_logo.webp | Bin .../res/drawable-hdpi/share_email_logo.webp | Bin .../main/res/drawable-hdpi/share_qq_logo.webp | Bin .../res/drawable-hdpi/share_qzone_logo.webp | Bin .../main/res/drawable-hdpi/share_save.webp | Bin .../share_shortmessage_logo.webp | Bin .../drawable-hdpi/share_sinaweibo_logo.webp | Bin .../res/drawable-hdpi/share_wechat_logo.webp | Bin .../share_wechatmoments_logo.webp | Bin .../main/res/drawable-xxhdpi/share_qq.webp | Bin .../res/drawable-xxhdpi/share_qq_zone.webp | Bin .../res/drawable-xxhdpi/share_wechat.webp | Bin .../drawable-xxhdpi/share_wechat_moments.webp | Bin .../main/res/drawable-xxhdpi/share_weibo.webp | Bin .../src/main/res/drawable/bg_share_dialog.xml | 0 .../main/res/drawable/cardview_item_style.xml | 0 .../drawable/reuse_listview_item_style.xml | 0 .../src/main/res/layout/dialog_alert.xml | 6 +- .../main/res/layout/popup_share_dialog.xml | 0 .../src/main/res/layout/share_popup_item.xml | 0 .../main/res/layout/share_popup_layout.xml | 0 .../src/main/res/values-night/style.xml | 4 + module_common/src/main/res/values/strings.xml | 16 ++ module_common/src/main/res/values/style.xml | 4 + .../java/com/gh/gamecenter/Injection.java | 0 .../gamecenter/core/provider/IAppProvider.kt | 7 + .../core/provider/IConfigProvider.kt | 3 + .../core/provider/IDirectProvider.kt | 4 +- .../core/provider/IDownloadManagerProvider.kt | 8 + .../core/provider/IEnergyTaskProvider.kt | 10 + .../core/provider/IEntranceUtilsProvider.kt | 11 + .../core/provider/IPackageHelperProvider.kt | 8 + .../provider/IPackageInstallerProvider.kt | 13 + .../core/provider/IPackageUtilsProvider.kt | 9 + .../core/provider/IQuickLoginProvider.kt | 9 + .../core/provider/IUserManagerProvider.kt | 4 + .../gamecenter/core/utils}/IntentUtils.java | 32 +-- 457 files changed, 1903 insertions(+), 1239 deletions(-) create mode 100644 app/src/main/java/com/gh/common/provider/DownloadManagerProviderImpl.kt create mode 100644 app/src/main/java/com/gh/common/provider/EnergyTaskProviderImpl.kt create mode 100644 app/src/main/java/com/gh/common/provider/EntranceUtilsProviderImpl.kt create mode 100644 app/src/main/java/com/gh/common/provider/PackageHelperProviderImpl.kt create mode 100644 app/src/main/java/com/gh/common/provider/PackageInstallerProviderImpl.kt create mode 100644 app/src/main/java/com/gh/common/provider/QuickLoginProviderImpl.kt rename {app => module_common}/src/debug/java/com/gh/gamecenter/Injection.java (100%) rename {app/src/main/java/com/gh => module_common/src/main/java/com/gh/gamecenter/common}/base/BaseActivity.java (86%) create mode 100644 module_common/src/main/java/com/gh/gamecenter/common/callback/CancelListener.kt rename {app/src/main/java/com/gh/common/exposure => module_common/src/main/java/com/gh/gamecenter/common/entity}/ExposureEntity.kt (98%) rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/entity/NormalShareEntity.kt (89%) rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/entity/ShareEntity.kt (88%) rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/eventbus/EBShare.java (81%) rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/eventbus/EBShowDialog.java (92%) rename {app/src/main/java/com/gh => module_common/src/main/java/com/gh/gamecenter}/common/loghub/LoghubDatabase.kt (94%) rename {app/src/main/java/com/gh => module_common/src/main/java/com/gh/gamecenter}/common/loghub/LoghubEvent.kt (92%) rename {app/src/main/java/com/gh => module_common/src/main/java/com/gh/gamecenter}/common/loghub/LoghubEventDao.kt (90%) rename {app/src/main/java/com/gh => module_common/src/main/java/com/gh/gamecenter}/common/loghub/LoghubHelper.kt (95%) rename {app/src/main/java/com/gh => module_common/src/main/java/com/gh/gamecenter}/common/loghub/LoghubUtils.kt (93%) rename {app/src/main/java/com/gh/gamecenter/user => module_common/src/main/java/com/gh/gamecenter/common/retrofit}/ApiResponse.java (94%) create mode 100644 module_common/src/main/java/com/gh/gamecenter/common/retrofit/ApiService.kt create mode 100644 module_common/src/main/java/com/gh/gamecenter/common/retrofit/BaseRetrofitManager.java rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/retrofit/BiResponse.kt (94%) rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/retrofit/EmptyResponse.kt (93%) rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/retrofit/FileRequestBody.java (98%) rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/retrofit/JSONArrayResponse.java (91%) rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/retrofit/JSONObjectResponse.java (91%) rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/retrofit/ObservableUtil.java (98%) rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/retrofit/OkHttpCache.java (98%) rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/retrofit/OkHttpCacheInterceptor.java (69%) rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/retrofit/OkHttpNetworkInterceptor.java (95%) rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/retrofit/OkHttpRetryInterceptor.kt (62%) rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/retrofit/Response.java (93%) rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/retrofit/RetrofitCallback.java (93%) create mode 100644 module_common/src/main/java/com/gh/gamecenter/common/retrofit/RetrofitManager.java rename {app/src/main/java/com/gh/gamecenter => module_common/src/main/java/com/gh/gamecenter/common}/retrofit/StringResponse.java (90%) rename {app/src/main/java/com/gh => module_common/src/main/java/com/gh/gamecenter}/common/tracker/ActivityLifecycleWatcher.kt (95%) rename {app/src/main/java/com/gh => module_common/src/main/java/com/gh/gamecenter}/common/tracker/AppLifecycleWatcher.kt (98%) rename {app/src/main/java/com/gh => module_common/src/main/java/com/gh/gamecenter}/common/tracker/IBusiness.kt (74%) rename {app/src/main/java/com/gh => module_common/src/main/java/com/gh/gamecenter}/common/tracker/ITrack.kt (86%) rename {app/src/main/java/com/gh => module_common/src/main/java/com/gh/gamecenter}/common/tracker/Tracker.kt (97%) rename {app/src/main/java/com/gh => module_common/src/main/java/com/gh/gamecenter}/common/tracker/TrackerLogger.kt (84%) create mode 100644 module_common/src/main/java/com/gh/gamecenter/common/utils/DialogUtils.java create mode 100644 module_common/src/main/java/com/gh/gamecenter/common/utils/LogUtils.java create mode 100644 module_common/src/main/java/com/gh/gamecenter/common/utils/NewLogUtils.kt rename {app/src/main/java/com/gh/common/util => module_common/src/main/java/com/gh/gamecenter/common/utils}/ShareUtils.java (90%) rename {app => module_common}/src/main/res/anim/pophidden_anim.xml (100%) rename {app => module_common}/src/main/res/anim/popshow_anim.xml (100%) rename {app => module_common}/src/main/res/anim/popshow_anim_scale.xml (100%) rename {app => module_common}/src/main/res/drawable-hdpi/share_cancel_logo.webp (100%) rename {app => module_common}/src/main/res/drawable-hdpi/share_copyfont_logo.webp (100%) rename {app => module_common}/src/main/res/drawable-hdpi/share_email_logo.webp (100%) rename {app => module_common}/src/main/res/drawable-hdpi/share_qq_logo.webp (100%) rename {app => module_common}/src/main/res/drawable-hdpi/share_qzone_logo.webp (100%) rename {app => module_common}/src/main/res/drawable-hdpi/share_save.webp (100%) rename {app => module_common}/src/main/res/drawable-hdpi/share_shortmessage_logo.webp (100%) rename {app => module_common}/src/main/res/drawable-hdpi/share_sinaweibo_logo.webp (100%) rename {app => module_common}/src/main/res/drawable-hdpi/share_wechat_logo.webp (100%) rename {app => module_common}/src/main/res/drawable-hdpi/share_wechatmoments_logo.webp (100%) rename {app => module_common}/src/main/res/drawable-xxhdpi/share_qq.webp (100%) rename {app => module_common}/src/main/res/drawable-xxhdpi/share_qq_zone.webp (100%) rename {app => module_common}/src/main/res/drawable-xxhdpi/share_wechat.webp (100%) rename {app => module_common}/src/main/res/drawable-xxhdpi/share_wechat_moments.webp (100%) rename {app => module_common}/src/main/res/drawable-xxhdpi/share_weibo.webp (100%) rename {app => module_common}/src/main/res/drawable/bg_share_dialog.xml (100%) rename {app => module_common}/src/main/res/drawable/cardview_item_style.xml (100%) rename {app => module_common}/src/main/res/drawable/reuse_listview_item_style.xml (100%) rename {app => module_common}/src/main/res/layout/dialog_alert.xml (93%) rename {app => module_common}/src/main/res/layout/popup_share_dialog.xml (100%) rename {app => module_common}/src/main/res/layout/share_popup_item.xml (100%) rename {app => module_common}/src/main/res/layout/share_popup_layout.xml (100%) rename {app => module_common}/src/release/java/com/gh/gamecenter/Injection.java (100%) create mode 100644 module_core/src/main/java/com/gh/gamecenter/core/provider/IDownloadManagerProvider.kt create mode 100644 module_core/src/main/java/com/gh/gamecenter/core/provider/IEnergyTaskProvider.kt create mode 100644 module_core/src/main/java/com/gh/gamecenter/core/provider/IEntranceUtilsProvider.kt create mode 100644 module_core/src/main/java/com/gh/gamecenter/core/provider/IPackageHelperProvider.kt create mode 100644 module_core/src/main/java/com/gh/gamecenter/core/provider/IPackageInstallerProvider.kt create mode 100644 module_core/src/main/java/com/gh/gamecenter/core/provider/IQuickLoginProvider.kt rename {app/src/main/java/com/gh/common/util => module_core/src/main/java/com/gh/gamecenter/core/utils}/IntentUtils.java (59%) diff --git a/app/build.gradle b/app/build.gradle index 62159d4ec2..4e4402af4b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -203,7 +203,7 @@ dependencies { testImplementation 'junit:junit:4.12' debugImplementation "com.squareup.leakcanary:leakcanary-android:${leakcanary}" - debugImplementation "com.squareup.okhttp3:logging-interceptor:${okHttp}" + // debugImplementation "com.gu.android:toolargetool:${toolargetool}" // 需要使用调试时才启用 debugImplementation "com.github.nichbar:WhatTheStack:${whatTheStack}" debugImplementation "io.github.didi.dokit:dokitx:${dokit}" @@ -214,8 +214,6 @@ dependencies { implementation "androidx.annotation:annotation:${annotation}" - implementation "androidx.room:room-runtime:${room}" - implementation "androidx.room:room-rxjava2:${room}" implementation "androidx.viewpager2:viewpager2:${viewpager2}" kapt "androidx.room:room-compiler:${room}" @@ -230,8 +228,6 @@ dependencies { implementation "com.google.android:flexbox:${flexbox}" - implementation "pub.devrel:easypermissions:${easypermissions}" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "com.contrarywind:Android-PickerView:${pickerView}" @@ -253,10 +249,7 @@ dependencies { implementation "com.llew.huawei:verifier:${verifier}" implementation "com.lg:skeleton:${skeleton}" - implementation "com.tencent.mm.opensdk:wechat-sdk-android-without-mta:${mta}" - debugImplementation "com.github.nichbar.chucker:library:${chucker}" - releaseImplementation "com.github.nichbar.chucker:library-no-op:${chucker}" teaImplementation "com.bytedance.applog:RangersAppLog-Lite-cn:${bytedanceApplog}" implementation "com.aliyun.dpa:oss-android-sdk:${oss}" @@ -266,7 +259,6 @@ dependencies { implementation "com.github.hsiafan:apk-parser:${apkParser}" implementation "org.nanohttpd:nanohttpd:${nanohttpd}" - implementation "com.aliyun.openservices:aliyun-log-android-sdk:${aliyunLog}" implementation "com.lg:easyfloat:${easyFloat}" implementation "io.github.florent37:shapeofview:${shapeOfView}" diff --git a/app/src/main/java/com/gh/base/BaseRichEditorActivity.kt b/app/src/main/java/com/gh/base/BaseRichEditorActivity.kt index 407264e00f..bf67741269 100644 --- a/app/src/main/java/com/gh/base/BaseRichEditorActivity.kt +++ b/app/src/main/java/com/gh/base/BaseRichEditorActivity.kt @@ -15,6 +15,8 @@ import android.widget.FrameLayout import android.widget.TextView import androidx.lifecycle.Observer import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.NewLogUtils import com.gh.common.view.RichEditor import com.gh.gamecenter.CropImageActivity import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/base/BaseRichEditorViewModel.kt b/app/src/main/java/com/gh/base/BaseRichEditorViewModel.kt index ed11356911..c632d1db8b 100644 --- a/app/src/main/java/com/gh/base/BaseRichEditorViewModel.kt +++ b/app/src/main/java/com/gh/base/BaseRichEditorViewModel.kt @@ -19,7 +19,7 @@ import com.gh.gamecenter.entity.ErrorEntity import com.gh.gamecenter.entity.LocalVideoEntity import com.gh.gamecenter.entity.QuoteCountEntity import com.gh.gamecenter.qa.BbsType -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.retrofit.service.ApiService import com.gh.gamecenter.video.upload.OnUploadListener diff --git a/app/src/main/java/com/gh/base/ToolBarActivity.java b/app/src/main/java/com/gh/base/ToolBarActivity.java index cc19f8e0f4..1934a98abf 100644 --- a/app/src/main/java/com/gh/base/ToolBarActivity.java +++ b/app/src/main/java/com/gh/base/ToolBarActivity.java @@ -27,6 +27,7 @@ import androidx.fragment.app.Fragment; import androidx.lifecycle.ViewModelProviders; import com.facebook.drawee.view.SimpleDraweeView; +import com.gh.gamecenter.common.base.BaseActivity; import com.gh.gamecenter.common.constant.Constants; import com.gh.gamecenter.core.utils.DisplayUtils; import com.gh.gamecenter.common.utils.ImageUtils; diff --git a/app/src/main/java/com/gh/common/DefaultJsApi.kt b/app/src/main/java/com/gh/common/DefaultJsApi.kt index 3d965a8f6e..5456a8dc5c 100644 --- a/app/src/main/java/com/gh/common/DefaultJsApi.kt +++ b/app/src/main/java/com/gh/common/DefaultJsApi.kt @@ -10,9 +10,10 @@ import androidx.appcompat.app.AppCompatActivity import androidx.fragment.app.FragmentActivity import com.gh.gamecenter.core.utils.CurrentActivityHolder import com.gh.gamecenter.common.constant.Constants -import com.gh.common.loghub.LoghubUtils -import com.gh.common.tracker.Tracker +import com.gh.gamecenter.common.loghub.LoghubUtils +import com.gh.gamecenter.common.tracker.Tracker import com.gh.common.util.* +import com.gh.common.util.LogUtils import com.gh.gamecenter.common.view.dsbridge.CompletionHandler import com.gh.gamecenter.* import com.gh.gamecenter.BuildConfig diff --git a/app/src/main/java/com/gh/common/FixedRateJobHelper.kt b/app/src/main/java/com/gh/common/FixedRateJobHelper.kt index c832efebd4..4f39d60084 100644 --- a/app/src/main/java/com/gh/common/FixedRateJobHelper.kt +++ b/app/src/main/java/com/gh/common/FixedRateJobHelper.kt @@ -2,13 +2,13 @@ package com.gh.common import com.gh.common.exposure.ExposureManager import com.gh.common.filter.RegionSettingHelper -import com.gh.common.loghub.LoghubUtils +import com.gh.gamecenter.common.loghub.LoghubUtils import com.gh.gamecenter.common.utils.doOnMainProcessOnly import com.gh.gamecenter.common.utils.tryCatchInRelease import com.gh.common.videolog.VideoRecordUtils import com.gh.download.DownloadDataHelper import com.gh.gamecenter.entity.TimeEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/common/constant/Config.java b/app/src/main/java/com/gh/common/constant/Config.java index 6ea570f0d4..4cc5abb9b2 100644 --- a/app/src/main/java/com/gh/common/constant/Config.java +++ b/app/src/main/java/com/gh/common/constant/Config.java @@ -21,8 +21,8 @@ import com.gh.gamecenter.entity.NewSettingsEntity; import com.gh.gamecenter.entity.NewsEntity; import com.gh.gamecenter.entity.SettingsEntity; import com.gh.gamecenter.eventbus.EBReuse; -import com.gh.gamecenter.retrofit.BiResponse; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.BiResponse; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.halo.assistant.HaloApp; import com.lightgame.utils.Utils; diff --git a/app/src/main/java/com/gh/common/dialog/PackageCheckDialogFragment.kt b/app/src/main/java/com/gh/common/dialog/PackageCheckDialogFragment.kt index 9247fda040..1da047ca1c 100644 --- a/app/src/main/java/com/gh/common/dialog/PackageCheckDialogFragment.kt +++ b/app/src/main/java/com/gh/common/dialog/PackageCheckDialogFragment.kt @@ -18,6 +18,7 @@ import androidx.recyclerview.widget.RecyclerView import com.gh.gamecenter.common.base.BaseRecyclerViewHolder import com.gh.gamecenter.common.constant.Constants import com.gh.common.util.* +import com.gh.common.util.LogUtils import com.gh.gamecenter.common.view.CustomLinkMovementMethod import com.gh.download.DownloadManager import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/common/exposure/ExposureConverters.kt b/app/src/main/java/com/gh/common/exposure/ExposureConverters.kt index c0f3f1e47e..8b3392b110 100644 --- a/app/src/main/java/com/gh/common/exposure/ExposureConverters.kt +++ b/app/src/main/java/com/gh/common/exposure/ExposureConverters.kt @@ -1,6 +1,7 @@ package com.gh.common.exposure import androidx.room.TypeConverter +import com.gh.gamecenter.common.entity.ExposureEntity import com.gh.gamecenter.common.exposure.meta.Meta import com.gh.gamecenter.core.utils.GsonUtils import java.util.* diff --git a/app/src/main/java/com/gh/common/exposure/ExposureEvent.kt b/app/src/main/java/com/gh/common/exposure/ExposureEvent.kt index dbbb1f432a..9b5ff1cc4d 100644 --- a/app/src/main/java/com/gh/common/exposure/ExposureEvent.kt +++ b/app/src/main/java/com/gh/common/exposure/ExposureEvent.kt @@ -10,6 +10,7 @@ import com.gh.gamecenter.common.exposure.meta.MetaUtil import com.gh.common.exposure.time.TimeUtil import com.gh.gamecenter.common.utils.getFirstElementDividedByDivider import com.gh.download.server.BrowserInstallHelper +import com.gh.gamecenter.common.entity.ExposureEntity import com.gh.gamecenter.entity.GameEntity import com.lightgame.download.DownloadEntity import kotlinx.parcelize.Parcelize diff --git a/app/src/main/java/com/gh/common/exposure/ExposureManager.kt b/app/src/main/java/com/gh/common/exposure/ExposureManager.kt index efd3e8c359..2251c86967 100644 --- a/app/src/main/java/com/gh/common/exposure/ExposureManager.kt +++ b/app/src/main/java/com/gh/common/exposure/ExposureManager.kt @@ -1,7 +1,7 @@ package com.gh.common.exposure import com.aliyun.sls.android.producer.Log -import com.gh.common.loghub.LoghubHelper +import com.gh.gamecenter.common.loghub.LoghubHelper import com.gh.gamecenter.common.utils.toJson import com.gh.gamecenter.common.utils.tryWithDefaultCatch import com.gh.gamecenter.BuildConfig diff --git a/app/src/main/java/com/gh/common/filter/RegionSettingHelper.kt b/app/src/main/java/com/gh/common/filter/RegionSettingHelper.kt index cc77e81de6..b5eae07f58 100644 --- a/app/src/main/java/com/gh/common/filter/RegionSettingHelper.kt +++ b/app/src/main/java/com/gh/common/filter/RegionSettingHelper.kt @@ -8,7 +8,7 @@ import com.gh.gamecenter.common.utils.toJson import com.gh.gamecenter.common.utils.toObject import com.gh.gamecenter.R import com.gh.gamecenter.entity.GameEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.functions.Function diff --git a/app/src/main/java/com/gh/common/provider/AppProviderImpl.kt b/app/src/main/java/com/gh/common/provider/AppProviderImpl.kt index 8fcd73b563..c6b3069776 100644 --- a/app/src/main/java/com/gh/common/provider/AppProviderImpl.kt +++ b/app/src/main/java/com/gh/common/provider/AppProviderImpl.kt @@ -2,6 +2,7 @@ package com.gh.common.provider import android.content.Context import com.alibaba.android.arouter.facade.annotation.Route +import com.gh.gamecenter.R import com.gh.gamecenter.common.constant.RouteConsts import com.gh.gamecenter.core.provider.IAppProvider import com.halo.assistant.HaloApp @@ -12,6 +13,10 @@ class AppProviderImpl : IAppProvider { } + override fun getAppName(): String { + return HaloApp.getInstance().getString(R.string.app_name) + } + override fun getGid(): String { return HaloApp.getInstance().gid ?: "" } @@ -24,10 +29,22 @@ class AppProviderImpl : IAppProvider { return HaloApp.getInstance().channel ?: "" } + override fun getUserAgent(): String { + return HaloApp.getInstance().userAgent ?: "" + } + + override fun getServerUserMark(): String { + return HaloApp.getInstance().serverUserMark ?: "" + } + override fun getDeviceRamSize(): Long { return HaloApp.getInstance().deviceRamSize } + override fun getTemporaryLocalDeviceId(): String { + return HaloApp.getInstance().temporaryLocalDeviceId ?: "" + } + override fun isUserAcceptPrivacyPolicy(context: Context): Boolean { return HaloApp.isUserAcceptPrivacyPolicy(context) } diff --git a/app/src/main/java/com/gh/common/provider/ConfigProviderImpl.kt b/app/src/main/java/com/gh/common/provider/ConfigProviderImpl.kt index 80df61465e..50d5c1aaf1 100644 --- a/app/src/main/java/com/gh/common/provider/ConfigProviderImpl.kt +++ b/app/src/main/java/com/gh/common/provider/ConfigProviderImpl.kt @@ -8,6 +8,14 @@ import com.gh.gamecenter.core.provider.IConfigProvider @Route(path = RouteConsts.provider.config, name = "Config暴露服务") class ConfigProviderImpl : IConfigProvider { + override fun getTencentAppId(): String { + return Config.TENCENT_APPID + } + + override fun getWechatAppId(): String { + return Config.WECHAT_APPID + } + override fun getUploadLimitSize(): Long { return Config.getSettings()?.image?.uploadLimitSize ?: 0L } @@ -44,6 +52,10 @@ class ConfigProviderImpl : IConfigProvider { return Config.getSettings()?.image?.oss?.gifWaterMark ?: "" } + override fun getQQ(): String { + return Config.getSettings()?.support?.qq ?: "" + } + override fun init(context: Context?) { } diff --git a/app/src/main/java/com/gh/common/provider/DialogUtilsProviderImpl.kt b/app/src/main/java/com/gh/common/provider/DialogUtilsProviderImpl.kt index 3810409211..4f52bcd881 100644 --- a/app/src/main/java/com/gh/common/provider/DialogUtilsProviderImpl.kt +++ b/app/src/main/java/com/gh/common/provider/DialogUtilsProviderImpl.kt @@ -3,6 +3,7 @@ package com.gh.common.provider import android.content.Context import com.alibaba.android.arouter.facade.annotation.Route import com.gh.common.util.DialogUtils +import com.gh.gamecenter.common.callback.CancelListener import com.gh.gamecenter.common.callback.ConfirmListener import com.gh.gamecenter.common.constant.RouteConsts import com.gh.gamecenter.core.provider.IDialogUtilsProvider @@ -14,7 +15,11 @@ class DialogUtilsProviderImpl : IDialogUtilsProvider { override fun onConfirm() { confirm.invoke() } - }, cancel) + }, object :CancelListener{ + override fun onCancel() { + cancel.invoke() + } + }) } override fun init(context: Context?) { diff --git a/app/src/main/java/com/gh/common/provider/DirectProviderImpl.kt b/app/src/main/java/com/gh/common/provider/DirectProviderImpl.kt index be9f102e6e..b3016ccd36 100644 --- a/app/src/main/java/com/gh/common/provider/DirectProviderImpl.kt +++ b/app/src/main/java/com/gh/common/provider/DirectProviderImpl.kt @@ -17,6 +17,10 @@ class DirectProviderImpl : IDirectProvider { DirectUtils.directToRegulationTestPage(context) } + override fun directToQqConversation(context: Context, qq: String) { + DirectUtils.directToQqConversation(context, qq) + } + override fun init(context: Context?) { } diff --git a/app/src/main/java/com/gh/common/provider/DownloadManagerProviderImpl.kt b/app/src/main/java/com/gh/common/provider/DownloadManagerProviderImpl.kt new file mode 100644 index 0000000000..e2abd7407f --- /dev/null +++ b/app/src/main/java/com/gh/common/provider/DownloadManagerProviderImpl.kt @@ -0,0 +1,21 @@ +package com.gh.common.provider + +import android.content.Context +import com.alibaba.android.arouter.facade.annotation.Route +import com.gh.download.DownloadManager +import com.gh.gamecenter.common.constant.RouteConsts +import com.gh.gamecenter.core.provider.IDownloadManagerProvider +import com.lightgame.download.DownloadEntity + +@Route(path = RouteConsts.provider.downloadManager, name = "DownloadManager暴露服务") +class DownloadManagerProviderImpl : IDownloadManagerProvider { + + override fun getDownloadEntityByUrl(url: String): DownloadEntity? { + return DownloadManager.getInstance().getDownloadEntityByUrl(url) + } + + override fun init(context: Context?) { + + } + +} \ No newline at end of file diff --git a/app/src/main/java/com/gh/common/provider/EnergyTaskProviderImpl.kt b/app/src/main/java/com/gh/common/provider/EnergyTaskProviderImpl.kt new file mode 100644 index 0000000000..b78a5e072a --- /dev/null +++ b/app/src/main/java/com/gh/common/provider/EnergyTaskProviderImpl.kt @@ -0,0 +1,23 @@ +package com.gh.common.provider + +import android.content.Context +import com.alibaba.android.arouter.facade.annotation.Route +import com.gh.common.util.EnergyTaskHelper +import com.gh.common.util.IntegralLogHelper +import com.gh.gamecenter.common.constant.RouteConsts +import com.gh.gamecenter.core.provider.IEnergyTaskProvider + +@Route(path = RouteConsts.provider.energyTask, name = "EnergyTask暴露服务") +class EnergyTaskProviderImpl : IEnergyTaskProvider { + override fun postEnergyTaskForShare(type: String, id: String, url: String) { + EnergyTaskHelper.postEnergyTaskForShare(type, id, url) + } + + override fun logInviteResult(result: String, type: String?) { + IntegralLogHelper.logInviteResult(result, type) + } + + override fun init(context: Context?) { + + } +} \ No newline at end of file diff --git a/app/src/main/java/com/gh/common/provider/EntranceUtilsProviderImpl.kt b/app/src/main/java/com/gh/common/provider/EntranceUtilsProviderImpl.kt new file mode 100644 index 0000000000..a0513771e4 --- /dev/null +++ b/app/src/main/java/com/gh/common/provider/EntranceUtilsProviderImpl.kt @@ -0,0 +1,23 @@ +package com.gh.common.provider + +import android.content.Context +import android.os.Bundle +import com.alibaba.android.arouter.facade.annotation.Route +import com.gh.common.util.EntranceUtils +import com.gh.gamecenter.common.constant.RouteConsts +import com.gh.gamecenter.core.provider.IEntranceUtilsProvider + +@Route(path = RouteConsts.provider.entranceUtils, name = "EntranceUtils暴露服务") +class EntranceUtilsProviderImpl: IEntranceUtilsProvider { + override fun jumpActivity(context: Context, bundle: Bundle) { + EntranceUtils.jumpActivity(context, bundle) + } + + override fun saveShortcut(activityName: String, bundle: Bundle?) { + EntranceUtils.saveShortcut(activityName, bundle) + } + + override fun init(context: Context?) { + + } +} \ No newline at end of file diff --git a/app/src/main/java/com/gh/common/provider/PackageHelperProviderImpl.kt b/app/src/main/java/com/gh/common/provider/PackageHelperProviderImpl.kt new file mode 100644 index 0000000000..ccec3a5736 --- /dev/null +++ b/app/src/main/java/com/gh/common/provider/PackageHelperProviderImpl.kt @@ -0,0 +1,19 @@ +package com.gh.common.provider + +import android.content.Context +import com.alibaba.android.arouter.facade.annotation.Route +import com.gh.common.util.PackageHelper +import com.gh.gamecenter.common.constant.RouteConsts +import com.gh.gamecenter.core.provider.IPackageHelperProvider + +@Route(path = RouteConsts.provider.packageHelper, name = "PackageHelper暴露服务") +class PackageHelperProviderImpl : IPackageHelperProvider { + + override fun getLocalPackageNameSet(): HashSet { + return PackageHelper.localPackageNameSet + } + + override fun init(context: Context?) { + + } +} \ No newline at end of file diff --git a/app/src/main/java/com/gh/common/provider/PackageInstallerProviderImpl.kt b/app/src/main/java/com/gh/common/provider/PackageInstallerProviderImpl.kt new file mode 100644 index 0000000000..f12ce97d2e --- /dev/null +++ b/app/src/main/java/com/gh/common/provider/PackageInstallerProviderImpl.kt @@ -0,0 +1,24 @@ +package com.gh.common.provider + +import android.content.Context +import com.alibaba.android.arouter.facade.annotation.Route +import com.gh.common.util.PackageInstaller +import com.gh.gamecenter.common.constant.RouteConsts +import com.gh.gamecenter.core.provider.IPackageInstallerProvider +import com.lightgame.download.DownloadEntity + +@Route(path = RouteConsts.provider.packageInstaller, name = "PackageInstaller暴露服务") +class PackageInstallerProviderImpl : IPackageInstallerProvider { + + override fun install(context: Context, downloadEntity: DownloadEntity, showUnzipToast: Boolean) { + PackageInstaller.install(context, downloadEntity, showUnzipToast) + } + + override fun uninstall(context: Context, path: String) { + PackageInstaller.uninstall(context, path) + } + + override fun init(context: Context?) { + + } +} \ No newline at end of file diff --git a/app/src/main/java/com/gh/common/provider/PackageUtilsProviderImpl.kt b/app/src/main/java/com/gh/common/provider/PackageUtilsProviderImpl.kt index 4a94aa16b3..1d41e2fc21 100644 --- a/app/src/main/java/com/gh/common/provider/PackageUtilsProviderImpl.kt +++ b/app/src/main/java/com/gh/common/provider/PackageUtilsProviderImpl.kt @@ -1,6 +1,7 @@ package com.gh.common.provider import android.content.Context +import android.content.pm.PackageInfo import com.alibaba.android.arouter.facade.annotation.Route import com.gh.common.util.PackageUtils import com.gh.gamecenter.common.constant.RouteConsts @@ -16,6 +17,18 @@ class PackageUtilsProviderImpl : IPackageUtilsProvider { return PackageUtils.getGhVersionName() } + override fun getInstalledPackages(context: Context, flag: Int): List { + return PackageUtils.getInstalledPackages(context, flag) + } + + override fun getApkSignatureByPackageName(context: Context, packageName: String): Array { + return PackageUtils.getApkSignatureByPackageName(context, packageName) + } + + override fun getSideLoadedInfo(): MutableMap? { + return PackageUtils.getSideLoadedInfo() + } + override fun init(context: Context?) { } diff --git a/app/src/main/java/com/gh/common/provider/QuickLoginProviderImpl.kt b/app/src/main/java/com/gh/common/provider/QuickLoginProviderImpl.kt new file mode 100644 index 0000000000..369322fd73 --- /dev/null +++ b/app/src/main/java/com/gh/common/provider/QuickLoginProviderImpl.kt @@ -0,0 +1,19 @@ +package com.gh.common.provider + +import android.content.Context +import com.alibaba.android.arouter.facade.annotation.Route +import com.gh.common.util.QuickLoginHelper +import com.gh.gamecenter.common.constant.RouteConsts +import com.gh.gamecenter.core.provider.IQuickLoginProvider + +@Route(path = RouteConsts.provider.quickLogin, name = "一键登录暴露服务") +class QuickLoginProviderImpl : IQuickLoginProvider { + + override fun startLogin(context: Context, entrance: String) { + QuickLoginHelper.startLogin(context, entrance) + } + + override fun init(context: Context?) { + + } +} \ No newline at end of file diff --git a/app/src/main/java/com/gh/common/provider/UserManagerProviderImpl.kt b/app/src/main/java/com/gh/common/provider/UserManagerProviderImpl.kt index c208ca2030..e17e64cce9 100644 --- a/app/src/main/java/com/gh/common/provider/UserManagerProviderImpl.kt +++ b/app/src/main/java/com/gh/common/provider/UserManagerProviderImpl.kt @@ -16,6 +16,22 @@ class UserManagerProviderImpl: IUserManagerProvider { return UserManager.getInstance().userId } + override fun getToken(): String { + return UserManager.getInstance().token + } + + override fun refreshToken(accessToken: String, success: () -> Unit, fail: (String?) -> Unit) { + UserManager.getInstance().refreshToken(accessToken, object : UserManager.refreshCallBack { + override fun onLogin() { + success.invoke() + } + + override fun onLoginFailure(errorMessage: String?) { + fail.invoke(errorMessage) + } + }) + } + override fun init(context: Context?) { } diff --git a/app/src/main/java/com/gh/common/repository/ReservationRepository.kt b/app/src/main/java/com/gh/common/repository/ReservationRepository.kt index 4f7d952763..68ba47ec06 100644 --- a/app/src/main/java/com/gh/common/repository/ReservationRepository.kt +++ b/app/src/main/java/com/gh/common/repository/ReservationRepository.kt @@ -3,7 +3,7 @@ package com.gh.common.repository import android.annotation.SuppressLint import com.gh.common.util.CheckLoginUtils import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/common/simulator/SimulatorDownloadManager.kt b/app/src/main/java/com/gh/common/simulator/SimulatorDownloadManager.kt index c6ca6c3e99..1e380c5700 100644 --- a/app/src/main/java/com/gh/common/simulator/SimulatorDownloadManager.kt +++ b/app/src/main/java/com/gh/common/simulator/SimulatorDownloadManager.kt @@ -13,6 +13,7 @@ import com.gh.gamecenter.core.AppExecutor.uiExecutor import com.gh.gamecenter.common.constant.Constants import com.gh.gamecenter.common.base.TrackableDialog import com.gh.common.util.* +import com.gh.common.util.LogUtils import com.gh.download.DownloadManager import com.gh.gamecenter.R import com.gh.gamecenter.common.utils.* diff --git a/app/src/main/java/com/gh/common/simulator/SimulatorGameManager.kt b/app/src/main/java/com/gh/common/simulator/SimulatorGameManager.kt index 3194cd20f3..dc2cb49cc8 100644 --- a/app/src/main/java/com/gh/common/simulator/SimulatorGameManager.kt +++ b/app/src/main/java/com/gh/common/simulator/SimulatorGameManager.kt @@ -9,6 +9,7 @@ import android.text.TextUtils import com.g00fy2.versioncompare.Version import com.gh.gamecenter.common.json.json import com.gh.common.util.* +import com.gh.common.util.LogUtils import com.gh.download.DownloadManager import com.gh.gamecenter.common.callback.BiCallback import com.gh.gamecenter.common.utils.* @@ -16,9 +17,9 @@ import com.gh.gamecenter.core.utils.* import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.entity.SimulatorGameRecordEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.EmptyResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.EmptyResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.room.AppDatabase import com.halo.assistant.HaloApp diff --git a/app/src/main/java/com/gh/common/util/ActivationHelper.kt b/app/src/main/java/com/gh/common/util/ActivationHelper.kt index 65560c0a90..ee77fd1d0b 100644 --- a/app/src/main/java/com/gh/common/util/ActivationHelper.kt +++ b/app/src/main/java/com/gh/common/util/ActivationHelper.kt @@ -1,7 +1,7 @@ package com.gh.common.util import com.gh.gamecenter.core.utils.SPUtils -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.schedulers.Schedulers import okhttp3.ResponseBody diff --git a/app/src/main/java/com/gh/common/util/AdHelper.kt b/app/src/main/java/com/gh/common/util/AdHelper.kt index e32120a066..3f77de2187 100644 --- a/app/src/main/java/com/gh/common/util/AdHelper.kt +++ b/app/src/main/java/com/gh/common/util/AdHelper.kt @@ -6,7 +6,7 @@ import com.gh.common.constant.Config import com.gh.gamecenter.common.utils.NetworkUtils import com.gh.gamecenter.entity.SettingsEntity import com.gh.gamecenter.entity.StartupAdEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/common/util/BbsReportHelper.kt b/app/src/main/java/com/gh/common/util/BbsReportHelper.kt index 293e921cea..d7dc7b0605 100644 --- a/app/src/main/java/com/gh/common/util/BbsReportHelper.kt +++ b/app/src/main/java/com/gh/common/util/BbsReportHelper.kt @@ -21,7 +21,7 @@ import com.gh.gamecenter.common.utils.toObject import com.gh.gamecenter.common.utils.toRequestBody import com.gh.gamecenter.databinding.DialogReportReasonBinding import com.gh.gamecenter.entity.SettingsEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/common/util/BbsStayTimeHelper.kt b/app/src/main/java/com/gh/common/util/BbsStayTimeHelper.kt index 2500cd6018..b2185e4091 100644 --- a/app/src/main/java/com/gh/common/util/BbsStayTimeHelper.kt +++ b/app/src/main/java/com/gh/common/util/BbsStayTimeHelper.kt @@ -15,7 +15,7 @@ import com.gh.gamecenter.qa.article.detail.ArticleDetailActivity import com.gh.gamecenter.qa.comment.CommentActivity import com.gh.gamecenter.qa.questions.newdetail.NewQuestionDetailActivity import com.gh.gamecenter.qa.video.detail.ForumVideoDetailActivity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/common/util/CollectionUtils.kt b/app/src/main/java/com/gh/common/util/CollectionUtils.kt index 691df5349c..3d62483ca4 100644 --- a/app/src/main/java/com/gh/common/util/CollectionUtils.kt +++ b/app/src/main/java/com/gh/common/util/CollectionUtils.kt @@ -3,7 +3,7 @@ package com.gh.common.util import android.content.Context import com.gh.gamecenter.eventbus.EBCollectionChanged import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Observable import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/common/util/CommentHelper.kt b/app/src/main/java/com/gh/common/util/CommentHelper.kt index 171743f406..932d8b5536 100644 --- a/app/src/main/java/com/gh/common/util/CommentHelper.kt +++ b/app/src/main/java/com/gh/common/util/CommentHelper.kt @@ -19,7 +19,7 @@ import com.gh.gamecenter.entity.MeEntity import com.gh.gamecenter.entity.Permissions import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.qa.comment.OnCommentOptionClickListener -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/common/util/CommentUtils.java b/app/src/main/java/com/gh/common/util/CommentUtils.java index d43bf9ce9c..b6a583c01e 100644 --- a/app/src/main/java/com/gh/common/util/CommentUtils.java +++ b/app/src/main/java/com/gh/common/util/CommentUtils.java @@ -27,8 +27,8 @@ import com.gh.gamecenter.entity.CommentEntity; import com.gh.gamecenter.entity.MeEntity; import com.gh.gamecenter.entity.UserInfoEntity; import com.gh.gamecenter.manager.UserManager; -import com.gh.gamecenter.retrofit.BiResponse; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.BiResponse; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.halo.assistant.HaloApp; import com.lightgame.utils.Utils; diff --git a/app/src/main/java/com/gh/common/util/ConcernUtils.kt b/app/src/main/java/com/gh/common/util/ConcernUtils.kt index 058763efb3..a176f70bda 100644 --- a/app/src/main/java/com/gh/common/util/ConcernUtils.kt +++ b/app/src/main/java/com/gh/common/util/ConcernUtils.kt @@ -4,7 +4,7 @@ import android.content.Context import android.text.TextUtils import com.gh.gamecenter.eventbus.EBConcernChanged import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/common/util/DataLogUtils.java b/app/src/main/java/com/gh/common/util/DataLogUtils.java index 28a2405e1a..9cf1452caa 100644 --- a/app/src/main/java/com/gh/common/util/DataLogUtils.java +++ b/app/src/main/java/com/gh/common/util/DataLogUtils.java @@ -3,7 +3,7 @@ package com.gh.common.util; import android.content.Context; import com.gh.gamecenter.common.exposure.meta.MetaUtil; -import com.gh.common.loghub.LoghubUtils; +import com.gh.gamecenter.common.loghub.LoghubUtils; import com.gh.gamecenter.common.utils.Installation; import com.halo.assistant.HaloApp; import com.lightgame.download.DownloadEntity; diff --git a/app/src/main/java/com/gh/common/util/DataUtils.java b/app/src/main/java/com/gh/common/util/DataUtils.java index 8f108c9119..d0cab3d584 100644 --- a/app/src/main/java/com/gh/common/util/DataUtils.java +++ b/app/src/main/java/com/gh/common/util/DataUtils.java @@ -14,7 +14,7 @@ import com.gh.gamecenter.core.utils.GsonUtils; import com.gh.gamecenter.core.utils.MtaHelper; import com.gh.gamecenter.core.utils.SPUtils; import com.gh.gamecenter.entity.UserInfoEntity; -import com.gh.gamecenter.retrofit.BiResponse; +import com.gh.gamecenter.common.retrofit.BiResponse; import com.gh.gamecenter.retrofit.RetrofitManager; import com.gh.gid.GidCallback; import com.gh.gid.GidHelper; diff --git a/app/src/main/java/com/gh/common/util/DeviceTokenUtils.kt b/app/src/main/java/com/gh/common/util/DeviceTokenUtils.kt index b282020620..03697ca8ed 100644 --- a/app/src/main/java/com/gh/common/util/DeviceTokenUtils.kt +++ b/app/src/main/java/com/gh/common/util/DeviceTokenUtils.kt @@ -6,7 +6,7 @@ import android.preference.PreferenceManager import com.gh.gamecenter.common.exposure.meta.MetaUtil import com.gh.gamecenter.BuildConfig import com.gh.gamecenter.entity.TimeEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/common/util/DialogUtils.java b/app/src/main/java/com/gh/common/util/DialogUtils.java index e3a369f27f..17f92ea226 100644 --- a/app/src/main/java/com/gh/common/util/DialogUtils.java +++ b/app/src/main/java/com/gh/common/util/DialogUtils.java @@ -50,26 +50,27 @@ import androidx.recyclerview.widget.RecyclerView; import com.facebook.drawee.generic.GenericDraweeHierarchy; import com.facebook.drawee.view.SimpleDraweeView; import com.gh.common.constant.Config; -import com.gh.gamecenter.common.view.DrawableView; -import com.gh.gamecenter.common.view.FixLinearLayoutManager; -import com.gh.gamecenter.common.view.LimitHeightLinearLayout; -import com.gh.gamecenter.common.view.MaxHeightNestedScrollView; -import com.gh.gamecenter.common.view.VerticalItemDecoration; import com.gh.gamecenter.R; import com.gh.gamecenter.SuggestionActivity; import com.gh.gamecenter.adapter.ReportReasonAdapter; import com.gh.gamecenter.adapter.viewholder.PrivacyPolicyItemViewHolder; import com.gh.gamecenter.common.base.TrackableDialog; +import com.gh.gamecenter.common.callback.CancelListener; import com.gh.gamecenter.common.callback.ConfirmListener; import com.gh.gamecenter.common.callback.SimpleCallback; import com.gh.gamecenter.common.databinding.DialogAlertDefaultBinding; import com.gh.gamecenter.common.utils.ExtensionsKt; +import com.gh.gamecenter.common.utils.ImageUtils; import com.gh.gamecenter.common.utils.NetworkUtils; import com.gh.gamecenter.common.view.CustomLinkMovementMethod; +import com.gh.gamecenter.common.view.DrawableView; +import com.gh.gamecenter.common.view.FixLinearLayoutManager; +import com.gh.gamecenter.common.view.LimitHeightLinearLayout; +import com.gh.gamecenter.common.view.MaxHeightNestedScrollView; +import com.gh.gamecenter.common.view.VerticalItemDecoration; import com.gh.gamecenter.core.AppExecutor; import com.gh.gamecenter.core.utils.DisplayUtils; import com.gh.gamecenter.core.utils.EmptyCallback; -import com.gh.gamecenter.common.utils.ImageUtils; import com.gh.gamecenter.core.utils.MtaHelper; import com.gh.gamecenter.core.utils.SpanBuilder; import com.gh.gamecenter.core.utils.StringUtils; @@ -208,30 +209,8 @@ public class DialogUtils { dialog.show(); } - public static void showWarningDialog(Context context, String title, CharSequence msg, final ConfirmListener listener) { - if (!(context instanceof Activity)) { - return; - } - showWarningDialog(context, title, msg, "取消", "确定", listener, null); - } - public static void showWarningDialog(Context context, String title, CharSequence msg, String cancel, String confirm, - final ConfirmListener cmListener, final CancelListener clListener) { - showAlertDialog(context, title, msg, confirm, cancel, cmListener, clListener); - } - - // 网络劫持时 打开QQ客户端,创建临时会话 - public static void showQqSessionDialog(final Context context) { - String qq = ""; - if (Config.getSettings() != null && Config.getSettings().getSupport() != null) { - qq = Config.getSettings().getSupport().getQq(); - } - String finalQq = qq; - showWarningDialog(context, "警告", "您当前网络环境异常,下载地址可能被运营商恶意替换(网络劫持)" + - ",如多次下载失败,请联系客服获取正确的下载地址(客服QQ:" + qq + ")" - , "取消", "前往QQ", () -> DirectUtils.directToQqConversation(context, finalQq), null); - } public static void checkDownload(Context context, String size, CheckDownloadCallBack callBack) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(HaloApp.getInstance().getApplication()); @@ -285,7 +264,7 @@ public class DialogUtils { } public static void showNoConnectionDownloadDialog(Context context, ConfirmListener listener, CancelListener cancelListener) { - showWarningDialog(context, "下载提示", "网络异常,请检查手机网络状态", "连上WiFi后自动下载", "关闭", listener, cancelListener); + com.gh.gamecenter.common.utils.DialogUtils.showWarningDialog(context, "下载提示", "网络异常,请检查手机网络状态", "连上WiFi后自动下载", "关闭", listener, cancelListener); } public static void showDownloadDialog(Context context, ConfirmListener listener, CancelListener cancelListener) { @@ -334,11 +313,11 @@ public class DialogUtils { } public static void showResumeDownloadDialog(Context context, ConfirmListener listener, CancelListener cancelListener) { - showWarningDialog(context, "下载提示", "当前正在使用移动网络,继续下载会消耗手机流量", "连上WiFi后自动下载", "继续下载", listener, cancelListener); + com.gh.gamecenter.common.utils.DialogUtils.showWarningDialog(context, "下载提示", "当前正在使用移动网络,继续下载会消耗手机流量", "连上WiFi后自动下载", "继续下载", listener, cancelListener); } public static void showDownloadDialog(Context context, ConfirmListener listener) { - showWarningDialog(context, "下载提示", "您当前使用的网络为2G/3G/4G,开始下载将会消耗移动流量,确定下载?", listener); + com.gh.gamecenter.common.utils.DialogUtils.showWarningDialog(context, "下载提示", "您当前使用的网络为2G/3G/4G,开始下载将会消耗移动流量,确定下载?", listener); } public static void showCancelDialog(Context context, final ConfirmListener listener, CancelListener cancelListener) { @@ -432,93 +411,7 @@ public class DialogUtils { return showNewAlertDialog(context, title, message, negative, positive, null, gravity, shouldShowCloseBtn, clListener, cmListener); } - /** - * Material Design 风格弹窗 - * - * @param context - * @param title 标题 - * @param message 内容 - * @param positive 确认按钮文本 - * @param negative 取消按钮文本 - * @param cmListener 确认按钮监听 - * @param clListener 取消按钮监听 - */ - public static Dialog showAlertDialog(Context context, String title, CharSequence message - , String positive, String negative, final ConfirmListener cmListener, final CancelListener clListener) { - context = checkDialogContext(context); - final Dialog dialog = new Dialog(context, R.style.GhAlertDialog); - - View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_alert, null); - TextView contentTv = contentView.findViewById(R.id.dialog_content); - TextView titleTv = contentView.findViewById(R.id.dialog_title); - TextView negativeTv = contentView.findViewById(R.id.dialog_negative); - TextView positiveTv = contentView.findViewById(R.id.dialog_positive); - if (message.toString().contains("红包奖励")) {//将红包奖励四个字标红 - String str = message.toString().substring(0, message.toString().indexOf("红包奖励")) + "红包奖励"; - contentTv.setText(Html.fromHtml(str)); - } else { - contentTv.setText(message); - } - titleTv.setText(title); - negativeTv.setText(negative); - positiveTv.setText(positive); - - negativeTv.setOnClickListener(view -> { - if (clListener != null) { - clListener.onCancel(); - } - dialog.dismiss(); - }); - - positiveTv.setOnClickListener(view -> { - if (cmListener != null) { - cmListener.onConfirm(); - } - dialog.dismiss(); - }); - - dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); - dialog.setContentView(contentView); - dialog.show(); - return dialog; - } - - public static Dialog showAlertDialog(Context context, String title, Spanned message - , String positive, String negative, final ConfirmListener cmListener, final CancelListener clListener) { - context = checkDialogContext(context); - - final Dialog dialog = new Dialog(context, R.style.GhAlertDialog); - - View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_alert, null); - TextView contentTv = contentView.findViewById(R.id.dialog_content); - TextView titleTv = contentView.findViewById(R.id.dialog_title); - TextView negativeTv = contentView.findViewById(R.id.dialog_negative); - TextView positiveTv = contentView.findViewById(R.id.dialog_positive); - contentTv.setText(message); - titleTv.setText(title); - negativeTv.setText(negative); - positiveTv.setText(positive); - - negativeTv.setOnClickListener(view -> { - if (clListener != null) { - clListener.onCancel(); - } - dialog.dismiss(); - }); - - positiveTv.setOnClickListener(view -> { - if (cmListener != null) { - cmListener.onConfirm(); - } - dialog.dismiss(); - }); - - dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); - dialog.setContentView(contentView); - dialog.show(); - return dialog; - } public static Dialog showDialogWithHtmlContent(Context context, String title, String content , String positive, String negative, final ConfirmListener cmListener, final CancelListener clListener) { @@ -2296,10 +2189,6 @@ public class DialogUtils { return AppManager.getInstance().currentActivity(); } - public interface CancelListener { - void onCancel(); - } - public interface OptionCallback { void onClicked(String text); } diff --git a/app/src/main/java/com/gh/common/util/DirectUtils.kt b/app/src/main/java/com/gh/common/util/DirectUtils.kt index a495ea9974..b351712304 100644 --- a/app/src/main/java/com/gh/common/util/DirectUtils.kt +++ b/app/src/main/java/com/gh/common/util/DirectUtils.kt @@ -9,7 +9,7 @@ import android.os.Build import android.os.Bundle import android.text.TextUtils import androidx.appcompat.app.AppCompatActivity -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.base.BaseActivity_TabLayout import com.gh.base.ToolBarActivity import com.gh.gamecenter.common.base.fragment.BaseFragment_TabLayout @@ -19,7 +19,6 @@ import com.gh.gamecenter.common.constant.Constants import com.gh.common.exposure.ExposureEvent import com.gh.common.exposure.ExposureEvent.Companion.createEvent import com.gh.common.exposure.ExposureManager.log -import com.gh.common.exposure.ExposureSource import com.gh.common.exposure.ExposureTraceUtils.appendTrace import com.gh.common.exposure.ExposureType import com.gh.gamecenter.common.constant.EntranceConsts.* @@ -30,11 +29,8 @@ import com.gh.gamecenter.catalog.CatalogActivity import com.gh.gamecenter.category.CategoryDirectoryActivity import com.gh.gamecenter.category2.CategoryV2Activity import com.gh.gamecenter.common.constant.EntranceConsts -import com.gh.gamecenter.common.utils.DialogHelper +import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.core.utils.RunningUtils -import com.gh.gamecenter.common.utils.copyTextAndToast -import com.gh.gamecenter.common.utils.isPublishEnv -import com.gh.gamecenter.common.utils.EnvHelper import com.gh.gamecenter.download.DownloadFragment.Companion.INDEX_UPDATE import com.gh.gamecenter.entity.* import com.gh.gamecenter.eventbus.EBSkip @@ -61,7 +57,7 @@ import com.gh.gamecenter.qa.article.detail.ArticleDetailActivity import com.gh.gamecenter.qa.questions.newdetail.NewQuestionDetailActivity import com.gh.gamecenter.qa.subject.CommunitySubjectActivity import com.gh.gamecenter.qa.video.detail.ForumVideoDetailActivity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.security.BindPhoneActivity import com.gh.gamecenter.servers.GameServerTestActivity diff --git a/app/src/main/java/com/gh/common/util/DownloadHelper.kt b/app/src/main/java/com/gh/common/util/DownloadHelper.kt index ed46db9488..470dc32a87 100644 --- a/app/src/main/java/com/gh/common/util/DownloadHelper.kt +++ b/app/src/main/java/com/gh/common/util/DownloadHelper.kt @@ -4,7 +4,7 @@ import com.gh.common.filter.RegionSettingHelper import com.gh.download.DownloadManager import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.entity.GameEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/common/util/DownloadObserver.kt b/app/src/main/java/com/gh/common/util/DownloadObserver.kt index 6a7c67eb17..59b21dbce2 100644 --- a/app/src/main/java/com/gh/common/util/DownloadObserver.kt +++ b/app/src/main/java/com/gh/common/util/DownloadObserver.kt @@ -2,7 +2,7 @@ package com.gh.common.util import android.os.Build import android.preference.PreferenceManager -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.constant.Constants import com.gh.common.exposure.ExposureUtils import com.gh.gamecenter.common.exposure.meta.MetaUtil @@ -21,8 +21,8 @@ import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.entity.SimpleGameEntity import com.gh.gamecenter.entity.SimulatorEntity import com.gh.gamecenter.eventbus.EBDownloadStatus -import com.gh.gamecenter.eventbus.EBShowDialog -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.eventbus.EBShowDialog +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.setting.GameDownloadSettingFragment import com.gh.gamecenter.suggest.SuggestType @@ -191,7 +191,12 @@ object DownloadObserver { when { // TODO 插件化传 path 从 apk 中获取 packageName 的形式有可能出现拿不到 packageName 的情况 downloadEntity.isPluggable -> // 弹出插件化提示框 - EventBus.getDefault().post(EBShowDialog(BaseActivity.PLUGGABLE, downloadEntity.path)) + EventBus.getDefault().post( + EBShowDialog( + BaseActivity.PLUGGABLE, + downloadEntity.path + ) + ) downloadEntity.isPlugin -> Utils.toast(mApplication, downloadEntity.name + " - " + platform + " - 下载完成") else -> Utils.toast(mApplication, downloadEntity.name + " - 下载完成") } @@ -235,9 +240,19 @@ object DownloadObserver { } else { // 弹出卸载提示框 if (downloadEntity.isPlugin) { - EventBus.getDefault().post(EBShowDialog(BaseActivity.PLUGGABLE, downloadEntity.path)) + EventBus.getDefault().post( + EBShowDialog( + BaseActivity.PLUGGABLE, + downloadEntity.path + ) + ) } else { - EventBus.getDefault().post(EBShowDialog(BaseActivity.SIGNATURE_CONFLICT, downloadEntity.path)) + EventBus.getDefault().post( + EBShowDialog( + BaseActivity.SIGNATURE_CONFLICT, + downloadEntity.path + ) + ) } } } diff --git a/app/src/main/java/com/gh/common/util/EnergyTaskHelper.kt b/app/src/main/java/com/gh/common/util/EnergyTaskHelper.kt index 77d6da4c3d..92f2756906 100644 --- a/app/src/main/java/com/gh/common/util/EnergyTaskHelper.kt +++ b/app/src/main/java/com/gh/common/util/EnergyTaskHelper.kt @@ -17,7 +17,7 @@ import com.gh.gamecenter.core.utils.* import com.gh.gamecenter.energy.EnergyCenterActivity import com.gh.gamecenter.entity.EnergyTaskCompleteEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.AppManager import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/common/util/GameActivityDownloadHelper.kt b/app/src/main/java/com/gh/common/util/GameActivityDownloadHelper.kt index c2ad1d6d49..16241082e4 100644 --- a/app/src/main/java/com/gh/common/util/GameActivityDownloadHelper.kt +++ b/app/src/main/java/com/gh/common/util/GameActivityDownloadHelper.kt @@ -29,11 +29,11 @@ import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.entity.PluginLocation import com.gh.gamecenter.gamedetail.dialog.GamePermissionDialogFragment import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.EmptyResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.EmptyResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.teenagermode.TeenagerModeActivity -import com.gh.gamecenter.user.ApiResponse +import com.gh.gamecenter.common.retrofit.ApiResponse import com.lightgame.download.FileUtils /** diff --git a/app/src/main/java/com/gh/common/util/GameCollectionSquareBrowseTaskHelper.kt b/app/src/main/java/com/gh/common/util/GameCollectionSquareBrowseTaskHelper.kt index c8c66353aa..5b3ddbd3a4 100644 --- a/app/src/main/java/com/gh/common/util/GameCollectionSquareBrowseTaskHelper.kt +++ b/app/src/main/java/com/gh/common/util/GameCollectionSquareBrowseTaskHelper.kt @@ -18,7 +18,7 @@ import com.gh.gamecenter.common.utils.singleToMain import com.gh.gamecenter.common.utils.tryWithDefaultCatch import com.gh.gamecenter.gamecollection.detail.GameCollectionDetailActivity import com.gh.gamecenter.gamecollection.square.GameCollectionSquareActivity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lzf.easyfloat.EasyFloat diff --git a/app/src/main/java/com/gh/common/util/GameSubstituteRepositoryHelper.kt b/app/src/main/java/com/gh/common/util/GameSubstituteRepositoryHelper.kt index 9e579c3201..10854b67e0 100644 --- a/app/src/main/java/com/gh/common/util/GameSubstituteRepositoryHelper.kt +++ b/app/src/main/java/com/gh/common/util/GameSubstituteRepositoryHelper.kt @@ -10,8 +10,8 @@ import com.gh.gamecenter.core.utils.MtaHelper import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.entity.SubjectEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/common/util/IntegralLogHelper.kt b/app/src/main/java/com/gh/common/util/IntegralLogHelper.kt index 086f97de3d..352401c30f 100644 --- a/app/src/main/java/com/gh/common/util/IntegralLogHelper.kt +++ b/app/src/main/java/com/gh/common/util/IntegralLogHelper.kt @@ -1,8 +1,8 @@ package com.gh.common.util -import com.gh.common.loghub.LoghubUtils.log -import com.gh.common.tracker.Tracker.launchId -import com.gh.common.tracker.Tracker.sessionId +import com.gh.gamecenter.common.loghub.LoghubUtils.log +import com.gh.gamecenter.common.tracker.Tracker.launchId +import com.gh.gamecenter.common.tracker.Tracker.sessionId import com.gh.gamecenter.common.utils.debugOnly import com.gh.gamecenter.common.utils.tryWithDefaultCatch import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/common/util/LibaoUtils.java b/app/src/main/java/com/gh/common/util/LibaoUtils.java index 148460330c..486482c8c3 100644 --- a/app/src/main/java/com/gh/common/util/LibaoUtils.java +++ b/app/src/main/java/com/gh/common/util/LibaoUtils.java @@ -30,8 +30,8 @@ import com.gh.gamecenter.eventbus.EBReuse; import com.gh.gamecenter.eventbus.EBUISwitch; import com.gh.gamecenter.geetest.GeetestUtils; import com.gh.gamecenter.manager.UserManager; -import com.gh.gamecenter.retrofit.JSONObjectResponse; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.JSONObjectResponse; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.halo.assistant.HaloApp; import com.lightgame.utils.Utils; diff --git a/app/src/main/java/com/gh/common/util/LogUtils.java b/app/src/main/java/com/gh/common/util/LogUtils.java index e4b588f67b..e4e3709c61 100644 --- a/app/src/main/java/com/gh/common/util/LogUtils.java +++ b/app/src/main/java/com/gh/common/util/LogUtils.java @@ -1,6 +1,5 @@ package com.gh.common.util; -import android.annotation.SuppressLint; import android.app.Application; import android.content.Context; import android.os.Build; @@ -8,29 +7,25 @@ import android.text.TextUtils; import androidx.annotation.Nullable; -import com.gh.common.exposure.ExposureEntity; import com.gh.common.exposure.ExposureEvent; import com.gh.common.exposure.ExposureSource; -import com.gh.common.loghub.LoghubUtils; -import com.gh.common.loghub.SimpleLogContainerEntity; import com.gh.gamecenter.BuildConfig; import com.gh.gamecenter.common.constant.Constants; +import com.gh.gamecenter.common.entity.ExposureEntity; import com.gh.gamecenter.common.exposure.meta.Meta; import com.gh.gamecenter.common.exposure.meta.MetaUtil; +import com.gh.gamecenter.common.loghub.LoghubUtils; +import com.gh.gamecenter.common.loghub.SimpleLogContainerEntity; import com.gh.gamecenter.common.utils.DeviceUtils; -import com.gh.gamecenter.common.utils.EnvHelper; import com.gh.gamecenter.core.utils.GsonUtils; import com.gh.gamecenter.entity.CommunityEntity; import com.gh.gamecenter.entity.DetectionObjectEntity; import com.gh.gamecenter.entity.GameEntity; import com.gh.gamecenter.entity.PackageDialogEntity; -import com.gh.gamecenter.entity.ShareResultEntity; import com.gh.gamecenter.entity.SpecialColumn; import com.gh.gamecenter.entity.StartupAdEntity; import com.gh.gamecenter.manager.UserManager; import com.gh.gamecenter.qa.entity.Questions; -import com.gh.gamecenter.retrofit.EmptyResponse; -import com.gh.gamecenter.retrofit.RetrofitManager; import com.halo.assistant.HaloApp; import com.lightgame.utils.Utils; @@ -41,10 +36,6 @@ import org.json.JSONObject; import java.util.ArrayList; import java.util.List; -import io.reactivex.schedulers.Schedulers; -import okhttp3.MediaType; -import okhttp3.RequestBody; - /** * Created by khy on 2/01/18. */ @@ -526,90 +517,6 @@ public class LogUtils { LoghubUtils.log(object, "event", false); } - public static void uploadShareEnter(String entrance, String url, String title, String summary, String resourceId) { - JSONObject object = new JSONObject(); - JSONObject payloadObject = new JSONObject(); - try { - object.put("action", "entrance_source"); - payloadObject.put("entrance", entrance); - payloadObject.put("url", url); - payloadObject.put("title", title); - payloadObject.put("summary", summary); - payloadObject.put("resource_id", resourceId); - object.put("payload", payloadObject); - } catch (JSONException e) { - e.printStackTrace(); - } - uploadShare(object); - } - - public static void uploadShareType(String shareType, String entrance, String url, String title, String summary, String resourceId) { - JSONObject object = new JSONObject(); - JSONObject payloadObject = new JSONObject(); - try { - object.put("action", "share_type"); - payloadObject.put("share_type", shareType); - payloadObject.put("entrance", entrance); - payloadObject.put("url", url); - payloadObject.put("title", title); - payloadObject.put("summary", summary); - payloadObject.put("resource_id", resourceId); - object.put("payload", payloadObject); - } catch (JSONException e) { - e.printStackTrace(); - } - uploadShare(object); - } - - @SuppressLint("CheckResult") - public static void uploadShareResult(String shareType, String entrance, String shareResult, String url, String title, String summary, String resourceId) { - JSONObject object = new JSONObject(); - JSONObject payloadObject = new JSONObject(); - try { - object.put("action", "share_result"); - payloadObject.put("share_type", shareType); - payloadObject.put("entrance", entrance); - payloadObject.put("share_result", shareResult); - payloadObject.put("url", url); - payloadObject.put("title", title); - payloadObject.put("summary", summary); - payloadObject.put("resource_id", resourceId); - object.put("payload", payloadObject); - } catch (JSONException e) { - e.printStackTrace(); - } - uploadShare(object); - - ShareResultEntity entity = new ShareResultEntity(new ShareResultEntity.Content(url, title, summary), shareType, shareResult); - RequestBody body = RequestBody.create(MediaType.parse("application/json"), GsonUtils.toJson(entity)); - - RetrofitManager.getInstance().getApi() - .postShareResult(body) - .subscribeOn(Schedulers.io()) - .subscribe(new EmptyResponse<>()); - - // 判断是否上报游戏单活动的"转发活动"任务 - postGameCollectionRepostActivityTaskCheck(url, shareResult); - } - - @SuppressLint("CheckResult") - public static void postGameCollectionRepostActivityTaskCheck(String url, String shareResult) { - if (!TextUtils.isEmpty(url) && "success".equals(shareResult)) { - String gameCollectionActivityUrl; - if (EnvHelper.isDevEnv()) { - gameCollectionActivityUrl = Constants.GAME_COLLECTION_ACTIVITY_ADDRESS_DEV; - } else { - gameCollectionActivityUrl = Constants.GAME_COLLECTION_ACTIVITY_ADDRESS; - } - if (url.contains(gameCollectionActivityUrl)) { - RetrofitManager.getInstance().getNewApi() - .postGameCollectionTask("repost_activity", "0") - .subscribeOn(Schedulers.io()) - .subscribe(new EmptyResponse<>()); - } - } - } - public static JSONObject getMetaObject() { Meta meta = MetaUtil.INSTANCE.getMeta(); JSONObject metaObject = new JSONObject(); diff --git a/app/src/main/java/com/gh/common/util/LoginUtils.java b/app/src/main/java/com/gh/common/util/LoginUtils.java index c883d4558c..4f5bdcf7dc 100644 --- a/app/src/main/java/com/gh/common/util/LoginUtils.java +++ b/app/src/main/java/com/gh/common/util/LoginUtils.java @@ -3,8 +3,8 @@ package com.gh.common.util; import android.content.Context; import com.gh.gamecenter.common.utils.DeviceUtils; -import com.gh.gamecenter.retrofit.JSONObjectResponse; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.JSONObjectResponse; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.utils.Utils; diff --git a/app/src/main/java/com/gh/common/util/MessageShareUtils.java b/app/src/main/java/com/gh/common/util/MessageShareUtils.java index b99399daff..64c8d7f9fb 100644 --- a/app/src/main/java/com/gh/common/util/MessageShareUtils.java +++ b/app/src/main/java/com/gh/common/util/MessageShareUtils.java @@ -33,6 +33,7 @@ import com.gh.gamecenter.BuildConfig; import com.gh.gamecenter.R; import com.gh.gamecenter.WeiBoShareActivity; import com.gh.gamecenter.common.utils.BitmapUtils; +import com.gh.gamecenter.common.utils.ShareUtils; import com.gh.gamecenter.core.utils.DisplayUtils; import com.gh.gamecenter.common.utils.ImageUtils; import com.lightgame.utils.Utils; diff --git a/app/src/main/java/com/gh/common/util/NewLogUtils.kt b/app/src/main/java/com/gh/common/util/NewLogUtils.kt index abaa7bfab1..a2b8d9223b 100644 --- a/app/src/main/java/com/gh/common/util/NewLogUtils.kt +++ b/app/src/main/java/com/gh/common/util/NewLogUtils.kt @@ -3,15 +3,13 @@ package com.gh.common.util import android.annotation.SuppressLint import com.gh.gamecenter.common.json.JsonObjectBuilder import com.gh.gamecenter.common.json.json -import com.gh.common.loghub.LoghubUtils -import com.gh.common.tracker.Tracker -import com.gh.gamecenter.common.utils.createRequestBody +import com.gh.gamecenter.common.loghub.LoghubUtils +import com.gh.gamecenter.common.tracker.Tracker import com.gh.gamecenter.common.utils.toRequestBody -import com.gh.gamecenter.entity.AdditionalParamsEntity import com.gh.gamecenter.entity.LinkEntity import com.gh.gamecenter.entity.QuoteCountEntity import com.gh.gamecenter.entity.WechatConfigEntity -import com.gh.gamecenter.retrofit.EmptyResponse +import com.gh.gamecenter.common.retrofit.EmptyResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.schedulers.Schedulers @@ -572,29 +570,6 @@ object NewLogUtils { log(json, "bbs_community", false) } - //分享结果 - @JvmStatic - fun logShareResult(additionalParams: AdditionalParamsEntity? = null, shareResult: Boolean) { - val json = json { - "location" to "分享面板" - "event" to "share_result" - "meta" to LogUtils.getMetaObject() - "share_success" to shareResult - - additionalParams?.let { - "content_type" to it.contentType - "content_id" to it.contentId - "bbs_id" to it.bbsId - "bbs_type" to it.bbsType - "ref_user_id" to it.refUserId - } - - "launch_id" to Tracker.launchId - "session_id" to Tracker.sessionId - "timestamp" to System.currentTimeMillis() / 1000 - } - log(json, "bbs_community", false) - } //分享面板点击 fun logSharePanelClick(event: String, userId: String, contentType: String, contentId: String, bbsId: String, bbsType: String) { @@ -1745,26 +1720,6 @@ object NewLogUtils { log(json, "event", false) } - //浏览游戏单/游戏单详情相关点击 - @JvmStatic - fun logViewOrClickGameCollectionDetail( - event: String, - title: String, - id: String, - shareType: String = "" - ) { - val json = json { - "event" to event - "game_collect_title" to title - "game_collect_id" to id - if (shareType.isNotEmpty()) { - "share_type" to shareType - } - "timestamp" to System.currentTimeMillis() / 1000 - parseAndPutMeta().invoke(this) - } - log(json, "event", false) - } //游戏单视频相关 @JvmStatic diff --git a/app/src/main/java/com/gh/common/util/NewsUtils.java b/app/src/main/java/com/gh/common/util/NewsUtils.java index c967eaece6..f370c9e146 100644 --- a/app/src/main/java/com/gh/common/util/NewsUtils.java +++ b/app/src/main/java/com/gh/common/util/NewsUtils.java @@ -1,6 +1,5 @@ package com.gh.common.util; -import android.content.Context; import android.graphics.Color; import android.widget.TextView; @@ -8,7 +7,7 @@ import androidx.annotation.Nullable; import com.gh.gamecenter.R; import com.gh.gamecenter.entity.NewsEntity; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import java.text.ParseException; @@ -20,7 +19,6 @@ import java.util.Locale; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.schedulers.Schedulers; -import okhttp3.ResponseBody; public class NewsUtils { diff --git a/app/src/main/java/com/gh/common/util/PackageInstaller.kt b/app/src/main/java/com/gh/common/util/PackageInstaller.kt index 844d40393e..aafbde2651 100644 --- a/app/src/main/java/com/gh/common/util/PackageInstaller.kt +++ b/app/src/main/java/com/gh/common/util/PackageInstaller.kt @@ -8,19 +8,19 @@ import android.net.Uri import android.os.Build import androidx.appcompat.app.AppCompatActivity import androidx.core.content.FileProvider -import com.gh.gamecenter.core.utils.CurrentActivityHolder -import com.gh.gamecenter.common.constant.Constants import com.gh.common.dialog.InstallPermissionDialogFragment import com.gh.common.xapk.XapkInstaller import com.gh.download.server.BrowserInstallHelper import com.gh.gamecenter.BuildConfig +import com.gh.gamecenter.common.constant.Constants import com.gh.gamecenter.common.utils.DialogHelper -import com.gh.gamecenter.core.utils.SPUtils -import com.gh.gamecenter.core.utils.ToastUtils import com.gh.gamecenter.common.utils.getExtension import com.gh.gamecenter.common.utils.toRequestBody +import com.gh.gamecenter.core.utils.CurrentActivityHolder import com.gh.gamecenter.core.utils.MD5Utils -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.core.utils.SPUtils +import com.gh.gamecenter.core.utils.ToastUtils +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.download.DownloadEntity diff --git a/app/src/main/java/com/gh/common/util/PlatformUtils.java b/app/src/main/java/com/gh/common/util/PlatformUtils.java index 3b73673f32..1d5ccc7f4b 100644 --- a/app/src/main/java/com/gh/common/util/PlatformUtils.java +++ b/app/src/main/java/com/gh/common/util/PlatformUtils.java @@ -10,7 +10,7 @@ import com.gh.gamecenter.core.AppExecutor; import com.gh.gamecenter.R; import com.gh.gamecenter.entity.PlatformEntity; import com.gh.gamecenter.eventbus.EBReuse; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.halo.assistant.HaloApp; import com.lightgame.download.FileUtils; diff --git a/app/src/main/java/com/gh/common/util/PostCommentUtils.java b/app/src/main/java/com/gh/common/util/PostCommentUtils.java index 0484f050a8..e65cd1f0a5 100644 --- a/app/src/main/java/com/gh/common/util/PostCommentUtils.java +++ b/app/src/main/java/com/gh/common/util/PostCommentUtils.java @@ -6,8 +6,8 @@ import android.text.TextUtils; import com.gh.gamecenter.R; import com.gh.gamecenter.entity.CommentEntity; -import com.gh.gamecenter.retrofit.JSONObjectResponse; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.JSONObjectResponse; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.utils.Utils; import com.walkud.rom.checker.RomIdentifier; diff --git a/app/src/main/java/com/gh/common/util/QRCodeUtils.java b/app/src/main/java/com/gh/common/util/QRCodeUtils.java index 607de76cd2..256da6dda3 100644 --- a/app/src/main/java/com/gh/common/util/QRCodeUtils.java +++ b/app/src/main/java/com/gh/common/util/QRCodeUtils.java @@ -5,7 +5,7 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.widget.ImageView; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.google.zxing.BarcodeFormat; import com.google.zxing.EncodeHintType; import com.google.zxing.WriterException; diff --git a/app/src/main/java/com/gh/common/util/QuickLoginHelper.kt b/app/src/main/java/com/gh/common/util/QuickLoginHelper.kt index 3a69700d8a..e3f2fd43b3 100644 --- a/app/src/main/java/com/gh/common/util/QuickLoginHelper.kt +++ b/app/src/main/java/com/gh/common/util/QuickLoginHelper.kt @@ -16,20 +16,23 @@ import com.cmic.sso.sdk.auth.AuthnHelper import com.cmic.sso.sdk.auth.LoginClickListener import com.cmic.sso.sdk.auth.TokenListener import com.gh.common.constant.Config -import com.gh.gamecenter.common.constant.Constants -import com.gh.gamecenter.common.utils.PermissionHelper.checkReadPhoneStatePermissionBeforeAction -import com.gh.gamecenter.core.utils.ToastUtils.toast import com.gh.gamecenter.LoginActivity import com.gh.gamecenter.R import com.gh.gamecenter.common.callback.BiCallback +import com.gh.gamecenter.common.callback.CancelListener import com.gh.gamecenter.common.callback.ConfirmListener +import com.gh.gamecenter.common.constant.Constants import com.gh.gamecenter.common.databinding.SetWaitDialogBinding import com.gh.gamecenter.common.utils.* +import com.gh.gamecenter.common.utils.PermissionHelper.checkReadPhoneStatePermissionBeforeAction import com.gh.gamecenter.core.runOnUiThread -import com.gh.gamecenter.core.utils.* +import com.gh.gamecenter.core.utils.ClickUtils +import com.gh.gamecenter.core.utils.EmptyCallback +import com.gh.gamecenter.core.utils.SPUtils +import com.gh.gamecenter.core.utils.ToastUtils.toast import com.gh.gamecenter.databinding.DialogQuickLoginBinding import com.gh.gamecenter.entity.LoginTokenEntity -import com.gh.gamecenter.user.ApiResponse +import com.gh.gamecenter.common.retrofit.ApiResponse import com.gh.gamecenter.user.LoginTag import com.gh.gamecenter.user.UserRepository import com.lightgame.utils.AppManager @@ -56,6 +59,10 @@ object QuickLoginHelper { private const val ENTRANCE_DEFAULT = "一键登录" private const val ENTRANCE_PERMISSION_DIALOG = "一键登录权限弹窗" private const val AUTH_ACTIVITY_NAME = "com.cmic.sso.sdk.activity.LoginAuthActivity" + const val STATUS_DEFAULT = 0 // 默认(隐藏一键登录按钮) + const val STATUS_FROM_QUICK_LOGIN_PAGE = 1 // 从一键登录的授权页过来 + const val STATUS_FROM_QUICK_LOGIN_PERMISSION = 2 // 从一键登录的电话权限弹窗过来 + // 1.取号请求(可提前进行) @JvmStatic @@ -67,18 +74,18 @@ object QuickLoginHelper { } AuthnHelper.getInstance(context.applicationContext).getPhoneInfo( - Config.QUICK_LOGIN_APPID, - Config.QUICK_LOGIN_APPKEY, - { requestCode: Int, jsonObject: JSONObject -> - val code = jsonObject.optString("resultCode") - // “103000”为成功 - if (code == "103000") { - if (requestCode == REQUEST_GET_PHONE_INFO_CODE) { - SPUtils.setBoolean(Constants.SP_HAS_GET_PHONE_INFO, true) - } + Config.QUICK_LOGIN_APPID, + Config.QUICK_LOGIN_APPKEY, + { requestCode: Int, jsonObject: JSONObject -> + val code = jsonObject.optString("resultCode") + // “103000”为成功 + if (code == "103000") { + if (requestCode == REQUEST_GET_PHONE_INFO_CODE) { + SPUtils.setBoolean(Constants.SP_HAS_GET_PHONE_INFO, true) } - }, - REQUEST_GET_PHONE_INFO_CODE + } + }, + REQUEST_GET_PHONE_INFO_CODE ) } @@ -107,23 +114,24 @@ object QuickLoginHelper { loginAuth(context) } else { DialogUtils.showQuickLoginPermissionDialog( - context,object :ConfirmListener{ + context, object : ConfirmListener { override fun onConfirm() { - checkReadPhoneStatePermissionBeforeAction(context, object : EmptyCallback { + checkReadPhoneStatePermissionBeforeAction(context, object : EmptyCallback { override fun onCallback() { loginAuth(context) } }) } - }, - { + }, object : CancelListener { + override fun onCancel() { startCodeLoginPage( - context, - entrance = ENTRANCE_PERMISSION_DIALOG, - isFinishAuth = false, - isFromPermission = true + context, + entrance = ENTRANCE_PERMISSION_DIALOG, + isFinishAuth = false, + isFromPermission = true ) } + } ) } } @@ -186,101 +194,103 @@ object QuickLoginHelper { mAuthnHelper?.loginAuth(Config.QUICK_LOGIN_APPID, Config.QUICK_LOGIN_APPKEY, mTokenListener, REQUEST_LOGIN_AUTH_CODE) } - private fun getConfig(context: Context, entrance: String): AuthThemeConfig{ + private fun getConfig(context: Context, entrance: String): AuthThemeConfig { return AuthThemeConfig.Builder() - .setStatusBar(Color.WHITE, true) //状态栏颜色、是否高亮 - .setAuthContentView(getCustomView(context)) //自定义布局 - // 服务条款标题栏 - .setClauseLayoutResID(R.layout.layout_quick_login_navigation, "backIv") //服务条款标题栏 - .setNavTextColor(Color.BLACK) //服务条款标题颜色 - .setNavTextSize(18) //服务条款标题字体大小 - // 手机号码 - .setNumberSize(20, true) //手机号码字体大小 - .setNumberColor(R.color.text_title.toColor()) //手机号码字体颜色 - .setNumFieldOffsetY(95) //号码栏Y偏移量 - // 登录按钮 - .setLogBtnImgPath("login_btn_bg") //登录按钮背景 - .setLogBtnText("本机号码一键登录", Color.WHITE, 16, false) //登录按钮相关 - .setLogBtnOffsetY(170) //登录按钮Y偏移量 - .setLogBtn(1000, 44) //登录按钮相关宽高 - .setLogBtnMargin(20, 20) //登录按钮相对于屏幕左右边缘边距 - // 回调 - .setBackPressedListener {} //返回键回调 - .setLogBtnClickListener(object : LoginClickListener { - override fun onLoginClickStart(context: Context, jsonObj: JSONObject?) { - LogUtils.login("logging", "一键登录", entrance) - mDialog = Dialog(context, R.style.DialogWindowTransparent).apply { - val binding = SetWaitDialogBinding.inflate(LayoutInflater.from(context)).apply { - setWaitMessage.text = R.string.logging.toResString() - } - requestWindowFeature(Window.FEATURE_NO_TITLE) - setContentView(binding.root) - setCanceledOnTouchOutside(false) - show() + .setStatusBar(Color.WHITE, true) //状态栏颜色、是否高亮 + .setAuthContentView(getCustomView(context)) //自定义布局 + // 服务条款标题栏 + .setClauseLayoutResID(R.layout.layout_quick_login_navigation, "backIv") //服务条款标题栏 + .setNavTextColor(Color.BLACK) //服务条款标题颜色 + .setNavTextSize(18) //服务条款标题字体大小 + // 手机号码 + .setNumberSize(20, true) //手机号码字体大小 + .setNumberColor(R.color.text_title.toColor()) //手机号码字体颜色 + .setNumFieldOffsetY(95) //号码栏Y偏移量 + // 登录按钮 + .setLogBtnImgPath("login_btn_bg") //登录按钮背景 + .setLogBtnText("本机号码一键登录", Color.WHITE, 16, false) //登录按钮相关 + .setLogBtnOffsetY(170) //登录按钮Y偏移量 + .setLogBtn(1000, 44) //登录按钮相关宽高 + .setLogBtnMargin(20, 20) //登录按钮相对于屏幕左右边缘边距 + // 回调 + .setBackPressedListener {} //返回键回调 + .setLogBtnClickListener(object : LoginClickListener { + override fun onLoginClickStart(context: Context, jsonObj: JSONObject?) { + LogUtils.login("logging", "一键登录", entrance) + mDialog = Dialog(context, R.style.DialogWindowTransparent).apply { + val binding = SetWaitDialogBinding.inflate(LayoutInflater.from(context)).apply { + setWaitMessage.text = R.string.logging.toResString() } + requestWindowFeature(Window.FEATURE_NO_TITLE) + setContentView(binding.root) + setCanceledOnTouchOutside(false) + show() } + } - override fun onLoginClickComplete(context: Context, jsonObj: JSONObject?) { - if (mToken.isNotBlank()) { - val params = HashMap() - params["token"] = mToken + override fun onLoginClickComplete(context: Context, jsonObj: JSONObject?) { + if (mToken.isNotBlank()) { + val params = HashMap() + params["token"] = mToken - // 4.请求登录接口 - UserRepository.getInstance().login( - JSONObject(params as Map<*, *>), - LoginTag.oauth, - object : BiCallback> { - override fun onFirst(first: LoginTokenEntity) { - if (mDialog != null && mDialog!!.isShowing) { - mDialog?.dismiss() - } - - SPUtils.setBoolean(Constants.SP_HAS_GET_PHONE_INFO, false) - - LogUtils.login("success", "一键登录", entrance) - finishAuthActivity() - } - - override fun onSecond(second: ApiResponse) { - if (mDialog != null && mDialog!!.isShowing) { - mDialog?.dismiss() - } - } + // 4.请求登录接口 + UserRepository.getInstance().login( + JSONObject(params as Map<*, *>), + LoginTag.oauth, + object : BiCallback> { + override fun onFirst(first: LoginTokenEntity) { + if (mDialog != null && mDialog!!.isShowing) { + mDialog?.dismiss() } - ) - } else { - if (mDialog != null && mDialog!!.isShowing) { - mDialog?.dismiss() + + SPUtils.setBoolean(Constants.SP_HAS_GET_PHONE_INFO, false) + + LogUtils.login("success", "一键登录", entrance) + finishAuthActivity() + } + + override fun onSecond(second: ApiResponse) { + if (mDialog != null && mDialog!!.isShowing) { + mDialog?.dismiss() + } + } } + ) + } else { + if (mDialog != null && mDialog!!.isShowing) { + mDialog?.dismiss() } } - }) //登录按钮回调 - .setCheckBoxListener { _: Context?, _: JSONObject? -> - toast("请先勾选同意《${getOperatorType(context)}认证服务协议》《用户协议》《隐私政策》") - } //勾选回调 - // 勾选框 - .setCheckTipText("") //设置未勾选时弹出提示 - .setCheckBoxImgPath("ic_quick_login_check", "ic_quick_login_uncheck", 12, 12) //勾选图片 - // 服务条款、用户协议、隐私政策 - .setPrivacyState(false) //默认不勾选 - .setPrivacyAlignment("阅读并同意 " + AuthThemeConfig.PLACEHOLDER + " 用户协议 隐私政策", - "用户协议", R.string.disclaimer_url.toResString(), - "隐私政策", R.string.privacy_policy_url.toResString(), - "", "", "", "") //隐私条款的协议文本,自定义条款,自定义条款链接(支持四份条款) - .setPrivacyText(11, R.color.text_subtitleDesc.toColor(), R.color.theme_font.toColor(), true, false) //条款文本设置 - .setPrivacyMargin(30, 32) //隐私条款距离手机左右边缘的边距 - .setPrivacyOffsetY(280) //隐私条款Y偏移量 - // 语言 - .setAppLanguageType(0) //0.中文简体1.中文繁体2.英文 - // 转场动画 - .setAuthPageActIn("anim_auth_in","anim_auth_out") + } + }) //登录按钮回调 + .setCheckBoxListener { _: Context?, _: JSONObject? -> + toast("请先勾选同意《${getOperatorType(context)}认证服务协议》《用户协议》《隐私政策》") + } //勾选回调 + // 勾选框 + .setCheckTipText("") //设置未勾选时弹出提示 + .setCheckBoxImgPath("ic_quick_login_check", "ic_quick_login_uncheck", 12, 12) //勾选图片 + // 服务条款、用户协议、隐私政策 + .setPrivacyState(false) //默认不勾选 + .setPrivacyAlignment( + "阅读并同意 " + AuthThemeConfig.PLACEHOLDER + " 用户协议 隐私政策", + "用户协议", R.string.disclaimer_url.toResString(), + "隐私政策", R.string.privacy_policy_url.toResString(), + "", "", "", "" + ) //隐私条款的协议文本,自定义条款,自定义条款链接(支持四份条款) + .setPrivacyText(11, R.color.text_subtitleDesc.toColor(), R.color.theme_font.toColor(), true, false) //条款文本设置 + .setPrivacyMargin(30, 32) //隐私条款距离手机左右边缘的边距 + .setPrivacyOffsetY(280) //隐私条款Y偏移量 + // 语言 + .setAppLanguageType(0) //0.中文简体1.中文繁体2.英文 + // 转场动画 + .setAuthPageActIn("anim_auth_in", "anim_auth_out") // .setAuthPageActOut("anim_auth_in","anim_auth_out") - // 整体布局 - .setAuthPageWindowMode(WindowManager.LayoutParams.MATCH_PARENT, 360) //授权页窗口宽高比例 - .setWindowBottom(1) //授权页是否居于底部,0=居中;1=底部,设置为1Y轴的偏移 失效 - .setFitsSystemWindows(false) - .setThemeId(R.style.quickLoginDialog) //授权页弹窗主题 - .build() + // 整体布局 + .setAuthPageWindowMode(WindowManager.LayoutParams.MATCH_PARENT, 360) //授权页窗口宽高比例 + .setWindowBottom(1) //授权页是否居于底部,0=居中;1=底部,设置为1Y轴的偏移 失效 + .setFitsSystemWindows(false) + .setThemeId(R.style.quickLoginDialog) //授权页弹窗主题 + .build() } // 获取自定义布局View @@ -327,12 +337,12 @@ object QuickLoginHelper { } val status = when { - isFromPermission -> LoginActivity.STATUS_FROM_QUICK_LOGIN_PERMISSION + isFromPermission -> STATUS_FROM_QUICK_LOGIN_PERMISSION - mOpenAuthPageSuccess -> LoginActivity.STATUS_FROM_QUICK_LOGIN_PAGE + mOpenAuthPageSuccess -> STATUS_FROM_QUICK_LOGIN_PAGE - else -> LoginActivity.STATUS_DEFAULT + else -> STATUS_DEFAULT } context.startActivity(LoginActivity.getIntent(context, entrance, status)) diff --git a/app/src/main/java/com/gh/common/util/ReservationHelper.kt b/app/src/main/java/com/gh/common/util/ReservationHelper.kt index 0c3ea1839b..9c6f11d3ef 100644 --- a/app/src/main/java/com/gh/common/util/ReservationHelper.kt +++ b/app/src/main/java/com/gh/common/util/ReservationHelper.kt @@ -5,6 +5,7 @@ import android.content.Context import com.gh.gamecenter.common.constant.Constants import com.gh.common.repository.ReservationRepository import com.gh.gamecenter.WebActivity +import com.gh.gamecenter.common.callback.CancelListener import com.gh.gamecenter.common.callback.ConfirmListener import com.gh.gamecenter.common.utils.createRequestBody import com.gh.gamecenter.common.utils.singleToMain @@ -12,7 +13,7 @@ import com.gh.gamecenter.common.utils.toObject import com.gh.gamecenter.core.utils.* import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.entity.WechatConfigEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils @@ -84,14 +85,16 @@ object ReservationHelper { DialogUtils.showReserveSuccessDialog(context) } else { NewLogUtils.logReserveWechatRemindPopShow(wechatConfig) - DialogUtils.showReserveSuccess2WechatBindDialog(context,object :ConfirmListener{ + DialogUtils.showReserveSuccess2WechatBindDialog(context, object : ConfirmListener { override fun onConfirm() { - NewLogUtils.logReserveWechatRemindPopClick(wechatConfig,"开启微信提醒") + NewLogUtils.logReserveWechatRemindPopClick(wechatConfig, "开启微信提醒") context.startActivity(WebActivity.getBindWechatIntent(context)) } - }) { - NewLogUtils.logReserveWechatRemindPopClick(wechatConfig, "关闭弹窗") - } + }, object : CancelListener { + override fun onCancel() { + NewLogUtils.logReserveWechatRemindPopClick(wechatConfig, "关闭弹窗") + } + }) } } } @@ -109,7 +112,7 @@ object ReservationHelper { "删除预约", "游戏已上线,你可以删除此预约记录,确定删除吗?", "确定删除", - "暂不删除", object :ConfirmListener{ + "暂不删除", object : ConfirmListener { override fun onConfirm() { emptyCallback.onCallback() } @@ -124,7 +127,7 @@ object ReservationHelper { "取消预约", "取消之后你将无法收到游戏上线的通知,确定取消预约吗?", "确定取消", - "暂不取消", object :ConfirmListener{ + "暂不取消", object : ConfirmListener { override fun onConfirm() { emptyCallback.onCallback() } diff --git a/app/src/main/java/com/gh/common/util/SimpleRequestHelper.kt b/app/src/main/java/com/gh/common/util/SimpleRequestHelper.kt index b44902d342..3d2e52331d 100644 --- a/app/src/main/java/com/gh/common/util/SimpleRequestHelper.kt +++ b/app/src/main/java/com/gh/common/util/SimpleRequestHelper.kt @@ -1,7 +1,7 @@ package com.gh.common.util import com.gh.gamecenter.common.utils.createRequestBody -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/common/util/TagUtils.java b/app/src/main/java/com/gh/common/util/TagUtils.java index c75bc3b639..d20aeeefcd 100644 --- a/app/src/main/java/com/gh/common/util/TagUtils.java +++ b/app/src/main/java/com/gh/common/util/TagUtils.java @@ -6,7 +6,7 @@ import android.content.SharedPreferences; import androidx.collection.ArrayMap; import com.gh.gamecenter.entity.TagEntity; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import java.util.HashSet; diff --git a/app/src/main/java/com/gh/common/util/UploadImageUtils.kt b/app/src/main/java/com/gh/common/util/UploadImageUtils.kt index b47f0d68e4..f599fb0cdd 100644 --- a/app/src/main/java/com/gh/common/util/UploadImageUtils.kt +++ b/app/src/main/java/com/gh/common/util/UploadImageUtils.kt @@ -3,9 +3,9 @@ package com.gh.common.util import android.annotation.SuppressLint import android.graphics.BitmapFactory import com.gh.gamecenter.common.utils.CompressImageUtils -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.FileRequestBody -import com.gh.gamecenter.retrofit.RetrofitCallback +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.FileRequestBody +import com.gh.gamecenter.common.retrofit.RetrofitCallback import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Observable import io.reactivex.ObservableOnSubscribe diff --git a/app/src/main/java/com/gh/common/util/UsageStatsHelper.kt b/app/src/main/java/com/gh/common/util/UsageStatsHelper.kt index b4420dbbcf..dc2172b034 100644 --- a/app/src/main/java/com/gh/common/util/UsageStatsHelper.kt +++ b/app/src/main/java/com/gh/common/util/UsageStatsHelper.kt @@ -22,7 +22,7 @@ import com.gh.common.util.UsageStatsHelper.getDataByUsageEvents import com.gh.common.util.UsageStatsHelper.getDataByUsageStats import com.gh.gamecenter.common.utils.debugOnly import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/common/util/WechatBindHelper.kt b/app/src/main/java/com/gh/common/util/WechatBindHelper.kt index 634c41d527..5e8eb5bb25 100644 --- a/app/src/main/java/com/gh/common/util/WechatBindHelper.kt +++ b/app/src/main/java/com/gh/common/util/WechatBindHelper.kt @@ -9,7 +9,7 @@ import com.gh.gamecenter.common.utils.singleToMain import com.gh.gamecenter.common.utils.toJson import com.gh.gamecenter.entity.WechatConfigEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import okhttp3.ResponseBody diff --git a/app/src/main/java/com/gh/common/videolog/VideoRecordUtils.kt b/app/src/main/java/com/gh/common/videolog/VideoRecordUtils.kt index ae4f02ae76..1843cae83d 100644 --- a/app/src/main/java/com/gh/common/videolog/VideoRecordUtils.kt +++ b/app/src/main/java/com/gh/common/videolog/VideoRecordUtils.kt @@ -7,7 +7,7 @@ import com.gh.gamecenter.common.utils.toRequestBody import com.gh.gamecenter.common.utils.toastInInternalRelease import com.gh.gamecenter.common.utils.tryWithDefaultCatch import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.room.AppDatabase import com.halo.assistant.HaloApp diff --git a/app/src/main/java/com/gh/download/DownloadDataHelper.kt b/app/src/main/java/com/gh/download/DownloadDataHelper.kt index 78dd18c643..60680d9d6a 100644 --- a/app/src/main/java/com/gh/download/DownloadDataHelper.kt +++ b/app/src/main/java/com/gh/download/DownloadDataHelper.kt @@ -5,7 +5,7 @@ import android.text.TextUtils import com.gh.gamecenter.common.constant.Constants import com.gh.gamecenter.common.exposure.meta.MetaUtil import com.gh.gamecenter.common.exposure.meta.MetaUtil.getMeta -import com.gh.common.loghub.LoghubUtils +import com.gh.gamecenter.common.loghub.LoghubUtils import com.gh.common.util.* import com.gh.common.xapk.XapkInstaller import com.gh.gamecenter.BuildConfig diff --git a/app/src/main/java/com/gh/download/PackageObserver.kt b/app/src/main/java/com/gh/download/PackageObserver.kt index 6841a91d97..cbed3f39c2 100644 --- a/app/src/main/java/com/gh/download/PackageObserver.kt +++ b/app/src/main/java/com/gh/download/PackageObserver.kt @@ -4,7 +4,7 @@ import android.annotation.SuppressLint import android.preference.PreferenceManager import android.text.TextUtils import com.gh.gamecenter.common.constant.Constants -import com.gh.common.loghub.LoghubUtils +import com.gh.gamecenter.common.loghub.LoghubUtils import com.gh.gamecenter.core.runOnIoThread import com.gh.common.util.* import com.gh.download.server.BrowserInstallHelper @@ -15,8 +15,8 @@ import com.gh.gamecenter.eventbus.EBPackage import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.packagehelper.PackageRepository import com.gh.gamecenter.packagehelper.PackageViewModel -import com.gh.gamecenter.retrofit.EmptyResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.EmptyResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.setting.GameDownloadSettingFragment.Companion.CONCERN_GAME_SP_KEY import com.halo.assistant.HaloApp @@ -28,7 +28,6 @@ import okhttp3.MediaType import okhttp3.RequestBody import org.json.JSONException import org.json.JSONObject -import java.util.* object PackageObserver { diff --git a/app/src/main/java/com/gh/download/dialog/DownloadDialogItemViewHolder.kt b/app/src/main/java/com/gh/download/dialog/DownloadDialogItemViewHolder.kt index 20c832ffd8..6244ff2f71 100644 --- a/app/src/main/java/com/gh/download/dialog/DownloadDialogItemViewHolder.kt +++ b/app/src/main/java/com/gh/download/dialog/DownloadDialogItemViewHolder.kt @@ -6,7 +6,7 @@ import android.widget.RelativeLayout import androidx.appcompat.app.AppCompatActivity import androidx.core.content.ContextCompat import androidx.recyclerview.widget.RecyclerView -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.base.BaseRecyclerViewHolder import com.gh.common.constant.Config import com.gh.common.dialog.CertificationDialog @@ -14,6 +14,7 @@ import com.gh.common.dialog.DeviceRemindDialog import com.gh.common.dialog.PackageCheckDialogFragment import com.gh.common.exposure.ExposureEvent import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.common.util.DirectUtils.directToLinkPage import com.gh.download.DownloadManager import com.gh.download.server.BrowserInstallHelper diff --git a/app/src/main/java/com/gh/download/server/BrowserInstallHelper.kt b/app/src/main/java/com/gh/download/server/BrowserInstallHelper.kt index d5dc4cd2a5..6c601e92d6 100644 --- a/app/src/main/java/com/gh/download/server/BrowserInstallHelper.kt +++ b/app/src/main/java/com/gh/download/server/BrowserInstallHelper.kt @@ -5,9 +5,9 @@ import android.os.Build import android.util.Base64 import com.gh.common.constant.Config import com.gh.gamecenter.common.constant.Constants -import com.gh.common.exposure.ExposureEntity +import com.gh.gamecenter.common.entity.ExposureEntity import com.gh.common.exposure.ExposureEvent -import com.gh.common.loghub.LoghubUtils +import com.gh.gamecenter.common.loghub.LoghubUtils import com.gh.common.util.* import com.gh.gamecenter.ShellActivity import com.gh.gamecenter.common.utils.DialogHelper diff --git a/app/src/main/java/com/gh/flutter/FlutterLogHubServiceImplAop.kt b/app/src/main/java/com/gh/flutter/FlutterLogHubServiceImplAop.kt index 12198786ac..e3a7856ffa 100644 --- a/app/src/main/java/com/gh/flutter/FlutterLogHubServiceImplAop.kt +++ b/app/src/main/java/com/gh/flutter/FlutterLogHubServiceImplAop.kt @@ -1,8 +1,8 @@ package com.gh.flutter import com.gh.gamecenter.common.json.json -import com.gh.common.loghub.LoghubUtils -import com.gh.common.tracker.Tracker +import com.gh.gamecenter.common.loghub.LoghubUtils +import com.gh.gamecenter.common.tracker.Tracker import com.gh.common.util.LogUtils import com.lightgame.utils.Utils import me.ele.lancet.base.annotations.Insert diff --git a/app/src/main/java/com/gh/gamecenter/FullScreenWebActivity.kt b/app/src/main/java/com/gh/gamecenter/FullScreenWebActivity.kt index 44683dbc79..89800b7e67 100644 --- a/app/src/main/java/com/gh/gamecenter/FullScreenWebActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/FullScreenWebActivity.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter import android.content.Context import android.content.Intent import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.gamecenter.common.constant.EntranceConsts import com.halo.assistant.fragment.WebFragment diff --git a/app/src/main/java/com/gh/gamecenter/ImageViewerActivity.kt b/app/src/main/java/com/gh/gamecenter/ImageViewerActivity.kt index c8cd0dc14b..b0c0a5ab5a 100644 --- a/app/src/main/java/com/gh/gamecenter/ImageViewerActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/ImageViewerActivity.kt @@ -38,7 +38,7 @@ import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView import com.facebook.drawee.backends.pipeline.Fresco import com.facebook.imagepipeline.core.ImagePipeline import com.facebook.imagepipeline.request.ImageRequest -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.common.Base64ImageHolder.image import com.gh.common.constant.Config import com.gh.gamecenter.core.runOnIoThread @@ -53,7 +53,7 @@ import com.gh.gamecenter.entity.CommunityEntity import com.gh.gamecenter.entity.ImageInfoEntity import com.gh.gamecenter.qa.article.detail.ArticleDetailActivity import com.gh.gamecenter.qa.entity.AnswerEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.github.piasy.biv.view.BigImageView import com.github.piasy.biv.view.FrescoImageViewFactory diff --git a/app/src/main/java/com/gh/gamecenter/LibaoDetailActivity.java b/app/src/main/java/com/gh/gamecenter/LibaoDetailActivity.java index e284b15ba5..78204a23d5 100644 --- a/app/src/main/java/com/gh/gamecenter/LibaoDetailActivity.java +++ b/app/src/main/java/com/gh/gamecenter/LibaoDetailActivity.java @@ -45,7 +45,7 @@ import com.gh.gamecenter.eventbus.EBDownloadStatus; import com.gh.gamecenter.eventbus.EBPackage; import com.gh.gamecenter.eventbus.EBReuse; import com.gh.gamecenter.eventbus.EBUISwitch; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.halo.assistant.HaloApp; import com.lightgame.download.DataWatcher; diff --git a/app/src/main/java/com/gh/gamecenter/LoginActivity.java b/app/src/main/java/com/gh/gamecenter/LoginActivity.java index 543cca8244..564326b069 100644 --- a/app/src/main/java/com/gh/gamecenter/LoginActivity.java +++ b/app/src/main/java/com/gh/gamecenter/LoginActivity.java @@ -6,20 +6,19 @@ import android.os.Bundle; import androidx.annotation.NonNull; -import com.gh.gamecenter.core.utils.DisplayUtils; +import com.alibaba.android.arouter.facade.annotation.Route; +import com.gh.common.util.QuickLoginHelper; import com.gh.gamecenter.common.constant.EntranceConsts; +import com.gh.gamecenter.common.constant.RouteConsts; +import com.gh.gamecenter.core.utils.DisplayUtils; import com.gh.gamecenter.fragment.LoginFragment; /** * Created by khy on 14/08/17. */ - +@Route(path = RouteConsts.activity.loginActivity) public class LoginActivity extends NormalActivity { - public static final int STATUS_DEFAULT = 0; // 默认(隐藏一键登录按钮) - public static final int STATUS_FROM_QUICK_LOGIN_PAGE = 1; // 从一键登录的授权页过来 - public static final int STATUS_FROM_QUICK_LOGIN_PERMISSION = 2; // 从一键登录的电话权限弹窗过来 - @Override protected Intent provideNormalIntent() { return getTargetIntent(this, LoginActivity.class, LoginFragment.class); @@ -27,7 +26,7 @@ public class LoginActivity extends NormalActivity { @NonNull public static Intent getIntent(Context context, String entrance) { - return getIntent(context, entrance, STATUS_DEFAULT); + return getIntent(context, entrance, QuickLoginHelper.STATUS_DEFAULT); } @NonNull diff --git a/app/src/main/java/com/gh/gamecenter/MainActivity.java b/app/src/main/java/com/gh/gamecenter/MainActivity.java index fb4c22a2c6..43ada44c47 100644 --- a/app/src/main/java/com/gh/gamecenter/MainActivity.java +++ b/app/src/main/java/com/gh/gamecenter/MainActivity.java @@ -40,7 +40,7 @@ import androidx.fragment.app.Fragment; import androidx.lifecycle.ViewModelProviders; import com.gh.base.AppUncaughtHandler; -import com.gh.base.BaseActivity; +import com.gh.gamecenter.common.base.BaseActivity; import com.gh.gamecenter.common.base.fragment.BaseFragment_ViewPager; import com.gh.common.DefaultUrlHandler; import com.gh.gamecenter.common.avoidcallback.AvoidOnResultManager; @@ -66,7 +66,7 @@ import com.gh.common.util.PackageInstaller; import com.gh.common.util.PackageUtils; import com.gh.common.util.PlatformUtils; import com.gh.common.util.QuickLoginHelper; -import com.gh.common.util.ShareUtils; +import com.gh.gamecenter.common.utils.ShareUtils; import com.gh.common.util.WechatBindHelper; import com.gh.download.DownloadManager; import com.gh.gamecenter.common.constant.Constants; @@ -99,8 +99,8 @@ import com.gh.gamecenter.manager.UpdateManager; import com.gh.gamecenter.manager.UserManager; import com.gh.gamecenter.common.base.fragment.NormalFragment; import com.gh.gamecenter.packagehelper.PackageViewModel; -import com.gh.gamecenter.retrofit.BiResponse; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.BiResponse; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.gh.gamecenter.room.AppDatabase; import com.gh.gamecenter.room.dao.SimulatorGameDao; diff --git a/app/src/main/java/com/gh/gamecenter/NetworkDiagnosisActivity.kt b/app/src/main/java/com/gh/gamecenter/NetworkDiagnosisActivity.kt index 594815236a..e3823158e7 100644 --- a/app/src/main/java/com/gh/gamecenter/NetworkDiagnosisActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/NetworkDiagnosisActivity.kt @@ -22,7 +22,7 @@ import com.gh.common.util.* import com.gh.gamecenter.common.utils.DialogHelper import com.gh.gamecenter.common.utils.tryCatchInRelease import com.gh.gamecenter.common.utils.DeviceUtils -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import io.reactivex.Observable import io.reactivex.ObservableOnSubscribe import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/NewsDetailActivity.java b/app/src/main/java/com/gh/gamecenter/NewsDetailActivity.java index 34d83d3916..354cfce9f0 100644 --- a/app/src/main/java/com/gh/gamecenter/NewsDetailActivity.java +++ b/app/src/main/java/com/gh/gamecenter/NewsDetailActivity.java @@ -35,13 +35,12 @@ import com.gh.gamecenter.common.utils.ExtensionsKt; import com.gh.gamecenter.core.utils.ClickUtils; import com.gh.common.util.CollectionUtils; import com.gh.common.util.DataCollectionUtils; -import com.gh.common.util.DataUtils; import com.gh.common.util.DetailDownloadUtils; import com.gh.gamecenter.core.utils.DisplayUtils; import com.gh.gamecenter.common.constant.EntranceConsts; import com.gh.gamecenter.core.utils.MtaHelper; import com.gh.common.util.NewLogUtils; -import com.gh.common.util.ShareUtils; +import com.gh.gamecenter.common.utils.ShareUtils; import com.gh.gamecenter.common.view.FixLinearLayoutManager; import com.gh.gamecenter.common.view.VerticalItemDecoration; import com.gh.download.DownloadManager; @@ -56,7 +55,7 @@ import com.gh.gamecenter.eventbus.EBNetworkState; import com.gh.gamecenter.eventbus.EBPackage; import com.gh.gamecenter.eventbus.EBReuse; import com.gh.gamecenter.newsdetail.NewsDetailAdapter; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.halo.assistant.fragment.SettingsFragment; import com.lightgame.download.DataWatcher; @@ -65,11 +64,8 @@ import com.lightgame.utils.Utils; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; -import org.w3c.dom.Text; -import java.util.HashMap; import java.util.HashSet; -import java.util.Map; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.schedulers.Schedulers; diff --git a/app/src/main/java/com/gh/gamecenter/SearchActivity.kt b/app/src/main/java/com/gh/gamecenter/SearchActivity.kt index 9027b233d2..c342b29c6c 100644 --- a/app/src/main/java/com/gh/gamecenter/SearchActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/SearchActivity.kt @@ -13,7 +13,7 @@ import android.widget.RelativeLayout import android.widget.TextView import androidx.core.widget.doAfterTextChanged import androidx.core.widget.doOnTextChanged -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.common.util.* import com.gh.gamecenter.DisplayType.* import com.gh.gamecenter.common.constant.EntranceConsts diff --git a/app/src/main/java/com/gh/gamecenter/ShareCardPicActivity.java b/app/src/main/java/com/gh/gamecenter/ShareCardPicActivity.java index 93ed8eb1ce..e3ae6148ac 100644 --- a/app/src/main/java/com/gh/gamecenter/ShareCardPicActivity.java +++ b/app/src/main/java/com/gh/gamecenter/ShareCardPicActivity.java @@ -33,7 +33,7 @@ import com.gh.common.util.MessageShareUtils; import com.gh.common.util.QRCodeUtils; import com.gh.gamecenter.core.utils.StringUtils; import com.gh.gamecenter.entity.ConcernEntity; -import com.gh.gamecenter.retrofit.ObservableUtil; +import com.gh.gamecenter.common.retrofit.ObservableUtil; import java.io.File; import java.io.IOException; diff --git a/app/src/main/java/com/gh/gamecenter/ShareGhActivity.java b/app/src/main/java/com/gh/gamecenter/ShareGhActivity.java index 151ddeec6a..82e70f530b 100644 --- a/app/src/main/java/com/gh/gamecenter/ShareGhActivity.java +++ b/app/src/main/java/com/gh/gamecenter/ShareGhActivity.java @@ -16,7 +16,7 @@ import com.gh.common.util.MessageShareUtils; import com.gh.gamecenter.common.utils.ExtensionsKt; import com.gh.gamecenter.core.utils.MtaHelper; import com.gh.common.util.QRCodeUtils; -import com.gh.common.util.ShareUtils; +import com.gh.gamecenter.common.utils.ShareUtils; import com.tencent.tauth.Tencent; /** diff --git a/app/src/main/java/com/gh/gamecenter/SkipActivity.java b/app/src/main/java/com/gh/gamecenter/SkipActivity.java index 946c246e22..b220ac0b2a 100644 --- a/app/src/main/java/com/gh/gamecenter/SkipActivity.java +++ b/app/src/main/java/com/gh/gamecenter/SkipActivity.java @@ -45,7 +45,7 @@ import android.os.Bundle; import android.text.TextUtils; import android.util.Base64; -import com.gh.base.BaseActivity; +import com.gh.gamecenter.common.base.BaseActivity; import com.gh.common.util.CheckLoginUtils; import com.gh.common.util.DirectUtils; import com.gh.gamecenter.common.constant.EntranceConsts; diff --git a/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java b/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java index 1b456a475f..814141b852 100644 --- a/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java +++ b/app/src/main/java/com/gh/gamecenter/SplashScreenActivity.java @@ -20,11 +20,12 @@ import androidx.core.app.ActivityCompat; import androidx.viewpager.widget.PagerAdapter; import androidx.viewpager.widget.ViewPager; +import com.alibaba.android.arouter.facade.annotation.Route; import com.g00fy2.versioncompare.Version; -import com.gh.base.BaseActivity; +import com.gh.gamecenter.common.base.BaseActivity; import com.gh.common.constant.Config; import com.gh.common.dialog.PrivacyPolicyDialogFragment; -import com.gh.common.tracker.TrackerLogger; +import com.gh.gamecenter.common.tracker.TrackerLogger; import com.gh.common.util.AdHelper; import com.gh.common.util.DeviceTokenUtils; import com.gh.common.util.DialogUtils; @@ -37,6 +38,7 @@ import com.gh.common.util.UsageStatsHelper; import com.gh.download.DownloadManager; import com.gh.gamecenter.common.callback.SimpleCallback; import com.gh.gamecenter.common.constant.Constants; +import com.gh.gamecenter.common.constant.RouteConsts; import com.gh.gamecenter.common.utils.DialogHelper; import com.gh.gamecenter.common.utils.ExtensionsKt; import com.gh.gamecenter.common.utils.PackageFlavorHelper; @@ -48,8 +50,8 @@ import com.gh.gamecenter.core.utils.SPUtils; import com.gh.gamecenter.entity.AuthDialogEntity; import com.gh.gamecenter.entity.DeviceDialogEntity; import com.gh.gamecenter.entity.PrivacyPolicyEntity; -import com.gh.gamecenter.retrofit.BiResponse; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.BiResponse; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.halo.assistant.HaloApp; import com.lightgame.download.DownloadEntity; @@ -78,6 +80,7 @@ import pub.devrel.easypermissions.EasyPermissions; /** * 引导页面 */ +@Route(path = RouteConsts.activity.splashActivity) public class SplashScreenActivity extends BaseActivity { private SharedPreferences mSharedPreferences; diff --git a/app/src/main/java/com/gh/gamecenter/SuggestionActivity.java b/app/src/main/java/com/gh/gamecenter/SuggestionActivity.java index 49b2afcb22..be9f1d2f07 100644 --- a/app/src/main/java/com/gh/gamecenter/SuggestionActivity.java +++ b/app/src/main/java/com/gh/gamecenter/SuggestionActivity.java @@ -41,7 +41,7 @@ import com.gh.common.util.CheckLoginUtils; import com.gh.common.util.DirectUtils; import com.gh.common.util.NotificationHelper; import com.gh.common.util.PackageUtils; -import com.gh.common.util.ShareUtils; +import com.gh.gamecenter.common.utils.ShareUtils; import com.gh.common.util.UploadImageUtils; import com.gh.gamecenter.common.base.TrackableDialog; import com.gh.gamecenter.common.base.fragment.WaitingDialogFragment; @@ -71,7 +71,7 @@ import com.gh.gamecenter.entity.SettingsEntity; import com.gh.gamecenter.entity.SimpleGameEntity; import com.gh.gamecenter.entity.UserInfoEntity; import com.gh.gamecenter.manager.UserManager; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.gh.gamecenter.suggest.SuggestGameCollectAdapter; import com.gh.gamecenter.suggest.SuggestPicAdapter; diff --git a/app/src/main/java/com/gh/gamecenter/WebActivity.kt b/app/src/main/java/com/gh/gamecenter/WebActivity.kt index 0a14403e94..2254e231b7 100644 --- a/app/src/main/java/com/gh/gamecenter/WebActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/WebActivity.kt @@ -8,15 +8,12 @@ import android.os.Bundle import android.text.TextUtils import android.view.KeyEvent import android.view.View - import com.alibaba.android.arouter.facade.annotation.Route import com.gh.gamecenter.common.constant.Constants import com.gh.gamecenter.common.constant.EntranceConsts -import com.gh.gamecenter.common.utils.EnvHelper -import com.gh.common.util.IntentUtils import com.gh.gamecenter.common.constant.RouteConsts +import com.gh.gamecenter.common.utils.EnvHelper import com.gh.gamecenter.common.utils.updateStatusBarColor - import com.gh.gamecenter.entity.ConcernEntity import com.gh.gamecenter.entity.NewsEntity import com.gh.gamecenter.entity.ToolBoxEntity @@ -90,7 +87,7 @@ open class WebActivity : NormalActivity() { bundle.putBoolean(EntranceConsts.KEY_WEB_SHARE, showWebShare) bundle.putString(EntranceConsts.KEY_URL, url) bundle.putBoolean(WebFragment.KEY_LEAVE_WEB_PAGE_TO_HANDLE_TITLE, true) - return IntentUtils.getWebTargetIntent(context, bundle, url) + return getWebTargetIntent(context, bundle, url) } // 获取通用页面 @@ -237,7 +234,7 @@ open class WebActivity : NormalActivity() { bundle.putString(EntranceConsts.KEY_URL, url) bundle.putBoolean(WebFragment.KEY_COMPLETION_TITLE, autoCompletionTitle) bundle.putBoolean(WebFragment.KEY_LEAVE_WEB_PAGE_TO_HANDLE_TITLE, false) - return IntentUtils.getWebTargetIntent(context, bundle, url) + return getWebTargetIntent(context, bundle, url) } @JvmStatic @@ -254,7 +251,7 @@ open class WebActivity : NormalActivity() { bundle.putBoolean(WebFragment.KEY_COMPLETION_TITLE, autoCompletionTitle) bundle.putBoolean(WebFragment.KEY_LEAVE_WEB_PAGE_TO_HANDLE_TITLE, false) bundle.putBoolean(WebFragment.KEY_OPEN_NATIVE_PAGE, isOpenNativePage) - return IntentUtils.getWebTargetIntent(context, bundle, url) + return getWebTargetIntent(context, bundle, url) } // 获取问答页 @@ -278,7 +275,7 @@ open class WebActivity : NormalActivity() { isWebPageHandleBackPressed ) bundle.putInt(WebFragment.KEY_QA_TYPE, qaType) - return IntentUtils.getWebTargetIntent(context, bundle, url) + return getWebTargetIntent(context, bundle, url) } // 获取H5游戏 @@ -299,7 +296,22 @@ open class WebActivity : NormalActivity() { bundle.putBoolean(WebFragment.KEY_REQUIRE_BACK_CONFIRMATION, true) bundle.putString(WebFragment.KEY_BACK_CONFIRMATION_CONTENT, "退出后将不保存当前游戏进度,确定退出吗?") } - return IntentUtils.getWebTargetIntent(context, bundle, url) + return getWebTargetIntent(context, bundle, url) + } + + private fun getWebTargetIntent(context: Context?, bundle: Bundle, url: String?): Intent { + val cls: Class = if (url?.contains("android_page_type=singleton") == true) { + SingletonWebActivity::class.java + } else { + WebActivity::class.java + } + if (url?.contains("leave_web_page_handle_back_pressed=true") == true) { + bundle.putBoolean(WebFragment.KEY_LEAVE_WEB_PAGE_TO_HANDLE_BACK_PRESSED, true) + } + val intent = Intent(context, cls) + intent.putExtra(NORMAL_FRAGMENT_NAME, WebFragment::class.java.canonicalName) + intent.putExtra(NORMAL_FRAGMENT_BUNDLE, bundle) + return intent } } } \ No newline at end of file diff --git a/app/src/main/java/com/gh/gamecenter/WeiBoShareActivity.java b/app/src/main/java/com/gh/gamecenter/WeiBoShareActivity.java index 59b26daf48..1bcf05bf4c 100644 --- a/app/src/main/java/com/gh/gamecenter/WeiBoShareActivity.java +++ b/app/src/main/java/com/gh/gamecenter/WeiBoShareActivity.java @@ -1,5 +1,7 @@ package com.gh.gamecenter; +import static com.gh.gamecenter.common.constant.EntranceConsts.*; + import android.app.Activity; import android.content.Context; import android.content.Intent; @@ -12,17 +14,19 @@ import android.util.Base64; import androidx.annotation.NonNull; +import com.alibaba.android.arouter.facade.annotation.Route; import com.gh.common.Base64ImageHolder; import com.gh.common.constant.Config; -import com.gh.gamecenter.common.callback.BiCallback; -import com.gh.gamecenter.common.utils.BitmapUtils; import com.gh.common.util.EnergyTaskHelper; -import com.gh.gamecenter.common.utils.ImageUtils; import com.gh.common.util.IntegralLogHelper; import com.gh.common.util.LogUtils; import com.gh.common.util.NewLogUtils; -import com.gh.common.util.ShareUtils; -import com.gh.gamecenter.eventbus.EBShare; +import com.gh.gamecenter.common.callback.BiCallback; +import com.gh.gamecenter.common.constant.RouteConsts; +import com.gh.gamecenter.common.eventbus.EBShare; +import com.gh.gamecenter.common.utils.BitmapUtils; +import com.gh.gamecenter.common.utils.ImageUtils; +import com.gh.gamecenter.common.utils.ShareUtils; import com.lightgame.utils.Utils; import com.sina.weibo.sdk.api.ImageObject; import com.sina.weibo.sdk.api.TextObject; @@ -42,16 +46,9 @@ import java.io.ByteArrayOutputStream; *

* 微博分享 */ +@Route(path = RouteConsts.activity.weiBoShareActivity) public class WeiBoShareActivity extends Activity implements WbShareCallback { - - private static final String KET_SHARE_STYLE = "shareStyle"; - private static final String KET_SHAREICON = "shareIcon"; - private static final String KET_SHAREURL = "shareUrl"; - private static final String KET_TITLE = "KET_TITLE"; - private static final String KET_TYPE = "KET_TYPE"; - private static final String KET_SUMMARY = "KET_SUMMARY"; - private static final String WEIBO_SCOPE = ( "email,direct_messages_read,direct_messages_write," + "friendships_groups_read,friendships_groups_write,statuses_to_me_read," @@ -258,7 +255,7 @@ public class WeiBoShareActivity extends Activity implements WbShareCallback { public void onComplete() { Utils.toast(this, R.string.share_success_hint); if ("NORMAL".equals(mShareStyle)) { - LogUtils.uploadShareResult(ShareUtils.shareType, ShareUtils.shareEntrance.getName(), "success", + com.gh.gamecenter.common.utils.LogUtils.uploadShareResult(ShareUtils.shareType, ShareUtils.shareEntrance.getName(), "success", ShareUtils.shareEntity.getShareUrl(), ShareUtils.shareEntity.getShareTitle(), ShareUtils.shareEntity.getSummary(), ShareUtils.resourceId); EventBus.getDefault().post(new EBShare(ShareUtils.shareEntrance)); EnergyTaskHelper.postEnergyTaskForShare(ShareUtils.shareEntrance.getName(), ShareUtils.resourceId, ShareUtils.shareEntity.getShareUrl()); @@ -268,9 +265,9 @@ public class WeiBoShareActivity extends Activity implements WbShareCallback { if (ShareUtils.shareEntrance == ShareUtils.ShareEntrance.askNormal || ShareUtils.shareEntrance == ShareUtils.ShareEntrance.communityArticle || ShareUtils.shareEntrance == ShareUtils.ShareEntrance.video) { - NewLogUtils.logShareResult(ShareUtils.additionalParams, true); + com.gh.gamecenter.common.utils.NewLogUtils.logShareResult(ShareUtils.additionalParams, true); } else if (ShareUtils.shareEntrance == ShareUtils.ShareEntrance.gameCollection) { - NewLogUtils.logViewOrClickGameCollectionDetail( + com.gh.gamecenter.common.utils.NewLogUtils.logViewOrClickGameCollectionDetail( "click_game_collect_detail_favorite_success", ShareUtils.shareEntity.getShareTitle(), ShareUtils.resourceId, @@ -287,7 +284,7 @@ public class WeiBoShareActivity extends Activity implements WbShareCallback { public void onError(UiError uiError) { Utils.toast(this, R.string.share_fail_hint); if ("NORMAL".equals(mShareStyle)) { - LogUtils.uploadShareResult(ShareUtils.shareType, ShareUtils.shareEntrance.getName(), "fail", + com.gh.gamecenter.common.utils.LogUtils.uploadShareResult(ShareUtils.shareType, ShareUtils.shareEntrance.getName(), "fail", ShareUtils.shareEntity.getShareUrl(), ShareUtils.shareEntity.getShareTitle(), ShareUtils.shareEntity.getSummary(), ShareUtils.resourceId); if (ShareUtils.shareEntrance == ShareUtils.ShareEntrance.inviteFriends) { IntegralLogHelper.INSTANCE.logInviteResult("失败", "微博"); @@ -295,7 +292,7 @@ public class WeiBoShareActivity extends Activity implements WbShareCallback { if (ShareUtils.shareEntrance == ShareUtils.ShareEntrance.askNormal || ShareUtils.shareEntrance == ShareUtils.ShareEntrance.communityArticle || ShareUtils.shareEntrance == ShareUtils.ShareEntrance.video) { - NewLogUtils.logShareResult(ShareUtils.additionalParams, false); + com.gh.gamecenter.common.utils.NewLogUtils.logShareResult(ShareUtils.additionalParams, false); } } else { IntegralLogHelper.INSTANCE.logInviteResult("失败", "微博"); @@ -307,7 +304,7 @@ public class WeiBoShareActivity extends Activity implements WbShareCallback { public void onCancel() { Utils.toast(this, R.string.share_cancel_hint); if ("NORMAL".equals(mShareStyle)) { - LogUtils.uploadShareResult(ShareUtils.shareType, ShareUtils.shareEntrance.getName(), "cancel", + com.gh.gamecenter.common.utils.LogUtils.uploadShareResult(ShareUtils.shareType, ShareUtils.shareEntrance.getName(), "cancel", ShareUtils.shareEntity.getShareUrl(), ShareUtils.shareEntity.getShareTitle(), ShareUtils.shareEntity.getSummary(), ShareUtils.resourceId); if (ShareUtils.shareEntrance == ShareUtils.ShareEntrance.inviteFriends) { IntegralLogHelper.INSTANCE.logInviteResult("取消", "微博"); @@ -315,7 +312,7 @@ public class WeiBoShareActivity extends Activity implements WbShareCallback { if (ShareUtils.shareEntrance == ShareUtils.ShareEntrance.askNormal || ShareUtils.shareEntrance == ShareUtils.ShareEntrance.communityArticle || ShareUtils.shareEntrance == ShareUtils.ShareEntrance.video) { - NewLogUtils.logShareResult(ShareUtils.additionalParams, false); + com.gh.gamecenter.common.utils.NewLogUtils.logShareResult(ShareUtils.additionalParams, false); } } else { IntegralLogHelper.INSTANCE.logInviteResult("取消", "微博"); diff --git a/app/src/main/java/com/gh/gamecenter/adapter/CleanApkAdapter.java b/app/src/main/java/com/gh/gamecenter/adapter/CleanApkAdapter.java index 7a66a37f53..5e8c922082 100644 --- a/app/src/main/java/com/gh/gamecenter/adapter/CleanApkAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/adapter/CleanApkAdapter.java @@ -24,7 +24,7 @@ import com.gh.gamecenter.R; import com.gh.gamecenter.adapter.viewholder.KcSelectGameViewHolder; import com.gh.gamecenter.databinding.KcGameSelectItemBinding; import com.gh.gamecenter.entity.InstallGameEntity; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.lightgame.adapter.BaseRecyclerAdapter; import com.lightgame.utils.RuntimeUtils; diff --git a/app/src/main/java/com/gh/gamecenter/adapter/CommentDetailAdapter.java b/app/src/main/java/com/gh/gamecenter/adapter/CommentDetailAdapter.java index 2c14a8f33d..edc67d0f5a 100644 --- a/app/src/main/java/com/gh/gamecenter/adapter/CommentDetailAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/adapter/CommentDetailAdapter.java @@ -21,7 +21,7 @@ import com.gh.gamecenter.adapter.viewholder.CommentViewHolder; import com.gh.gamecenter.adapter.viewholder.FooterViewHolder; import com.gh.gamecenter.entity.ArticleCommentParent; import com.gh.gamecenter.entity.CommentEntity; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.adapter.BaseRecyclerAdapter; import com.lightgame.utils.Utils; diff --git a/app/src/main/java/com/gh/gamecenter/adapter/GameNewsAdapter.java b/app/src/main/java/com/gh/gamecenter/adapter/GameNewsAdapter.java index e502b1e6e2..67e847a527 100644 --- a/app/src/main/java/com/gh/gamecenter/adapter/GameNewsAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/adapter/GameNewsAdapter.java @@ -30,7 +30,7 @@ import com.gh.gamecenter.databinding.GameNewsSearchItemBinding; import com.gh.gamecenter.databinding.GameNewsTypeItemBinding; import com.gh.gamecenter.databinding.NewsTextItemBinding; import com.gh.gamecenter.entity.NewsEntity; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.adapter.BaseRecyclerAdapter; import com.lightgame.utils.Utils; diff --git a/app/src/main/java/com/gh/gamecenter/adapter/ImagePagerAdapter.java b/app/src/main/java/com/gh/gamecenter/adapter/ImagePagerAdapter.java index 1bbbd9f9ec..b23b0e7985 100644 --- a/app/src/main/java/com/gh/gamecenter/adapter/ImagePagerAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/adapter/ImagePagerAdapter.java @@ -12,7 +12,7 @@ import android.view.ViewGroup; import androidx.annotation.NonNull; import com.facebook.drawee.view.SimpleDraweeView; -import com.gh.common.exposure.ExposureEntity; +import com.gh.gamecenter.common.entity.ExposureEntity; import com.gh.common.exposure.ExposureEvent; import com.gh.common.exposure.ExposureSource; import com.gh.common.exposure.ExposureType; diff --git a/app/src/main/java/com/gh/gamecenter/adapter/LibaoDetailAdapter.java b/app/src/main/java/com/gh/gamecenter/adapter/LibaoDetailAdapter.java index d587509563..3728115e5b 100644 --- a/app/src/main/java/com/gh/gamecenter/adapter/LibaoDetailAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/adapter/LibaoDetailAdapter.java @@ -41,7 +41,7 @@ import com.gh.gamecenter.entity.LibaoEntity; import com.gh.gamecenter.entity.LibaoStatusEntity; import com.gh.gamecenter.entity.MeEntity; import com.gh.gamecenter.entity.UserDataLibaoEntity; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.gh.gamecenter.suggest.SuggestType; import com.lightgame.adapter.BaseRecyclerAdapter; diff --git a/app/src/main/java/com/gh/gamecenter/adapter/MessageDetailAdapter.java b/app/src/main/java/com/gh/gamecenter/adapter/MessageDetailAdapter.java index 44bff3b3a5..20135677ed 100644 --- a/app/src/main/java/com/gh/gamecenter/adapter/MessageDetailAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/adapter/MessageDetailAdapter.java @@ -42,9 +42,9 @@ import com.gh.gamecenter.entity.ArticleCommentParent; import com.gh.gamecenter.entity.CommentEntity; import com.gh.gamecenter.entity.ConcernEntity; import com.gh.gamecenter.manager.VisitManager; -import com.gh.gamecenter.retrofit.JSONObjectResponse; -import com.gh.gamecenter.retrofit.OkHttpCache; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.JSONObjectResponse; +import com.gh.gamecenter.common.retrofit.OkHttpCache; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.adapter.BaseRecyclerAdapter; import com.lightgame.utils.Utils; diff --git a/app/src/main/java/com/gh/gamecenter/adapter/ToolBoxRvAdapter.java b/app/src/main/java/com/gh/gamecenter/adapter/ToolBoxRvAdapter.java index e3e19f74d4..6f50c533cc 100644 --- a/app/src/main/java/com/gh/gamecenter/adapter/ToolBoxRvAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/adapter/ToolBoxRvAdapter.java @@ -18,7 +18,7 @@ import com.gh.gamecenter.adapter.viewholder.ReuseViewHolder; import com.gh.gamecenter.adapter.viewholder.ToolBoxViewHolder; import com.gh.gamecenter.databinding.ToolboxItemBinding; import com.gh.gamecenter.entity.ToolBoxEntity; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.gh.gamecenter.suggest.SuggestType; import com.lightgame.adapter.BaseRecyclerAdapter; diff --git a/app/src/main/java/com/gh/gamecenter/amway/AmwayActivity.kt b/app/src/main/java/com/gh/gamecenter/amway/AmwayActivity.kt index 0e9137afde..63272ce88e 100644 --- a/app/src/main/java/com/gh/gamecenter/amway/AmwayActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/amway/AmwayActivity.kt @@ -1,7 +1,7 @@ package com.gh.gamecenter.amway import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/amway/AmwayAdapter.kt b/app/src/main/java/com/gh/gamecenter/amway/AmwayAdapter.kt index 171a491a72..7d4b23cecb 100644 --- a/app/src/main/java/com/gh/gamecenter/amway/AmwayAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/amway/AmwayAdapter.kt @@ -12,6 +12,7 @@ import com.gh.common.exposure.ExposureEvent import com.gh.common.exposure.ExposureSource import com.gh.common.exposure.IExposable import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.gamecenter.GameDetailActivity import com.gh.gamecenter.R import com.gh.gamecenter.adapter.viewholder.FooterViewHolder diff --git a/app/src/main/java/com/gh/gamecenter/amway/AmwayFragment.kt b/app/src/main/java/com/gh/gamecenter/amway/AmwayFragment.kt index ca90b35d87..3f900aea7c 100644 --- a/app/src/main/java/com/gh/gamecenter/amway/AmwayFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/amway/AmwayFragment.kt @@ -13,6 +13,7 @@ import com.gh.gamecenter.core.utils.TimeElapsedHelper import com.gh.common.exposure.ExposureListener import com.gh.common.exposure.ExposureSource import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.gamecenter.common.view.VerticalItemDecoration import com.gh.common.xapk.XapkInstaller import com.gh.common.xapk.XapkUnzipStatus diff --git a/app/src/main/java/com/gh/gamecenter/amway/AmwayViewModel.kt b/app/src/main/java/com/gh/gamecenter/amway/AmwayViewModel.kt index 17ded3d6ef..faa97c4101 100644 --- a/app/src/main/java/com/gh/gamecenter/amway/AmwayViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/amway/AmwayViewModel.kt @@ -14,8 +14,8 @@ import com.gh.gamecenter.entity.RatingComment import com.gh.gamecenter.entity.SubjectEntity import com.gh.gamecenter.home.LegacyHomeItemData import com.gh.gamecenter.home.LegacyHomeSubjectTransformer -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.Observable diff --git a/app/src/main/java/com/gh/gamecenter/amway/search/AmwaySearchViewModel.kt b/app/src/main/java/com/gh/gamecenter/amway/search/AmwaySearchViewModel.kt index 89156978b3..c9872ca2cf 100644 --- a/app/src/main/java/com/gh/gamecenter/amway/search/AmwaySearchViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/amway/search/AmwaySearchViewModel.kt @@ -11,8 +11,8 @@ import com.gh.gamecenter.BuildConfig import com.gh.gamecenter.baselist.LoadStatus import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/gamecenter/baselist/ListHeadViewModel.java b/app/src/main/java/com/gh/gamecenter/baselist/ListHeadViewModel.java index 0d833aa76a..90cd88ebed 100644 --- a/app/src/main/java/com/gh/gamecenter/baselist/ListHeadViewModel.java +++ b/app/src/main/java/com/gh/gamecenter/baselist/ListHeadViewModel.java @@ -6,7 +6,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.gh.gamecenter.mvvm.Resource; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.gh.gamecenter.retrofit.service.ApiService; diff --git a/app/src/main/java/com/gh/gamecenter/baselist/ListViewModel.java b/app/src/main/java/com/gh/gamecenter/baselist/ListViewModel.java index e1bbc77661..b42829b648 100644 --- a/app/src/main/java/com/gh/gamecenter/baselist/ListViewModel.java +++ b/app/src/main/java/com/gh/gamecenter/baselist/ListViewModel.java @@ -12,8 +12,8 @@ import com.gh.gamecenter.common.constant.EntranceConsts; import com.gh.download.DownloadManager; import com.gh.gamecenter.common.utils.ExtensionsKt; import com.gh.gamecenter.entity.GameEntity; -import com.gh.gamecenter.retrofit.BiResponse; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.BiResponse; +import com.gh.gamecenter.common.retrofit.Response; import org.jetbrains.annotations.NotNull; diff --git a/app/src/main/java/com/gh/gamecenter/catalog/CatalogViewModel.kt b/app/src/main/java/com/gh/gamecenter/catalog/CatalogViewModel.kt index 154b97e34e..2d64321288 100644 --- a/app/src/main/java/com/gh/gamecenter/catalog/CatalogViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/catalog/CatalogViewModel.kt @@ -8,7 +8,7 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider import com.gh.common.util.LogUtils import com.gh.gamecenter.entity.CatalogEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/catalog/NewCatalogListViewModel.kt b/app/src/main/java/com/gh/gamecenter/catalog/NewCatalogListViewModel.kt index 6a8d8fdde5..08b3ab6212 100644 --- a/app/src/main/java/com/gh/gamecenter/catalog/NewCatalogListViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/catalog/NewCatalogListViewModel.kt @@ -2,7 +2,7 @@ package com.gh.gamecenter.catalog import android.app.Application import androidx.lifecycle.MutableLiveData -import com.gh.common.exposure.ExposureEntity +import com.gh.gamecenter.common.entity.ExposureEntity import com.gh.common.exposure.ExposureUtils import com.gh.gamecenter.core.utils.UrlFilterUtils import com.gh.common.view.CatalogFilterView diff --git a/app/src/main/java/com/gh/gamecenter/catalog/SpecialCatalogViewModel.kt b/app/src/main/java/com/gh/gamecenter/catalog/SpecialCatalogViewModel.kt index 2e46a2a964..ca190b11fe 100644 --- a/app/src/main/java/com/gh/gamecenter/catalog/SpecialCatalogViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/catalog/SpecialCatalogViewModel.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.catalog import android.app.Application import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import com.gh.common.exposure.ExposureEntity +import com.gh.gamecenter.common.entity.ExposureEntity import com.gh.common.exposure.ExposureSource import com.gh.common.util.LogUtils import com.gh.gamecenter.baselist.ListViewModel diff --git a/app/src/main/java/com/gh/gamecenter/catalog/SubCatalogViewModel.kt b/app/src/main/java/com/gh/gamecenter/catalog/SubCatalogViewModel.kt index 51a036708d..6a2c31205f 100644 --- a/app/src/main/java/com/gh/gamecenter/catalog/SubCatalogViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/catalog/SubCatalogViewModel.kt @@ -7,7 +7,7 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider import com.gh.gamecenter.entity.CatalogEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/category/CategoryDirectoryAdapter.kt b/app/src/main/java/com/gh/gamecenter/category/CategoryDirectoryAdapter.kt index 04ba926836..21a866b1d7 100644 --- a/app/src/main/java/com/gh/gamecenter/category/CategoryDirectoryAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/category/CategoryDirectoryAdapter.kt @@ -5,14 +5,14 @@ import android.view.View import android.view.ViewGroup import android.widget.LinearLayout import androidx.recyclerview.widget.RecyclerView -import com.gh.gamecenter.core.utils.DisplayUtils -import com.gh.gamecenter.common.utils.ImageUtils -import com.gh.common.util.IntentUtils -import com.gh.gamecenter.common.utils.toBinding import com.gh.common.view.SubCategoryView import com.gh.gamecenter.R import com.gh.gamecenter.baselist.ListAdapter +import com.gh.gamecenter.category.CategoryListActivity.Companion.getIntent +import com.gh.gamecenter.common.utils.ImageUtils +import com.gh.gamecenter.common.utils.toBinding import com.gh.gamecenter.common.utils.toColor +import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.gamecenter.databinding.ItemCategoryBinding import com.gh.gamecenter.entity.CategoryEntity import net.cachapa.expandablelayout.ExpandableLayout @@ -41,7 +41,7 @@ class CategoryDirectoryAdapter(context: Context, var categoryTitle: String) holder.binding.run { divider.setBackgroundColor(R.color.background.toColor(mContext)) containerPrimaryCategory.setOnClickListener { - IntentUtils.startCategoryListActivity(root.context, categoryTitle, category) + root.context.startActivity(getIntent(root.context, categoryTitle, category, "全部")) } ImageUtils.display(iconIv, category.icon) categoryName.text = category.name diff --git a/app/src/main/java/com/gh/gamecenter/category2/CategoryV2Fragment.kt b/app/src/main/java/com/gh/gamecenter/category2/CategoryV2Fragment.kt index 0412557a4b..c7cd8414e9 100644 --- a/app/src/main/java/com/gh/gamecenter/category2/CategoryV2Fragment.kt +++ b/app/src/main/java/com/gh/gamecenter/category2/CategoryV2Fragment.kt @@ -13,6 +13,7 @@ import androidx.recyclerview.widget.LinearLayoutManager import com.gh.gamecenter.common.base.fragment.LazyFragment import com.gh.gamecenter.common.constant.Constants import com.gh.common.util.* +import com.gh.common.util.LogUtils import com.gh.gamecenter.common.view.FixLinearLayoutManager import com.gh.gamecenter.R import com.gh.gamecenter.SearchActivity diff --git a/app/src/main/java/com/gh/gamecenter/category2/CategoryV2ListFragment.kt b/app/src/main/java/com/gh/gamecenter/category2/CategoryV2ListFragment.kt index 9bc04627c6..c0ba61b88f 100644 --- a/app/src/main/java/com/gh/gamecenter/category2/CategoryV2ListFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/category2/CategoryV2ListFragment.kt @@ -7,6 +7,7 @@ import com.ethanhua.skeleton.Skeleton import com.gh.gamecenter.common.constant.Constants import com.gh.common.exposure.ExposureListener import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.common.view.CategoryFilterView import com.gh.common.xapk.XapkInstaller import com.gh.common.xapk.XapkUnzipStatus diff --git a/app/src/main/java/com/gh/gamecenter/category2/CategoryV2ListViewModel.kt b/app/src/main/java/com/gh/gamecenter/category2/CategoryV2ListViewModel.kt index 6102637618..10c19a6b3b 100644 --- a/app/src/main/java/com/gh/gamecenter/category2/CategoryV2ListViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/category2/CategoryV2ListViewModel.kt @@ -4,7 +4,7 @@ import android.app.Application import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import com.gh.common.exposure.ExposureEntity +import com.gh.gamecenter.common.entity.ExposureEntity import com.gh.common.exposure.ExposureSource import com.gh.common.exposure.ExposureUtils import com.gh.gamecenter.core.utils.UrlFilterUtils diff --git a/app/src/main/java/com/gh/gamecenter/category2/CategoryV2ViewModel.kt b/app/src/main/java/com/gh/gamecenter/category2/CategoryV2ViewModel.kt index 3196a24d62..881a957e73 100644 --- a/app/src/main/java/com/gh/gamecenter/category2/CategoryV2ViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/category2/CategoryV2ViewModel.kt @@ -9,7 +9,7 @@ import androidx.lifecycle.ViewModelProvider import com.gh.common.util.LogUtils import com.gh.gamecenter.entity.CategoryEntity import com.gh.gamecenter.entity.SidebarsEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/collection/AnswerViewModel.kt b/app/src/main/java/com/gh/gamecenter/collection/AnswerViewModel.kt index b4532b7e0f..ecd336bc1d 100644 --- a/app/src/main/java/com/gh/gamecenter/collection/AnswerViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/collection/AnswerViewModel.kt @@ -9,7 +9,7 @@ import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.baselist.LoadType import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.qa.entity.AnswerEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Observable import io.reactivex.Single diff --git a/app/src/main/java/com/gh/gamecenter/collection/ArticleAdapter.java b/app/src/main/java/com/gh/gamecenter/collection/ArticleAdapter.java index 2d80242edf..e24f38d357 100644 --- a/app/src/main/java/com/gh/gamecenter/collection/ArticleAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/collection/ArticleAdapter.java @@ -33,7 +33,7 @@ import com.gh.gamecenter.databinding.PopupHistoryOptionBinding; import com.gh.gamecenter.entity.NewsEntity; import com.gh.gamecenter.history.ManageOption; import com.gh.gamecenter.manager.VisitManager; -import com.gh.gamecenter.retrofit.JSONObjectResponse; +import com.gh.gamecenter.common.retrofit.JSONObjectResponse; import com.gh.gamecenter.retrofit.RetrofitManager; import org.json.JSONException; diff --git a/app/src/main/java/com/gh/gamecenter/collection/CommunityArticleViewModel.kt b/app/src/main/java/com/gh/gamecenter/collection/CommunityArticleViewModel.kt index 8b44cc6376..5e2daac106 100644 --- a/app/src/main/java/com/gh/gamecenter/collection/CommunityArticleViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/collection/CommunityArticleViewModel.kt @@ -11,8 +11,8 @@ import com.gh.gamecenter.baselist.LoadType import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.qa.entity.AnswerEntity import com.gh.gamecenter.qa.entity.ArticleEntity -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.Observable diff --git a/app/src/main/java/com/gh/gamecenter/collection/GamesCollectionAdapter.kt b/app/src/main/java/com/gh/gamecenter/collection/GamesCollectionAdapter.kt index 5726948fcb..1b561e5960 100644 --- a/app/src/main/java/com/gh/gamecenter/collection/GamesCollectionAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/collection/GamesCollectionAdapter.kt @@ -16,6 +16,7 @@ import androidx.recyclerview.widget.RecyclerView import com.gh.gamecenter.common.constant.ItemViewType import com.gh.gamecenter.common.syncpage.ISyncAdapterHandler import com.gh.common.util.* +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.GameDetailActivity import com.gh.gamecenter.R import com.gh.gamecenter.adapter.viewholder.FooterViewHolder diff --git a/app/src/main/java/com/gh/gamecenter/collection/GamesCollectionViewModel.kt b/app/src/main/java/com/gh/gamecenter/collection/GamesCollectionViewModel.kt index bece267cb0..1730b6dd71 100644 --- a/app/src/main/java/com/gh/gamecenter/collection/GamesCollectionViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/collection/GamesCollectionViewModel.kt @@ -17,8 +17,8 @@ import com.gh.gamecenter.baselist.LoadType import com.gh.gamecenter.collection.GamesCollectionFragment.Companion.TYPE_COLLECT import com.gh.gamecenter.collection.GamesCollectionFragment.Companion.TYPE_HISTORY import com.gh.gamecenter.entity.GamesCollectionEntity -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.Single diff --git a/app/src/main/java/com/gh/gamecenter/download/GameUpdateFragmentAdapter.java b/app/src/main/java/com/gh/gamecenter/download/GameUpdateFragmentAdapter.java index ca1c59e948..6cfc417712 100644 --- a/app/src/main/java/com/gh/gamecenter/download/GameUpdateFragmentAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/download/GameUpdateFragmentAdapter.java @@ -24,7 +24,6 @@ import com.gh.common.exposure.IExposable; import com.gh.common.history.HistoryHelper; import com.gh.common.util.ApkActiveUtils; import com.gh.common.util.DataCollectionUtils; -import com.gh.common.util.DataUtils; import com.gh.gamecenter.common.utils.DialogHelper; import com.gh.common.util.DialogUtils; import com.gh.gamecenter.core.utils.GsonUtils; @@ -51,7 +50,7 @@ import com.gh.gamecenter.entity.PluginLocation; import com.gh.gamecenter.eventbus.EBDownloadChanged; import com.gh.gamecenter.eventbus.EBSkip; import com.gh.gamecenter.manager.PackagesManager; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.adapter.BaseRecyclerAdapter; import com.lightgame.download.DownloadEntity; @@ -63,9 +62,7 @@ import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; -import java.util.HashMap; import java.util.List; -import java.util.Map; import io.reactivex.Observable; import io.reactivex.android.schedulers.AndroidSchedulers; diff --git a/app/src/main/java/com/gh/gamecenter/download/InstalledGameViewModel.kt b/app/src/main/java/com/gh/gamecenter/download/InstalledGameViewModel.kt index 2959f3c6d6..48a52632df 100644 --- a/app/src/main/java/com/gh/gamecenter/download/InstalledGameViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/download/InstalledGameViewModel.kt @@ -14,7 +14,7 @@ import com.gh.download.DownloadManager import com.gh.gamecenter.entity.ApkEntity import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.entity.GameInstall -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Observable import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/download/UpdatableGameAdapter.kt b/app/src/main/java/com/gh/gamecenter/download/UpdatableGameAdapter.kt index d3904e4be2..f3a9b5551d 100644 --- a/app/src/main/java/com/gh/gamecenter/download/UpdatableGameAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/download/UpdatableGameAdapter.kt @@ -17,6 +17,7 @@ import com.gh.common.exposure.ExposureEvent.Companion.createEvent import com.gh.common.exposure.ExposureSource import com.gh.common.exposure.IExposable import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.gamecenter.common.view.BugFixedPopupWindow import com.gh.download.DownloadManager import com.gh.download.dialog.DownloadDialog diff --git a/app/src/main/java/com/gh/gamecenter/download/UpdatableGameViewModel.kt b/app/src/main/java/com/gh/gamecenter/download/UpdatableGameViewModel.kt index e923b3e17d..b82a313e66 100644 --- a/app/src/main/java/com/gh/gamecenter/download/UpdatableGameViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/download/UpdatableGameViewModel.kt @@ -23,7 +23,7 @@ import com.gh.gamecenter.entity.GameUpdateEntity import com.gh.gamecenter.entity.PluginLocation import com.gh.gamecenter.eventbus.EBDownloadChanged import com.gh.gamecenter.manager.PackagesManager -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.download.DownloadEntity diff --git a/app/src/main/java/com/gh/gamecenter/energy/EnergyCenterFragment.kt b/app/src/main/java/com/gh/gamecenter/energy/EnergyCenterFragment.kt index 81f2231a13..3bdf7643fe 100644 --- a/app/src/main/java/com/gh/gamecenter/energy/EnergyCenterFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/energy/EnergyCenterFragment.kt @@ -11,6 +11,7 @@ import androidx.fragment.app.Fragment import com.gh.gamecenter.common.base.adapter.FragmentAdapter import com.gh.gamecenter.common.base.fragment.BaseLazyFragment import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.gamecenter.R import com.gh.gamecenter.common.callback.ConfirmListener import com.gh.gamecenter.common.constant.EntranceConsts diff --git a/app/src/main/java/com/gh/gamecenter/energy/EnergyCenterViewModel.kt b/app/src/main/java/com/gh/gamecenter/energy/EnergyCenterViewModel.kt index 5f8b5c8509..d3568bac52 100644 --- a/app/src/main/java/com/gh/gamecenter/energy/EnergyCenterViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/energy/EnergyCenterViewModel.kt @@ -5,7 +5,7 @@ import android.app.Application import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.MutableLiveData import com.gh.gamecenter.entity.CommodityCategoryEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/energy/EnergyHouseViewModel.kt b/app/src/main/java/com/gh/gamecenter/energy/EnergyHouseViewModel.kt index ef906e18b5..506eaa9481 100644 --- a/app/src/main/java/com/gh/gamecenter/energy/EnergyHouseViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/energy/EnergyHouseViewModel.kt @@ -6,8 +6,7 @@ import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.MutableLiveData import com.gh.gamecenter.entity.CommodityCategoryEntity import com.gh.gamecenter.entity.RollNoticeEntity -import com.gh.gamecenter.entity.TaskEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/energy/TaskAdapter.kt b/app/src/main/java/com/gh/gamecenter/energy/TaskAdapter.kt index 2c8f6df185..22e0aa15db 100644 --- a/app/src/main/java/com/gh/gamecenter/energy/TaskAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/energy/TaskAdapter.kt @@ -9,6 +9,7 @@ import androidx.recyclerview.widget.RecyclerView import com.gh.gamecenter.common.base.BaseRecyclerViewHolder import com.gh.gamecenter.common.constant.ItemViewType import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.gamecenter.R import com.gh.gamecenter.adapter.viewholder.FooterViewHolder import com.gh.gamecenter.baselist.ListAdapter diff --git a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListAdapter.kt b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListAdapter.kt index 5f6287d5c1..81d58cc664 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListAdapter.kt @@ -6,12 +6,11 @@ import android.view.ViewGroup import android.widget.LinearLayout import androidx.core.content.ContextCompat import androidx.recyclerview.widget.RecyclerView -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.constant.ItemViewType import com.gh.gamecenter.common.syncpage.ISyncAdapterHandler import com.gh.gamecenter.core.utils.MtaHelper import com.gh.common.util.NewLogUtils -import com.gh.gamecenter.common.utils.dip2px import com.gh.gamecenter.R import com.gh.gamecenter.adapter.viewholder.FooterViewHolder import com.gh.gamecenter.baselist.ListAdapter diff --git a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListFragment.kt b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListFragment.kt index b89fe71339..3ca7155de2 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumArticleAskListFragment.kt @@ -9,6 +9,7 @@ import com.ethanhua.skeleton.Skeleton import com.gh.gamecenter.core.AppExecutor import com.gh.gamecenter.common.constant.Constants import com.gh.common.util.* +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.common.view.divider.HorizontalDividerItemDecoration import com.gh.gamecenter.R import com.gh.gamecenter.baselist.LazyListFragment diff --git a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailActivity.kt b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailActivity.kt index ca2bd76cbf..289e77f732 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailActivity.kt @@ -4,7 +4,7 @@ import android.content.Context import android.content.Intent import android.os.Bundle import androidx.fragment.app.Fragment -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailFragment.kt b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailFragment.kt index 73c7629fe3..32fdf548d8 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailFragment.kt @@ -31,6 +31,8 @@ import com.gh.gamecenter.common.constant.Constants import com.gh.gamecenter.common.base.TrackableDialog import com.gh.gamecenter.core.runOnUiThread import com.gh.common.util.* +import com.gh.common.util.LogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.GameDetailActivity import com.gh.gamecenter.NewsDetailActivity import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailViewModel.kt b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailViewModel.kt index b01b6c2c09..bf3ac16ae3 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/detail/ForumDetailViewModel.kt @@ -14,9 +14,9 @@ import com.gh.gamecenter.entity.UserEntity import com.gh.gamecenter.eventbus.EBForumRecordChange import com.gh.gamecenter.mvvm.Resource import com.gh.gamecenter.qa.entity.* -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.EmptyResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.EmptyResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.room.AppDatabase import com.halo.assistant.HaloApp diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/ArticleItemVideoView.kt b/app/src/main/java/com/gh/gamecenter/forum/home/ArticleItemVideoView.kt index 52adfa0b5b..76d8a84e33 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/ArticleItemVideoView.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/ArticleItemVideoView.kt @@ -11,7 +11,6 @@ import android.widget.SeekBar import android.widget.TextView import androidx.core.content.ContextCompat import com.facebook.drawee.view.SimpleDraweeView -import com.gh.common.util.* import com.gh.gamecenter.R import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.core.utils.MD5Utils diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/CommunityHomeFragment.kt b/app/src/main/java/com/gh/gamecenter/forum/home/CommunityHomeFragment.kt index e171d7790e..ae0d1d8cef 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/CommunityHomeFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/CommunityHomeFragment.kt @@ -18,6 +18,7 @@ import androidx.core.os.bundleOf import androidx.fragment.app.Fragment import androidx.viewpager.widget.ViewPager import com.gh.common.util.* +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.R import com.gh.gamecenter.common.base.TrackableDialog import com.gh.gamecenter.common.base.adapter.FragmentAdapter diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/CommunityHomeViewModel.kt b/app/src/main/java/com/gh/gamecenter/forum/home/CommunityHomeViewModel.kt index d3c976fd15..4fa40e2284 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/CommunityHomeViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/CommunityHomeViewModel.kt @@ -11,7 +11,7 @@ import com.gh.gamecenter.qa.entity.ArticleDetailEntity import com.gh.gamecenter.qa.entity.ArticleEntity import com.gh.gamecenter.qa.entity.QuestionsDetailEntity import com.gh.gamecenter.qa.entity.TimeEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager class CommunityHomeViewModel(application: Application) : AndroidViewModel(application) { diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/ForumActivityAdapter.kt b/app/src/main/java/com/gh/gamecenter/forum/home/ForumActivityAdapter.kt index e02727982b..c4faac3812 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/ForumActivityAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/ForumActivityAdapter.kt @@ -8,6 +8,7 @@ import com.gh.gamecenter.common.base.BaseRecyclerViewHolder import com.gh.gamecenter.common.constant.ItemViewType import com.gh.common.exposure.time.TimeUtil import com.gh.common.util.* +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.R import com.gh.gamecenter.adapter.viewholder.FooterViewHolder import com.gh.gamecenter.baselist.ListAdapter diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/ForumActivityViewModel.kt b/app/src/main/java/com/gh/gamecenter/forum/home/ForumActivityViewModel.kt index 081383d70f..8c1bf97640 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/ForumActivityViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/ForumActivityViewModel.kt @@ -7,7 +7,7 @@ import com.gh.gamecenter.common.utils.singleToMain import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.entity.ForumActivityCategoryEntity import com.gh.gamecenter.entity.ForumActivityEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Single diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleAskItemViewHolder.kt b/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleAskItemViewHolder.kt index f5d08fe153..203100175c 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleAskItemViewHolder.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleAskItemViewHolder.kt @@ -6,8 +6,11 @@ import android.graphics.Color import android.graphics.drawable.GradientDrawable import android.text.SpannableStringBuilder import android.view.View -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.LogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.R import com.gh.gamecenter.common.callback.ConfirmListener import com.gh.gamecenter.common.utils.* diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleListAdapter.kt b/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleListAdapter.kt index 9ef6db0285..ced9640898 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleListAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleListAdapter.kt @@ -4,17 +4,15 @@ import android.content.Context import android.graphics.Color import android.view.View import android.view.ViewGroup -import android.widget.LinearLayout import androidx.core.content.ContextCompat import androidx.recyclerview.widget.RecyclerView -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.constant.ItemViewType import com.gh.gamecenter.common.syncpage.ISyncAdapterHandler import com.gh.gamecenter.core.utils.MtaHelper import com.gh.common.util.NewLogUtils import com.gh.gamecenter.common.utils.dip2px import com.gh.gamecenter.common.utils.goneIf -import com.gh.common.util.* import com.gh.gamecenter.R import com.gh.gamecenter.adapter.viewholder.FooterViewHolder import com.gh.gamecenter.baselist.ListAdapter diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleListViewModel.kt b/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleListViewModel.kt index 78b0c2afdf..26ef01deee 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleListViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/ForumArticleListViewModel.kt @@ -12,7 +12,7 @@ import com.gh.gamecenter.entity.ForumUnreadEntity import com.gh.gamecenter.entity.ForumVideoEntity import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.qa.entity.ArticleEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.room.AppDatabase import io.reactivex.Observable diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/ForumFragment.kt b/app/src/main/java/com/gh/gamecenter/forum/home/ForumFragment.kt index 63f5b5e7fc..ac002cef8e 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/ForumFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/ForumFragment.kt @@ -18,6 +18,7 @@ import com.ethanhua.skeleton.ViewSkeletonScreen import com.gh.gamecenter.common.base.fragment.LazyFragment import com.gh.gamecenter.common.constant.Constants import com.gh.common.util.* +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.common.view.GridSpacingItemColorDecoration import com.gh.gamecenter.R import com.gh.gamecenter.common.utils.* diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/ForumHomeViewModel.kt b/app/src/main/java/com/gh/gamecenter/forum/home/ForumHomeViewModel.kt index a6b88271d8..a92a8c5d36 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/ForumHomeViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/ForumHomeViewModel.kt @@ -9,7 +9,7 @@ import com.gh.gamecenter.entity.ForumEntity import com.gh.gamecenter.entity.LinkEntity import com.gh.gamecenter.manager.PackagesManager import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Observable import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/ForumViewModel.kt b/app/src/main/java/com/gh/gamecenter/forum/home/ForumViewModel.kt index b7a7994cf2..02eef20134 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/ForumViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/ForumViewModel.kt @@ -10,8 +10,8 @@ import com.gh.gamecenter.entity.ForumBannerEntity import com.gh.gamecenter.entity.ForumEntity import com.gh.gamecenter.entity.ForumUnreadEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/forum/home/HorizontalForumsAdapter.kt b/app/src/main/java/com/gh/gamecenter/forum/home/HorizontalForumsAdapter.kt index 8f98ceefc3..17dc0acdbe 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/home/HorizontalForumsAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/home/HorizontalForumsAdapter.kt @@ -4,6 +4,7 @@ import android.content.Context import android.view.ViewGroup import com.gh.gamecenter.common.base.BaseRecyclerViewHolder import com.gh.common.util.* +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.R import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.core.utils.NumberUtils diff --git a/app/src/main/java/com/gh/gamecenter/forum/list/ForumListVIewModel.kt b/app/src/main/java/com/gh/gamecenter/forum/list/ForumListVIewModel.kt index 8addc80180..55b47d8fca 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/list/ForumListVIewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/list/ForumListVIewModel.kt @@ -5,7 +5,7 @@ import android.app.Application import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.entity.ForumEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Observable import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/forum/moderator/ApplyModeratorViewModel.kt b/app/src/main/java/com/gh/gamecenter/forum/moderator/ApplyModeratorViewModel.kt index 1ee994a1c1..9d5ad22fb8 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/moderator/ApplyModeratorViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/moderator/ApplyModeratorViewModel.kt @@ -6,7 +6,7 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider import com.gh.gamecenter.entity.ApplyModeratorStatusEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/forum/moderator/ModeratorListAdapter.kt b/app/src/main/java/com/gh/gamecenter/forum/moderator/ModeratorListAdapter.kt index 01cedafa38..2076b7c78b 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/moderator/ModeratorListAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/moderator/ModeratorListAdapter.kt @@ -6,6 +6,7 @@ import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import com.gh.gamecenter.common.base.BaseRecyclerViewHolder import com.gh.common.util.* +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.R import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.common.utils.ImageUtils diff --git a/app/src/main/java/com/gh/gamecenter/forum/moderator/ModeratorListViewModel.kt b/app/src/main/java/com/gh/gamecenter/forum/moderator/ModeratorListViewModel.kt index 925e0167fe..07819763b8 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/moderator/ModeratorListViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/moderator/ModeratorListViewModel.kt @@ -10,8 +10,8 @@ import com.gh.gamecenter.R import com.gh.gamecenter.entity.ApplyModeratorStatusEntity import com.gh.gamecenter.entity.PersonalEntity import com.gh.gamecenter.eventbus.EBUserFollow -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.google.gson.JsonObject import com.halo.assistant.HaloApp diff --git a/app/src/main/java/com/gh/gamecenter/forum/search/ForumContentSearchListAdapter.kt b/app/src/main/java/com/gh/gamecenter/forum/search/ForumContentSearchListAdapter.kt index 02c44c53a3..e45d7e7420 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/search/ForumContentSearchListAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/search/ForumContentSearchListAdapter.kt @@ -10,11 +10,12 @@ import android.view.ViewGroup import android.widget.LinearLayout import androidx.core.content.ContextCompat import androidx.recyclerview.widget.RecyclerView -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.base.BaseRecyclerViewHolder import com.gh.gamecenter.common.constant.ItemViewType import com.gh.gamecenter.common.syncpage.ISyncAdapterHandler import com.gh.common.util.* +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.R import com.gh.gamecenter.adapter.viewholder.FooterViewHolder import com.gh.gamecenter.baselist.ListAdapter diff --git a/app/src/main/java/com/gh/gamecenter/forum/search/ForumOrUserSearchDefaultViewModel.kt b/app/src/main/java/com/gh/gamecenter/forum/search/ForumOrUserSearchDefaultViewModel.kt index e3a13cf606..4d175c1d03 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/search/ForumOrUserSearchDefaultViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/search/ForumOrUserSearchDefaultViewModel.kt @@ -5,7 +5,7 @@ import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.MutableLiveData import com.gh.gamecenter.common.utils.observableToMain import com.gh.gamecenter.entity.SettingsEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager class ForumOrUserSearchDefaultViewModel(application: Application) : AndroidViewModel(application) { diff --git a/app/src/main/java/com/gh/gamecenter/forum/search/UserSearchListViewModel.kt b/app/src/main/java/com/gh/gamecenter/forum/search/UserSearchListViewModel.kt index 9c8d6f2915..2462eebc35 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/search/UserSearchListViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/search/UserSearchListViewModel.kt @@ -6,7 +6,7 @@ import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.baselist.LoadType import com.gh.gamecenter.entity.FollowersOrFansEntity import com.gh.gamecenter.eventbus.EBUserFollow -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.Observable diff --git a/app/src/main/java/com/gh/gamecenter/forum/select/ForumSelectViewModel.kt b/app/src/main/java/com/gh/gamecenter/forum/select/ForumSelectViewModel.kt index 743c2be651..1b55f7aeb0 100644 --- a/app/src/main/java/com/gh/gamecenter/forum/select/ForumSelectViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/forum/select/ForumSelectViewModel.kt @@ -8,8 +8,8 @@ import com.gh.gamecenter.entity.ForumCategoryEntity import com.gh.gamecenter.entity.ForumEntity import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.mvvm.Resource -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/fragment/HomeSearchToolWrapperFragment.kt b/app/src/main/java/com/gh/gamecenter/fragment/HomeSearchToolWrapperFragment.kt index 32006fb206..906ef46b5c 100644 --- a/app/src/main/java/com/gh/gamecenter/fragment/HomeSearchToolWrapperFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/fragment/HomeSearchToolWrapperFragment.kt @@ -14,6 +14,8 @@ import androidx.viewpager.widget.ViewPager import com.gh.gamecenter.common.base.adapter.FragmentAdapter import com.gh.common.exposure.ExposureSource import com.gh.common.util.* +import com.gh.common.util.LogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.R import com.gh.gamecenter.amway.AmwayFragment import com.gh.gamecenter.catalog.CatalogFragment diff --git a/app/src/main/java/com/gh/gamecenter/fragment/HomeSearchToolWrapperViewModel.kt b/app/src/main/java/com/gh/gamecenter/fragment/HomeSearchToolWrapperViewModel.kt index 0ca3b1dc03..93c5a61b13 100644 --- a/app/src/main/java/com/gh/gamecenter/fragment/HomeSearchToolWrapperViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/fragment/HomeSearchToolWrapperViewModel.kt @@ -8,7 +8,7 @@ import com.gh.gamecenter.common.utils.toColor import com.gh.gamecenter.BuildConfig import com.gh.gamecenter.R import com.gh.gamecenter.entity.SubjectRecommendEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/fragment/LoginFragment.java b/app/src/main/java/com/gh/gamecenter/fragment/LoginFragment.java index de4d37a3ce..5073cf75a6 100644 --- a/app/src/main/java/com/gh/gamecenter/fragment/LoginFragment.java +++ b/app/src/main/java/com/gh/gamecenter/fragment/LoginFragment.java @@ -29,34 +29,33 @@ import androidx.lifecycle.Lifecycle; import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProviders; -import com.gh.gamecenter.common.base.fragment.WaitingDialogFragment; -import com.gh.gamecenter.common.constant.Constants; import com.gh.common.util.CheckLoginUtils; -import com.gh.gamecenter.common.utils.ExtensionsKt; -import com.gh.gamecenter.core.utils.ClickUtils; import com.gh.common.util.DialogUtils; import com.gh.common.util.EnergyTaskHelper; -import com.gh.gamecenter.common.constant.EntranceConsts; -import com.gh.gamecenter.common.utils.PackageFlavorHelper; import com.gh.common.util.LogUtils; import com.gh.common.util.LoginHelper; import com.gh.common.util.LoginUtils; -import com.gh.gamecenter.core.utils.MtaHelper; -import com.gh.gamecenter.core.utils.PatternUtils; -import com.gh.gamecenter.common.utils.PermissionHelper; import com.gh.common.util.QuickLoginHelper; -import com.gh.gamecenter.core.utils.SPUtils; -import com.gh.gamecenter.LoginActivity; import com.gh.gamecenter.R; import com.gh.gamecenter.WebActivity; +import com.gh.gamecenter.common.base.fragment.NormalFragment; +import com.gh.gamecenter.common.base.fragment.WaitingDialogFragment; +import com.gh.gamecenter.common.constant.Constants; +import com.gh.gamecenter.common.constant.EntranceConsts; +import com.gh.gamecenter.common.utils.ExtensionsKt; +import com.gh.gamecenter.common.utils.PackageFlavorHelper; +import com.gh.gamecenter.common.utils.PermissionHelper; +import com.gh.gamecenter.core.utils.ClickUtils; +import com.gh.gamecenter.core.utils.MtaHelper; +import com.gh.gamecenter.core.utils.PatternUtils; +import com.gh.gamecenter.core.utils.SPUtils; import com.gh.gamecenter.databinding.FragmentLoginBinding; import com.gh.gamecenter.entity.LoginTokenEntity; import com.gh.gamecenter.entity.UserInfoEntity; import com.gh.gamecenter.eventbus.EBReuse; import com.gh.gamecenter.manager.UserManager; -import com.gh.gamecenter.common.base.fragment.NormalFragment; import com.gh.gamecenter.security.BindPhoneActivity; -import com.gh.gamecenter.user.ApiResponse; +import com.gh.gamecenter.common.retrofit.ApiResponse; import com.gh.gamecenter.user.LoginTag; import com.gh.gamecenter.user.UserViewModel; import com.halo.assistant.HaloApp; @@ -91,7 +90,7 @@ public class LoginFragment private String mServiceId; private Animation mShakeAnim; - private int mStatus = LoginActivity.STATUS_DEFAULT; + private int mStatus = QuickLoginHelper.STATUS_DEFAULT; @Override protected void handleMessage(Message msg) { @@ -138,9 +137,9 @@ public class LoginFragment super.onCreate(savedInstanceState); if (getArguments() != null) { - mStatus = getArguments().getInt(EntranceConsts.KEY_SHOW_QUICK_LOGIN, LoginActivity.STATUS_DEFAULT); + mStatus = getArguments().getInt(EntranceConsts.KEY_SHOW_QUICK_LOGIN, QuickLoginHelper.STATUS_DEFAULT); } else { - mStatus = LoginActivity.STATUS_DEFAULT; + mStatus = QuickLoginHelper.STATUS_DEFAULT; } final UserViewModel.Factory factory = new UserViewModel.Factory(HaloApp.getInstance().getApplication()); @@ -189,7 +188,7 @@ public class LoginFragment params.topMargin = screenHeight * 80 / 640; mBinding.loginPhoneContainer.setLayoutParams(params); - if (mStatus == LoginActivity.STATUS_DEFAULT) { + if (mStatus == QuickLoginHelper.STATUS_DEFAULT) { mBinding.quickLoginTv.setVisibility(View.GONE); } else { mBinding.quickLoginTv.setVisibility(View.VISIBLE); @@ -240,9 +239,9 @@ public class LoginFragment super.onClick(v); int id = v.getId(); if (id == R.id.quickLoginTv) { - if (mStatus == LoginActivity.STATUS_FROM_QUICK_LOGIN_PAGE) { + if (mStatus == QuickLoginHelper.STATUS_FROM_QUICK_LOGIN_PAGE) { requireActivity().finish(); - } else if (mStatus == LoginActivity.STATUS_FROM_QUICK_LOGIN_PERMISSION) { + } else if (mStatus == QuickLoginHelper.STATUS_FROM_QUICK_LOGIN_PERMISSION) { showPermissionDialog(); } } else if (id == R.id.checkIv || id == R.id.checkClickView1 || id == R.id.checkClickView2) { @@ -429,7 +428,7 @@ public class LoginFragment if (getActivity() != null && CheckLoginUtils.isLogin()) { getActivity().finish(); // 如果是从一键登录页跳转过来的,登录成功后也要finish一键登录页 - if (mStatus == LoginActivity.STATUS_FROM_QUICK_LOGIN_PAGE) { + if (mStatus == QuickLoginHelper.STATUS_FROM_QUICK_LOGIN_PAGE) { QuickLoginHelper.finishAuthActivity(); } } diff --git a/app/src/main/java/com/gh/gamecenter/fragment/MainWrapperFragment.java b/app/src/main/java/com/gh/gamecenter/fragment/MainWrapperFragment.java index 30f914263a..fd0558c665 100644 --- a/app/src/main/java/com/gh/gamecenter/fragment/MainWrapperFragment.java +++ b/app/src/main/java/com/gh/gamecenter/fragment/MainWrapperFragment.java @@ -30,7 +30,7 @@ import com.gh.common.constant.Config; import com.gh.common.dialog.PrivacyPolicyDialogFragment; import com.gh.common.dialog.ReserveDialog; import com.gh.common.exposure.ExposureSource; -import com.gh.common.tracker.TrackerLogger; +import com.gh.gamecenter.common.tracker.TrackerLogger; import com.gh.common.util.FloatingBackViewManager; import com.gh.common.util.HomeBottomBarHelper; import com.gh.common.util.IntegralLogHelper; diff --git a/app/src/main/java/com/gh/gamecenter/fragment/MainWrapperRepository.kt b/app/src/main/java/com/gh/gamecenter/fragment/MainWrapperRepository.kt index 515ac9aff4..a25ddaecec 100644 --- a/app/src/main/java/com/gh/gamecenter/fragment/MainWrapperRepository.kt +++ b/app/src/main/java/com/gh/gamecenter/fragment/MainWrapperRepository.kt @@ -6,7 +6,7 @@ import com.gh.common.util.HomeBottomBarHelper import com.gh.gamecenter.BuildConfig import com.gh.gamecenter.core.utils.SingletonHolder import com.gh.gamecenter.entity.SubjectRecommendEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/fragment/MainWrapperViewModel.kt b/app/src/main/java/com/gh/gamecenter/fragment/MainWrapperViewModel.kt index 63f0130eab..07921862c6 100644 --- a/app/src/main/java/com/gh/gamecenter/fragment/MainWrapperViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/fragment/MainWrapperViewModel.kt @@ -8,9 +8,7 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider import com.gh.common.util.CheckLoginUtils -import com.gh.common.util.HomeBottomBarHelper import com.gh.common.util.PackageUtils -import com.gh.gamecenter.BuildConfig import com.gh.gamecenter.common.constant.Constants import com.gh.gamecenter.core.utils.SPUtils import com.gh.gamecenter.entity.DialogEntity @@ -18,12 +16,11 @@ import com.gh.gamecenter.entity.SimpleGameEntity import com.gh.gamecenter.entity.SubjectRecommendEntity import com.gh.gamecenter.entity.WelcomeDialogEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers -import retrofit2.HttpException class MainWrapperViewModel(application: Application, repository: MainWrapperRepository) : AndroidViewModel(application) { private val mApi = RetrofitManager.getInstance().api diff --git a/app/src/main/java/com/gh/gamecenter/game/GameFragmentAdapter.kt b/app/src/main/java/com/gh/gamecenter/game/GameFragmentAdapter.kt index e40098afdd..2b33fe21b6 100644 --- a/app/src/main/java/com/gh/gamecenter/game/GameFragmentAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/game/GameFragmentAdapter.kt @@ -17,6 +17,8 @@ import com.gh.common.databind.BindingAdapters import com.gh.common.exposure.* import com.gh.gamecenter.core.runOnIoThread import com.gh.common.util.* +import com.gh.common.util.LogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.BlockActivity import com.gh.gamecenter.GameDetailActivity import com.gh.gamecenter.MainActivity @@ -26,6 +28,7 @@ import com.gh.gamecenter.adapter.viewholder.* import com.gh.gamecenter.baselist.LoadStatus import com.gh.gamecenter.category.CategoryDirectoryActivity import com.gh.gamecenter.common.constant.EntranceConsts +import com.gh.gamecenter.common.entity.ExposureEntity import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.common.view.FixGridLayoutManager import com.gh.gamecenter.common.view.GridSpacingItemDecoration diff --git a/app/src/main/java/com/gh/gamecenter/game/GameNavigationAdapter.kt b/app/src/main/java/com/gh/gamecenter/game/GameNavigationAdapter.kt index 5b031919b3..00199e2fe9 100644 --- a/app/src/main/java/com/gh/gamecenter/game/GameNavigationAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/game/GameNavigationAdapter.kt @@ -10,6 +10,7 @@ import com.gh.common.util.* import com.gh.gamecenter.baselist.ListAdapter import com.gh.gamecenter.common.base.BaseRecyclerViewHolder import com.gh.gamecenter.common.constant.Constants +import com.gh.gamecenter.common.entity.ExposureEntity import com.gh.gamecenter.common.utils.ImageUtils import com.gh.gamecenter.common.utils.goneIf import com.gh.gamecenter.common.utils.safelyGetInRelease diff --git a/app/src/main/java/com/gh/gamecenter/game/GameViewModel.kt b/app/src/main/java/com/gh/gamecenter/game/GameViewModel.kt index dc125a4447..a74ac8df51 100644 --- a/app/src/main/java/com/gh/gamecenter/game/GameViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/game/GameViewModel.kt @@ -5,7 +5,7 @@ import android.app.Application import android.text.TextUtils import androidx.collection.ArrayMap import androidx.lifecycle.* -import com.gh.common.exposure.ExposureEntity +import com.gh.gamecenter.common.entity.ExposureEntity import com.gh.common.filter.RegionSettingHelper import com.gh.gamecenter.core.iinterface.IOffsetable import com.gh.common.util.* @@ -24,8 +24,8 @@ import com.gh.gamecenter.game.data.GameSubjectData import com.gh.gamecenter.game.rank.RankCollectionAdapter import com.gh.gamecenter.gamecollection.square.GameCollectionListItemData import com.gh.gamecenter.home.BlankDividerViewHolder -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.fragment.SettingsFragment import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/gamecenter/game/columncollection/detail/ColumnCollectionDetailViewModel.kt b/app/src/main/java/com/gh/gamecenter/game/columncollection/detail/ColumnCollectionDetailViewModel.kt index 10d11f059d..e6403fa293 100644 --- a/app/src/main/java/com/gh/gamecenter/game/columncollection/detail/ColumnCollectionDetailViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/game/columncollection/detail/ColumnCollectionDetailViewModel.kt @@ -10,7 +10,7 @@ import com.gh.gamecenter.baselist.LoadStatus import com.gh.gamecenter.baselist.LoadType import com.gh.gamecenter.entity.GameColumnCollection import com.gh.gamecenter.entity.LinkEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.Observable diff --git a/app/src/main/java/com/gh/gamecenter/game/upload/GameSubmissionActivity.kt b/app/src/main/java/com/gh/gamecenter/game/upload/GameSubmissionActivity.kt index 537c362dec..67db15b363 100644 --- a/app/src/main/java/com/gh/gamecenter/game/upload/GameSubmissionActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/game/upload/GameSubmissionActivity.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.game.upload import android.content.Context import android.content.Intent import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.NormalActivity import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/game/upload/GameUploadViewModel.kt b/app/src/main/java/com/gh/gamecenter/game/upload/GameUploadViewModel.kt index de9c039121..badf0f9cb9 100644 --- a/app/src/main/java/com/gh/gamecenter/game/upload/GameUploadViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/game/upload/GameUploadViewModel.kt @@ -7,10 +7,10 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager -import com.gh.gamecenter.user.ApiResponse +import com.gh.gamecenter.common.retrofit.ApiResponse import com.google.gson.JsonObject import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailAdapter.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailAdapter.kt index ae233063d4..479383593b 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailAdapter.kt @@ -20,6 +20,7 @@ import com.gh.gamecenter.common.syncpage.SyncDataEntity import com.gh.gamecenter.common.syncpage.SyncFieldConstants import com.gh.gamecenter.common.syncpage.SyncPageRepository import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.gamecenter.common.view.DrawableView import com.gh.gamecenter.common.view.GridSpacingItemColorDecoration import com.gh.gamecenter.GameDetailActivity diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailFragment.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailFragment.kt index cc17f78364..85e87ec594 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailFragment.kt @@ -20,7 +20,9 @@ import com.gh.common.history.HistoryHelper import com.gh.gamecenter.common.syncpage.SyncDataEntity import com.gh.gamecenter.common.syncpage.SyncFieldConstants import com.gh.gamecenter.common.syncpage.SyncPageRepository -import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.DirectUtils +import com.gh.common.util.NewLogUtils import com.gh.common.xapk.XapkInstaller import com.gh.common.xapk.XapkUnzipStatus import com.gh.download.DownloadManager @@ -28,16 +30,18 @@ import com.gh.gamecenter.R import com.gh.gamecenter.baselist.ListFragment import com.gh.gamecenter.baselist.LoadType import com.gh.gamecenter.common.constant.EntranceConsts -import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.common.view.SegmentedFilterView -import com.gh.gamecenter.core.utils.* import com.gh.gamecenter.databinding.FragmentGameCollectionDetailBinding import com.gh.gamecenter.databinding.LayoutGameCollectionTagBinding import com.gh.gamecenter.entity.GamesCollectionDetailEntity -import com.gh.gamecenter.entity.NormalShareEntity +import com.gh.gamecenter.common.entity.NormalShareEntity import com.gh.gamecenter.eventbus.EBDownloadStatus import com.gh.gamecenter.eventbus.EBPackage -import com.gh.gamecenter.eventbus.EBShare +import com.gh.gamecenter.common.eventbus.EBShare +import com.gh.gamecenter.common.utils.* +import com.gh.gamecenter.core.utils.DisplayUtils +import com.gh.gamecenter.core.utils.MD5Utils +import com.gh.gamecenter.core.utils.SPUtils import com.gh.gamecenter.eventbus.EBUserFollow import com.gh.gamecenter.gamedetail.GameDetailFragment import com.gh.gamecenter.home.video.ScrollCalculatorHelper @@ -1019,7 +1023,7 @@ class GameCollectionDetailFragment : } fun logEvent(event: String, shareType: String = "") { - NewLogUtils.logViewOrClickGameCollectionDetail( + com.gh.gamecenter.common.utils.NewLogUtils.logViewOrClickGameCollectionDetail( event, mGameCollectionTitle, mGameCollectionId, diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailViewModel.kt index 67fc2887ca..b91d92061d 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionDetailViewModel.kt @@ -25,9 +25,9 @@ import com.gh.gamecenter.eventbus.EBUserFollow import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.qa.article.detail.CommentItemData import com.gh.gamecenter.qa.comment.base.BaseCommentViewModel -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.EmptyResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.EmptyResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionPosterViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionPosterViewModel.kt index e5c93a1b28..48c00474c4 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionPosterViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionPosterViewModel.kt @@ -5,7 +5,7 @@ import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.MutableLiveData import com.gh.gamecenter.R import com.gh.gamecenter.eventbus.EBUserFollow -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionShareDialog.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionShareDialog.kt index 113ff7decb..65d7698247 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionShareDialog.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/GameCollectionShareDialog.kt @@ -6,13 +6,14 @@ import android.view.View import android.view.ViewGroup import androidx.appcompat.app.AppCompatActivity import com.gh.gamecenter.common.base.fragment.BaseDraggableDialogFragment -import com.gh.common.util.* import com.gh.gamecenter.R +import com.gh.gamecenter.common.utils.ShareUtils import com.gh.gamecenter.common.utils.toColor import com.gh.gamecenter.common.utils.toDrawable import com.gh.gamecenter.databinding.DialogGameCollectionShareBinding -import com.gh.gamecenter.entity.NormalShareEntity -import com.gh.gamecenter.eventbus.EBShare +import com.gh.gamecenter.common.entity.NormalShareEntity +import com.gh.gamecenter.common.eventbus.EBShare +import com.gh.gamecenter.common.utils.NewLogUtils import org.greenrobot.eventbus.EventBus class GameCollectionShareDialog : BaseDraggableDialogFragment() { diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/conversation/GameCollectionCommentConversationViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/conversation/GameCollectionCommentConversationViewModel.kt index 411eaf376f..131883d36d 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/detail/conversation/GameCollectionCommentConversationViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/detail/conversation/GameCollectionCommentConversationViewModel.kt @@ -7,7 +7,7 @@ import androidx.lifecycle.ViewModelProvider import com.gh.gamecenter.entity.CommentEntity import com.gh.gamecenter.gamecollection.detail.GameCollectionDetailViewModel import com.gh.gamecenter.qa.article.detail.CommentItemData -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import io.reactivex.Single import io.reactivex.schedulers.Schedulers import retrofit2.HttpException diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/mine/MyGameCollectionViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/mine/MyGameCollectionViewModel.kt index 1ee431c191..fee5277cb5 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/mine/MyGameCollectionViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/mine/MyGameCollectionViewModel.kt @@ -7,7 +7,7 @@ import com.gh.gamecenter.common.utils.observableToMain import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.entity.GamesCollectionEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Observable import okhttp3.ResponseBody diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/publish/ChooseGameCollectionDefaultCoverDialog.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/publish/ChooseGameCollectionDefaultCoverDialog.kt index c24d9e8a39..2947859bfb 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/publish/ChooseGameCollectionDefaultCoverDialog.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/publish/ChooseGameCollectionDefaultCoverDialog.kt @@ -16,6 +16,7 @@ import androidx.recyclerview.widget.GridLayoutManager import com.gh.gamecenter.common.base.fragment.BaseDialogFragment import androidx.recyclerview.widget.RecyclerView import com.gh.common.util.* +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.common.view.GridSpacingItemColorDecoration import com.gh.gamecenter.R import com.gh.gamecenter.common.constant.EntranceConsts diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/publish/ChooseGameCollectionDefaultCoverViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/publish/ChooseGameCollectionDefaultCoverViewModel.kt index 1d3dac4063..e36e0ea0d2 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/publish/ChooseGameCollectionDefaultCoverViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/publish/ChooseGameCollectionDefaultCoverViewModel.kt @@ -8,7 +8,7 @@ import androidx.lifecycle.ViewModelProvider import com.gh.gamecenter.core.utils.ToastUtils import com.gh.gamecenter.common.utils.observableToMain import com.gh.gamecenter.entity.GameCollectionCoverEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import retrofit2.HttpException diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionActivityLabelViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionActivityLabelViewModel.kt index 79c65f6f3f..6c0b86956c 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionActivityLabelViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionActivityLabelViewModel.kt @@ -5,7 +5,7 @@ import android.app.Application import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.MutableLiveData import com.gh.gamecenter.entity.ActivityLabelEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionEditActivity.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionEditActivity.kt index 7ec941067b..f299e2f0ba 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionEditActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionEditActivity.kt @@ -10,15 +10,15 @@ import android.view.View import android.widget.TextView import androidx.core.widget.doOnTextChanged import com.gh.base.ToolBarActivity +import com.gh.common.util.ErrorHelper +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.common.base.fragment.WaitingDialogFragment import com.gh.gamecenter.common.constant.Constants -import com.gh.common.util.* import com.gh.gamecenter.CropImageActivity import com.gh.gamecenter.R import com.gh.gamecenter.WebActivity import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.common.utils.* -import com.gh.gamecenter.common.utils.ImageUtils import com.gh.gamecenter.core.utils.PatternUtils import com.gh.gamecenter.databinding.ActivityGameCollectionEditBinding import com.gh.gamecenter.databinding.ItemGameCollectionFlexTagBinding diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionEditViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionEditViewModel.kt index 7f113ff4f9..c8fca51e69 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionEditViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/publish/GameCollectionEditViewModel.kt @@ -17,8 +17,8 @@ import com.gh.gamecenter.entity.GameCollectionDraft import com.gh.gamecenter.entity.GamesCollectionEntity import com.gh.gamecenter.entity.TagInfoEntity import com.gh.gamecenter.mvvm.Resource -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.room.AppDatabase import okhttp3.ResponseBody diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionBannerAdapter.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionBannerAdapter.kt index 91e38ccee2..91ad2ace3f 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionBannerAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionBannerAdapter.kt @@ -6,6 +6,7 @@ import androidx.recyclerview.widget.RecyclerView import com.gh.common.exposure.* import com.gh.common.util.DirectUtils import com.gh.gamecenter.common.base.BaseRecyclerViewHolder +import com.gh.gamecenter.common.entity.ExposureEntity import com.gh.gamecenter.common.utils.ImageUtils import com.gh.gamecenter.common.utils.safelyGetInRelease import com.gh.gamecenter.common.utils.toBinding diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareActivity.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareActivity.kt index 5c45108156..38e65b49bb 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareActivity.kt @@ -1,7 +1,7 @@ package com.gh.gamecenter.gamecollection.square import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.common.util.GameCollectionSquareBrowseTaskHelper import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareAdapter.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareAdapter.kt index cbb6f4e9c0..7359c113ff 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareAdapter.kt @@ -16,7 +16,7 @@ import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.PagerSnapHelper import androidx.recyclerview.widget.RecyclerView import androidx.viewpager2.widget.ViewPager2 -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.constant.ItemViewType import com.gh.common.exposure.ExposureEvent import com.gh.common.exposure.ExposureSource @@ -24,11 +24,13 @@ import com.gh.common.exposure.IExposable import com.gh.common.util.* import com.gh.gamecenter.common.utils.ImageUtils.display import com.gh.common.exposure.* +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.GameDetailActivity import com.gh.gamecenter.R import com.gh.gamecenter.adapter.viewholder.FooterViewHolder import com.gh.gamecenter.baselist.ListAdapter import com.gh.gamecenter.baselist.LoadStatus +import com.gh.gamecenter.common.entity.ExposureEntity import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.common.view.ScrollEventListener import com.gh.gamecenter.core.utils.DisplayUtils diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareFragment.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareFragment.kt index 364a936bd3..22c6b64df3 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareFragment.kt @@ -24,6 +24,7 @@ import com.ethanhua.skeleton.Skeleton import com.gh.common.exposure.* import com.gh.gamecenter.common.constant.Constants import com.gh.common.util.* +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.common.view.SegmentedFilterView import com.gh.gamecenter.common.view.VerticalItemDecoration import com.gh.gamecenter.R @@ -31,6 +32,7 @@ import com.gh.gamecenter.baselist.LazyListFragment import com.gh.gamecenter.baselist.ListAdapter import com.gh.gamecenter.baselist.LoadType import com.gh.gamecenter.common.constant.EntranceConsts +import com.gh.gamecenter.common.entity.ExposureEntity import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.common.view.ScrollEventListener import com.gh.gamecenter.core.utils.* diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareViewModel.kt index a6c65468fe..72bcfe8195 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/square/GameCollectionSquareViewModel.kt @@ -8,7 +8,7 @@ import com.gh.gamecenter.baselist.LoadParams import com.gh.gamecenter.baselist.LoadStatus import com.gh.gamecenter.baselist.LoadType import com.gh.gamecenter.entity.* -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Observable import io.reactivex.Single diff --git a/app/src/main/java/com/gh/gamecenter/gamecollection/tag/GameCollectionTagViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamecollection/tag/GameCollectionTagViewModel.kt index 57079de6bf..6a9363e402 100644 --- a/app/src/main/java/com/gh/gamecenter/gamecollection/tag/GameCollectionTagViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamecollection/tag/GameCollectionTagViewModel.kt @@ -5,7 +5,7 @@ import android.app.Application import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.MutableLiveData import com.gh.gamecenter.entity.GameCollectionTagEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt index a08b30cc76..eff990c309 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailFragment.kt @@ -28,6 +28,9 @@ import com.gh.gamecenter.core.iinterface.IScrollable import com.gh.common.repository.ReservationRepository import com.gh.common.simulator.SimulatorGameManager import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.LogUtils +import com.gh.common.util.NewLogUtils import com.gh.common.view.FlexLinearLayout import com.gh.gamecenter.common.view.WrapContentDraweeView import com.gh.common.xapk.XapkInstaller diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailViewModel.kt index 2a16b61198..a86ba4a5fd 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/GameDetailViewModel.kt @@ -26,8 +26,8 @@ import com.gh.gamecenter.gamedetail.entity.DetailEntity import com.gh.gamecenter.gamedetail.entity.NewGameDetailEntity import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.mvvm.Resource -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescAdapter.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescAdapter.kt index c0ade48de2..8d89732d40 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescAdapter.kt @@ -26,6 +26,9 @@ import com.gh.common.exposure.ExposureEvent import com.gh.common.exposure.ExposureManager import com.gh.common.exposure.ExposureSource import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.LogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.common.view.GridSpacingItemColorDecoration import com.gh.gamecenter.common.view.divider.HorizontalDividerItemDecoration import com.gh.gamecenter.GameNewsActivity diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescCommentsAdapter.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescCommentsAdapter.kt index 8ddea93572..ce4a0d33aa 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescCommentsAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescCommentsAdapter.kt @@ -10,10 +10,11 @@ import android.widget.PopupWindow import android.widget.TextView import androidx.core.content.ContextCompat import androidx.recyclerview.widget.RecyclerView -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.constant.Constants import com.gh.gamecenter.common.constant.ItemViewType import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.gamecenter.R import com.gh.gamecenter.baselist.ListAdapter import com.gh.gamecenter.common.callback.ConfirmListener diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescViewModel.kt index 3c64c4a63f..4381d820e7 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/desc/DescViewModel.kt @@ -22,7 +22,7 @@ import com.gh.gamecenter.entity.SubjectEntity import com.gh.gamecenter.gamedetail.entity.CustomColumn import com.gh.gamecenter.gamedetail.entity.DetailEntity import com.gh.gamecenter.gamedetail.entity.GameInfo -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/desc/GameDetailInfoItemAdapter.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/desc/GameDetailInfoItemAdapter.kt index 462ca79baa..9ac3575560 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/desc/GameDetailInfoItemAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/desc/GameDetailInfoItemAdapter.kt @@ -11,6 +11,7 @@ import com.gh.common.util.* import com.gh.gamecenter.R import com.gh.gamecenter.WebActivity import com.gh.gamecenter.common.utils.DialogHelper +import com.gh.gamecenter.common.utils.ShareUtils import com.gh.gamecenter.core.utils.TimeUtils import com.gh.gamecenter.common.utils.copyTextAndToast import com.gh.gamecenter.common.utils.toBinding diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/desc/GameRaidersAdapter.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/desc/GameRaidersAdapter.kt index 770d0a4a87..1dabfb6ede 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/desc/GameRaidersAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/desc/GameRaidersAdapter.kt @@ -6,6 +6,7 @@ import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import com.gh.common.DefaultUrlHandler import com.gh.common.util.* +import com.gh.common.util.LogUtils import com.gh.gamecenter.NewsDetailActivity import com.gh.gamecenter.R import com.gh.gamecenter.common.utils.* diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/dialog/GameDetailMoreDialog.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/dialog/GameDetailMoreDialog.kt index 55efed24bb..716e429e0b 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/dialog/GameDetailMoreDialog.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/dialog/GameDetailMoreDialog.kt @@ -8,7 +8,7 @@ import androidx.appcompat.app.AppCompatActivity import com.gh.gamecenter.common.base.fragment.BaseDraggableDialogFragment import com.gh.common.util.EnergyTaskHelper.postEnergyTask import com.gh.gamecenter.core.utils.MtaHelper -import com.gh.common.util.ShareUtils +import com.gh.gamecenter.common.utils.ShareUtils import com.gh.gamecenter.common.utils.isPublishEnv import com.gh.gamecenter.R import com.gh.gamecenter.SuggestionActivity diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/dialog/InviteCodeDialog.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/dialog/InviteCodeDialog.kt index 894001b424..e1804977af 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/dialog/InviteCodeDialog.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/dialog/InviteCodeDialog.kt @@ -10,7 +10,7 @@ import com.gh.gamecenter.core.utils.ToastUtils import com.gh.gamecenter.databinding.DialogInviteCodeBinding import com.gh.gamecenter.eventbus.EBTask import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.security.BindPhoneActivity import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/fuli/FuLiFragment.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/fuli/FuLiFragment.kt index d4143fde73..44b3cdf686 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/fuli/FuLiFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/fuli/FuLiFragment.kt @@ -11,6 +11,7 @@ import com.ethanhua.skeleton.ViewSkeletonScreen import com.gh.gamecenter.common.base.fragment.LazyFragment import com.gh.gamecenter.core.iinterface.IScrollable import com.gh.common.util.* +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.R import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.common.utils.* diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/fuli/kaifu/ServersCalendarViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/fuli/kaifu/ServersCalendarViewModel.kt index 8d4a4ca246..443e0ab83a 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/fuli/kaifu/ServersCalendarViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/fuli/kaifu/ServersCalendarViewModel.kt @@ -8,7 +8,7 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider import com.gh.gamecenter.common.utils.throwExceptionInDebug import com.gh.gamecenter.entity.* -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Single import io.reactivex.SingleEmitter diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/history/HistoryApkListActivity.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/history/HistoryApkListActivity.kt index 1ede9cadf3..ebf4ccf958 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/history/HistoryApkListActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/history/HistoryApkListActivity.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.gamedetail.history import android.content.Context import android.content.Intent import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.NormalActivity import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/history/HistoryApkListViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/history/HistoryApkListViewModel.kt index 70bdaf5f8e..f11a0fdff2 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/history/HistoryApkListViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/history/HistoryApkListViewModel.kt @@ -9,7 +9,7 @@ import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.baselist.LoadType import com.gh.gamecenter.entity.ApkEntity import com.gh.gamecenter.entity.GameEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.download.DownloadEntity import io.reactivex.Single diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/myrating/MyRatingActivity.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/myrating/MyRatingActivity.kt index edb2f5f7fd..6df435d0aa 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/myrating/MyRatingActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/myrating/MyRatingActivity.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.gamedetail.myrating import android.content.Context import android.content.Intent import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.NormalActivity import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/myrating/MyRatingViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/myrating/MyRatingViewModel.kt index 7e3bfe5433..24a5777741 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/myrating/MyRatingViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/myrating/MyRatingViewModel.kt @@ -8,7 +8,7 @@ import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.entity.ErrorEntity import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.personalhome.rating.MyRating -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.Observable diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingAdapter.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingAdapter.kt index e1c21bfcbd..42ef1c0c75 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingAdapter.kt @@ -11,6 +11,8 @@ import androidx.core.content.ContextCompat import androidx.recyclerview.widget.RecyclerView import com.gh.gamecenter.common.constant.ItemViewType import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.R import com.gh.gamecenter.adapter.viewholder.FooterViewHolder import com.gh.gamecenter.baselist.ListAdapter diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingCommentItemViewHolder.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingCommentItemViewHolder.kt index 762e82dba8..4e61de6656 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingCommentItemViewHolder.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingCommentItemViewHolder.kt @@ -18,10 +18,12 @@ import android.widget.LinearLayout import android.widget.PopupWindow import android.widget.TextView import androidx.core.content.ContextCompat -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.base.BaseRecyclerViewHolder import com.gh.gamecenter.common.constant.Constants import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.common.view.CustomLinkMovementMethod import com.gh.gamecenter.common.view.DrawableView import com.gh.gamecenter.R @@ -40,7 +42,6 @@ import com.squareup.picasso.Picasso import io.reactivex.Single import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers -import splitties.views.setCompoundDrawables import java.util.regex.Pattern class RatingCommentItemViewHolder(val binding: RatingCommentItemBinding) : BaseRecyclerViewHolder(binding.root) { diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyActivity.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyActivity.kt index a5cfc0a4b1..f63f389be9 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyActivity.kt @@ -14,6 +14,7 @@ import androidx.recyclerview.widget.RecyclerView import com.gh.gamecenter.common.base.fragment.WaitingDialogFragment import com.gh.common.exposure.ExposureManager import com.gh.common.util.* +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.common.view.VerticalItemDecoration import com.gh.download.DownloadManager import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyAdapter.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyAdapter.kt index 344be86179..41cce85646 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyAdapter.kt @@ -13,7 +13,7 @@ import android.view.View import android.view.ViewGroup import androidx.core.content.ContextCompat import androidx.recyclerview.widget.RecyclerView -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.base.BaseRecyclerViewHolder import com.gh.gamecenter.common.constant.Constants import com.gh.gamecenter.common.constant.ItemViewType @@ -21,6 +21,8 @@ import com.gh.common.exposure.ExposureEvent import com.gh.common.exposure.ExposureSource import com.gh.common.exposure.IExposable import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.common.view.CustomLinkMovementMethod import com.gh.gamecenter.common.view.DrawableView import com.gh.gamecenter.GameDetailActivity diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyViewModel.kt index 74f1b02a05..bb3204b6a5 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingReplyViewModel.kt @@ -20,7 +20,7 @@ import com.gh.gamecenter.entity.ErrorEntity import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.entity.RatingComment import com.gh.gamecenter.entity.RatingReplyEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingViewModel.kt index db3bd819e5..fe8f32044b 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/RatingViewModel.kt @@ -18,7 +18,7 @@ import com.gh.gamecenter.entity.ErrorEntity import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.entity.Rating import com.gh.gamecenter.entity.RatingComment -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.Observable diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/edit/RatingEditActivity.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/edit/RatingEditActivity.kt index 4f6cc46bc2..35ba8ec316 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/edit/RatingEditActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/edit/RatingEditActivity.kt @@ -19,12 +19,15 @@ import com.gh.gamecenter.core.AppExecutor import com.gh.common.DefaultJsApi import com.gh.gamecenter.common.constant.Constants import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.common.view.dsbridge.DWebView import com.gh.gamecenter.common.view.dsbridge.OnReturnValue import com.gh.gamecenter.BuildConfig import com.gh.gamecenter.R import com.gh.gamecenter.ShellActivity import com.gh.gamecenter.WebActivity +import com.gh.gamecenter.common.callback.CancelListener import com.gh.gamecenter.common.callback.ConfirmListener import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.common.utils.* @@ -302,15 +305,16 @@ class RatingEditActivity : ToolBarActivity(), KeyboardHeightObserver { this@RatingEditActivity, true, "提示", "检测到您评论的内容中含有反映游戏问题相关内容,可选择点击下方联系客服按钮,将问题反馈给客服,以便更优解决!", "联系客服", "继续提交", - object :ConfirmListener{ - override fun onConfirm() { - DirectUtils.directToWebView(this@RatingEditActivity, Constants.TENCENT_QIDIAN_ADDRESS, mEntrance) - MtaHelper.onEvent("游戏评论跳转", "联系客服弹窗", "点击联系客服") - } - }, - { - postGameComment(again = true) - MtaHelper.onEvent("游戏评论跳转", "联系客服弹窗", "点击继续提交") + object : ConfirmListener { + override fun onConfirm() { + DirectUtils.directToWebView(this@RatingEditActivity, Constants.TENCENT_QIDIAN_ADDRESS, mEntrance) + MtaHelper.onEvent("游戏评论跳转", "联系客服弹窗", "点击联系客服") + } + }, object : CancelListener { + override fun onCancel() { + postGameComment(again = true) + MtaHelper.onEvent("游戏评论跳转", "联系客服弹窗", "点击继续提交") + } }, TrackableEntity(event = "游戏评论跳转", key = "联系客服弹窗") ) } @@ -321,7 +325,7 @@ class RatingEditActivity : ToolBarActivity(), KeyboardHeightObserver { this@RatingEditActivity, "提示", "检测到您评论的内容中含有反映游戏问题相关内容,可选择点击下方问题反馈按钮,将问题反馈给后台客服,以便更优解决!", "问题反馈", "继续提交", - object :ConfirmListener{ + object : ConfirmListener { override fun onConfirm() { MtaHelper.onEvent("游戏评论跳转", "意见反馈弹窗", "点击问题反馈") mBinding.mWebView.callHandler("getComment", OnReturnValue { content -> @@ -335,10 +339,11 @@ class RatingEditActivity : ToolBarActivity(), KeyboardHeightObserver { finish() }) } - }, - { - MtaHelper.onEvent("游戏评论跳转", "意见反馈弹窗", "点击继续提交") - postGameComment(again = true) + }, object : CancelListener { + override fun onCancel() { + MtaHelper.onEvent("游戏评论跳转", "意见反馈弹窗", "点击继续提交") + postGameComment(again = true) + } }, TrackableEntity(event = "游戏评论跳转", key = "意见反馈弹窗") ) } @@ -487,7 +492,7 @@ class RatingEditActivity : ToolBarActivity(), KeyboardHeightObserver { override fun onNightModeChange() { super.onNightModeChange() - updateStatusBarColor( R.color.black, R.color.white) + updateStatusBarColor(R.color.black, R.color.white) mBinding.mWebView.enableForceDark(NightModeUtils.isNightMode(this)) } diff --git a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/edit/RatingEditViewModel.kt b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/edit/RatingEditViewModel.kt index 57db61389a..0d8f76888d 100644 --- a/app/src/main/java/com/gh/gamecenter/gamedetail/rating/edit/RatingEditViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/gamedetail/rating/edit/RatingEditViewModel.kt @@ -14,8 +14,8 @@ import com.gh.gamecenter.common.utils.tryWithDefaultCatch import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.entity.RatingComment import com.gh.gamecenter.mvvm.Resource -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/geetest/GeetestUtils.java b/app/src/main/java/com/gh/gamecenter/geetest/GeetestUtils.java index 1712bd2202..2b0c2bb822 100644 --- a/app/src/main/java/com/gh/gamecenter/geetest/GeetestUtils.java +++ b/app/src/main/java/com/gh/gamecenter/geetest/GeetestUtils.java @@ -5,7 +5,7 @@ import android.content.Context; import android.content.DialogInterface; import com.gh.gamecenter.core.utils.AppDebugConfig; -import com.gh.gamecenter.retrofit.JSONObjectResponse; +import com.gh.gamecenter.common.retrofit.JSONObjectResponse; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.utils.RuntimeUtils; import com.lightgame.utils.Utils; diff --git a/app/src/main/java/com/gh/gamecenter/help/HelpContainerViewModel.kt b/app/src/main/java/com/gh/gamecenter/help/HelpContainerViewModel.kt index 71fec2a466..1798a1a37e 100644 --- a/app/src/main/java/com/gh/gamecenter/help/HelpContainerViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/help/HelpContainerViewModel.kt @@ -8,7 +8,7 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider import com.gh.gamecenter.entity.HelpCategoryEntity import com.gh.gamecenter.mvvm.Resource -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/help/HelpQaCategoryViewModel.kt b/app/src/main/java/com/gh/gamecenter/help/HelpQaCategoryViewModel.kt index ce51e8f8e3..c305add261 100644 --- a/app/src/main/java/com/gh/gamecenter/help/HelpQaCategoryViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/help/HelpQaCategoryViewModel.kt @@ -8,7 +8,7 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider import com.gh.gamecenter.entity.HelpCategoryEntity import com.gh.gamecenter.mvvm.Resource -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/help/QaFeedbackViewModel.kt b/app/src/main/java/com/gh/gamecenter/help/QaFeedbackViewModel.kt index 2f1b9f5791..02c96870f0 100644 --- a/app/src/main/java/com/gh/gamecenter/help/QaFeedbackViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/help/QaFeedbackViewModel.kt @@ -12,7 +12,7 @@ import com.gh.common.util.PackageUtils import com.gh.gamecenter.common.utils.singleToMain import com.gh.gamecenter.common.utils.toRequestBody import com.gh.gamecenter.R -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.walkud.rom.checker.RomIdentifier diff --git a/app/src/main/java/com/gh/gamecenter/home/HomeFragment.kt b/app/src/main/java/com/gh/gamecenter/home/HomeFragment.kt index 67a54dafaa..2dab8bb5bf 100644 --- a/app/src/main/java/com/gh/gamecenter/home/HomeFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/home/HomeFragment.kt @@ -12,6 +12,7 @@ import com.gh.gamecenter.common.constant.Constants import com.gh.common.databind.BindingAdapters import com.gh.common.exposure.ExposureListener import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.gamecenter.common.view.OffsetLinearLayoutManager import com.gh.common.xapk.XapkInstaller import com.gh.common.xapk.XapkUnzipStatus diff --git a/app/src/main/java/com/gh/gamecenter/home/HomeViewModel.kt b/app/src/main/java/com/gh/gamecenter/home/HomeViewModel.kt index b13721f08a..663d76eaa4 100644 --- a/app/src/main/java/com/gh/gamecenter/home/HomeViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/home/HomeViewModel.kt @@ -18,8 +18,8 @@ import com.gh.gamecenter.entity.* import com.gh.gamecenter.game.rank.RankCollectionAdapter import com.gh.gamecenter.gamecollection.square.GameCollectionListItemData import com.gh.gamecenter.packagehelper.PackageRepository -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.halo.assistant.fragment.SettingsFragment diff --git a/app/src/main/java/com/gh/gamecenter/home/LegacyHomeFragmentAdapterAssistant.kt b/app/src/main/java/com/gh/gamecenter/home/LegacyHomeFragmentAdapterAssistant.kt index ee520dca66..de0097f2f0 100644 --- a/app/src/main/java/com/gh/gamecenter/home/LegacyHomeFragmentAdapterAssistant.kt +++ b/app/src/main/java/com/gh/gamecenter/home/LegacyHomeFragmentAdapterAssistant.kt @@ -15,6 +15,8 @@ import com.gh.common.exposure.ExposureEvent import com.gh.common.exposure.ExposureSource import com.gh.gamecenter.core.iinterface.IOffsetable import com.gh.common.util.* +import com.gh.common.util.LogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.GameDetailActivity import com.gh.gamecenter.MainActivity import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/home/gamecollection/HomeGameCollectionAdapter.kt b/app/src/main/java/com/gh/gamecenter/home/gamecollection/HomeGameCollectionAdapter.kt index 3688f52f7e..c561c58a8e 100644 --- a/app/src/main/java/com/gh/gamecenter/home/gamecollection/HomeGameCollectionAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/home/gamecollection/HomeGameCollectionAdapter.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.home.gamecollection import android.content.Context import android.view.View import android.view.ViewGroup -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.base.BaseRecyclerViewHolder import com.gh.common.util.* import com.gh.common.view.AsyncCell diff --git a/app/src/main/java/com/gh/gamecenter/home/skip/PackageSkipActivity.kt b/app/src/main/java/com/gh/gamecenter/home/skip/PackageSkipActivity.kt index 85ac31e5fa..1000f1a127 100644 --- a/app/src/main/java/com/gh/gamecenter/home/skip/PackageSkipActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/home/skip/PackageSkipActivity.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.home.skip import android.content.Context import android.content.Intent import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.gamecenter.R import com.gh.gamecenter.entity.GameEntity diff --git a/app/src/main/java/com/gh/gamecenter/info/ConcernAdapter.java b/app/src/main/java/com/gh/gamecenter/info/ConcernAdapter.java index c7420185e0..092ea6bb1a 100644 --- a/app/src/main/java/com/gh/gamecenter/info/ConcernAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/info/ConcernAdapter.java @@ -34,9 +34,9 @@ import com.gh.gamecenter.entity.ViewsEntity; import com.gh.gamecenter.manager.CommentManager; import com.gh.gamecenter.manager.UserManager; import com.gh.gamecenter.manager.VisitManager; -import com.gh.gamecenter.retrofit.JSONObjectResponse; -import com.gh.gamecenter.retrofit.ObservableUtil; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.JSONObjectResponse; +import com.gh.gamecenter.common.retrofit.ObservableUtil; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.adapter.BaseRecyclerAdapter; import com.lightgame.utils.Utils; diff --git a/app/src/main/java/com/gh/gamecenter/info/ConcernFragment.java b/app/src/main/java/com/gh/gamecenter/info/ConcernFragment.java index 28f6f11057..e439c6f1e5 100644 --- a/app/src/main/java/com/gh/gamecenter/info/ConcernFragment.java +++ b/app/src/main/java/com/gh/gamecenter/info/ConcernFragment.java @@ -47,7 +47,7 @@ import com.gh.gamecenter.eventbus.EBNetworkState; import com.gh.gamecenter.eventbus.EBReuse; import com.gh.gamecenter.manager.UserManager; import com.gh.gamecenter.common.base.fragment.NormalFragment; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.halo.assistant.fragment.myconcern.MyConcernRecommendAdapter; diff --git a/app/src/main/java/com/gh/gamecenter/info/InfoAdapter.java b/app/src/main/java/com/gh/gamecenter/info/InfoAdapter.java index 42acd9a3ad..c19d5644c2 100644 --- a/app/src/main/java/com/gh/gamecenter/info/InfoAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/info/InfoAdapter.java @@ -27,7 +27,7 @@ import com.gh.gamecenter.databinding.NewsImage2ItemBinding; import com.gh.gamecenter.databinding.NewsImage3ItemBinding; import com.gh.gamecenter.entity.NewsEntity; import com.gh.gamecenter.manager.VisitManager; -import com.gh.gamecenter.retrofit.JSONObjectResponse; +import com.gh.gamecenter.common.retrofit.JSONObjectResponse; import com.gh.gamecenter.retrofit.RetrofitManager; import org.json.JSONException; diff --git a/app/src/main/java/com/gh/gamecenter/info/NewsViewsRepository.java b/app/src/main/java/com/gh/gamecenter/info/NewsViewsRepository.java index a4e21091be..a8be2b4f0f 100644 --- a/app/src/main/java/com/gh/gamecenter/info/NewsViewsRepository.java +++ b/app/src/main/java/com/gh/gamecenter/info/NewsViewsRepository.java @@ -3,7 +3,7 @@ package com.gh.gamecenter.info; import androidx.lifecycle.LiveData; import androidx.lifecycle.MediatorLiveData; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import java.util.List; diff --git a/app/src/main/java/com/gh/gamecenter/info/OriginalAdapter.java b/app/src/main/java/com/gh/gamecenter/info/OriginalAdapter.java index 086aaa6595..7273792c7f 100644 --- a/app/src/main/java/com/gh/gamecenter/info/OriginalAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/info/OriginalAdapter.java @@ -26,7 +26,7 @@ import com.gh.gamecenter.databinding.NewsImage2ItemBinding; import com.gh.gamecenter.databinding.NewsImage3ItemBinding; import com.gh.gamecenter.entity.NewsEntity; import com.gh.gamecenter.manager.VisitManager; -import com.gh.gamecenter.retrofit.JSONObjectResponse; +import com.gh.gamecenter.common.retrofit.JSONObjectResponse; import com.gh.gamecenter.retrofit.RetrofitManager; import org.json.JSONException; diff --git a/app/src/main/java/com/gh/gamecenter/info/StrategyAdapter.java b/app/src/main/java/com/gh/gamecenter/info/StrategyAdapter.java index f51947f745..b0673de621 100644 --- a/app/src/main/java/com/gh/gamecenter/info/StrategyAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/info/StrategyAdapter.java @@ -20,7 +20,7 @@ import com.gh.gamecenter.adapter.viewholder.NewsTextViewHolder; import com.gh.gamecenter.databinding.NewsFooterItemBinding; import com.gh.gamecenter.databinding.NewsTextItemBinding; import com.gh.gamecenter.entity.NewsEntity; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.adapter.BaseRecyclerAdapter; diff --git a/app/src/main/java/com/gh/gamecenter/info/StrategyFragment.java b/app/src/main/java/com/gh/gamecenter/info/StrategyFragment.java index a89f9fe433..4a6d68b316 100644 --- a/app/src/main/java/com/gh/gamecenter/info/StrategyFragment.java +++ b/app/src/main/java/com/gh/gamecenter/info/StrategyFragment.java @@ -35,7 +35,7 @@ import com.gh.gamecenter.eventbus.EBUISwitch; import com.gh.gamecenter.manager.DataCollectionManager; import com.gh.gamecenter.manager.UserManager; import com.gh.gamecenter.personal.PersonalFragment; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.jakewharton.rxbinding2.view.RxView; diff --git a/app/src/main/java/com/gh/gamecenter/libao/Libao2FragmentAdapter.java b/app/src/main/java/com/gh/gamecenter/libao/Libao2FragmentAdapter.java index beb3cedb3d..b6cfce3a6e 100644 --- a/app/src/main/java/com/gh/gamecenter/libao/Libao2FragmentAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/libao/Libao2FragmentAdapter.java @@ -25,7 +25,7 @@ import com.gh.gamecenter.databinding.LibaoItemBinding; import com.gh.gamecenter.entity.LibaoEntity; import com.gh.gamecenter.entity.LibaoStatusEntity; import com.gh.gamecenter.manager.UserManager; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.adapter.BaseRecyclerAdapter; diff --git a/app/src/main/java/com/gh/gamecenter/libao/Libao3FragmentAdapter.java b/app/src/main/java/com/gh/gamecenter/libao/Libao3FragmentAdapter.java index 857bd127ce..a464f4bf36 100644 --- a/app/src/main/java/com/gh/gamecenter/libao/Libao3FragmentAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/libao/Libao3FragmentAdapter.java @@ -29,7 +29,7 @@ import com.gh.gamecenter.entity.LibaoStatusEntity; import com.gh.gamecenter.entity.MeEntity; import com.gh.gamecenter.entity.UserDataLibaoEntity; import com.gh.gamecenter.manager.UserManager; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.adapter.BaseRecyclerAdapter; import com.lightgame.utils.Utils; diff --git a/app/src/main/java/com/gh/gamecenter/libao/LibaoHistoryAdapter.java b/app/src/main/java/com/gh/gamecenter/libao/LibaoHistoryAdapter.java index faf8d520ad..f5972e6abc 100644 --- a/app/src/main/java/com/gh/gamecenter/libao/LibaoHistoryAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/libao/LibaoHistoryAdapter.java @@ -23,7 +23,7 @@ import com.gh.gamecenter.databinding.LibaoItemBinding; import com.gh.gamecenter.entity.LibaoEntity; import com.gh.gamecenter.entity.MeEntity; import com.gh.gamecenter.entity.UserDataLibaoEntity; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.adapter.BaseRecyclerAdapter; diff --git a/app/src/main/java/com/gh/gamecenter/libao/LibaoNewAdapter.kt b/app/src/main/java/com/gh/gamecenter/libao/LibaoNewAdapter.kt index 78370cd736..0c08f3d64b 100644 --- a/app/src/main/java/com/gh/gamecenter/libao/LibaoNewAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/libao/LibaoNewAdapter.kt @@ -17,7 +17,7 @@ import com.gh.gamecenter.common.utils.setRootBackgroundColor import com.gh.gamecenter.databinding.LibaoItemBinding import com.gh.gamecenter.entity.LibaoEntity import com.gh.gamecenter.entity.LibaoStatusEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.adapter.BaseRecyclerAdapter import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/libao/LibaoSearchAdapter.kt b/app/src/main/java/com/gh/gamecenter/libao/LibaoSearchAdapter.kt index 41bc0c5c3b..c589fbf38c 100644 --- a/app/src/main/java/com/gh/gamecenter/libao/LibaoSearchAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/libao/LibaoSearchAdapter.kt @@ -17,7 +17,7 @@ import com.gh.gamecenter.common.utils.setRootBackgroundColor import com.gh.gamecenter.databinding.LibaoItemBinding import com.gh.gamecenter.entity.LibaoEntity import com.gh.gamecenter.entity.LibaoStatusEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.adapter.BaseRecyclerAdapter import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/manager/CommentManager.java b/app/src/main/java/com/gh/gamecenter/manager/CommentManager.java index bb11a2f8ce..d90f5f7d60 100644 --- a/app/src/main/java/com/gh/gamecenter/manager/CommentManager.java +++ b/app/src/main/java/com/gh/gamecenter/manager/CommentManager.java @@ -5,8 +5,8 @@ import android.content.Context; import com.gh.common.constant.Config; import com.gh.gamecenter.core.utils.StringUtils; import com.gh.gamecenter.common.utils.TimestampUtils; -import com.gh.gamecenter.retrofit.ObservableUtil; -import com.gh.gamecenter.retrofit.OkHttpCache; +import com.gh.gamecenter.common.retrofit.ObservableUtil; +import com.gh.gamecenter.common.retrofit.OkHttpCache; import org.json.JSONArray; import org.json.JSONException; diff --git a/app/src/main/java/com/gh/gamecenter/manager/DataCollectionManager.java b/app/src/main/java/com/gh/gamecenter/manager/DataCollectionManager.java index b68b958f76..d9fef20e7c 100644 --- a/app/src/main/java/com/gh/gamecenter/manager/DataCollectionManager.java +++ b/app/src/main/java/com/gh/gamecenter/manager/DataCollectionManager.java @@ -4,7 +4,7 @@ import android.content.Context; import com.gh.gamecenter.core.AppExecutor; import com.gh.gamecenter.common.exposure.meta.MetaUtil; -import com.gh.common.loghub.LoghubUtils; +import com.gh.gamecenter.common.loghub.LoghubUtils; import com.gh.gamecenter.common.utils.Installation; import com.gh.common.util.LogUtils; import com.gh.common.util.PackageUtils; diff --git a/app/src/main/java/com/gh/gamecenter/manager/UpdateManager.java b/app/src/main/java/com/gh/gamecenter/manager/UpdateManager.java index f4af051c2a..d0ed701545 100644 --- a/app/src/main/java/com/gh/gamecenter/manager/UpdateManager.java +++ b/app/src/main/java/com/gh/gamecenter/manager/UpdateManager.java @@ -45,7 +45,7 @@ import com.gh.gamecenter.MainActivity; import com.gh.gamecenter.R; import com.gh.gamecenter.entity.AppEntity; import com.gh.gamecenter.entity.GameEntity; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.halo.assistant.HaloApp; import com.lightgame.download.DataChanger; diff --git a/app/src/main/java/com/gh/gamecenter/manager/UserManager.java b/app/src/main/java/com/gh/gamecenter/manager/UserManager.java index 9723d8eef4..1fba64987b 100644 --- a/app/src/main/java/com/gh/gamecenter/manager/UserManager.java +++ b/app/src/main/java/com/gh/gamecenter/manager/UserManager.java @@ -2,29 +2,26 @@ package com.gh.gamecenter.manager; import android.annotation.SuppressLint; import android.content.SharedPreferences; -import android.os.Build; import android.preference.PreferenceManager; import android.text.TextUtils; import androidx.annotation.Nullable; -import com.gh.base.BaseActivity; +import com.gh.gamecenter.common.base.BaseActivity; import com.gh.gamecenter.common.constant.Constants; import com.gh.gamecenter.common.exposure.meta.MetaUtil; import com.gh.common.repository.ReservationRepository; -import com.gh.common.util.DataUtils; import com.gh.gamecenter.common.utils.DeviceUtils; 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.BuildConfig; import com.gh.gamecenter.entity.CommunityEntity; import com.gh.gamecenter.entity.LoginTokenEntity; import com.gh.gamecenter.entity.TokenEntity; import com.gh.gamecenter.entity.UserInfoEntity; -import com.gh.gamecenter.eventbus.EBShowDialog; -import com.gh.gamecenter.retrofit.BiResponse; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.eventbus.EBShowDialog; +import com.gh.gamecenter.common.retrofit.BiResponse; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.gh.gamecenter.retrofit.service.ApiService; import com.gh.gamecenter.user.UserRepository; diff --git a/app/src/main/java/com/gh/gamecenter/manager/VisitManager.java b/app/src/main/java/com/gh/gamecenter/manager/VisitManager.java index 77bf1c46a8..2e7c7ac421 100644 --- a/app/src/main/java/com/gh/gamecenter/manager/VisitManager.java +++ b/app/src/main/java/com/gh/gamecenter/manager/VisitManager.java @@ -6,8 +6,8 @@ import com.gh.common.constant.Config; import com.gh.gamecenter.core.utils.StringUtils; import com.gh.gamecenter.common.utils.TimestampUtils; import com.gh.gamecenter.core.utils.UrlFilterUtils; -import com.gh.gamecenter.retrofit.ObservableUtil; -import com.gh.gamecenter.retrofit.OkHttpCache; +import com.gh.gamecenter.common.retrofit.ObservableUtil; +import com.gh.gamecenter.common.retrofit.OkHttpCache; import org.json.JSONArray; import org.json.JSONException; diff --git a/app/src/main/java/com/gh/gamecenter/message/KeFuViewModel.kt b/app/src/main/java/com/gh/gamecenter/message/KeFuViewModel.kt index ccdaea0558..f2ac7e3576 100644 --- a/app/src/main/java/com/gh/gamecenter/message/KeFuViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/message/KeFuViewModel.kt @@ -4,7 +4,7 @@ import android.app.Application import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.entity.MessageKeFuEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Observable import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/message/MessageDetailFragment.java b/app/src/main/java/com/gh/gamecenter/message/MessageDetailFragment.java index 00510055e4..896de77638 100644 --- a/app/src/main/java/com/gh/gamecenter/message/MessageDetailFragment.java +++ b/app/src/main/java/com/gh/gamecenter/message/MessageDetailFragment.java @@ -45,8 +45,8 @@ import com.gh.gamecenter.eventbus.EBReuse; import com.gh.gamecenter.manager.CommentManager; import com.gh.gamecenter.manager.UserManager; import com.gh.gamecenter.common.base.fragment.NormalFragment; -import com.gh.gamecenter.retrofit.OkHttpCache; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.OkHttpCache; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.halo.assistant.HaloApp; import com.lightgame.listeners.OnBackPressedListener; @@ -204,7 +204,7 @@ public class MessageDetailFragment extends NormalFragment implements OnCommentCa .getNewsCommentnum(newsId, Utils.getTime(getContext())) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new com.gh.gamecenter.retrofit.Response>() { + .subscribe(new Response>() { @Override public void onResponse(List response) { diff --git a/app/src/main/java/com/gh/gamecenter/message/MessageItemViewHolder.java b/app/src/main/java/com/gh/gamecenter/message/MessageItemViewHolder.java index 3c54522dff..667e2cab95 100644 --- a/app/src/main/java/com/gh/gamecenter/message/MessageItemViewHolder.java +++ b/app/src/main/java/com/gh/gamecenter/message/MessageItemViewHolder.java @@ -5,15 +5,13 @@ import android.content.Intent; import android.view.View; import android.widget.RelativeLayout; -import com.gh.base.BaseActivity; -import com.gh.gamecenter.common.base.BaseRecyclerViewHolder; -import com.gh.gamecenter.common.callback.OnListClickListener; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.fragment.app.FragmentActivity; + +import com.gh.gamecenter.common.base.BaseActivity; import com.gh.common.databind.BindingAdapters; -import com.gh.gamecenter.core.utils.ClickUtils; import com.gh.common.util.DirectUtils; -import com.gh.gamecenter.core.utils.DisplayUtils; -import com.gh.gamecenter.common.utils.ImageUtils; -import com.gh.gamecenter.core.utils.MtaHelper; import com.gh.common.util.NewsUtils; import com.gh.gamecenter.CommentDetailActivity; import com.gh.gamecenter.GameDetailActivity; @@ -21,6 +19,13 @@ import com.gh.gamecenter.MessageDetailActivity; import com.gh.gamecenter.NewsDetailActivity; import com.gh.gamecenter.R; import com.gh.gamecenter.WebActivity; +import com.gh.gamecenter.common.base.BaseRecyclerViewHolder; +import com.gh.gamecenter.common.callback.OnListClickListener; +import com.gh.gamecenter.common.retrofit.Response; +import com.gh.gamecenter.common.utils.ImageUtils; +import com.gh.gamecenter.core.utils.ClickUtils; +import com.gh.gamecenter.core.utils.DisplayUtils; +import com.gh.gamecenter.core.utils.MtaHelper; import com.gh.gamecenter.databinding.MessageItemBinding; import com.gh.gamecenter.entity.CommunityEntity; import com.gh.gamecenter.entity.LinkEntity; @@ -36,7 +41,6 @@ import com.gh.gamecenter.qa.comment.CommentActivity; import com.gh.gamecenter.qa.entity.Questions; import com.gh.gamecenter.qa.follow.AskFollowMoreDialog; import com.gh.gamecenter.qa.questions.newdetail.NewQuestionDetailActivity; -import com.gh.gamecenter.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.gh.gamecenter.video.detail.VideoDetailContainerViewModel; import com.lightgame.utils.Utils; @@ -44,10 +48,6 @@ import com.lightgame.utils.Utils; import java.util.ArrayList; import java.util.List; -import androidx.annotation.Nullable; -import androidx.core.content.ContextCompat; -import androidx.fragment.app.FragmentActivity; - import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.schedulers.Schedulers; import retrofit2.HttpException; diff --git a/app/src/main/java/com/gh/gamecenter/message/MessageNormalViewModel.kt b/app/src/main/java/com/gh/gamecenter/message/MessageNormalViewModel.kt index 24685c584d..a67b2a0563 100644 --- a/app/src/main/java/com/gh/gamecenter/message/MessageNormalViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/message/MessageNormalViewModel.kt @@ -6,7 +6,7 @@ import androidx.lifecycle.ViewModelProvider import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.entity.MessageEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.Observable diff --git a/app/src/main/java/com/gh/gamecenter/message/MessageUnreadRepository.kt b/app/src/main/java/com/gh/gamecenter/message/MessageUnreadRepository.kt index 39a6e00043..a1174f4c20 100644 --- a/app/src/main/java/com/gh/gamecenter/message/MessageUnreadRepository.kt +++ b/app/src/main/java/com/gh/gamecenter/message/MessageUnreadRepository.kt @@ -15,8 +15,8 @@ import com.gh.gamecenter.entity.ConcernEntity import com.gh.gamecenter.entity.FunctionalGroupEntity import com.gh.gamecenter.entity.MessageUnreadEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.retrofit.service.ApiService import com.google.gson.reflect.TypeToken diff --git a/app/src/main/java/com/gh/gamecenter/message/MessageViewModel.kt b/app/src/main/java/com/gh/gamecenter/message/MessageViewModel.kt index 3f1d373979..1670aad208 100644 --- a/app/src/main/java/com/gh/gamecenter/message/MessageViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/message/MessageViewModel.kt @@ -4,7 +4,7 @@ import android.app.Application import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.entity.MessageEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.Observable diff --git a/app/src/main/java/com/gh/gamecenter/mvvm/NetworkBoundResource.java b/app/src/main/java/com/gh/gamecenter/mvvm/NetworkBoundResource.java index eb7324a525..bfd61586e0 100644 --- a/app/src/main/java/com/gh/gamecenter/mvvm/NetworkBoundResource.java +++ b/app/src/main/java/com/gh/gamecenter/mvvm/NetworkBoundResource.java @@ -4,7 +4,7 @@ import androidx.lifecycle.LiveData; import androidx.lifecycle.MediatorLiveData; import androidx.annotation.Nullable; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import io.reactivex.Observable; import io.reactivex.android.schedulers.AndroidSchedulers; diff --git a/app/src/main/java/com/gh/gamecenter/mygame/MyReservationViewModel.kt b/app/src/main/java/com/gh/gamecenter/mygame/MyReservationViewModel.kt index f9ed0363e3..3ce9d7d9c9 100644 --- a/app/src/main/java/com/gh/gamecenter/mygame/MyReservationViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/mygame/MyReservationViewModel.kt @@ -10,7 +10,7 @@ import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.baselist.LoadType import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.Observable diff --git a/app/src/main/java/com/gh/gamecenter/mygame/PlayedGameActivity.kt b/app/src/main/java/com/gh/gamecenter/mygame/PlayedGameActivity.kt index 45563bad61..8e966afcc7 100644 --- a/app/src/main/java/com/gh/gamecenter/mygame/PlayedGameActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/mygame/PlayedGameActivity.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.mygame import android.content.Context import android.content.Intent import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.NormalActivity diff --git a/app/src/main/java/com/gh/gamecenter/mygame/PlayedGameAdapter.kt b/app/src/main/java/com/gh/gamecenter/mygame/PlayedGameAdapter.kt index d9d5aa1a5b..12e7f57d00 100644 --- a/app/src/main/java/com/gh/gamecenter/mygame/PlayedGameAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/mygame/PlayedGameAdapter.kt @@ -18,6 +18,7 @@ import com.gh.common.exposure.ExposureEvent import com.gh.common.exposure.ExposureSource import com.gh.common.exposure.IExposable import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.gamecenter.common.view.BugFixedPopupWindow import com.gh.gamecenter.common.view.DrawableView import com.gh.gamecenter.GameDetailActivity @@ -25,6 +26,7 @@ import com.gh.gamecenter.R import com.gh.gamecenter.adapter.viewholder.FooterViewHolder import com.gh.gamecenter.adapter.viewholder.GameViewHolder import com.gh.gamecenter.baselist.ListAdapter +import com.gh.gamecenter.common.callback.CancelListener import com.gh.gamecenter.common.callback.ConfirmListener import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.core.utils.* @@ -205,11 +207,15 @@ open class PlayedGameAdapter( holder.binding.switchIv.setOnClickListener { if (!UsageStatsHelper.checkForPermission()) { DialogUtils.showUsageStatsDialog( - mContext, object :ConfirmListener{ + mContext, object : ConfirmListener { override fun onConfirm() { UsageStatsHelper.skipToUsageStats(mContext, UsageStatsHelper.USAGE_STATUS_REQUEST_CODE) } - }) {} + }, object : CancelListener { + override fun onCancel() { + + } + }) } } } diff --git a/app/src/main/java/com/gh/gamecenter/mygame/PlayedGameViewModel.kt b/app/src/main/java/com/gh/gamecenter/mygame/PlayedGameViewModel.kt index d62dbe169c..51501b5fb5 100644 --- a/app/src/main/java/com/gh/gamecenter/mygame/PlayedGameViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/mygame/PlayedGameViewModel.kt @@ -6,7 +6,7 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.entity.GameEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/gamecenter/newsdetail/NewsDetailAdapter.java b/app/src/main/java/com/gh/gamecenter/newsdetail/NewsDetailAdapter.java index 5c335d6704..4fe543793b 100644 --- a/app/src/main/java/com/gh/gamecenter/newsdetail/NewsDetailAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/newsdetail/NewsDetailAdapter.java @@ -30,7 +30,6 @@ import com.gh.common.util.CheckLoginUtils; import com.gh.common.util.CommentUtils; import com.gh.common.util.ConcernUtils; import com.gh.common.util.DataCollectionUtils; -import com.gh.common.util.DataUtils; import com.gh.common.util.DialogUtils; import com.gh.common.util.DirectUtils; import com.gh.common.util.NewsUtils; @@ -70,17 +69,15 @@ import com.gh.gamecenter.entity.MtaEvent; import com.gh.gamecenter.entity.NewsDetailEntity; import com.gh.gamecenter.entity.NewsEntity; import com.gh.gamecenter.qa.editor.OnLinkClickListener; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.halo.assistant.fragment.SettingsFragment; import com.lightgame.adapter.BaseRecyclerAdapter; import com.lightgame.utils.Utils; import java.util.ArrayList; -import java.util.HashMap; import java.util.HashSet; import java.util.List; -import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; import io.reactivex.android.schedulers.AndroidSchedulers; diff --git a/app/src/main/java/com/gh/gamecenter/packagehelper/PackageFilterManager.kt b/app/src/main/java/com/gh/gamecenter/packagehelper/PackageFilterManager.kt index 97b150716a..b4605856d7 100644 --- a/app/src/main/java/com/gh/gamecenter/packagehelper/PackageFilterManager.kt +++ b/app/src/main/java/com/gh/gamecenter/packagehelper/PackageFilterManager.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.packagehelper import android.annotation.SuppressLint import com.gh.gamecenter.common.utils.toRequestBody import com.gh.gamecenter.entity.PackageFilter -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.room.AppDatabase import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/packagehelper/PackageRepository.kt b/app/src/main/java/com/gh/gamecenter/packagehelper/PackageRepository.kt index e6adb9f766..61ca65d860 100644 --- a/app/src/main/java/com/gh/gamecenter/packagehelper/PackageRepository.kt +++ b/app/src/main/java/com/gh/gamecenter/packagehelper/PackageRepository.kt @@ -5,7 +5,7 @@ import android.text.TextUtils import androidx.lifecycle.MutableLiveData import com.gh.gamecenter.common.exposure.meta.MetaUtil import com.gh.common.filter.RegionSettingHelper -import com.gh.common.loghub.LoghubUtils +import com.gh.gamecenter.common.loghub.LoghubUtils import com.gh.common.util.* import com.gh.gamecenter.R import com.gh.gamecenter.core.runOnIoThread @@ -17,9 +17,9 @@ import com.gh.gamecenter.manager.PackagesManager import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.packagehelper.PackageRepository.gameInstalled import com.gh.gamecenter.packagehelper.PackageRepository.gameUpdate -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.ObservableUtil -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.ObservableUtil +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/gamecenter/personal/NewPersonalFragment.kt b/app/src/main/java/com/gh/gamecenter/personal/NewPersonalFragment.kt index d9fa029d15..42b01971c3 100644 --- a/app/src/main/java/com/gh/gamecenter/personal/NewPersonalFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/personal/NewPersonalFragment.kt @@ -31,9 +31,7 @@ import com.gh.gamecenter.common.view.SpacingItemDecoration import com.gh.gamecenter.MessageActivity import com.gh.gamecenter.R import com.gh.gamecenter.common.callback.ConfirmListener -import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.common.utils.NetworkUtils -import com.gh.gamecenter.core.utils.StringUtils import com.gh.gamecenter.common.utils.dip2px import com.gh.gamecenter.common.utils.toColor import com.gh.gamecenter.common.utils.tryCatchInRelease @@ -47,23 +45,18 @@ import com.gh.gamecenter.eventbus.EBConcernChanged import com.gh.gamecenter.eventbus.EBNetworkState import com.gh.gamecenter.eventbus.EBReuse import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.message.MessageUnreadRepository.loadMessageUnreadData import com.gh.gamecenter.message.MessageUnreadRepository.loadMessageUnreadTotal import com.gh.gamecenter.message.MessageUnreadViewModel import com.gh.gamecenter.personalhome.UserHomeViewModel -import com.gh.gamecenter.qa.answer.detail.SimpleAnswerDetailActivity import com.gh.gamecenter.room.AppDatabase -import com.gh.gamecenter.user.ApiResponse +import com.gh.gamecenter.common.retrofit.ApiResponse import com.gh.gamecenter.user.UserViewModel import com.google.android.material.appbar.AppBarLayout import com.halo.assistant.HaloApp import com.tencent.connect.common.Constants -import okhttp3.MediaType -import okhttp3.RequestBody import org.greenrobot.eventbus.EventBus import org.greenrobot.eventbus.Subscribe import org.greenrobot.eventbus.ThreadMode -import org.json.JSONObject import kotlin.math.abs class NewPersonalFragment : BaseLazyFragment() { diff --git a/app/src/main/java/com/gh/gamecenter/personal/PersonalFragment.kt b/app/src/main/java/com/gh/gamecenter/personal/PersonalFragment.kt index 970ea7c911..f25b30ef00 100644 --- a/app/src/main/java/com/gh/gamecenter/personal/PersonalFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/personal/PersonalFragment.kt @@ -12,7 +12,7 @@ import androidx.core.content.ContextCompat import androidx.lifecycle.ViewModelProvider import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.base.fragment.BaseLazyFragment import com.gh.common.databind.BindingAdapters import com.gh.common.util.* @@ -32,9 +32,7 @@ import com.gh.gamecenter.common.view.VerticalItemDecoration import com.gh.gamecenter.MessageActivity import com.gh.gamecenter.R import com.gh.gamecenter.common.callback.ConfirmListener -import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.common.utils.NetworkUtils -import com.gh.gamecenter.core.utils.StringUtils import com.gh.gamecenter.common.utils.toColor import com.gh.gamecenter.common.utils.tryCatchInRelease import com.gh.gamecenter.common.utils.PackageFlavorHelper @@ -47,25 +45,20 @@ import com.gh.gamecenter.eventbus.EBNetworkState import com.gh.gamecenter.eventbus.EBReuse import com.gh.gamecenter.fragment.MainWrapperFragment import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.message.MessageUnreadRepository.loadMessageUnreadData import com.gh.gamecenter.message.MessageUnreadRepository.loadMessageUnreadTotal import com.gh.gamecenter.message.MessageUnreadViewModel import com.gh.gamecenter.personal.NewPersonalActivity.Companion.getIntent import com.gh.gamecenter.personalhome.UserHomeViewModel -import com.gh.gamecenter.qa.answer.detail.SimpleAnswerDetailActivity import com.gh.gamecenter.room.AppDatabase -import com.gh.gamecenter.user.ApiResponse +import com.gh.gamecenter.common.retrofit.ApiResponse import com.gh.gamecenter.user.UserViewModel import com.google.android.material.appbar.AppBarLayout import com.halo.assistant.HaloApp import com.jakewharton.rxbinding2.view.RxView import com.tencent.connect.common.Constants -import okhttp3.MediaType -import okhttp3.RequestBody import org.greenrobot.eventbus.EventBus import org.greenrobot.eventbus.Subscribe import org.greenrobot.eventbus.ThreadMode -import org.json.JSONObject import java.util.concurrent.TimeUnit import kotlin.math.abs diff --git a/app/src/main/java/com/gh/gamecenter/personal/PersonalViewModel.kt b/app/src/main/java/com/gh/gamecenter/personal/PersonalViewModel.kt index 98a14ecd7e..28b9bad513 100644 --- a/app/src/main/java/com/gh/gamecenter/personal/PersonalViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/personal/PersonalViewModel.kt @@ -17,8 +17,8 @@ import com.gh.gamecenter.entity.* import com.gh.gamecenter.eventbus.EBSkip import com.gh.gamecenter.fragment.MainWrapperFragment import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.subject.SubjectActivity import com.halo.assistant.HaloApp diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/FollowersOrFansViewModel.kt b/app/src/main/java/com/gh/gamecenter/personalhome/FollowersOrFansViewModel.kt index 77de7a3152..d14365c26f 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/FollowersOrFansViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/FollowersOrFansViewModel.kt @@ -9,7 +9,7 @@ import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.entity.FollowersOrFansEntity import com.gh.gamecenter.eventbus.EBUserFollow import com.gh.gamecenter.personalhome.fans.FansActivity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/InstalledGameDialog.kt b/app/src/main/java/com/gh/gamecenter/personalhome/InstalledGameDialog.kt index 3360f35036..994ded30f1 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/InstalledGameDialog.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/InstalledGameDialog.kt @@ -16,7 +16,7 @@ import com.gh.gamecenter.R import com.gh.gamecenter.databinding.DialogInstalledGameBinding import com.gh.gamecenter.entity.GameInstall import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/UserHomeActivity.kt b/app/src/main/java/com/gh/gamecenter/personalhome/UserHomeActivity.kt index e2b5fa04e6..25c8c98471 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/UserHomeActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/UserHomeActivity.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.personalhome import android.content.Context import android.content.Intent import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.NormalActivity diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/UserHomeFragment.kt b/app/src/main/java/com/gh/gamecenter/personalhome/UserHomeFragment.kt index e040082e33..4e11d921de 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/UserHomeFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/UserHomeFragment.kt @@ -1,7 +1,6 @@ package com.gh.gamecenter.personalhome import android.graphics.Bitmap -import android.graphics.Canvas import android.graphics.drawable.BitmapDrawable import android.os.Build import android.os.Bundle @@ -20,6 +19,7 @@ import com.gh.gamecenter.common.base.fragment.BaseFragment_TabLayout import com.gh.gamecenter.common.constant.Constants import com.gh.common.databind.BindingAdapters import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.common.util.DirectUtils.directToBadgeWall import com.gh.gamecenter.* import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/UserHomeViewModel.kt b/app/src/main/java/com/gh/gamecenter/personalhome/UserHomeViewModel.kt index 12e1477215..995623a62b 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/UserHomeViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/UserHomeViewModel.kt @@ -14,8 +14,7 @@ import com.gh.gamecenter.common.utils.createRequestBody import com.gh.gamecenter.R import com.gh.gamecenter.entity.* import com.gh.gamecenter.eventbus.EBUserFollow -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.google.gson.JsonObject import com.halo.assistant.HaloApp @@ -44,7 +43,7 @@ class UserHomeViewModel(application: Application, var userId: String) : AndroidV .api.getPersonalData(userId, HaloApp.getInstance().channel, Utils.getTime(getApplication())) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(object : Response() { + .subscribe(object : com.gh.gamecenter.common.retrofit.Response() { override fun onResponse(response: PersonalEntity?) { userInfo.value = response } @@ -87,7 +86,7 @@ class UserHomeViewModel(application: Application, var userId: String) : AndroidV observable .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(object : Response() { + .subscribe(object : com.gh.gamecenter.common.retrofit.Response() { override fun onResponse(response: ResponseBody?) { super.onResponse(response) if (isFollow) { @@ -115,7 +114,7 @@ class UserHomeViewModel(application: Application, var userId: String) : AndroidV .api.getBadges(userId) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(object : Response>() { + .subscribe(object : com.gh.gamecenter.common.retrofit.Response>() { override fun onResponse(response: List?) { super.onResponse(response) badges.postValue(response) @@ -128,7 +127,7 @@ class UserHomeViewModel(application: Application, var userId: String) : AndroidV .api.availableBadges(userId) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(object : Response>() { + .subscribe(object : com.gh.gamecenter.common.retrofit.Response>() { override fun onResponse(response: List?) { super.onResponse(response) availableBadge.postValue(if (response.isNullOrEmpty()) null else response[0]) diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/background/BackgroundClipActivity.kt b/app/src/main/java/com/gh/gamecenter/personalhome/background/BackgroundClipActivity.kt index 7eaacec3fd..def34d0805 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/background/BackgroundClipActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/background/BackgroundClipActivity.kt @@ -6,7 +6,7 @@ import android.content.Intent import android.graphics.Bitmap import android.os.Bundle import android.widget.ImageView -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.base.fragment.WaitingDialogFragment import com.gh.gamecenter.common.utils.BitmapUtils import com.gh.gamecenter.core.utils.DisplayUtils diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/background/BackgroundPreviewActivity.kt b/app/src/main/java/com/gh/gamecenter/personalhome/background/BackgroundPreviewActivity.kt index 15f1ff6bfc..a4677e66b3 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/background/BackgroundPreviewActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/background/BackgroundPreviewActivity.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.personalhome.background import android.content.Context import android.content.Intent import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/background/PersonalityBackgroundViewModel.kt b/app/src/main/java/com/gh/gamecenter/personalhome/background/PersonalityBackgroundViewModel.kt index 8c2349b6bc..aade0b39cb 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/background/PersonalityBackgroundViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/background/PersonalityBackgroundViewModel.kt @@ -11,7 +11,7 @@ import com.gh.gamecenter.common.callback.BiCallback import com.gh.gamecenter.common.utils.BitmapUtils import com.gh.gamecenter.common.utils.ImageUtils import com.gh.gamecenter.entity.BackgroundImageEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Single import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/border/AvatarBorderActivity.kt b/app/src/main/java/com/gh/gamecenter/personalhome/border/AvatarBorderActivity.kt index b43fca2542..682a568c5a 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/border/AvatarBorderActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/border/AvatarBorderActivity.kt @@ -3,10 +3,9 @@ package com.gh.gamecenter.personalhome.border import android.content.Context import android.content.Intent import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.gamecenter.common.constant.EntranceConsts -import com.gh.common.util.EntranceUtils import com.gh.gamecenter.R class AvatarBorderActivity : BaseActivity() { diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/border/AvatarBorderViewModel.kt b/app/src/main/java/com/gh/gamecenter/personalhome/border/AvatarBorderViewModel.kt index c1ff556289..800f814027 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/border/AvatarBorderViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/border/AvatarBorderViewModel.kt @@ -5,7 +5,7 @@ import android.app.Application import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.MutableLiveData import com.gh.gamecenter.entity.AvatarBorderCategoryEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/border/ChooseAvatarBorderViewModel.kt b/app/src/main/java/com/gh/gamecenter/personalhome/border/ChooseAvatarBorderViewModel.kt index 335b3a0ee8..90dc0c7419 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/border/ChooseAvatarBorderViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/border/ChooseAvatarBorderViewModel.kt @@ -8,7 +8,7 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider import com.gh.gamecenter.core.utils.UrlFilterUtils import com.gh.gamecenter.entity.AvatarBorderEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/fans/FansActivity.kt b/app/src/main/java/com/gh/gamecenter/personalhome/fans/FansActivity.kt index a50f62997c..00b8904e70 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/fans/FansActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/fans/FansActivity.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.personalhome.fans import android.content.Context import android.content.Intent import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.NormalActivity import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/followers/FollowersActivity.kt b/app/src/main/java/com/gh/gamecenter/personalhome/followers/FollowersActivity.kt index 4bfe6e6c8e..bef58b6c1b 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/followers/FollowersActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/followers/FollowersActivity.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.personalhome.followers import android.content.Context import android.content.Intent import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.NormalActivity import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/home/UserHistoryAdapter.kt b/app/src/main/java/com/gh/gamecenter/personalhome/home/UserHistoryAdapter.kt index 44a78cb229..bbd8b88ea8 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/home/UserHistoryAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/home/UserHistoryAdapter.kt @@ -9,6 +9,7 @@ import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import com.gh.gamecenter.common.constant.ItemViewType import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.gamecenter.R import com.gh.gamecenter.adapter.viewholder.FooterViewHolder import com.gh.gamecenter.adapter.viewholder.PersonalHomeRatingViewHolder diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/home/UserHistoryViewModel.kt b/app/src/main/java/com/gh/gamecenter/personalhome/home/UserHistoryViewModel.kt index 845d0274b2..c3d3c4dc37 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/home/UserHistoryViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/home/UserHistoryViewModel.kt @@ -16,8 +16,8 @@ import com.gh.gamecenter.common.utils.singleToMain import com.gh.gamecenter.entity.ErrorEntity import com.gh.gamecenter.entity.ForumVideoEntity import com.gh.gamecenter.entity.PersonalHistoryEntity -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils @@ -68,7 +68,7 @@ class UserHistoryViewModel(application: Application, mApi.voteGameComment(gameId, commentId) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(object : Response() { + .subscribe(object : com.gh.gamecenter.common.retrofit.Response() { override fun onResponse(response: ResponseBody?) { Utils.toast(getApplication(), "点赞成功") callback.invoke() @@ -92,7 +92,7 @@ class UserHistoryViewModel(application: Application, mApi.unvoteGameComment(gameId, commentId) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(object : Response() { + .subscribe(object : com.gh.gamecenter.common.retrofit.Response() { override fun onResponse(response: ResponseBody?) { super.onResponse(response) Utils.toast(getApplication(), "取消点赞") diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/home/game/UserCommentHistoryViewModel.kt b/app/src/main/java/com/gh/gamecenter/personalhome/home/game/UserCommentHistoryViewModel.kt index 12f391e51b..0f8f64c8ed 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/home/game/UserCommentHistoryViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/home/game/UserCommentHistoryViewModel.kt @@ -10,7 +10,7 @@ import com.gh.gamecenter.common.utils.toObject import com.gh.gamecenter.core.utils.UrlFilterUtils import com.gh.gamecenter.entity.ErrorEntity import com.gh.gamecenter.personalhome.rating.MyRating -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.Observable diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/home/game/UserGameViewModel.kt b/app/src/main/java/com/gh/gamecenter/personalhome/home/game/UserGameViewModel.kt index 9a66175526..66cb420070 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/home/game/UserGameViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/home/game/UserGameViewModel.kt @@ -7,13 +7,14 @@ import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers import okhttp3.ResponseBody +import retrofit2.Response class UserGameViewModel(application: Application, private val mUserId: String) : AndroidViewModel(application) { @@ -30,7 +31,7 @@ class UserGameViewModel(application: Application, private val mUserId: String) .api.getPlayedGamesCount(mUserId, Utils.getTime(getApplication())) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(object : BiResponse>() { + .subscribe(object : BiResponse>() { override fun onSuccess(data: retrofit2.Response) { val countContent = data.headers().get("Total") playedGameCount.postValue(if (TextUtils.isEmpty(countContent)) 0 else countContent?.toInt() ?: 0) diff --git a/app/src/main/java/com/gh/gamecenter/personalhome/rating/RatingActivity.kt b/app/src/main/java/com/gh/gamecenter/personalhome/rating/RatingActivity.kt index 75824da763..d4a5c1e969 100644 --- a/app/src/main/java/com/gh/gamecenter/personalhome/rating/RatingActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/personalhome/rating/RatingActivity.kt @@ -4,7 +4,7 @@ import android.content.Context import android.content.Intent import android.os.Bundle import androidx.lifecycle.ViewModelProviders -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.R import com.gh.gamecenter.baselist.ListActivity diff --git a/app/src/main/java/com/gh/gamecenter/qa/answer/BaseAnswerOrArticleItemViewHolder.kt b/app/src/main/java/com/gh/gamecenter/qa/answer/BaseAnswerOrArticleItemViewHolder.kt index aa483b16c9..42c5ff3e9d 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/answer/BaseAnswerOrArticleItemViewHolder.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/answer/BaseAnswerOrArticleItemViewHolder.kt @@ -11,7 +11,6 @@ import com.gh.gamecenter.R import com.gh.gamecenter.common.utils.debounceActionWithInterval import com.gh.gamecenter.common.utils.doOnAnimationEnd import com.gh.gamecenter.common.utils.toColor -import com.gh.gamecenter.common.utils.toDrawable import com.gh.gamecenter.core.utils.* import com.gh.gamecenter.entity.CommunityEntity import com.gh.gamecenter.entity.VoteEntity @@ -25,8 +24,8 @@ import com.gh.gamecenter.qa.entity.QuestionsDetailEntity import com.gh.gamecenter.qa.questions.invite.QuestionsInviteActivity import com.gh.gamecenter.qa.questions.newdetail.NewQuestionDetailActivity import com.gh.gamecenter.qa.video.detail.ForumVideoDetailActivity -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import com.lightgame.view.CheckableImageView diff --git a/app/src/main/java/com/gh/gamecenter/qa/answer/CommunityAnswerItemViewHolder.kt b/app/src/main/java/com/gh/gamecenter/qa/answer/CommunityAnswerItemViewHolder.kt index d2b2d7feae..f6dcc6c183 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/answer/CommunityAnswerItemViewHolder.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/answer/CommunityAnswerItemViewHolder.kt @@ -9,6 +9,7 @@ import android.widget.LinearLayout import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.content.ContextCompat import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.gamecenter.CollectionActivity import com.gh.gamecenter.R import com.gh.gamecenter.common.callback.ConfirmListener diff --git a/app/src/main/java/com/gh/gamecenter/qa/answer/detail/AnswerDetailFragment.kt b/app/src/main/java/com/gh/gamecenter/qa/answer/detail/AnswerDetailFragment.kt index 8f028cb083..21e566a4ee 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/answer/detail/AnswerDetailFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/answer/detail/AnswerDetailFragment.kt @@ -27,6 +27,8 @@ import com.gh.gamecenter.core.utils.TimeElapsedHelper import com.gh.gamecenter.common.constant.Constants.GAME_DETAIL_COME_IN import com.gh.common.history.HistoryHelper import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.LogUtils import com.gh.gamecenter.common.view.DrawableView import com.gh.common.view.RichEditor import com.gh.gamecenter.ImageViewerActivity @@ -43,6 +45,7 @@ import com.gh.gamecenter.entity.* import com.gh.gamecenter.eventbus.EBReuse import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.common.base.fragment.NormalFragment +import com.gh.gamecenter.common.entity.NormalShareEntity import com.gh.gamecenter.personal.PersonalFragment import com.gh.gamecenter.qa.answer.edit.AnswerEditActivity import com.gh.gamecenter.qa.comment.CommentActivity diff --git a/app/src/main/java/com/gh/gamecenter/qa/answer/detail/AnswerDetailViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/answer/detail/AnswerDetailViewModel.kt index 463513d38c..e0a4ac93f6 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/answer/detail/AnswerDetailViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/answer/detail/AnswerDetailViewModel.kt @@ -17,9 +17,9 @@ import com.gh.gamecenter.entity.SpecialColumn import com.gh.gamecenter.entity.VoteEntity import com.gh.gamecenter.eventbus.EBUserFollow import com.gh.gamecenter.qa.entity.AnswerDetailEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager -import com.gh.gamecenter.user.ApiResponse +import com.gh.gamecenter.common.retrofit.ApiResponse import com.lightgame.utils.Utils import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/qa/answer/detail/SimpleAnswerDetailActivity.kt b/app/src/main/java/com/gh/gamecenter/qa/answer/detail/SimpleAnswerDetailActivity.kt index e0c7f39b2e..a1e627139e 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/answer/detail/SimpleAnswerDetailActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/answer/detail/SimpleAnswerDetailActivity.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.qa.answer.detail import android.content.Context import android.content.Intent import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.NormalActivity import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/qa/answer/draft/AnswerDraftAdapter.java b/app/src/main/java/com/gh/gamecenter/qa/answer/draft/AnswerDraftAdapter.java index a2947a1608..1f59afbc0b 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/answer/draft/AnswerDraftAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/qa/answer/draft/AnswerDraftAdapter.java @@ -24,7 +24,7 @@ import com.gh.gamecenter.manager.UserManager; import com.gh.gamecenter.qa.answer.edit.AnswerEditActivity; import com.gh.gamecenter.qa.entity.AnswerEntity; import com.gh.gamecenter.qa.myqa.AnswerDraftViewHolder; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.utils.Utils; diff --git a/app/src/main/java/com/gh/gamecenter/qa/answer/edit/AnswerEditActivity.kt b/app/src/main/java/com/gh/gamecenter/qa/answer/edit/AnswerEditActivity.kt index 21ac795f49..a256b17c84 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/answer/edit/AnswerEditActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/answer/edit/AnswerEditActivity.kt @@ -24,6 +24,7 @@ import com.gh.gamecenter.R import com.gh.gamecenter.common.callback.ConfirmListener import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.common.utils.* +import com.gh.gamecenter.common.utils.DialogUtils import com.gh.gamecenter.core.utils.* import com.gh.gamecenter.databinding.FragmentAnswerEditBinding import com.gh.gamecenter.entity.NotificationUgc diff --git a/app/src/main/java/com/gh/gamecenter/qa/answer/edit/AnswerEditViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/answer/edit/AnswerEditViewModel.kt index 2f20897f40..d249b4a3ac 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/answer/edit/AnswerEditViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/answer/edit/AnswerEditViewModel.kt @@ -18,7 +18,7 @@ import com.gh.gamecenter.common.utils.tryWithDefaultCatch import com.gh.gamecenter.core.utils.UrlFilterUtils import com.gh.gamecenter.qa.entity.AnswerDraftEntity import com.gh.gamecenter.qa.entity.Questions -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.lightgame.utils.Utils import io.reactivex.Single import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/qa/article/MyArticleActivity.kt b/app/src/main/java/com/gh/gamecenter/qa/article/MyArticleActivity.kt index e4ea7d728b..9ab5b46999 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/article/MyArticleActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/article/MyArticleActivity.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.qa.article import android.content.Context import android.content.Intent import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.NormalActivity diff --git a/app/src/main/java/com/gh/gamecenter/qa/article/SimpleArticleListActivity.kt b/app/src/main/java/com/gh/gamecenter/qa/article/SimpleArticleListActivity.kt index 880a3b2834..bd1e9fc3c3 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/article/SimpleArticleListActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/article/SimpleArticleListActivity.kt @@ -3,7 +3,7 @@ //import android.content.Context //import android.content.Intent //import android.os.Bundle -//import com.gh.base.BaseActivity +//import com.gh.gamecenter.common.base.BaseActivity //import com.gh.common.util.EntranceUtils //import com.gh.gamecenter.NormalActivity // diff --git a/app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailContentViewHolder.kt b/app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailContentViewHolder.kt index 1145887be2..ad06c7134a 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailContentViewHolder.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailContentViewHolder.kt @@ -11,6 +11,9 @@ import androidx.recyclerview.widget.RecyclerView import com.gh.common.DefaultUrlHandler import com.gh.gamecenter.core.runOnUiThread import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.LogUtils +import com.gh.common.util.NewLogUtils import com.gh.common.view.RichEditor import com.gh.gamecenter.ImageViewerActivity import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailFragment.kt b/app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailFragment.kt index 9f45d43603..ce6db26907 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailFragment.kt @@ -23,11 +23,15 @@ import com.gh.gamecenter.common.syncpage.SyncDataEntity import com.gh.gamecenter.common.syncpage.SyncFieldConstants import com.gh.gamecenter.common.syncpage.SyncPageRepository import com.gh.common.util.* +import com.gh.common.util.LogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.ImageViewerActivity import com.gh.gamecenter.R import com.gh.gamecenter.baselist.ListAdapter import com.gh.gamecenter.baselist.LoadType import com.gh.gamecenter.common.constant.EntranceConsts +import com.gh.gamecenter.common.entity.AdditionalParamsEntity +import com.gh.gamecenter.common.entity.NormalShareEntity import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.core.utils.* import com.gh.gamecenter.databinding.FragmentArticleDetailBinding diff --git a/app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailViewModel.kt index af5b34b4a4..65fcbc4f52 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/article/detail/ArticleDetailViewModel.kt @@ -19,7 +19,7 @@ import com.gh.gamecenter.eventbus.EBUserFollow import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.qa.comment.base.BaseCommentViewModel import com.gh.gamecenter.qa.entity.ArticleDetailEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.Observable diff --git a/app/src/main/java/com/gh/gamecenter/qa/article/detail/comment/ArticleDetailCommentViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/article/detail/comment/ArticleDetailCommentViewModel.kt index 810ee373f2..48ef8cd317 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/article/detail/comment/ArticleDetailCommentViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/article/detail/comment/ArticleDetailCommentViewModel.kt @@ -7,7 +7,7 @@ import androidx.lifecycle.ViewModelProvider import com.gh.gamecenter.entity.CommentEntity import com.gh.gamecenter.qa.comment.base.BaseCommentViewModel import com.gh.gamecenter.qa.article.detail.CommentItemData -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Observable import io.reactivex.Single diff --git a/app/src/main/java/com/gh/gamecenter/qa/article/draft/ArticleDraftFragment.kt b/app/src/main/java/com/gh/gamecenter/qa/article/draft/ArticleDraftFragment.kt index 1a2da0fd77..1666d9b1cd 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/article/draft/ArticleDraftFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/article/draft/ArticleDraftFragment.kt @@ -19,7 +19,7 @@ import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.qa.article.edit.ArticleEditActivity import com.gh.gamecenter.qa.draft.CommunityDraftWrapperActivity import com.gh.gamecenter.qa.entity.ArticleDraftEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.Observable diff --git a/app/src/main/java/com/gh/gamecenter/qa/article/edit/ArticleEditActivity.kt b/app/src/main/java/com/gh/gamecenter/qa/article/edit/ArticleEditActivity.kt index 990886c044..c784489c61 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/article/edit/ArticleEditActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/article/edit/ArticleEditActivity.kt @@ -15,19 +15,15 @@ import androidx.core.widget.doOnTextChanged import androidx.lifecycle.Observer import androidx.lifecycle.ViewModelProviders import com.gh.base.BaseRichEditorActivity +import com.gh.common.util.ErrorHelper +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.common.base.fragment.WaitingDialogFragment import com.gh.gamecenter.core.AppExecutor import com.gh.gamecenter.common.constant.Constants -import com.gh.common.util.* import com.gh.gamecenter.R import com.gh.gamecenter.common.callback.ConfirmListener import com.gh.gamecenter.common.constant.EntranceConsts -import com.gh.gamecenter.common.utils.debounceActionWithInterval -import com.gh.gamecenter.common.utils.ifLogin -import com.gh.gamecenter.common.utils.observeNonNull -import com.gh.gamecenter.common.utils.toColor -import com.gh.gamecenter.common.utils.DialogHelper -import com.gh.gamecenter.common.utils.TextHelper +import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.core.utils.* import com.gh.gamecenter.databinding.ActivityCommunityArticleEditBinding import com.gh.gamecenter.entity.ActivityLabelEntity diff --git a/app/src/main/java/com/gh/gamecenter/qa/article/edit/ArticleEditViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/article/edit/ArticleEditViewModel.kt index 8915367f3a..6a7ecc131e 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/article/edit/ArticleEditViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/article/edit/ArticleEditViewModel.kt @@ -22,7 +22,7 @@ import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.qa.entity.ArticleDetailEntity import com.gh.gamecenter.qa.entity.ArticleDraftEntity import com.gh.gamecenter.qa.questions.edit.QuestionEditViewModel -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.lightgame.utils.Utils import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/qa/column/AskColumnRepository.java b/app/src/main/java/com/gh/gamecenter/qa/column/AskColumnRepository.java index c427aaa622..a350eeb5fb 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/column/AskColumnRepository.java +++ b/app/src/main/java/com/gh/gamecenter/qa/column/AskColumnRepository.java @@ -8,9 +8,9 @@ import com.gh.common.util.ErrorHelper; import com.gh.gamecenter.core.utils.GsonUtils; import com.gh.gamecenter.manager.UserManager; import com.gh.gamecenter.qa.entity.AskTagGroupsEntity; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; -import com.gh.gamecenter.user.ApiResponse; +import com.gh.gamecenter.common.retrofit.ApiResponse; import com.halo.assistant.HaloApp; import java.util.ArrayList; diff --git a/app/src/main/java/com/gh/gamecenter/qa/comment/CommentActivity.kt b/app/src/main/java/com/gh/gamecenter/qa/comment/CommentActivity.kt index f3823594c3..7d3e170b7a 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/comment/CommentActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/comment/CommentActivity.kt @@ -6,7 +6,7 @@ import android.content.Intent import android.content.pm.ActivityInfo import android.os.Build import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.common.constant.EntranceConsts.KEY_COMMENT_ID diff --git a/app/src/main/java/com/gh/gamecenter/qa/comment/NewCommentFragment.kt b/app/src/main/java/com/gh/gamecenter/qa/comment/NewCommentFragment.kt index 3c64c2deae..d3cbd952f8 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/comment/NewCommentFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/comment/NewCommentFragment.kt @@ -21,6 +21,7 @@ import com.gh.gamecenter.common.syncpage.SyncDataEntity import com.gh.gamecenter.common.syncpage.SyncFieldConstants import com.gh.gamecenter.common.syncpage.SyncPageRepository import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.gamecenter.common.constant.EntranceConsts.KEY_COMMENT_ID import com.gh.gamecenter.common.view.VerticalItemDecoration import com.gh.gamecenter.CommentDetailActivity diff --git a/app/src/main/java/com/gh/gamecenter/qa/comment/NewCommentViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/comment/NewCommentViewModel.kt index ce3eba7b93..885538806e 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/comment/NewCommentViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/comment/NewCommentViewModel.kt @@ -16,11 +16,11 @@ import com.gh.gamecenter.common.utils.tryCatchInRelease import com.gh.gamecenter.common.utils.tryWithDefaultCatch import com.gh.gamecenter.entity.CommentDraft import com.gh.gamecenter.entity.CommentEntity -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.room.dao.CommentDraftDao -import com.gh.gamecenter.user.ApiResponse +import com.gh.gamecenter.common.retrofit.ApiResponse import com.lightgame.utils.Utils import io.reactivex.Observable import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentAdapter.kt b/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentAdapter.kt index bfd09446b5..02d0bc797a 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentAdapter.kt @@ -16,6 +16,8 @@ import com.gh.gamecenter.common.syncpage.SyncDataEntity import com.gh.gamecenter.common.syncpage.SyncFieldConstants import com.gh.gamecenter.common.syncpage.SyncPageRepository import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.common.view.GridSpacingItemColorDecoration import com.gh.gamecenter.R import com.gh.gamecenter.baselist.ListAdapter diff --git a/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentViewModel.kt index ac0f2ed1ad..306e82a9f3 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/comment/base/BaseCommentViewModel.kt @@ -20,7 +20,7 @@ import com.gh.gamecenter.entity.CommentEntity import com.gh.gamecenter.entity.MeEntity import com.gh.gamecenter.entity.Permissions import com.gh.gamecenter.qa.article.detail.CommentItemData -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.retrofit.service.ApiService import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/gamecenter/qa/comment/conversation/CommentConversationViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/comment/conversation/CommentConversationViewModel.kt index 295911820a..f864270ffd 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/comment/conversation/CommentConversationViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/comment/conversation/CommentConversationViewModel.kt @@ -7,8 +7,7 @@ import androidx.lifecycle.ViewModelProvider import com.gh.gamecenter.entity.CommentEntity import com.gh.gamecenter.qa.comment.base.BaseCommentViewModel import com.gh.gamecenter.qa.article.detail.CommentItemData -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.RetrofitManager +import com.gh.gamecenter.common.retrofit.BiResponse import io.reactivex.Observable import io.reactivex.Single import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/qa/dialog/ChooseForumActivity.kt b/app/src/main/java/com/gh/gamecenter/qa/dialog/ChooseForumActivity.kt index a50179975d..837d15eb9b 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/dialog/ChooseForumActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/dialog/ChooseForumActivity.kt @@ -10,7 +10,7 @@ import android.view.MotionEvent import android.view.View import androidx.core.widget.doOnTextChanged import androidx.fragment.app.Fragment -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.base.adapter.FragmentAdapter import com.gh.common.util.* import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/qa/dialog/MoreFunctionPanelDialog.kt b/app/src/main/java/com/gh/gamecenter/qa/dialog/MoreFunctionPanelDialog.kt index 6a7bf7bb5c..f49a5ef0bc 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/dialog/MoreFunctionPanelDialog.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/dialog/MoreFunctionPanelDialog.kt @@ -15,10 +15,11 @@ import com.gh.gamecenter.common.base.fragment.BaseDraggableDialogFragment import com.gh.common.util.* import com.gh.gamecenter.R import com.gh.gamecenter.common.constant.EntranceConsts +import com.gh.gamecenter.common.utils.ShareUtils import com.gh.gamecenter.common.utils.debounceActionWithInterval import com.gh.gamecenter.common.utils.dip2px import com.gh.gamecenter.databinding.DialogGameDetailMoreBinding -import com.gh.gamecenter.entity.NormalShareEntity +import com.gh.gamecenter.common.entity.NormalShareEntity import com.gh.gamecenter.entity.MenuItemEntity class MoreFunctionPanelDialog : BaseDraggableDialogFragment() { diff --git a/app/src/main/java/com/gh/gamecenter/qa/editor/FullScreenVideoActivity.kt b/app/src/main/java/com/gh/gamecenter/qa/editor/FullScreenVideoActivity.kt index 78d5209617..7e42a2aa68 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/editor/FullScreenVideoActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/editor/FullScreenVideoActivity.kt @@ -5,7 +5,7 @@ import android.content.Intent import android.content.pm.ActivityInfo import android.os.Build import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.core.utils.MD5Utils diff --git a/app/src/main/java/com/gh/gamecenter/qa/editor/GameFragment.kt b/app/src/main/java/com/gh/gamecenter/qa/editor/GameFragment.kt index f0839eb097..fe4511fa48 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/editor/GameFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/editor/GameFragment.kt @@ -21,7 +21,7 @@ import com.gh.gamecenter.baselist.NormalListViewModel import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.qa.entity.EditorInsertDefaultEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Util_System_Keyboard diff --git a/app/src/main/java/com/gh/gamecenter/qa/editor/OnLinkClickListener.kt b/app/src/main/java/com/gh/gamecenter/qa/editor/OnLinkClickListener.kt index 2e45bfe995..da5e78b7d7 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/editor/OnLinkClickListener.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/editor/OnLinkClickListener.kt @@ -2,7 +2,7 @@ package com.gh.gamecenter.qa.editor import android.content.Context import android.webkit.JavascriptInterface -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.core.AppExecutor import com.gh.common.util.* import com.gh.gamecenter.GameDetailActivity diff --git a/app/src/main/java/com/gh/gamecenter/qa/editor/PreviewVideoActivity.kt b/app/src/main/java/com/gh/gamecenter/qa/editor/PreviewVideoActivity.kt index e610919c59..c4f44e954e 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/editor/PreviewVideoActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/editor/PreviewVideoActivity.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.qa.editor import android.content.Context import android.content.Intent import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/qa/questions/detail/QuestionsDetailFragment.kt b/app/src/main/java/com/gh/gamecenter/qa/questions/detail/QuestionsDetailFragment.kt index 100aa1a19a..d52e1c0e53 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/questions/detail/QuestionsDetailFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/questions/detail/QuestionsDetailFragment.kt @@ -34,7 +34,7 @@ //import com.gh.gamecenter.baselist.ListAdapter //import com.gh.gamecenter.baselist.ListFragment //import com.gh.gamecenter.baselist.LoadType -//import com.gh.gamecenter.entity.NormalShareEntity +//import com.gh.gamecenter.common.entity.NormalShareEntity //import com.gh.gamecenter.entity.MenuItemEntity //import com.gh.gamecenter.entity.Permissions //import com.gh.gamecenter.entity.SpecialColumn diff --git a/app/src/main/java/com/gh/gamecenter/qa/questions/detail/QuestionsDetailViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/questions/detail/QuestionsDetailViewModel.kt index e81a6b99cb..c25869a1f9 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/questions/detail/QuestionsDetailViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/questions/detail/QuestionsDetailViewModel.kt @@ -17,7 +17,7 @@ //import com.gh.gamecenter.mvvm.Resource //import com.gh.gamecenter.qa.entity.AnswerEntity //import com.gh.gamecenter.qa.entity.QuestionsDetailEntity -//import com.gh.gamecenter.retrofit.BiResponse +//import com.gh.gamecenter.common.retrofit.BiResponse //import com.gh.gamecenter.retrofit.Response //import com.gh.gamecenter.retrofit.RetrofitManager //import com.halo.assistant.HaloApp diff --git a/app/src/main/java/com/gh/gamecenter/qa/questions/draft/QuestionDraftViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/questions/draft/QuestionDraftViewModel.kt index 10181651f7..69d6e49aa2 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/questions/draft/QuestionDraftViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/questions/draft/QuestionDraftViewModel.kt @@ -7,7 +7,7 @@ import com.gh.gamecenter.common.utils.observableToMain import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.qa.entity.QuestionDraftEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Observable import okhttp3.ResponseBody @@ -29,7 +29,7 @@ class QuestionDraftViewModel(application: Application) : ListViewModel(){ + .subscribe(object : Response(){ override fun onResponse(response: ResponseBody?) { super.onResponse(response) deleteDraftSuccess.postValue(Pair(draftId, true)) diff --git a/app/src/main/java/com/gh/gamecenter/qa/questions/edit/QuestionEditActivity.kt b/app/src/main/java/com/gh/gamecenter/qa/questions/edit/QuestionEditActivity.kt index 86a539135c..3bf078aebc 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/questions/edit/QuestionEditActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/questions/edit/QuestionEditActivity.kt @@ -19,18 +19,16 @@ import androidx.core.widget.addTextChangedListener import androidx.lifecycle.Observer import androidx.lifecycle.ViewModelProviders import com.gh.base.BaseRichEditorActivity +import com.gh.common.util.NewLogUtils +import com.gh.common.util.NotificationHelper import com.gh.gamecenter.common.base.fragment.WaitingDialogFragment import com.gh.gamecenter.core.AppExecutor import com.gh.gamecenter.common.constant.Constants -import com.gh.common.util.* import com.gh.gamecenter.R import com.gh.gamecenter.common.callback.ConfirmListener import com.gh.gamecenter.common.constant.EntranceConsts -import com.gh.gamecenter.common.utils.DialogHelper +import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.core.utils.ToastUtils -import com.gh.gamecenter.common.utils.debounceActionWithInterval -import com.gh.gamecenter.common.utils.toColor -import com.gh.gamecenter.common.utils.TextHelper import com.gh.gamecenter.core.utils.KeyboardHeightObserver import com.gh.gamecenter.core.utils.PatternUtils import com.gh.gamecenter.databinding.ActivityQuestionsEditBinding diff --git a/app/src/main/java/com/gh/gamecenter/qa/questions/edit/QuestionEditViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/questions/edit/QuestionEditViewModel.kt index 5706763e75..e48ebf0568 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/questions/edit/QuestionEditViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/questions/edit/QuestionEditViewModel.kt @@ -25,8 +25,8 @@ import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.mvvm.Resource import com.gh.gamecenter.qa.entity.QuestionDraftEntity import com.gh.gamecenter.qa.entity.QuestionsDetailEntity -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.lightgame.utils.Utils import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/qa/questions/edit/TagsSelectFragment.kt b/app/src/main/java/com/gh/gamecenter/qa/questions/edit/TagsSelectFragment.kt index aa2f21dd64..a171c76976 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/questions/edit/TagsSelectFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/questions/edit/TagsSelectFragment.kt @@ -19,6 +19,7 @@ import com.gh.gamecenter.common.base.fragment.BaseFragment import com.gh.gamecenter.core.AppExecutor import com.gh.common.util.* import com.gh.gamecenter.R +import com.gh.gamecenter.common.callback.CancelListener import com.gh.gamecenter.common.callback.ConfirmListener import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.common.utils.DialogHelper @@ -153,10 +154,12 @@ class TagsSelectFragment : BaseFragment() { data?.questionTitle, data?.getFollowCount().toString() + " 关注 · " + data?.answerCount + " 回答", "继续提交", "去看看", - { - mViewModel?.uploadPicAndPostQuestion(true) - MtaHelper.onEvent("提交相似问题弹窗", UserManager.getInstance().community.name, "问题相似-继续提交") - },object :ConfirmListener{ + object : CancelListener { + override fun onCancel() { + mViewModel?.uploadPicAndPostQuestion(true) + MtaHelper.onEvent("提交相似问题弹窗", UserManager.getInstance().community.name, "问题相似-继续提交") + } + }, object : ConfirmListener { override fun onConfirm() { MtaHelper.onEvent("提交相似问题弹窗", UserManager.getInstance().community.name, "问题相似-去看看") val intent = NewQuestionDetailActivity.getIntent(requireContext(), data?.questionId ?: "", mEntrance, "相似问题") @@ -171,7 +174,7 @@ class TagsSelectFragment : BaseFragment() { data?.questionTitle, data?.getFollowCount().toString() + " 关注 · " + data?.answerCount + " 回答", null, "去看看", null, - object :ConfirmListener{ + object : ConfirmListener { override fun onConfirm() { MtaHelper.onEvent("提交重复问题弹窗", UserManager.getInstance().community.name, "问题重复-去看看") val intent = NewQuestionDetailActivity.getIntent(requireContext(), data?.questionId ?: "", mEntrance, "重复问题") diff --git a/app/src/main/java/com/gh/gamecenter/qa/questions/edit/tip/QuestionTitleTipAdapter.kt b/app/src/main/java/com/gh/gamecenter/qa/questions/edit/tip/QuestionTitleTipAdapter.kt index 150e6b3d7e..3896ddf85e 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/questions/edit/tip/QuestionTitleTipAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/questions/edit/tip/QuestionTitleTipAdapter.kt @@ -14,7 +14,7 @@ import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.gamecenter.databinding.QuestionEditTitleSearchItemBinding import com.gh.gamecenter.qa.entity.QuestionsIndexEntity import com.gh.gamecenter.qa.questions.newdetail.NewQuestionDetailActivity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager diff --git a/app/src/main/java/com/gh/gamecenter/qa/questions/invite/QuestionsInviteViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/questions/invite/QuestionsInviteViewModel.kt index 35775d9771..5a08ce875e 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/questions/invite/QuestionsInviteViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/questions/invite/QuestionsInviteViewModel.kt @@ -8,7 +8,7 @@ import androidx.lifecycle.ViewModelProvider import com.gh.common.util.ErrorHelper import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.qa.entity.InviteEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.Observable diff --git a/app/src/main/java/com/gh/gamecenter/qa/questions/invite/QuestionsInviteWrapperFragment.java b/app/src/main/java/com/gh/gamecenter/qa/questions/invite/QuestionsInviteWrapperFragment.java index 3ffb3076c2..1cabed8d15 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/questions/invite/QuestionsInviteWrapperFragment.java +++ b/app/src/main/java/com/gh/gamecenter/qa/questions/invite/QuestionsInviteWrapperFragment.java @@ -14,7 +14,7 @@ import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentTransaction; import com.gh.gamecenter.common.constant.EntranceConsts; -import com.gh.common.util.ShareUtils; +import com.gh.gamecenter.common.utils.ShareUtils; import com.gh.gamecenter.common.utils.TextHelper; import com.gh.gamecenter.R; import com.gh.gamecenter.databinding.FragmentInviteBinding; diff --git a/app/src/main/java/com/gh/gamecenter/qa/questions/newdetail/NewQuestionDetailFragment.kt b/app/src/main/java/com/gh/gamecenter/qa/questions/newdetail/NewQuestionDetailFragment.kt index 0256629e3d..61ca8df7ae 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/questions/newdetail/NewQuestionDetailFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/questions/newdetail/NewQuestionDetailFragment.kt @@ -17,11 +17,15 @@ import androidx.recyclerview.widget.RecyclerView import com.ethanhua.skeleton.Skeleton import com.gh.gamecenter.common.constant.Constants import com.gh.common.util.* +import com.gh.common.util.LogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.ImageViewerActivity import com.gh.gamecenter.R import com.gh.gamecenter.baselist.ListAdapter import com.gh.gamecenter.baselist.LoadType import com.gh.gamecenter.common.constant.EntranceConsts +import com.gh.gamecenter.common.entity.AdditionalParamsEntity +import com.gh.gamecenter.common.entity.NormalShareEntity import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.common.utils.ImageUtils import com.gh.gamecenter.databinding.FragmentArticleDetailBinding diff --git a/app/src/main/java/com/gh/gamecenter/qa/questions/newdetail/NewQuestionDetailViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/questions/newdetail/NewQuestionDetailViewModel.kt index d4f9dcd2a8..8305205e9d 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/questions/newdetail/NewQuestionDetailViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/questions/newdetail/NewQuestionDetailViewModel.kt @@ -23,8 +23,8 @@ import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.qa.article.detail.CommentItemData import com.gh.gamecenter.qa.comment.base.BaseCommentViewModel import com.gh.gamecenter.qa.entity.QuestionsDetailEntity -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.lightgame.utils.Utils import io.reactivex.Observable import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/qa/questions/newdetail/QuestionDetailContentViewHolder.kt b/app/src/main/java/com/gh/gamecenter/qa/questions/newdetail/QuestionDetailContentViewHolder.kt index 0b38d25d4a..3d1d55a073 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/questions/newdetail/QuestionDetailContentViewHolder.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/questions/newdetail/QuestionDetailContentViewHolder.kt @@ -11,6 +11,9 @@ import androidx.recyclerview.widget.RecyclerView import com.gh.common.DefaultUrlHandler import com.gh.gamecenter.core.runOnUiThread import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.LogUtils +import com.gh.common.util.NewLogUtils import com.gh.common.view.RichEditor import com.gh.gamecenter.ImageViewerActivity import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/qa/recommends/AskRecommendSubjectViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/recommends/AskRecommendSubjectViewModel.kt index de5a63c108..8a3753c6ef 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/recommends/AskRecommendSubjectViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/recommends/AskRecommendSubjectViewModel.kt @@ -7,7 +7,7 @@ package com.gh.gamecenter.qa.recommends //import androidx.lifecycle.MutableLiveData //import com.gh.gamecenter.entity.LinkEntity //import com.gh.gamecenter.manager.UserManager -//import com.gh.gamecenter.retrofit.BiResponse +//import com.gh.gamecenter.common.retrofit.BiResponse //import com.gh.gamecenter.retrofit.Response //import com.gh.gamecenter.retrofit.RetrofitManager //import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/qa/tags/AskQuestionsNewRepository.java b/app/src/main/java/com/gh/gamecenter/qa/tags/AskQuestionsNewRepository.java index b4d75a7223..ec4c42f1cd 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/tags/AskQuestionsNewRepository.java +++ b/app/src/main/java/com/gh/gamecenter/qa/tags/AskQuestionsNewRepository.java @@ -9,9 +9,9 @@ import com.gh.gamecenter.core.utils.GsonUtils; import com.gh.gamecenter.R; import com.gh.gamecenter.manager.UserManager; import com.gh.gamecenter.qa.entity.AskTagGroupsEntity; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; -import com.gh.gamecenter.user.ApiResponse; +import com.gh.gamecenter.common.retrofit.ApiResponse; import com.halo.assistant.HaloApp; import java.util.ArrayList; diff --git a/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumTopVideoView.kt b/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumTopVideoView.kt index 0d7dd5843d..9ae59a6f8b 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumTopVideoView.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumTopVideoView.kt @@ -15,7 +15,6 @@ import androidx.fragment.app.FragmentManager import com.gh.gamecenter.common.constant.Constants import com.gh.gamecenter.common.observer.MuteCallback import com.gh.gamecenter.common.observer.VolumeObserver -import com.gh.common.util.* import com.gh.gamecenter.R import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.core.utils.SPUtils diff --git a/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumVideoDetailActivity.kt b/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumVideoDetailActivity.kt index c5d3a56524..d008ab03b2 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumVideoDetailActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumVideoDetailActivity.kt @@ -4,7 +4,7 @@ import android.content.Context import android.content.Intent import android.os.Bundle import androidx.fragment.app.Fragment -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.base.fragment.BaseFragment_TabLayout.PAGE_INDEX import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.gamecenter.common.constant.EntranceConsts diff --git a/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumVideoDetailFragment.kt b/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumVideoDetailFragment.kt index dfbb72fb17..c05a150197 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumVideoDetailFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumVideoDetailFragment.kt @@ -25,10 +25,13 @@ import com.gh.gamecenter.common.base.fragment.BaseFragment_TabLayout import com.gh.gamecenter.common.constant.Constants import com.gh.common.databind.BindingAdapters import com.gh.common.util.* +import com.gh.common.util.NewLogUtils import com.gh.download.DownloadManager import com.gh.gamecenter.GameDetailActivity import com.gh.gamecenter.R import com.gh.gamecenter.common.constant.EntranceConsts +import com.gh.gamecenter.common.entity.AdditionalParamsEntity +import com.gh.gamecenter.common.entity.NormalShareEntity import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.core.utils.* import com.gh.gamecenter.databinding.FragmentForumVideoDetailBinding diff --git a/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumVideoDetailViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumVideoDetailViewModel.kt index e46f1f74ea..dd739ed0d5 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumVideoDetailViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/video/detail/ForumVideoDetailViewModel.kt @@ -16,8 +16,8 @@ import com.gh.gamecenter.common.utils.tryCatchInRelease import com.gh.gamecenter.core.utils.* import com.gh.gamecenter.entity.* import com.gh.gamecenter.mvvm.Resource -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.google.gson.JsonObject import com.halo.assistant.HaloApp diff --git a/app/src/main/java/com/gh/gamecenter/qa/video/detail/comment/VideoCommentFragment.kt b/app/src/main/java/com/gh/gamecenter/qa/video/detail/comment/VideoCommentFragment.kt index 3692d822aa..e3ff0727fd 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/video/detail/comment/VideoCommentFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/video/detail/comment/VideoCommentFragment.kt @@ -10,6 +10,7 @@ import com.gh.gamecenter.common.syncpage.SyncDataEntity import com.gh.gamecenter.common.syncpage.SyncFieldConstants import com.gh.gamecenter.common.syncpage.SyncPageRepository import com.gh.common.util.* +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.common.view.CustomDividerItemDecoration import com.gh.gamecenter.R import com.gh.gamecenter.baselist.LazyListFragment diff --git a/app/src/main/java/com/gh/gamecenter/qa/video/detail/desc/VideoDescFragment.kt b/app/src/main/java/com/gh/gamecenter/qa/video/detail/desc/VideoDescFragment.kt index a7df7da58b..a8e8f094b4 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/video/detail/desc/VideoDescFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/video/detail/desc/VideoDescFragment.kt @@ -4,7 +4,7 @@ import android.view.View import androidx.lifecycle.Observer import androidx.recyclerview.widget.RecyclerView import com.gh.common.util.NewLogUtils -import com.gh.common.util.ShareUtils +import com.gh.gamecenter.common.utils.ShareUtils import com.gh.gamecenter.common.utils.observeNonNull import com.gh.gamecenter.common.utils.viewModelProviderFromParent import com.gh.gamecenter.R @@ -12,7 +12,7 @@ import com.gh.gamecenter.baselist.LazyListFragment import com.gh.gamecenter.baselist.ListAdapter import com.gh.gamecenter.entity.ForumVideoEntity import com.gh.gamecenter.entity.VideoDescItemEntity -import com.gh.gamecenter.eventbus.EBShare +import com.gh.gamecenter.common.eventbus.EBShare import com.gh.gamecenter.mvvm.Status import com.gh.gamecenter.qa.video.detail.ForumVideoDetailViewModel import org.greenrobot.eventbus.Subscribe diff --git a/app/src/main/java/com/gh/gamecenter/qa/video/detail/desc/VideoDescTopViewHolder.kt b/app/src/main/java/com/gh/gamecenter/qa/video/detail/desc/VideoDescTopViewHolder.kt index c02a9023d0..6d391e4606 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/video/detail/desc/VideoDescTopViewHolder.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/video/detail/desc/VideoDescTopViewHolder.kt @@ -11,6 +11,8 @@ import androidx.core.animation.doOnStart import androidx.core.view.marginTop import com.gh.gamecenter.common.base.BaseRecyclerViewHolder import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.R import com.gh.gamecenter.common.callback.ConfirmListener import com.gh.gamecenter.common.utils.* diff --git a/app/src/main/java/com/gh/gamecenter/qa/video/detail/desc/VideoDescViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/video/detail/desc/VideoDescViewModel.kt index a7a97f0311..bb13e6cbed 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/video/detail/desc/VideoDescViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/video/detail/desc/VideoDescViewModel.kt @@ -16,8 +16,8 @@ import com.gh.gamecenter.entity.ForumVideoEntity import com.gh.gamecenter.entity.VideoDescItemEntity import com.gh.gamecenter.eventbus.EBUserFollow import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/gamecenter/qa/video/publish/VideoPublishFragment.kt b/app/src/main/java/com/gh/gamecenter/qa/video/publish/VideoPublishFragment.kt index 799d71554e..9a211757a3 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/video/publish/VideoPublishFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/video/publish/VideoPublishFragment.kt @@ -18,6 +18,7 @@ import com.gh.gamecenter.common.base.fragment.WaitingDialogFragment import com.gh.gamecenter.core.AppExecutor import com.gh.gamecenter.core.runOnUiThread import com.gh.common.util.* +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.CropImageActivity import com.gh.gamecenter.R import com.gh.gamecenter.common.constant.EntranceConsts diff --git a/app/src/main/java/com/gh/gamecenter/qa/video/publish/VideoPublishViewModel.kt b/app/src/main/java/com/gh/gamecenter/qa/video/publish/VideoPublishViewModel.kt index 458048c19b..a50f1b5220 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/video/publish/VideoPublishViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/video/publish/VideoPublishViewModel.kt @@ -20,9 +20,9 @@ import com.gh.gamecenter.core.utils.* import com.gh.gamecenter.entity.* import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.mvvm.Resource -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.ObservableUtil -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.ObservableUtil +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.google.gson.JsonObject import com.halo.assistant.HaloApp diff --git a/app/src/main/java/com/gh/gamecenter/retrofit/RetrofitManager.java b/app/src/main/java/com/gh/gamecenter/retrofit/RetrofitManager.java index f23231c936..09ece6f138 100644 --- a/app/src/main/java/com/gh/gamecenter/retrofit/RetrofitManager.java +++ b/app/src/main/java/com/gh/gamecenter/retrofit/RetrofitManager.java @@ -2,44 +2,23 @@ package com.gh.gamecenter.retrofit; import android.content.Context; -import com.chuckerteam.chucker.api.ChuckerCollector; -import com.chuckerteam.chucker.api.ChuckerInterceptor; -import com.chuckerteam.chucker.api.RetentionManager; import com.gh.common.constant.Config; -import com.gh.gamecenter.Injection; +import com.gh.gamecenter.common.retrofit.BaseRetrofitManager; import com.gh.gamecenter.retrofit.service.ApiService; import com.halo.assistant.HaloApp; -import java.io.File; -import java.util.concurrent.TimeUnit; - -import okhttp3.Cache; import okhttp3.OkHttpClient; -import retrofit2.Retrofit; -import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; -import retrofit2.converter.gson.GsonConverterFactory; /** * Created by LGT on 2016/11/7. * Retrofit 管理工具 */ -public class RetrofitManager { +public class RetrofitManager extends BaseRetrofitManager { - private static final int NORMAL_CONN_TIME_OUT = 5; - private static final int NORMAL_READ_TIME_OUT = 5; - private static final int UPLOAD_CALL_TIME_OUT = 20; // 图片上传超时时间 private final ApiService mApiService; private final ApiService mNewApiService; private final ApiService mUploadApiService; - public static T provideService(OkHttpClient client, String url, Class serviceCls) { - return new Retrofit.Builder() - .client(client) - .addConverterFactory(GsonConverterFactory.create()) - .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) - .baseUrl(url).build().create(serviceCls); - } - private RetrofitManager() { Context context = HaloApp.getInstance().getApplicationContext(); OkHttpClient okHttpNormalConfig = getOkHttpConfig(context, 0, 2); @@ -48,22 +27,6 @@ public class RetrofitManager { mUploadApiService = provideService(getOkHttpConfig(context, UPLOAD_CALL_TIME_OUT, 1), Config.API_HOST, ApiService.class); } - private OkHttpClient getOkHttpConfig(Context context, int callTimeout, int maxRetryCount) { - final Cache cache = new Cache(new File(OkHttpCache.getCachePath(context)), 10 * 1024 * 1024); // 10Mb - - return Injection.provideRetrofitBuilder() - .addInterceptor(new OkHttpCacheInterceptor(context)) - .addInterceptor(new OkHttpRetryInterceptor(context, maxRetryCount)) - .addInterceptor(new ChuckerInterceptor(context, new ChuckerCollector(context, true, RetentionManager.Period.ONE_DAY))) - .addNetworkInterceptor(new OkHttpNetworkInterceptor(context)) - .connectTimeout(NORMAL_CONN_TIME_OUT, TimeUnit.SECONDS) - .readTimeout(NORMAL_READ_TIME_OUT, TimeUnit.SECONDS) - .callTimeout(callTimeout, TimeUnit.SECONDS) - .pingInterval(30, TimeUnit.SECONDS) // 加入间隔为30秒的心跳包,用于解决闲置 Http/2 连接关闭时间与服务器不一造成 Connection Timeout 的问题 (https://github.com/square/okhttp/issues/3261) - .cache(cache) - .build(); - } - public static RetrofitManager getInstance() { return SingletonHolder.INSTANCE; } diff --git a/app/src/main/java/com/gh/gamecenter/search/SearchGameIndexAdapter.kt b/app/src/main/java/com/gh/gamecenter/search/SearchGameIndexAdapter.kt index db8622eaa2..6bbf54501b 100644 --- a/app/src/main/java/com/gh/gamecenter/search/SearchGameIndexAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/search/SearchGameIndexAdapter.kt @@ -17,6 +17,8 @@ import com.gh.common.exposure.ExposureType import com.gh.common.exposure.IExposable import com.gh.common.filter.RegionSettingHelper import com.gh.common.util.* +import com.gh.common.util.LogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.GameDetailActivity import com.gh.gamecenter.R import com.gh.gamecenter.SearchType diff --git a/app/src/main/java/com/gh/gamecenter/search/SearchGameResultAdapter.kt b/app/src/main/java/com/gh/gamecenter/search/SearchGameResultAdapter.kt index 73501d4581..66a39616b6 100644 --- a/app/src/main/java/com/gh/gamecenter/search/SearchGameResultAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/search/SearchGameResultAdapter.kt @@ -16,6 +16,8 @@ import com.gh.common.exposure.ExposureType import com.gh.common.exposure.IExposable import com.gh.common.filter.RegionSettingHelper import com.gh.common.util.* +import com.gh.common.util.LogUtils +import com.gh.common.util.NewLogUtils import com.gh.gamecenter.GameDetailActivity import com.gh.gamecenter.R import com.gh.gamecenter.SearchType diff --git a/app/src/main/java/com/gh/gamecenter/security/BindPhoneFragment.kt b/app/src/main/java/com/gh/gamecenter/security/BindPhoneFragment.kt index e0c8d4fd5e..d87b76a305 100644 --- a/app/src/main/java/com/gh/gamecenter/security/BindPhoneFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/security/BindPhoneFragment.kt @@ -8,6 +8,7 @@ import android.view.View import androidx.lifecycle.Observer import com.gh.gamecenter.common.constant.Constants import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.common.util.EnergyTaskHelper.postInviteCodeTask import com.gh.gamecenter.BuildConfig import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/security/BindPhoneViewModel.kt b/app/src/main/java/com/gh/gamecenter/security/BindPhoneViewModel.kt index 9f985c994b..ab588eddf2 100644 --- a/app/src/main/java/com/gh/gamecenter/security/BindPhoneViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/security/BindPhoneViewModel.kt @@ -10,7 +10,7 @@ import com.gh.gamecenter.core.utils.GsonUtils import com.gh.common.util.LoginUtils import com.gh.gamecenter.core.utils.ToastUtils import com.gh.gamecenter.entity.ConflictUserEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/servers/GameServersContentFragment.kt b/app/src/main/java/com/gh/gamecenter/servers/GameServersContentFragment.kt index 83faf83ff1..7c7dadb4a1 100644 --- a/app/src/main/java/com/gh/gamecenter/servers/GameServersContentFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/servers/GameServersContentFragment.kt @@ -16,6 +16,7 @@ import com.gh.gamecenter.common.base.fragment.BaseFragment import com.gh.gamecenter.common.constant.Constants import com.gh.common.exposure.ExposureListener import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.gamecenter.core.utils.MtaHelper.onEvent import com.gh.common.xapk.XapkInstaller import com.gh.common.xapk.XapkUnzipStatus diff --git a/app/src/main/java/com/gh/gamecenter/servers/GameServersContentViewModel.kt b/app/src/main/java/com/gh/gamecenter/servers/GameServersContentViewModel.kt index a773919903..6b10881b18 100644 --- a/app/src/main/java/com/gh/gamecenter/servers/GameServersContentViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/servers/GameServersContentViewModel.kt @@ -15,7 +15,7 @@ import com.gh.gamecenter.core.utils.UrlFilterUtils import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.entity.ServerCalendarEntity import com.gh.gamecenter.entity.ServerPublishEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/servers/GameServersPublishFragment.kt b/app/src/main/java/com/gh/gamecenter/servers/GameServersPublishFragment.kt index 5914b7a710..17e29657c0 100644 --- a/app/src/main/java/com/gh/gamecenter/servers/GameServersPublishFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/servers/GameServersPublishFragment.kt @@ -20,7 +20,7 @@ import com.gh.gamecenter.R import com.gh.gamecenter.databinding.FragmentGameServersPublishBinding import com.gh.gamecenter.entity.ServersGameCategory import com.gh.gamecenter.eventbus.EBNetworkState -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/servers/GameServersTestViewModel.kt b/app/src/main/java/com/gh/gamecenter/servers/GameServersTestViewModel.kt index 8254de9d16..3658adf18e 100644 --- a/app/src/main/java/com/gh/gamecenter/servers/GameServersTestViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/servers/GameServersTestViewModel.kt @@ -9,13 +9,13 @@ import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider -import com.gh.common.exposure.ExposureEntity +import com.gh.gamecenter.common.entity.ExposureEntity import com.gh.common.util.ApkActiveUtils import com.gh.gamecenter.core.utils.TimeUtils import com.gh.gamecenter.common.utils.safelyGetInRelease import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.entity.ServerTestEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.schedulers.Schedulers import java.text.SimpleDateFormat diff --git a/app/src/main/java/com/gh/gamecenter/servers/add/AddKaiFuViewModel.kt b/app/src/main/java/com/gh/gamecenter/servers/add/AddKaiFuViewModel.kt index 9734c528df..b6c318852b 100644 --- a/app/src/main/java/com/gh/gamecenter/servers/add/AddKaiFuViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/servers/add/AddKaiFuViewModel.kt @@ -10,7 +10,7 @@ import androidx.lifecycle.MutableLiveData import com.gh.gamecenter.common.utils.DialogHelper import com.gh.gamecenter.core.utils.GsonUtils import com.gh.gamecenter.entity.ServerCalendarEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils.toast import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/servers/patch/PatchKaifuViewModel.kt b/app/src/main/java/com/gh/gamecenter/servers/patch/PatchKaifuViewModel.kt index 4c72183a42..9244eea4e6 100644 --- a/app/src/main/java/com/gh/gamecenter/servers/patch/PatchKaifuViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/servers/patch/PatchKaifuViewModel.kt @@ -5,7 +5,7 @@ import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.MutableLiveData import com.gh.gamecenter.R import com.gh.gamecenter.entity.ServerCalendarEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/simulatorgame/SimulatorGameListAdapter.kt b/app/src/main/java/com/gh/gamecenter/simulatorgame/SimulatorGameListAdapter.kt index 298b54baae..98ed37b32f 100644 --- a/app/src/main/java/com/gh/gamecenter/simulatorgame/SimulatorGameListAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/simulatorgame/SimulatorGameListAdapter.kt @@ -25,6 +25,7 @@ import com.gh.common.databind.BindingAdapters import com.gh.common.simulator.SimulatorDownloadManager import com.gh.common.simulator.SimulatorGameManager import com.gh.common.util.* +import com.gh.common.util.DialogUtils import com.gh.gamecenter.common.view.BugFixedPopupWindow import com.gh.gamecenter.GameDetailActivity import com.gh.gamecenter.MainActivity diff --git a/app/src/main/java/com/gh/gamecenter/subject/SubjectListViewModel.kt b/app/src/main/java/com/gh/gamecenter/subject/SubjectListViewModel.kt index dc3d27f69b..9016c9b951 100644 --- a/app/src/main/java/com/gh/gamecenter/subject/SubjectListViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/subject/SubjectListViewModel.kt @@ -13,7 +13,7 @@ import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.entity.SubjectData import com.gh.gamecenter.entity.SubjectSettingEntity import com.gh.gamecenter.entity.TagStyleEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Observable import io.reactivex.Single diff --git a/app/src/main/java/com/gh/gamecenter/subject/SubjectViewModel.kt b/app/src/main/java/com/gh/gamecenter/subject/SubjectViewModel.kt index c96d685e59..b18ea8c702 100644 --- a/app/src/main/java/com/gh/gamecenter/subject/SubjectViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/subject/SubjectViewModel.kt @@ -9,8 +9,8 @@ import androidx.lifecycle.ViewModelProvider import com.gh.common.constant.Config import com.gh.gamecenter.entity.SubjectData import com.gh.gamecenter.entity.SubjectSettingEntity -import com.gh.gamecenter.retrofit.JSONObjectResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.JSONObjectResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/suggest/SuggestSelectFragment.java b/app/src/main/java/com/gh/gamecenter/suggest/SuggestSelectFragment.java index 55af2081c3..5b35aa488c 100644 --- a/app/src/main/java/com/gh/gamecenter/suggest/SuggestSelectFragment.java +++ b/app/src/main/java/com/gh/gamecenter/suggest/SuggestSelectFragment.java @@ -11,7 +11,7 @@ import com.gh.gamecenter.common.base.fragment.BaseFragment; import com.gh.common.constant.Config; import com.gh.common.util.DirectUtils; import com.gh.gamecenter.core.utils.MtaHelper; -import com.gh.common.util.ShareUtils; +import com.gh.gamecenter.common.utils.ShareUtils; import com.gh.gamecenter.R; import com.gh.gamecenter.databinding.FragmentSuggestSelectBinding; import com.gh.gamecenter.entity.SettingsEntity; diff --git a/app/src/main/java/com/gh/gamecenter/suggest/SuggestSelectGameAdapter.java b/app/src/main/java/com/gh/gamecenter/suggest/SuggestSelectGameAdapter.java index 372deefe09..fe1ff43e13 100644 --- a/app/src/main/java/com/gh/gamecenter/suggest/SuggestSelectGameAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/suggest/SuggestSelectGameAdapter.java @@ -16,7 +16,7 @@ import com.gh.gamecenter.R; import com.gh.gamecenter.SuggestionActivity; import com.gh.gamecenter.databinding.DialogSelectGameItemBinding; import com.gh.gamecenter.entity.InstallGameEntity; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.lightgame.adapter.BaseRecyclerAdapter; import java.io.File; diff --git a/app/src/main/java/com/gh/gamecenter/tag/TagsActivity.kt b/app/src/main/java/com/gh/gamecenter/tag/TagsActivity.kt index c300237609..3e7998b728 100644 --- a/app/src/main/java/com/gh/gamecenter/tag/TagsActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/tag/TagsActivity.kt @@ -3,7 +3,7 @@ package com.gh.gamecenter.tag import android.content.Context import android.content.Intent import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.GameDetailActivity import com.gh.gamecenter.NormalActivity import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/tag/TagsListViewModel.kt b/app/src/main/java/com/gh/gamecenter/tag/TagsListViewModel.kt index 8584798121..230e55a970 100644 --- a/app/src/main/java/com/gh/gamecenter/tag/TagsListViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/tag/TagsListViewModel.kt @@ -11,7 +11,7 @@ import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.entity.GameEntity import com.gh.gamecenter.entity.SubjectSettingEntity import com.gh.gamecenter.entity.TagEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Observable import io.reactivex.Single diff --git a/app/src/main/java/com/gh/gamecenter/teenagermode/TeenagerModeActivity.kt b/app/src/main/java/com/gh/gamecenter/teenagermode/TeenagerModeActivity.kt index 807fc28c7a..893f919144 100644 --- a/app/src/main/java/com/gh/gamecenter/teenagermode/TeenagerModeActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/teenagermode/TeenagerModeActivity.kt @@ -4,7 +4,7 @@ import android.content.Context import android.content.Intent import android.os.Bundle import androidx.fragment.app.Fragment -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.R import com.gh.gamecenter.core.utils.DisplayUtils diff --git a/app/src/main/java/com/gh/gamecenter/teenagermode/TeenagerModeViewModel.kt b/app/src/main/java/com/gh/gamecenter/teenagermode/TeenagerModeViewModel.kt index 3ee2d01867..113fdf048a 100644 --- a/app/src/main/java/com/gh/gamecenter/teenagermode/TeenagerModeViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/teenagermode/TeenagerModeViewModel.kt @@ -4,7 +4,7 @@ import android.annotation.SuppressLint import android.app.Application import androidx.lifecycle.AndroidViewModel import com.gh.gamecenter.common.utils.createRequestBody -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/toolbox/ToolBoxViewModel.kt b/app/src/main/java/com/gh/gamecenter/toolbox/ToolBoxViewModel.kt index de29569258..fc0a53b7b6 100644 --- a/app/src/main/java/com/gh/gamecenter/toolbox/ToolBoxViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/toolbox/ToolBoxViewModel.kt @@ -4,7 +4,6 @@ import android.app.Application import androidx.lifecycle.AndroidViewModel import androidx.lifecycle.MutableLiveData import com.gh.gamecenter.common.constant.Constants -import com.gh.common.util.* import com.gh.gamecenter.baselist.LoadStatus import com.gh.gamecenter.core.utils.GsonUtils import com.gh.gamecenter.core.utils.SPUtils @@ -13,7 +12,7 @@ import com.gh.gamecenter.common.utils.toJson import com.gh.gamecenter.core.utils.UrlFilterUtils import com.gh.gamecenter.entity.ToolBoxBlockEntity import com.gh.gamecenter.entity.ToolBoxEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.google.gson.reflect.TypeToken import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/user/UserRepository.java b/app/src/main/java/com/gh/gamecenter/user/UserRepository.java index 49a3f75b5c..40f255019a 100644 --- a/app/src/main/java/com/gh/gamecenter/user/UserRepository.java +++ b/app/src/main/java/com/gh/gamecenter/user/UserRepository.java @@ -3,7 +3,6 @@ package com.gh.gamecenter.user; import android.annotation.SuppressLint; import android.content.Context; import android.content.SharedPreferences; -import android.os.Build; import android.preference.PreferenceManager; import android.text.TextUtils; @@ -13,10 +12,10 @@ import androidx.lifecycle.LiveData; import androidx.lifecycle.MediatorLiveData; import com.gh.gamecenter.common.constant.Constants; -import com.gh.gamecenter.common.exposure.meta.MetaUtil; import com.gh.common.repository.ReservationRepository; import com.gh.gamecenter.common.callback.BiCallback; import com.gh.common.util.DataUtils; +import com.gh.gamecenter.common.retrofit.ApiResponse; import com.gh.gamecenter.common.utils.DeviceUtils; import com.gh.common.util.EnergyTaskHelper; import com.gh.gamecenter.common.utils.EnvHelper; @@ -29,7 +28,6 @@ import com.gh.common.util.NewLogUtils; import com.gh.gamecenter.core.utils.SPUtils; import com.gh.common.util.WechatBindHelper; import com.gh.download.DownloadManager; -import com.gh.gamecenter.BuildConfig; import com.gh.gamecenter.R; import com.gh.gamecenter.entity.AvatarBorderEntity; import com.gh.gamecenter.entity.BackgroundImageEntity; @@ -41,8 +39,8 @@ import com.gh.gamecenter.eventbus.EBReuse; import com.gh.gamecenter.manager.UserManager; import com.gh.gamecenter.message.MessageUnreadRepository; import com.gh.gamecenter.personal.PersonalFragment; -import com.gh.gamecenter.retrofit.BiResponse; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.BiResponse; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.gh.gamecenter.retrofit.service.ApiService; import com.halo.assistant.HaloApp; diff --git a/app/src/main/java/com/gh/gamecenter/user/UserViewModel.java b/app/src/main/java/com/gh/gamecenter/user/UserViewModel.java index 0acc792451..0f5dc8ef97 100644 --- a/app/src/main/java/com/gh/gamecenter/user/UserViewModel.java +++ b/app/src/main/java/com/gh/gamecenter/user/UserViewModel.java @@ -2,6 +2,7 @@ package com.gh.gamecenter.user; import android.app.Application; +import com.gh.gamecenter.common.retrofit.ApiResponse; import com.gh.gamecenter.entity.UserInfoEntity; import org.json.JSONObject; diff --git a/app/src/main/java/com/gh/gamecenter/video/data/VideoDataActivity.kt b/app/src/main/java/com/gh/gamecenter/video/data/VideoDataActivity.kt index db145ca0c6..197e83aa42 100644 --- a/app/src/main/java/com/gh/gamecenter/video/data/VideoDataActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/video/data/VideoDataActivity.kt @@ -1,7 +1,7 @@ package com.gh.gamecenter.video.data import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/video/data/VideoDataViewModel.kt b/app/src/main/java/com/gh/gamecenter/video/data/VideoDataViewModel.kt index 289cfe4883..d329d2a5a9 100644 --- a/app/src/main/java/com/gh/gamecenter/video/data/VideoDataViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/video/data/VideoDataViewModel.kt @@ -8,7 +8,7 @@ import com.gh.gamecenter.entity.VideoDataItem import com.gh.gamecenter.entity.VideoDataOverViewEntity import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.mvvm.Resource -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/video/detail/DetailPlayerView.kt b/app/src/main/java/com/gh/gamecenter/video/detail/DetailPlayerView.kt index 0d6ff5dbf2..097c98a6cf 100644 --- a/app/src/main/java/com/gh/gamecenter/video/detail/DetailPlayerView.kt +++ b/app/src/main/java/com/gh/gamecenter/video/detail/DetailPlayerView.kt @@ -26,6 +26,8 @@ import com.gh.gamecenter.common.observer.VolumeObserver import com.gh.gamecenter.core.runOnIoThread import com.gh.gamecenter.core.runOnUiThread import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.LogUtils import com.gh.download.cache.ExoCacheManager import com.gh.gamecenter.GameDetailActivity import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/video/detail/VideoAdapter.kt b/app/src/main/java/com/gh/gamecenter/video/detail/VideoAdapter.kt index f917f52ad4..53e03abe8c 100644 --- a/app/src/main/java/com/gh/gamecenter/video/detail/VideoAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/video/detail/VideoAdapter.kt @@ -8,7 +8,7 @@ import android.widget.TextView import androidx.appcompat.app.AppCompatActivity import androidx.recyclerview.widget.RecyclerView import androidx.swiperefreshlayout.widget.SwipeRefreshLayout -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.constant.Constants import com.gh.common.exposure.ExposureEvent import com.gh.common.exposure.ExposureSource diff --git a/app/src/main/java/com/gh/gamecenter/video/detail/VideoDetailActivity.kt b/app/src/main/java/com/gh/gamecenter/video/detail/VideoDetailActivity.kt index 93eada488e..9b62029a6f 100644 --- a/app/src/main/java/com/gh/gamecenter/video/detail/VideoDetailActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/video/detail/VideoDetailActivity.kt @@ -1,7 +1,7 @@ package com.gh.gamecenter.video.detail import android.os.Bundle -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.core.utils.DisplayUtils import com.gh.gamecenter.R import java.util.* diff --git a/app/src/main/java/com/gh/gamecenter/video/detail/VideoDetailContainerFragment.kt b/app/src/main/java/com/gh/gamecenter/video/detail/VideoDetailContainerFragment.kt index 7e3239d2f5..fcae4209b4 100644 --- a/app/src/main/java/com/gh/gamecenter/video/detail/VideoDetailContainerFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/video/detail/VideoDetailContainerFragment.kt @@ -18,6 +18,7 @@ import androidx.recyclerview.widget.RecyclerView import com.gh.gamecenter.common.base.fragment.BaseLazyFragment import com.gh.common.exposure.ExposureListener import com.gh.common.util.* +import com.gh.common.util.LogUtils import com.gh.common.videolog.VideoRecordUtils import com.gh.gamecenter.common.view.vertical_recycler.OnPagerListener import com.gh.gamecenter.common.view.vertical_recycler.PagerLayoutManager @@ -25,6 +26,7 @@ import com.gh.download.DownloadManager import com.gh.download.cache.ExoCacheManager import com.gh.gamecenter.R import com.gh.gamecenter.common.constant.EntranceConsts +import com.gh.gamecenter.common.eventbus.EBShare import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.core.utils.* import com.gh.gamecenter.databinding.FragmentVideoDetailContainerBinding diff --git a/app/src/main/java/com/gh/gamecenter/video/detail/VideoDetailContainerViewModel.kt b/app/src/main/java/com/gh/gamecenter/video/detail/VideoDetailContainerViewModel.kt index 0b5fbdd15c..2fae37a16a 100644 --- a/app/src/main/java/com/gh/gamecenter/video/detail/VideoDetailContainerViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/video/detail/VideoDetailContainerViewModel.kt @@ -20,8 +20,8 @@ import com.gh.gamecenter.entity.User import com.gh.gamecenter.entity.VideoEntity import com.gh.gamecenter.eventbus.EBUserFollow import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.google.gson.JsonObject import com.lightgame.utils.Utils @@ -231,8 +231,8 @@ class VideoDetailContainerViewModel(application: Application) : AndroidViewModel } } .compose(singleToMain()) - .subscribe(object : BiResponse>>() { - override fun onSuccess(data: retrofit2.Response>) { + .subscribe(object : BiResponse>>() { + override fun onSuccess(data: retrofit2.Response>) { val headers = data.headers() total = headers.get("total")?.toInt() ?: 0 @@ -560,7 +560,7 @@ class VideoDetailContainerViewModel(application: Application) : AndroidViewModel RetrofitManager.getInstance() .api.postFollowing(videoEntity!!.user.id) .subscribeOn(Schedulers.io()) - .subscribe(object : Response() { + .subscribe(object : com.gh.gamecenter.common.retrofit.Response() { override fun onResponse(response: ResponseBody?) { super.onResponse(response) videoEntity.me.isFollower = true diff --git a/app/src/main/java/com/gh/gamecenter/video/game/GameVideoActivity.kt b/app/src/main/java/com/gh/gamecenter/video/game/GameVideoActivity.kt index 359037fcf1..308ff4cfbd 100644 --- a/app/src/main/java/com/gh/gamecenter/video/game/GameVideoActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/video/game/GameVideoActivity.kt @@ -8,7 +8,7 @@ import android.widget.TextView import androidx.core.content.ContextCompat import androidx.fragment.app.Fragment import androidx.lifecycle.ViewModelProviders -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.base.ToolBarActivity import com.gh.gamecenter.common.base.adapter.FragmentAdapter import com.gh.gamecenter.GameDetailActivity diff --git a/app/src/main/java/com/gh/gamecenter/video/game/GameVideoViewModel.kt b/app/src/main/java/com/gh/gamecenter/video/game/GameVideoViewModel.kt index 96e13e4975..4a29c2ef13 100644 --- a/app/src/main/java/com/gh/gamecenter/video/game/GameVideoViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/video/game/GameVideoViewModel.kt @@ -8,7 +8,7 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider import com.gh.gamecenter.entity.GameVideoInfo import com.gh.gamecenter.mvvm.Resource -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.android.schedulers.AndroidSchedulers import io.reactivex.schedulers.Schedulers diff --git a/app/src/main/java/com/gh/gamecenter/video/label/VideoLabelViewModel.kt b/app/src/main/java/com/gh/gamecenter/video/label/VideoLabelViewModel.kt index 420db3edcf..6906da1fc9 100644 --- a/app/src/main/java/com/gh/gamecenter/video/label/VideoLabelViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/video/label/VideoLabelViewModel.kt @@ -6,7 +6,7 @@ import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModelProvider import com.gh.gamecenter.entity.ActivityLabelEntity -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/video/upload/UploadManager.kt b/app/src/main/java/com/gh/gamecenter/video/upload/UploadManager.kt index 916c14ba86..cf551fdd29 100644 --- a/app/src/main/java/com/gh/gamecenter/video/upload/UploadManager.kt +++ b/app/src/main/java/com/gh/gamecenter/video/upload/UploadManager.kt @@ -6,7 +6,7 @@ import com.gh.gamecenter.core.utils.MD5Utils import com.gh.gamecenter.common.utils.tryCatchInRelease import com.gh.gamecenter.BuildConfig import com.gh.gamecenter.entity.OssEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.room.AppDatabase import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/video/upload/view/UploadVideoActivity.kt b/app/src/main/java/com/gh/gamecenter/video/upload/view/UploadVideoActivity.kt index bf02bcd662..e6f91d3216 100644 --- a/app/src/main/java/com/gh/gamecenter/video/upload/view/UploadVideoActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/video/upload/view/UploadVideoActivity.kt @@ -29,12 +29,15 @@ import com.gh.base.ToolBarActivity import com.gh.gamecenter.common.base.fragment.WaitingDialogFragment import com.gh.gamecenter.core.AppExecutor import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.LogUtils import com.gh.gamecenter.common.view.DrawableView import com.gh.gamecenter.CropImageActivity import com.gh.gamecenter.NewsDetailActivity import com.gh.gamecenter.R import com.gh.gamecenter.WebActivity import com.gh.gamecenter.common.* +import com.gh.gamecenter.common.callback.CancelListener import com.gh.gamecenter.common.callback.ConfirmListener import com.gh.gamecenter.common.constant.EntranceConsts import com.gh.gamecenter.common.utils.* @@ -467,13 +470,15 @@ class UploadVideoActivity : ToolBarActivity() { handleFileNotFound() } else { DialogUtils.showUploadDraftDialog(this@UploadVideoActivity, - { - if (!File(mVideoFileEntity?.path).exists()) { - toast("上传失败,视频文件不存在") - handleFileNotFound() + object :CancelListener{ + override fun onCancel() { + if (!File(mVideoFileEntity?.path).exists()) { + toast("上传失败,视频文件不存在") + handleFileNotFound() + } + MtaHelper.onEvent("上传视频", "上传视频-存草稿", "继续上传") + LogUtils.logVideoStreamingUpload("存草稿-取消", mPath, mEntranceLink, "") } - MtaHelper.onEvent("上传视频", "上传视频-存草稿", "继续上传") - LogUtils.logVideoStreamingUpload("存草稿-取消", mPath, mEntranceLink, "") }, object : ConfirmListener { override fun onConfirm() { verifyData(true) diff --git a/app/src/main/java/com/gh/gamecenter/video/upload/view/UploadVideoViewModel.kt b/app/src/main/java/com/gh/gamecenter/video/upload/view/UploadVideoViewModel.kt index 531dc1bcd5..3bd6d84176 100644 --- a/app/src/main/java/com/gh/gamecenter/video/upload/view/UploadVideoViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/video/upload/view/UploadVideoViewModel.kt @@ -16,8 +16,8 @@ import com.gh.gamecenter.common.utils.tryWithDefaultCatch import com.gh.gamecenter.entity.* import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.mvvm.Resource -import com.gh.gamecenter.retrofit.BiResponse -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.google.gson.JsonObject import com.lightgame.utils.Utils diff --git a/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoDraftViewModel.kt b/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoDraftViewModel.kt index 5a9807a048..36638bcb81 100644 --- a/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoDraftViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoDraftViewModel.kt @@ -6,7 +6,7 @@ import com.gh.common.util.ErrorHelper import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.entity.VideoDraftEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import io.reactivex.Observable import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoManagerActivity.kt b/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoManagerActivity.kt index 6dc2fbade8..98796f6cef 100644 --- a/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoManagerActivity.kt +++ b/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoManagerActivity.kt @@ -7,7 +7,7 @@ import android.view.MenuItem import android.view.View import android.widget.TextView import androidx.fragment.app.Fragment -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.base.BaseActivity_TabLayout import com.gh.common.util.* import com.gh.gamecenter.R diff --git a/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoVerifyAdapter.kt b/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoVerifyAdapter.kt index 8e8dcf947d..c86fa55d56 100644 --- a/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoVerifyAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoVerifyAdapter.kt @@ -10,6 +10,7 @@ import android.widget.TextView import androidx.recyclerview.widget.RecyclerView import com.gh.gamecenter.common.constant.ItemViewType import com.gh.common.util.* +import com.gh.common.util.LogUtils import com.gh.gamecenter.common.view.BugFixedPopupWindow import com.gh.gamecenter.R import com.gh.gamecenter.adapter.viewholder.FooterViewHolder diff --git a/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoVerifyViewModel.kt b/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoVerifyViewModel.kt index 799cdee1ac..eaf712209f 100644 --- a/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoVerifyViewModel.kt +++ b/app/src/main/java/com/gh/gamecenter/video/videomanager/VideoVerifyViewModel.kt @@ -6,7 +6,7 @@ import com.gh.common.util.ErrorHelper import com.gh.gamecenter.baselist.ListViewModel import com.gh.gamecenter.entity.VideoEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import io.reactivex.Observable diff --git a/app/src/main/java/com/gh/gamecenter/wxapi/WXEntryActivity.java b/app/src/main/java/com/gh/gamecenter/wxapi/WXEntryActivity.java index 337983c843..3812e36d51 100644 --- a/app/src/main/java/com/gh/gamecenter/wxapi/WXEntryActivity.java +++ b/app/src/main/java/com/gh/gamecenter/wxapi/WXEntryActivity.java @@ -9,12 +9,10 @@ import android.widget.TextView; import com.gh.common.DefaultUrlHandler; import com.gh.common.constant.Config; import com.gh.common.util.EnergyTaskHelper; -import com.gh.common.util.LogUtils; import com.gh.common.util.LoginHelper; -import com.gh.common.util.NewLogUtils; -import com.gh.common.util.ShareUtils; import com.gh.gamecenter.R; -import com.gh.gamecenter.eventbus.EBShare; +import com.gh.gamecenter.common.eventbus.EBShare; +import com.gh.gamecenter.common.utils.ShareUtils; import com.lightgame.utils.Utils; import com.tencent.mm.opensdk.modelbase.BaseReq; import com.tencent.mm.opensdk.modelbase.BaseResp; @@ -74,13 +72,13 @@ public class WXEntryActivity extends Activity implements IWXAPIEventHandler, WeC resultString = "分享成功"; Utils.toast(this, resultString); EventBus.getDefault().post(new EBShare(ShareUtils.shareEntrance)); - LogUtils.uploadShareResult(ShareUtils.shareType, ShareUtils.shareEntrance.getName(), "success", + com.gh.gamecenter.common.utils.LogUtils.uploadShareResult(ShareUtils.shareType, ShareUtils.shareEntrance.getName(), "success", ShareUtils.shareEntity.getShareUrl(), ShareUtils.shareEntity.getShareTitle(), ShareUtils.shareEntity.getSummary(), ShareUtils.resourceId); EnergyTaskHelper.postEnergyTaskForShare(ShareUtils.shareEntrance.getName(), ShareUtils.resourceId, ShareUtils.shareEntity.getShareUrl()); if (ShareUtils.shareEntrance == ShareUtils.ShareEntrance.askNormal || ShareUtils.shareEntrance == ShareUtils.ShareEntrance.communityArticle || ShareUtils.shareEntrance == ShareUtils.ShareEntrance.video) { - NewLogUtils.logShareResult(ShareUtils.additionalParams, true); + com.gh.gamecenter.common.utils.NewLogUtils.logShareResult(ShareUtils.additionalParams, true); } else if (ShareUtils.shareEntrance == ShareUtils.ShareEntrance.gameCollection) { String shareType; if ("wechat_friend".equals(ShareUtils.shareType)) { @@ -88,7 +86,7 @@ public class WXEntryActivity extends Activity implements IWXAPIEventHandler, WeC } else { shareType = "朋友圈"; } - NewLogUtils.logViewOrClickGameCollectionDetail( + com.gh.gamecenter.common.utils.NewLogUtils.logViewOrClickGameCollectionDetail( "click_game_collect_detail_favorite_success", ShareUtils.shareEntity.getShareTitle(), ShareUtils.resourceId, @@ -110,12 +108,12 @@ public class WXEntryActivity extends Activity implements IWXAPIEventHandler, WeC case BaseResp.ErrCode.ERR_USER_CANCEL: if (RETURN_MSG_TYPE_SHARE == baseResp.getType()) { resultString = getString(R.string.share_cancel_hint); - LogUtils.uploadShareResult(ShareUtils.shareType, ShareUtils.shareEntrance.getName(), "cancel", + com.gh.gamecenter.common.utils.LogUtils.uploadShareResult(ShareUtils.shareType, ShareUtils.shareEntrance.getName(), "cancel", ShareUtils.shareEntity.getShareUrl(), ShareUtils.shareEntity.getShareTitle(), ShareUtils.shareEntity.getSummary(), ShareUtils.resourceId); if (ShareUtils.shareEntrance == ShareUtils.ShareEntrance.askNormal || ShareUtils.shareEntrance == ShareUtils.ShareEntrance.communityArticle || ShareUtils.shareEntrance == ShareUtils.ShareEntrance.video) { - NewLogUtils.logShareResult(ShareUtils.additionalParams, false); + com.gh.gamecenter.common.utils.NewLogUtils.logShareResult(ShareUtils.additionalParams, false); } } else { resultString = "登录已取消"; @@ -133,12 +131,12 @@ public class WXEntryActivity extends Activity implements IWXAPIEventHandler, WeC default: if (RETURN_MSG_TYPE_SHARE == baseResp.getType()) { resultString = "分享错误"; - LogUtils.uploadShareResult(ShareUtils.shareType, ShareUtils.shareEntrance.getName(), "fail", + com.gh.gamecenter.common.utils.LogUtils.uploadShareResult(ShareUtils.shareType, ShareUtils.shareEntrance.getName(), "fail", ShareUtils.shareEntity.getShareUrl(), ShareUtils.shareEntity.getShareTitle(), ShareUtils.shareEntity.getSummary(), ShareUtils.resourceId); if (ShareUtils.shareEntrance == ShareUtils.ShareEntrance.askNormal || ShareUtils.shareEntrance == ShareUtils.ShareEntrance.communityArticle || ShareUtils.shareEntrance == ShareUtils.ShareEntrance.video) { - NewLogUtils.logShareResult(ShareUtils.additionalParams, false); + com.gh.gamecenter.common.utils.NewLogUtils.logShareResult(ShareUtils.additionalParams, false); } } else { resultString = "登录错误"; diff --git a/app/src/main/java/com/halo/assistant/HaloApp.java b/app/src/main/java/com/halo/assistant/HaloApp.java index 3dd89feec0..dd3b901850 100644 --- a/app/src/main/java/com/halo/assistant/HaloApp.java +++ b/app/src/main/java/com/halo/assistant/HaloApp.java @@ -28,8 +28,8 @@ import com.gh.base.GlobalActivityLifecycleObserver; import com.gh.common.FixedRateJobHelper; import com.gh.common.exposure.ExposureManager; import com.gh.common.filter.RegionSettingHelper; -import com.gh.common.loghub.LoghubUtils; -import com.gh.common.tracker.Tracker; +import com.gh.gamecenter.common.loghub.LoghubUtils; +import com.gh.gamecenter.common.tracker.Tracker; import com.gh.common.util.DataUtils; import com.gh.common.util.DownloadNotificationHelper; import com.gh.common.util.DownloadObserver; diff --git a/app/src/main/java/com/halo/assistant/fragment/SettingsFragment.kt b/app/src/main/java/com/halo/assistant/fragment/SettingsFragment.kt index 343bde2835..7660bfe715 100644 --- a/app/src/main/java/com/halo/assistant/fragment/SettingsFragment.kt +++ b/app/src/main/java/com/halo/assistant/fragment/SettingsFragment.kt @@ -16,6 +16,8 @@ import com.gh.common.history.HistoryHelper import com.gh.gamecenter.core.runOnIoThread import com.gh.gamecenter.core.runOnUiThread import com.gh.common.util.* +import com.gh.common.util.DialogUtils +import com.gh.common.util.NewLogUtils import com.gh.download.server.BrowserInstallHelper import com.gh.gamecenter.* import com.gh.gamecenter.common.callback.ConfirmListener @@ -29,11 +31,12 @@ import com.gh.gamecenter.fragment.MainWrapperFragment import com.gh.gamecenter.game.upload.GameSubmissionActivity import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.common.base.fragment.NormalFragment +import com.gh.gamecenter.common.callback.CancelListener import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.security.SecurityActivity import com.gh.gamecenter.setting.GameDownloadSettingActivity import com.gh.gamecenter.setting.VideoSettingActivity -import com.gh.gamecenter.user.ApiResponse +import com.gh.gamecenter.common.retrofit.ApiResponse import com.gh.gamecenter.user.UserRepository import com.gh.gamecenter.user.UserViewModel import com.lightgame.download.FileUtils @@ -237,7 +240,10 @@ class SettingsFragment : NormalFragment() { override fun onConfirm() { UsageStatsHelper.skipToUsageStats(requireContext(), UsageStatsHelper.USAGE_STATUS_REQUEST_CODE) } - }) {} + },object :CancelListener{ + override fun onCancel() { + } + }) } } } diff --git a/app/src/main/java/com/halo/assistant/fragment/VoteFragment.java b/app/src/main/java/com/halo/assistant/fragment/VoteFragment.java index cec3da1d75..b0f455f1df 100644 --- a/app/src/main/java/com/halo/assistant/fragment/VoteFragment.java +++ b/app/src/main/java/com/halo/assistant/fragment/VoteFragment.java @@ -29,7 +29,7 @@ import com.gh.gamecenter.baselist.NormalListViewModel; import com.gh.gamecenter.entity.MeEntity; import com.gh.gamecenter.entity.SettingsEntity; import com.gh.gamecenter.entity.VersionVoteEntity; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.utils.Util_System_Keyboard; diff --git a/app/src/main/java/com/halo/assistant/fragment/WebFragment.kt b/app/src/main/java/com/halo/assistant/fragment/WebFragment.kt index b1732f3bf3..9bdc5ab603 100644 --- a/app/src/main/java/com/halo/assistant/fragment/WebFragment.kt +++ b/app/src/main/java/com/halo/assistant/fragment/WebFragment.kt @@ -16,7 +16,7 @@ import android.view.View import android.webkit.* import androidx.annotation.RequiresApi import androidx.webkit.WebViewCompat -import com.gh.base.BaseActivity +import com.gh.gamecenter.common.base.BaseActivity import com.gh.gamecenter.common.base.fragment.LazyFragment import com.gh.gamecenter.core.AppExecutor.uiExecutor import com.gh.common.DefaultJsApi @@ -37,11 +37,8 @@ import com.gh.gamecenter.MessageDetailActivity import com.gh.gamecenter.R import com.gh.gamecenter.WebActivity import com.gh.gamecenter.common.constant.EntranceConsts -import com.gh.gamecenter.common.utils.NightModeUtils +import com.gh.gamecenter.common.utils.* import com.gh.gamecenter.core.utils.EmptyCallback -import com.gh.gamecenter.common.utils.tryWithDefaultCatch -import com.gh.gamecenter.common.utils.PackageFlavorHelper -import com.gh.gamecenter.common.utils.enableForceDark import com.gh.gamecenter.databinding.FragmentWebBinding import com.gh.gamecenter.entity.CommentnumEntity import com.gh.gamecenter.entity.MeEntity @@ -52,7 +49,7 @@ import com.gh.gamecenter.eventbus.EBTypeChange import com.gh.gamecenter.gamedetail.GameDetailFragment import com.gh.gamecenter.message.MessageDetailFragment import com.gh.gamecenter.personal.PersonalFragment -import com.gh.gamecenter.retrofit.Response +import com.gh.gamecenter.common.retrofit.Response import com.gh.gamecenter.retrofit.RetrofitManager import com.lightgame.utils.Utils import com.zhihu.matisse.Matisse diff --git a/app/src/main/java/com/halo/assistant/fragment/game/GameNewsSearchFragment.java b/app/src/main/java/com/halo/assistant/fragment/game/GameNewsSearchFragment.java index ba1d6ec289..5054504957 100644 --- a/app/src/main/java/com/halo/assistant/fragment/game/GameNewsSearchFragment.java +++ b/app/src/main/java/com/halo/assistant/fragment/game/GameNewsSearchFragment.java @@ -25,7 +25,7 @@ import com.gh.gamecenter.adapter.GameNewsAdapter; import com.gh.gamecenter.adapter.GameNewsTypeListAdapter; import com.gh.gamecenter.eventbus.EBTypeChange; import com.gh.gamecenter.common.base.fragment.NormalFragment; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import org.greenrobot.eventbus.Subscribe; diff --git a/app/src/main/java/com/halo/assistant/fragment/game/GameNewsSearchResultFragment.java b/app/src/main/java/com/halo/assistant/fragment/game/GameNewsSearchResultFragment.java index 742972f576..9c44f19059 100644 --- a/app/src/main/java/com/halo/assistant/fragment/game/GameNewsSearchResultFragment.java +++ b/app/src/main/java/com/halo/assistant/fragment/game/GameNewsSearchResultFragment.java @@ -29,7 +29,7 @@ import com.gh.gamecenter.adapter.viewholder.NewsTextViewHolder; import com.gh.gamecenter.databinding.NewsTextItemBinding; import com.gh.gamecenter.entity.NewsEntity; import com.gh.gamecenter.common.base.fragment.NormalFragment; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.utils.Util_System_Keyboard; diff --git a/app/src/main/java/com/halo/assistant/fragment/myconcern/MyConcernAdapter.java b/app/src/main/java/com/halo/assistant/fragment/myconcern/MyConcernAdapter.java index cdfe4432d3..c83416a7cd 100644 --- a/app/src/main/java/com/halo/assistant/fragment/myconcern/MyConcernAdapter.java +++ b/app/src/main/java/com/halo/assistant/fragment/myconcern/MyConcernAdapter.java @@ -12,7 +12,6 @@ import com.gh.common.filter.RegionSettingHelper; import com.gh.common.util.ApkActiveUtils; import com.gh.common.util.ConcernUtils; import com.gh.common.util.DataCollectionUtils; -import com.gh.common.util.DataUtils; import com.gh.gamecenter.core.utils.DisplayUtils; import com.gh.gamecenter.core.utils.StringUtils; import com.gh.gamecenter.GameDetailActivity; @@ -21,15 +20,13 @@ import com.gh.gamecenter.adapter.viewholder.ConcernViewHolder; import com.gh.gamecenter.databinding.ConcernItemBinding; import com.gh.gamecenter.entity.GameEntity; import com.gh.gamecenter.manager.UserManager; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.adapter.BaseRecyclerAdapter; import com.lightgame.utils.Utils; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.schedulers.Schedulers; diff --git a/app/src/main/java/com/halo/assistant/fragment/myconcern/MyConcernRecommendAdapter.java b/app/src/main/java/com/halo/assistant/fragment/myconcern/MyConcernRecommendAdapter.java index 0ffe4be310..d58a922560 100644 --- a/app/src/main/java/com/halo/assistant/fragment/myconcern/MyConcernRecommendAdapter.java +++ b/app/src/main/java/com/halo/assistant/fragment/myconcern/MyConcernRecommendAdapter.java @@ -15,7 +15,6 @@ import com.gh.common.util.ApkActiveUtils; import com.gh.common.util.CheckLoginUtils; import com.gh.common.util.ConcernUtils; import com.gh.common.util.DataCollectionUtils; -import com.gh.common.util.DataUtils; import com.gh.gamecenter.core.utils.DisplayUtils; import com.gh.gamecenter.core.utils.StringUtils; import com.gh.gamecenter.GameDetailActivity; @@ -25,16 +24,14 @@ import com.gh.gamecenter.databinding.ConcernItemBinding; import com.gh.gamecenter.entity.GameEntity; import com.gh.gamecenter.entity.GameInstall; import com.gh.gamecenter.manager.PackagesManager; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import com.gh.gamecenter.retrofit.RetrofitManager; import com.lightgame.adapter.BaseRecyclerAdapter; import com.lightgame.utils.Utils; import java.util.ArrayList; -import java.util.HashMap; import java.util.HashSet; import java.util.List; -import java.util.Map; import io.reactivex.Observable; import io.reactivex.android.schedulers.AndroidSchedulers; diff --git a/app/src/main/java/com/halo/assistant/fragment/user/ManuallyRealNameViewModel.kt b/app/src/main/java/com/halo/assistant/fragment/user/ManuallyRealNameViewModel.kt index 4fbad108f1..c5b33519c9 100644 --- a/app/src/main/java/com/halo/assistant/fragment/user/ManuallyRealNameViewModel.kt +++ b/app/src/main/java/com/halo/assistant/fragment/user/ManuallyRealNameViewModel.kt @@ -9,7 +9,7 @@ import com.gh.gamecenter.core.utils.GsonUtils import com.gh.gamecenter.common.utils.tryWithDefaultCatch import com.gh.gamecenter.entity.IdCardEntity import com.gh.gamecenter.entity.UserInfoEntity -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.halo.assistant.HaloApp import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/halo/assistant/fragment/user/RealNameInfoViewModel.kt b/app/src/main/java/com/halo/assistant/fragment/user/RealNameInfoViewModel.kt index 28951b2a80..62a3a5cf0d 100644 --- a/app/src/main/java/com/halo/assistant/fragment/user/RealNameInfoViewModel.kt +++ b/app/src/main/java/com/halo/assistant/fragment/user/RealNameInfoViewModel.kt @@ -17,7 +17,7 @@ import com.gh.gamecenter.common.utils.tryWithDefaultCatch import com.gh.gamecenter.entity.IdCardEntity import com.gh.gamecenter.entity.UserInfoEntity import com.gh.gamecenter.manager.UserManager -import com.gh.gamecenter.retrofit.BiResponse +import com.gh.gamecenter.common.retrofit.BiResponse import com.gh.gamecenter.retrofit.RetrofitManager import com.gh.gamecenter.user.UserRepository import com.halo.assistant.HaloApp diff --git a/app/src/main/java/com/halo/assistant/fragment/user/SelectRegionFragment.java b/app/src/main/java/com/halo/assistant/fragment/user/SelectRegionFragment.java index e105f649d2..8a0d778f37 100644 --- a/app/src/main/java/com/halo/assistant/fragment/user/SelectRegionFragment.java +++ b/app/src/main/java/com/halo/assistant/fragment/user/SelectRegionFragment.java @@ -17,7 +17,7 @@ import com.gh.common.util.DialogUtils; import com.gh.gamecenter.common.constant.EntranceConsts; import com.gh.gamecenter.R; import com.gh.gamecenter.entity.UserInfoEntity; -import com.gh.gamecenter.user.ApiResponse; +import com.gh.gamecenter.common.retrofit.ApiResponse; import com.gh.gamecenter.user.UserViewModel; import com.gh.gamecenter.common.base.fragment.NormalFragment; import com.halo.assistant.fragment.user.region.OnRegionSelectListener; diff --git a/app/src/main/java/com/halo/assistant/fragment/user/UserInfoEditFragment.kt b/app/src/main/java/com/halo/assistant/fragment/user/UserInfoEditFragment.kt index 713a8dec57..22673e1d63 100644 --- a/app/src/main/java/com/halo/assistant/fragment/user/UserInfoEditFragment.kt +++ b/app/src/main/java/com/halo/assistant/fragment/user/UserInfoEditFragment.kt @@ -26,9 +26,9 @@ import com.gh.gamecenter.databinding.FragmentUserinfoEditBinding import com.gh.gamecenter.entity.UserInfoEntity import com.gh.gamecenter.manager.UserManager import com.gh.gamecenter.common.base.fragment.NormalFragment -import com.gh.gamecenter.retrofit.JSONObjectResponse +import com.gh.gamecenter.common.retrofit.JSONObjectResponse import com.gh.gamecenter.retrofit.RetrofitManager -import com.gh.gamecenter.user.ApiResponse +import com.gh.gamecenter.common.retrofit.ApiResponse import com.gh.gamecenter.user.UserViewModel import com.halo.assistant.HaloApp import io.reactivex.android.schedulers.AndroidSchedulers diff --git a/app/src/main/java/com/halo/assistant/fragment/user/UserInfoFragment.kt b/app/src/main/java/com/halo/assistant/fragment/user/UserInfoFragment.kt index 234ca31c9a..af9f890285 100644 --- a/app/src/main/java/com/halo/assistant/fragment/user/UserInfoFragment.kt +++ b/app/src/main/java/com/halo/assistant/fragment/user/UserInfoFragment.kt @@ -11,7 +11,7 @@ import com.gh.gamecenter.* import com.gh.gamecenter.databinding.FragmentUserinfoBinding import com.gh.gamecenter.entity.UserInfoEntity import com.gh.gamecenter.common.base.fragment.NormalFragment -import com.gh.gamecenter.user.ApiResponse +import com.gh.gamecenter.common.retrofit.ApiResponse import com.gh.gamecenter.user.UserViewModel class UserInfoFragment : NormalFragment() { diff --git a/app/src/main/java/com/halo/assistant/fragment/user/UserPortraitCropImageActivity.java b/app/src/main/java/com/halo/assistant/fragment/user/UserPortraitCropImageActivity.java index 8305221bd7..6f828713ee 100644 --- a/app/src/main/java/com/halo/assistant/fragment/user/UserPortraitCropImageActivity.java +++ b/app/src/main/java/com/halo/assistant/fragment/user/UserPortraitCropImageActivity.java @@ -17,7 +17,7 @@ import com.gh.gamecenter.common.constant.EntranceConsts; import com.gh.common.util.UploadImageUtils; import com.gh.gamecenter.CropImageActivity; import com.gh.gamecenter.R; -import com.gh.gamecenter.retrofit.Response; +import com.gh.gamecenter.common.retrofit.Response; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/app/src/main/res/values-night/styles.xml b/app/src/main/res/values-night/styles.xml index aa158c0734..3a94a4e102 100644 --- a/app/src/main/res/values-night/styles.xml +++ b/app/src/main/res/values-night/styles.xml @@ -106,10 +106,6 @@ - - diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 409c0ae198..ec423508d7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -291,10 +291,7 @@ 原创 正在反馈... 下载管理 - 分享跳转中... - 分享成功 - 分享已取消 - 分享失败 + 输入手机号码 输入验证码 获取验证码 @@ -427,7 +424,6 @@ 最新评论 全部暂停 全部开始 - 解析包出错(可能被误删了),请重新下载 未开抢 领取 @@ -507,9 +503,7 @@ 图片不能大于%1$dMB,请重新选择 安装包不能大于%1$dGB,请重新选择 - https://www.ghzs.com/link?source=appshare100 - https://www.ghzs.com/link?source=appshare300 - https://and-static.ghzs.com/app-logo.png + 我的收藏 别话痨哦~休息一会再来评论吧~ 账号异常,暂时无法发表内容 @@ -776,12 +770,7 @@ 更换背景 安利墙 精彩评论 - 分享到 - 微信好友 - 朋友圈 - QQ好友 - QQ空间 - 微博 + 优秀评论 查看更多 祝贺!童鞋\n你已通过礼仪测试~ diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index cdde3b90e4..b8a11fe275 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -108,9 +108,6 @@ - + + \ No newline at end of file diff --git a/module_common/src/main/res/values/strings.xml b/module_common/src/main/res/values/strings.xml index d15afdc6ec..ff69e4e34c 100644 --- a/module_common/src/main/res/values/strings.xml +++ b/module_common/src/main/res/values/strings.xml @@ -8,6 +8,22 @@ 检查更新中... + 分享跳转中... + 分享成功 + 分享已取消 + 分享失败 + 分享到 + 微信好友 + 朋友圈 + QQ好友 + QQ空间 + 微博 + 解析包出错(可能被误删了),请重新下载 + + https://www.ghzs.com/link?source=appshare100 + https://www.ghzs.com/link?source=appshare300 + https://and-static.ghzs.com/app-logo.png + background_id text_color_id \ No newline at end of file diff --git a/module_common/src/main/res/values/style.xml b/module_common/src/main/res/values/style.xml index 6ec35131b0..4e5eada3a1 100644 --- a/module_common/src/main/res/values/style.xml +++ b/module_common/src/main/res/values/style.xml @@ -95,4 +95,8 @@ + + \ No newline at end of file diff --git a/app/src/release/java/com/gh/gamecenter/Injection.java b/module_common/src/release/java/com/gh/gamecenter/Injection.java similarity index 100% rename from app/src/release/java/com/gh/gamecenter/Injection.java rename to module_common/src/release/java/com/gh/gamecenter/Injection.java diff --git a/module_core/src/main/java/com/gh/gamecenter/core/provider/IAppProvider.kt b/module_core/src/main/java/com/gh/gamecenter/core/provider/IAppProvider.kt index 48640e9536..ff25eb4c4d 100644 --- a/module_core/src/main/java/com/gh/gamecenter/core/provider/IAppProvider.kt +++ b/module_core/src/main/java/com/gh/gamecenter/core/provider/IAppProvider.kt @@ -4,6 +4,7 @@ import android.content.Context import com.alibaba.android.arouter.facade.template.IProvider interface IAppProvider : IProvider { + fun getAppName():String fun getGid():String @@ -11,7 +12,13 @@ interface IAppProvider : IProvider { fun getChannel():String + fun getUserAgent():String + + fun getServerUserMark():String + fun getDeviceRamSize():Long + fun getTemporaryLocalDeviceId():String + fun isUserAcceptPrivacyPolicy(context: Context):Boolean } \ No newline at end of file diff --git a/module_core/src/main/java/com/gh/gamecenter/core/provider/IConfigProvider.kt b/module_core/src/main/java/com/gh/gamecenter/core/provider/IConfigProvider.kt index b10c6ed687..fc10323e93 100644 --- a/module_core/src/main/java/com/gh/gamecenter/core/provider/IConfigProvider.kt +++ b/module_core/src/main/java/com/gh/gamecenter/core/provider/IConfigProvider.kt @@ -3,6 +3,8 @@ package com.gh.gamecenter.core.provider import com.alibaba.android.arouter.facade.template.IProvider interface IConfigProvider : IProvider { + fun getTencentAppId():String + fun getWechatAppId():String fun getUploadLimitSize(): Long fun getSize(): Int fun getQuality(): Int @@ -12,4 +14,5 @@ interface IConfigProvider : IProvider { fun getWebp(): String fun getGitThumb(): String fun getGifWaterMark(): String + fun getQQ(): String } \ No newline at end of file diff --git a/module_core/src/main/java/com/gh/gamecenter/core/provider/IDirectProvider.kt b/module_core/src/main/java/com/gh/gamecenter/core/provider/IDirectProvider.kt index 01631dff65..04ae7aaf3a 100644 --- a/module_core/src/main/java/com/gh/gamecenter/core/provider/IDirectProvider.kt +++ b/module_core/src/main/java/com/gh/gamecenter/core/provider/IDirectProvider.kt @@ -3,8 +3,10 @@ package com.gh.gamecenter.core.provider import android.content.Context import com.alibaba.android.arouter.facade.template.IProvider -interface IDirectProvider: IProvider { +interface IDirectProvider : IProvider { fun directToWebView(context: Context, url: String, entrance: String? = null) fun directToRegulationTestPage(context: Context) + + fun directToQqConversation(context: Context, qq: String) } \ No newline at end of file diff --git a/module_core/src/main/java/com/gh/gamecenter/core/provider/IDownloadManagerProvider.kt b/module_core/src/main/java/com/gh/gamecenter/core/provider/IDownloadManagerProvider.kt new file mode 100644 index 0000000000..c3046128a6 --- /dev/null +++ b/module_core/src/main/java/com/gh/gamecenter/core/provider/IDownloadManagerProvider.kt @@ -0,0 +1,8 @@ +package com.gh.gamecenter.core.provider + +import com.alibaba.android.arouter.facade.template.IProvider +import com.lightgame.download.DownloadEntity + +interface IDownloadManagerProvider : IProvider { + fun getDownloadEntityByUrl(url: String): DownloadEntity? +} \ No newline at end of file diff --git a/module_core/src/main/java/com/gh/gamecenter/core/provider/IEnergyTaskProvider.kt b/module_core/src/main/java/com/gh/gamecenter/core/provider/IEnergyTaskProvider.kt new file mode 100644 index 0000000000..03163909be --- /dev/null +++ b/module_core/src/main/java/com/gh/gamecenter/core/provider/IEnergyTaskProvider.kt @@ -0,0 +1,10 @@ +package com.gh.gamecenter.core.provider + +import com.alibaba.android.arouter.facade.template.IProvider + +interface IEnergyTaskProvider : IProvider { + + fun postEnergyTaskForShare(type: String, id: String, url: String) + + fun logInviteResult(result: String, type: String? = null) +} \ No newline at end of file diff --git a/module_core/src/main/java/com/gh/gamecenter/core/provider/IEntranceUtilsProvider.kt b/module_core/src/main/java/com/gh/gamecenter/core/provider/IEntranceUtilsProvider.kt new file mode 100644 index 0000000000..85e039c512 --- /dev/null +++ b/module_core/src/main/java/com/gh/gamecenter/core/provider/IEntranceUtilsProvider.kt @@ -0,0 +1,11 @@ +package com.gh.gamecenter.core.provider + +import android.content.Context +import android.os.Bundle +import com.alibaba.android.arouter.facade.template.IProvider + +interface IEntranceUtilsProvider:IProvider { + fun saveShortcut(activityName:String , bundle: Bundle?) + + fun jumpActivity(context: Context , bundle: Bundle) +} \ No newline at end of file diff --git a/module_core/src/main/java/com/gh/gamecenter/core/provider/IPackageHelperProvider.kt b/module_core/src/main/java/com/gh/gamecenter/core/provider/IPackageHelperProvider.kt new file mode 100644 index 0000000000..a450b154c0 --- /dev/null +++ b/module_core/src/main/java/com/gh/gamecenter/core/provider/IPackageHelperProvider.kt @@ -0,0 +1,8 @@ +package com.gh.gamecenter.core.provider + +import com.alibaba.android.arouter.facade.template.IProvider + +interface IPackageHelperProvider : IProvider { + + fun getLocalPackageNameSet(): HashSet +} \ No newline at end of file diff --git a/module_core/src/main/java/com/gh/gamecenter/core/provider/IPackageInstallerProvider.kt b/module_core/src/main/java/com/gh/gamecenter/core/provider/IPackageInstallerProvider.kt new file mode 100644 index 0000000000..510f71c1f2 --- /dev/null +++ b/module_core/src/main/java/com/gh/gamecenter/core/provider/IPackageInstallerProvider.kt @@ -0,0 +1,13 @@ +package com.gh.gamecenter.core.provider + +import android.content.Context +import com.alibaba.android.arouter.facade.template.IProvider +import com.lightgame.download.DownloadEntity + +interface IPackageInstallerProvider : IProvider { + + fun install(context: Context, downloadEntity: DownloadEntity, showUnzipToast: Boolean) + + fun uninstall(context: Context, path: String) + +} \ No newline at end of file diff --git a/module_core/src/main/java/com/gh/gamecenter/core/provider/IPackageUtilsProvider.kt b/module_core/src/main/java/com/gh/gamecenter/core/provider/IPackageUtilsProvider.kt index 73a1748e98..6e7cd7639e 100644 --- a/module_core/src/main/java/com/gh/gamecenter/core/provider/IPackageUtilsProvider.kt +++ b/module_core/src/main/java/com/gh/gamecenter/core/provider/IPackageUtilsProvider.kt @@ -1,9 +1,18 @@ package com.gh.gamecenter.core.provider import android.content.Context +import android.content.pm.PackageInfo import com.alibaba.android.arouter.facade.template.IProvider interface IPackageUtilsProvider : IProvider { + fun obtainProcessName(context: Context): String + fun getGhVersionName(): String + + fun getInstalledPackages(context: Context, flag: Int): List + + fun getApkSignatureByPackageName(context: Context, packageName: String): Array + + fun getSideLoadedInfo(): MutableMap? } \ No newline at end of file diff --git a/module_core/src/main/java/com/gh/gamecenter/core/provider/IQuickLoginProvider.kt b/module_core/src/main/java/com/gh/gamecenter/core/provider/IQuickLoginProvider.kt new file mode 100644 index 0000000000..ef9a7883f2 --- /dev/null +++ b/module_core/src/main/java/com/gh/gamecenter/core/provider/IQuickLoginProvider.kt @@ -0,0 +1,9 @@ +package com.gh.gamecenter.core.provider + +import android.content.Context +import com.alibaba.android.arouter.facade.template.IProvider + +interface IQuickLoginProvider : IProvider { + + fun startLogin(context: Context, entrance: String) +} \ No newline at end of file diff --git a/module_core/src/main/java/com/gh/gamecenter/core/provider/IUserManagerProvider.kt b/module_core/src/main/java/com/gh/gamecenter/core/provider/IUserManagerProvider.kt index 6b939353ac..a6cf599ebc 100644 --- a/module_core/src/main/java/com/gh/gamecenter/core/provider/IUserManagerProvider.kt +++ b/module_core/src/main/java/com/gh/gamecenter/core/provider/IUserManagerProvider.kt @@ -7,4 +7,8 @@ interface IUserManagerProvider : IProvider { fun userShouldTakeRegulationBaseOnLastRemind(): Boolean fun getUserId(): String + + fun getToken(): String + + fun refreshToken(accessToken: String, success: () -> Unit, fail: (String?) -> Unit) } \ No newline at end of file diff --git a/app/src/main/java/com/gh/common/util/IntentUtils.java b/module_core/src/main/java/com/gh/gamecenter/core/utils/IntentUtils.java similarity index 59% rename from app/src/main/java/com/gh/common/util/IntentUtils.java rename to module_core/src/main/java/com/gh/gamecenter/core/utils/IntentUtils.java index b44f69e5db..76b067e31b 100644 --- a/app/src/main/java/com/gh/common/util/IntentUtils.java +++ b/module_core/src/main/java/com/gh/gamecenter/core/utils/IntentUtils.java @@ -1,20 +1,12 @@ -package com.gh.common.util; +package com.gh.gamecenter.core.utils; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.net.Uri; -import android.os.Bundle; import androidx.annotation.NonNull; -import com.gh.gamecenter.NormalActivity; -import com.gh.gamecenter.SingletonWebActivity; -import com.gh.gamecenter.WebActivity; -import com.gh.gamecenter.category.CategoryListActivity; -import com.gh.gamecenter.entity.CategoryEntity; -import com.halo.assistant.fragment.WebFragment; - /** * @author CsHeng * @Date 17/05/2017 @@ -61,26 +53,4 @@ public class IntentUtils { "https://www.ghzs.com/link?source=appshare333"); return data; } - - public static void startCategoryListActivity(Context context, String categoryTitle, CategoryEntity category) { - context.startActivity(CategoryListActivity.Companion.getIntent(context, categoryTitle, category, "全部")); - } - - public static Intent getWebTargetIntent(Context context, Bundle bundle, String url) { - Class cls; - - if (url.contains("android_page_type=singleton")) { - cls = SingletonWebActivity.class; - } else { - cls = WebActivity.class; - } - if (url.contains("leave_web_page_handle_back_pressed=true")) { - bundle.putBoolean(WebFragment.KEY_LEAVE_WEB_PAGE_TO_HANDLE_BACK_PRESSED, true); - } - - Intent intent = new Intent(context, cls); - intent.putExtra(NormalActivity.NORMAL_FRAGMENT_NAME, WebFragment.class.getCanonicalName()); - intent.putExtra(NormalActivity.NORMAL_FRAGMENT_BUNDLE, bundle); - return intent; - } }