Showing preview only (2,473K chars total). Download the full file or copy to clipboard to get everything.
Repository: wizos/loread
Branch: master
Commit: bec024a07bee
Files: 522
Total size: 2.2 MB
Directory structure:
gitextract_1feoynfu/
├── .github/
│ └── workflows/
│ └── android.yml
├── .gitignore
├── README.md
├── agentweb-core/
│ ├── .gitignore
│ ├── build.gradle
│ ├── providedLibs/
│ │ └── alipaySdk-20180601.jar
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ ├── java/
│ │ └── com/
│ │ └── just/
│ │ └── agentweb/
│ │ ├── AbsAgentWebSettings.java
│ │ ├── AbsAgentWebUIController.java
│ │ ├── Action.java
│ │ ├── ActionActivity.java
│ │ ├── AgentWeb.java
│ │ ├── AgentWebConfig.java
│ │ ├── AgentWebFileProvider.java
│ │ ├── AgentWebJsInterfaceCompat.java
│ │ ├── AgentWebPermissions.java
│ │ ├── AgentWebSettingsImpl.java
│ │ ├── AgentWebUIControllerImplBase.java
│ │ ├── AgentWebUtils.java
│ │ ├── AgentWebView.java
│ │ ├── BaseIndicatorSpec.java
│ │ ├── BaseIndicatorView.java
│ │ ├── BaseJsAccessEntrace.java
│ │ ├── DefaultChromeClient.java
│ │ ├── DefaultDesignUIController.java
│ │ ├── DefaultDownloadImpl.java
│ │ ├── DefaultUIController.java
│ │ ├── DefaultWebClient.java
│ │ ├── DefaultWebCreator.java
│ │ ├── DefaultWebLifeCycleImpl.java
│ │ ├── EventHandlerImpl.java
│ │ ├── EventInterceptor.java
│ │ ├── HookManager.java
│ │ ├── HttpHeaders.java
│ │ ├── IAgentWebSettings.java
│ │ ├── IEventHandler.java
│ │ ├── IUrlLoader.java
│ │ ├── IVideo.java
│ │ ├── IWebIndicator.java
│ │ ├── IWebLayout.java
│ │ ├── IndicatorController.java
│ │ ├── IndicatorHandler.java
│ │ ├── JsAccessEntrace.java
│ │ ├── JsAccessEntraceImpl.java
│ │ ├── JsBaseInterfaceHolder.java
│ │ ├── JsCallJava.java
│ │ ├── JsCallback.java
│ │ ├── JsInterfaceHolder.java
│ │ ├── JsInterfaceHolderImpl.java
│ │ ├── JsInterfaceObjectException.java
│ │ ├── LayoutParamsOffer.java
│ │ ├── LogUtils.java
│ │ ├── LollipopFixedWebView.java
│ │ ├── MiddlewareWebChromeBase.java
│ │ ├── MiddlewareWebClientBase.java
│ │ ├── NestedScrollAgentWebView.java
│ │ ├── PermissionInterceptor.java
│ │ ├── ProcessUtils.java
│ │ ├── Provider.java
│ │ ├── QuickCallJs.java
│ │ ├── UrlCommonException.java
│ │ ├── UrlLoaderImpl.java
│ │ ├── VideoImpl.java
│ │ ├── WebChromeClient.java
│ │ ├── WebChromeClientDelegate.java
│ │ ├── WebCreator.java
│ │ ├── WebIndicator.java
│ │ ├── WebLifeCycle.java
│ │ ├── WebListenerManager.java
│ │ ├── WebParentLayout.java
│ │ ├── WebSecurityCheckLogic.java
│ │ ├── WebSecurityController.java
│ │ ├── WebSecurityControllerImpl.java
│ │ ├── WebSecurityLogicImpl.java
│ │ ├── WebViewClient.java
│ │ └── WebViewClientDelegate.java
│ └── res/
│ ├── layout/
│ │ └── agentweb_error_page.xml
│ ├── values/
│ │ ├── colors.xml
│ │ ├── ids.xml
│ │ ├── strings.xml
│ │ └── style.xml
│ └── values-zh/
│ └── strings.xml
├── app/
│ ├── .gitignore
│ ├── build.gradle
│ ├── libs/
│ │ └── okgo-3.0.4.jar
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── me/
│ │ └── wizos/
│ │ └── loread/
│ │ └── ApplicationTest.java
│ └── main/
│ ├── AndroidManifest.xml
│ ├── assets/
│ │ ├── css/
│ │ │ ├── android_studio.css
│ │ │ ├── article_theme_day.css
│ │ │ ├── article_theme_night.css
│ │ │ └── normalize.css
│ │ └── js/
│ │ ├── highlight.pack.js
│ │ ├── lazyload.js
│ │ └── media.js
│ ├── java/
│ │ └── me/
│ │ └── wizos/
│ │ └── loread/
│ │ ├── App.java
│ │ ├── Contract.java
│ │ ├── activity/
│ │ │ ├── ArticleActivity.java
│ │ │ ├── BaseActivity.java
│ │ │ ├── FeedActivity.java
│ │ │ ├── LabActivity.java
│ │ │ ├── MainActivity.java
│ │ │ ├── MusicActivity.java
│ │ │ ├── ProviderActivity.java
│ │ │ ├── RuleGenerateActivity.java
│ │ │ ├── SearchActivity.java
│ │ │ ├── SettingActivity.java
│ │ │ ├── SplashActivity.java
│ │ │ ├── TTSActivity.java
│ │ │ ├── WebActivity.java
│ │ │ └── login/
│ │ │ ├── LoginFormState.java
│ │ │ ├── LoginInoReaderActivity.java
│ │ │ ├── LoginResult.java
│ │ │ └── LoginTinyRSSActivity.java
│ │ ├── adapter/
│ │ │ ├── ArticlePagedListAdapter.java
│ │ │ ├── ArticleViewBinder.java
│ │ │ └── ExpandedAdapter.java
│ │ ├── bean/
│ │ │ ├── Enclosure.java
│ │ │ ├── LogLevel.java
│ │ │ ├── Token.java
│ │ │ ├── UserAgent.java
│ │ │ ├── domain/
│ │ │ │ ├── OutFeed.java
│ │ │ │ └── OutTag.java
│ │ │ ├── feedly/
│ │ │ │ ├── CategoryItem.java
│ │ │ │ ├── Collection.java
│ │ │ │ ├── ContentDirection.java
│ │ │ │ ├── Counts.java
│ │ │ │ ├── Entry.java
│ │ │ │ ├── FeedItem.java
│ │ │ │ ├── Origin.java
│ │ │ │ ├── Profile.java
│ │ │ │ ├── StreamContents.java
│ │ │ │ ├── StreamIds.java
│ │ │ │ ├── Subscription.java
│ │ │ │ ├── Unreadcount.java
│ │ │ │ ├── Visual.java
│ │ │ │ └── input/
│ │ │ │ ├── EditCollection.java
│ │ │ │ ├── EditFeed.java
│ │ │ │ └── MarkerAction.java
│ │ │ ├── fever/
│ │ │ │ ├── BaseResponse.java
│ │ │ │ ├── Feed.java
│ │ │ │ ├── Feeds.java
│ │ │ │ ├── Group.java
│ │ │ │ ├── GroupFeeds.java
│ │ │ │ ├── Groups.java
│ │ │ │ ├── Item.java
│ │ │ │ ├── Items.java
│ │ │ │ ├── SavedItemIds.java
│ │ │ │ └── UnreadItemIds.java
│ │ │ ├── inoreader/
│ │ │ │ ├── EditTag.java
│ │ │ │ ├── GsItemContents.java
│ │ │ │ ├── GsTag.java
│ │ │ │ ├── GsTags.java
│ │ │ │ ├── GsUnreadCount.java
│ │ │ │ ├── ItemIds.java
│ │ │ │ ├── ItemRefs.java
│ │ │ │ ├── LoginResult.java
│ │ │ │ ├── Readability.java
│ │ │ │ ├── StreamContents.java
│ │ │ │ ├── StreamPref.java
│ │ │ │ ├── StreamPrefs.java
│ │ │ │ ├── SubCategories.java
│ │ │ │ ├── Subscription.java
│ │ │ │ ├── Subscriptions.java
│ │ │ │ ├── UnreadCounts.java
│ │ │ │ ├── UserInfo.java
│ │ │ │ └── itemContents/
│ │ │ │ ├── Item.java
│ │ │ │ ├── Origin.java
│ │ │ │ ├── Self.java
│ │ │ │ └── Summary.java
│ │ │ ├── loread/
│ │ │ │ ├── LoginParam.java
│ │ │ │ ├── RequestJsonBody.java
│ │ │ │ └── Response.java
│ │ │ ├── proxynode/
│ │ │ │ ├── AnonymityLevel.java
│ │ │ │ ├── ProxyNode.java
│ │ │ │ └── ProxyType.java
│ │ │ ├── search/
│ │ │ │ ├── QuickAdd.java
│ │ │ │ ├── SearchFeedItem.java
│ │ │ │ ├── SearchFeeds.java
│ │ │ │ └── StreamFeed.java
│ │ │ └── ttrss/
│ │ │ ├── request/
│ │ │ │ ├── GetArticles.java
│ │ │ │ ├── GetCategories.java
│ │ │ │ ├── GetFeeds.java
│ │ │ │ ├── GetHeadlines.java
│ │ │ │ ├── GetSavedItemIds.java
│ │ │ │ ├── GetUnreadItemIds.java
│ │ │ │ ├── LoginParam.java
│ │ │ │ ├── RequestParam.java
│ │ │ │ ├── SearchHeadlines.java
│ │ │ │ ├── SearchMode.java
│ │ │ │ ├── SubscribeToFeed.java
│ │ │ │ ├── UnsubscribeFeed.java
│ │ │ │ └── UpdateArticle.java
│ │ │ └── result/
│ │ │ ├── ArticleItem.java
│ │ │ ├── Attachment.java
│ │ │ ├── CategoryItem.java
│ │ │ ├── FeedItem.java
│ │ │ ├── SubscribeToFeedResult.java
│ │ │ ├── TTRSSLoginResult.java
│ │ │ ├── TinyResponse.java
│ │ │ └── UpdateArticleResult.java
│ │ ├── behavior/
│ │ │ ├── BottomNavigationBehavior.java
│ │ │ └── BottomNavigationViewBehavior.java
│ │ ├── bridge/
│ │ │ ├── ArticleBridge.java
│ │ │ └── WebBridge.java
│ │ ├── config/
│ │ │ ├── AdBlock.java
│ │ │ ├── ArticleActionConfig.java
│ │ │ ├── ArticleExtractConfig.java
│ │ │ ├── ArticleTags.java
│ │ │ ├── HostConfig.java
│ │ │ ├── LinkRewriteConfig.java
│ │ │ ├── NetworkRefererConfig.java
│ │ │ ├── NetworkUserAgentConfig.java
│ │ │ ├── SaveDirectory.java
│ │ │ ├── TestConfig.java
│ │ │ ├── Unsubscribe.java
│ │ │ ├── article_action_rule/
│ │ │ │ ├── ArticleActionRule.java
│ │ │ │ └── Condition.java
│ │ │ └── article_extract_rule/
│ │ │ ├── ArticleExtractRule.java
│ │ │ └── Selector.java
│ │ ├── db/
│ │ │ ├── Article.java
│ │ │ ├── ArticleDao.java
│ │ │ ├── ArticleTag.java
│ │ │ ├── ArticleTagDao.java
│ │ │ ├── Category.java
│ │ │ ├── CategoryDao.java
│ │ │ ├── CategoryView.java
│ │ │ ├── Collection.java
│ │ │ ├── CoreDB.java
│ │ │ ├── CorePref.java
│ │ │ ├── Entry.java
│ │ │ ├── Feed.java
│ │ │ ├── FeedCategory.java
│ │ │ ├── FeedCategoryDao.java
│ │ │ ├── FeedDao.java
│ │ │ ├── FeedView.java
│ │ │ ├── Tag.java
│ │ │ ├── TagDao.java
│ │ │ ├── User.java
│ │ │ └── UserDao.java
│ │ ├── extractor/
│ │ │ ├── Extractor.java
│ │ │ ├── ExtractorUtil.java
│ │ │ └── ModPage.java
│ │ ├── gson/
│ │ │ ├── GsonEnum.java
│ │ │ ├── GsonEnumTypeAdapter.java
│ │ │ └── GsonUtil.java
│ │ ├── network/
│ │ │ ├── HttpClientManager.java
│ │ │ ├── StringConverterFactory.java
│ │ │ ├── SyncWorker.java
│ │ │ ├── api/
│ │ │ │ ├── AuthApi.java
│ │ │ │ ├── BaseApi.java
│ │ │ │ ├── FeedlyApi.java
│ │ │ │ ├── FeedlyService.java
│ │ │ │ ├── FeverApi.java
│ │ │ │ ├── FeverService.java
│ │ │ │ ├── InoReaderApi.java
│ │ │ │ ├── InoReaderService.java
│ │ │ │ ├── LoginInterface.java
│ │ │ │ ├── LoreadApi.java
│ │ │ │ ├── LoreadService.java
│ │ │ │ ├── OAuthApi.java
│ │ │ │ ├── TinyRSSApi.java
│ │ │ │ └── TinyRSSService.java
│ │ │ ├── callback/
│ │ │ │ └── CallbackX.java
│ │ │ ├── glide/
│ │ │ │ └── OkHttpAppGlideModule.java
│ │ │ └── interceptor/
│ │ │ ├── InoreaderHeaderInterceptor.java
│ │ │ ├── LoggerInterceptor.java
│ │ │ ├── LoreadTokenInterceptor.java
│ │ │ ├── RedirectInterceptor.java
│ │ │ ├── RefererInterceptor.java
│ │ │ ├── RelyInterceptor.java
│ │ │ ├── TTRSSTokenInterceptor.java
│ │ │ ├── TokenAuthenticator.java
│ │ │ └── TokenInterceptor.java
│ │ ├── service/
│ │ │ ├── AudioService.java
│ │ │ ├── MainService.java
│ │ │ ├── MusicService.java
│ │ │ └── NetworkStateReceiver.java
│ │ ├── utils/
│ │ │ ├── ArticleUtil.java
│ │ │ ├── ColorModifier.java
│ │ │ ├── DataUtil.java
│ │ │ ├── EncryptUtil.java
│ │ │ ├── FileUtil.java
│ │ │ ├── ImageUtil.java
│ │ │ ├── ImgFileType.java
│ │ │ ├── NetworkUtil.java
│ │ │ ├── RGB.java
│ │ │ ├── ScreenUtil.java
│ │ │ ├── ScriptUtil.java
│ │ │ ├── SnackbarUtil.java
│ │ │ ├── StringJoiner.java
│ │ │ ├── StringUtils.java
│ │ │ ├── SymbolUtil.java
│ │ │ ├── TimeUtil.java
│ │ │ ├── Tool.java
│ │ │ ├── UriUtil.java
│ │ │ └── VideoInjectUtil.java
│ │ ├── view/
│ │ │ ├── ExpandableListViewS.java
│ │ │ ├── FriendlyCardView.java
│ │ │ ├── IconFontView.java
│ │ │ ├── SwipeRefreshLayoutS.java
│ │ │ ├── WebViewS.java
│ │ │ ├── colorful/
│ │ │ │ ├── Colorful.java
│ │ │ │ ├── StatusBarUtil.java
│ │ │ │ ├── StatusBarView.java
│ │ │ │ └── setter/
│ │ │ │ ├── TextColorSetter.java
│ │ │ │ ├── ViewBackgroundColorSetter.java
│ │ │ │ ├── ViewBackgroundDrawableSetter.java
│ │ │ │ ├── ViewGroupSetter.java
│ │ │ │ └── ViewSetter.java
│ │ │ ├── fastscroll/
│ │ │ │ ├── FastScrollDelegate.java
│ │ │ │ ├── FastScrollListView.java
│ │ │ │ ├── FastScrollRecyclerView.java
│ │ │ │ └── ListViewS.java
│ │ │ ├── slideback/
│ │ │ │ ├── SlideBack.java
│ │ │ │ ├── SlideBackManager.java
│ │ │ │ ├── SlideLayout.java
│ │ │ │ ├── callback/
│ │ │ │ │ ├── SlideBackCallBack.java
│ │ │ │ │ └── SlideCallBack.java
│ │ │ │ └── widget/
│ │ │ │ ├── SlideBackIconView.java
│ │ │ │ └── SlideBackInterceptLayout.java
│ │ │ └── webview/
│ │ │ ├── DownloadListenerS.java
│ │ │ ├── FastScrollWebView.java
│ │ │ ├── LongClickPopWindow.java
│ │ │ ├── NestedScrollWebView.java
│ │ │ ├── SlowlyProgressBar.java
│ │ │ └── VideoImpl.java
│ │ └── viewmodel/
│ │ ├── ArticleViewModel.java
│ │ ├── InoReaderUserViewModel.java
│ │ └── TinyRSSUserViewModel.java
│ └── res/
│ ├── anim/
│ │ ├── fade_in.xml
│ │ ├── fade_out.xml
│ │ ├── in_from_bottom.xml
│ │ └── out_from_bottom.xml
│ ├── drawable/
│ │ ├── corners_bg_checked.xml
│ │ ├── corners_bg_uncheck.xml
│ │ ├── custom_progress_bar_thumb.xml
│ │ ├── custom_thumb_src.xml
│ │ ├── flyme_style_switch_button_rectangle.xml
│ │ ├── flyme_style_switch_button_round.xml
│ │ ├── ic_arrow_auto_mark_readed.xml
│ │ ├── ic_arrow_right.xml
│ │ ├── ic_browser.xml
│ │ ├── ic_close.xml
│ │ ├── ic_copy_link.xml
│ │ ├── ic_eye.xml
│ │ ├── ic_favor.xml
│ │ ├── ic_favor_fill.xml
│ │ ├── ic_mark_down.xml
│ │ ├── ic_mark_unread.xml
│ │ ├── ic_mark_up.xml
│ │ ├── ic_music.xml
│ │ ├── ic_panorama.xml
│ │ ├── ic_read.xml
│ │ ├── ic_refresh.xml
│ │ ├── ic_rename.xml
│ │ ├── ic_share.xml
│ │ ├── ic_state_all.xml
│ │ ├── ic_state_star.xml
│ │ ├── ic_state_unread.xml
│ │ ├── ic_state_unstar.xml
│ │ ├── ic_stop_loading.xml
│ │ ├── ic_unsubscribe.xml
│ │ ├── ic_user_agent.xml
│ │ ├── ic_volume.xml
│ │ ├── logo_feedly.xml
│ │ ├── logo_inoreader.xml
│ │ ├── progress_bg.xml
│ │ ├── seekbar_audio.xml
│ │ ├── selector_corners_bg.xml
│ │ ├── selector_star.xml
│ │ ├── splash_layers.xml
│ │ ├── textview_border_day.xml
│ │ └── textview_border_night.xml
│ ├── drawable-v23/
│ │ ├── logo_feedly_icon.xml
│ │ ├── logo_inoreader_icon.xml
│ │ └── logo_ttrss_icon.xml
│ ├── layout/
│ │ ├── activity_article.xml
│ │ ├── activity_feed.xml
│ │ ├── activity_lab.xml
│ │ ├── activity_login_inoreader.xml
│ │ ├── activity_login_tiny_rss.xml
│ │ ├── activity_main.xml
│ │ ├── activity_main_list_item.xml
│ │ ├── activity_music.xml
│ │ ├── activity_provider.xml
│ │ ├── activity_provider_low_version.xml
│ │ ├── activity_rule_generate.xml
│ │ ├── activity_search.xml
│ │ ├── activity_search_list_header_result_count.xml
│ │ ├── activity_search_list_header_word.xml
│ │ ├── activity_search_list_item_feed.xml
│ │ ├── activity_setting.xml
│ │ ├── activity_tts.xml
│ │ ├── activity_web.xml
│ │ ├── bottom_sheet_category.xml
│ │ ├── config_download_view.xml
│ │ ├── main_bottom_sheet_more.xml
│ │ ├── main_item_header.xml
│ │ ├── md_simplelist_item.xml
│ │ ├── setting_item_arrow.xml
│ │ ├── setting_item_session.xml
│ │ ├── setting_item_switch.xml
│ │ ├── tag_expandable_item_child.xml
│ │ ├── tag_expandable_item_group.xml
│ │ └── webview_long_clicked_popwindow.xml
│ ├── menu/
│ │ ├── menu_article.xml
│ │ └── menu_web.xml
│ ├── values/
│ │ ├── arrays.xml
│ │ ├── attr.xml
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ ├── values-zh-rCN/
│ │ └── strings.xml
│ └── xml/
│ ├── account_authenticator.xml
│ ├── account_preferences.xml
│ ├── account_sync_adapter.xml
│ └── network_security_config.xml
├── build.gradle
├── config.json
├── floatwindow/
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ ├── java/
│ │ └── com/
│ │ └── yhao/
│ │ └── floatwindow/
│ │ ├── adaptation/
│ │ │ ├── Miui.java
│ │ │ └── Rom.java
│ │ ├── base/
│ │ │ └── FloatLifecycle.java
│ │ ├── constant/
│ │ │ ├── MoveType.java
│ │ │ └── Screen.java
│ │ ├── interfaces/
│ │ │ ├── FloatView.java
│ │ │ ├── IFloatWindow.java
│ │ │ ├── LifecycleListener.java
│ │ │ ├── PermissionListener.java
│ │ │ ├── ResumedListener.java
│ │ │ └── ViewStateListener.java
│ │ ├── permission/
│ │ │ └── FloatActivity.java
│ │ ├── util/
│ │ │ ├── ActivityCounter.java
│ │ │ ├── DensityUtil.java
│ │ │ ├── LogUtil.java
│ │ │ └── PermissionUtil.java
│ │ └── view/
│ │ ├── FloatPhone.java
│ │ ├── FloatToast.java
│ │ ├── FloatWindow.java
│ │ └── IFloatWindowImpl.java
│ └── res/
│ └── values/
│ └── style.xml
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── luban/
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── top/
│ │ └── zibin/
│ │ └── luban/
│ │ └── ApplicationTest.java
│ └── main/
│ ├── AndroidManifest.xml
│ ├── java/
│ │ └── top/
│ │ └── zibin/
│ │ └── luban/
│ │ ├── Checker.java
│ │ ├── CompressionPredicate.java
│ │ ├── Engine.java
│ │ ├── FileProvider.java
│ │ ├── InputStreamProvider.java
│ │ ├── Luban.java
│ │ ├── OnCompressListener.java
│ │ └── OnRenameListener.java
│ └── res/
│ └── values/
│ └── strings.xml
├── privacy_and_security.md
├── settings.gradle
├── support/
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.txt
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ ├── java/
│ │ └── com/
│ │ └── yanzhenjie/
│ │ └── recyclerview/
│ │ ├── AdapterWrapper.java
│ │ ├── Controller.java
│ │ ├── ExpandableAdapter.java
│ │ ├── Horizontal.java
│ │ ├── LeftHorizontal.java
│ │ ├── OnItemClickListener.java
│ │ ├── OnItemLongClickListener.java
│ │ ├── OnItemMenuClickListener.java
│ │ ├── OnItemSwipeListener.java
│ │ ├── RightHorizontal.java
│ │ ├── StickyCreator.java
│ │ ├── StickyHeaderLayout.java
│ │ ├── StickyViewHolder.java
│ │ ├── SwipeDragLayout.java
│ │ ├── SwipeMenu.java
│ │ ├── SwipeMenuBridge.java
│ │ ├── SwipeMenuCreator.java
│ │ ├── SwipeMenuItem.java
│ │ ├── SwipeMenuLayout.java
│ │ ├── SwipeMenuView.java
│ │ ├── SwipeRecyclerView.java
│ │ ├── listview/
│ │ │ ├── FastScrollDelegate.java
│ │ │ └── FastScrollRecyclerView.java
│ │ ├── touch/
│ │ │ ├── DefaultItemTouchHelper.java
│ │ │ ├── ItemTouchHelperCallback.java
│ │ │ ├── OnItemMoveListener.java
│ │ │ ├── OnItemMovementListener.java
│ │ │ └── OnItemStateChangedListener.java
│ │ └── widget/
│ │ ├── BorderItemDecoration.java
│ │ ├── ColorDrawer.java
│ │ ├── DefaultItemDecoration.java
│ │ ├── DefaultLoadMoreView.java
│ │ ├── Drawer.java
│ │ └── StickyNestedScrollView.java
│ └── res/
│ ├── layout/
│ │ ├── support_recycler_view_item.xml
│ │ ├── support_recycler_view_item2.xml
│ │ └── support_recycler_view_load_more.xml
│ ├── values/
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ └── strings.xml
│ ├── values-zh/
│ │ └── strings.xml
│ ├── values-zh-rHK/
│ │ └── strings.xml
│ └── values-zh-rTW/
│ └── strings.xml
└── swipelayout/
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src/
└── main/
├── AndroidManifest.xml
├── java/
│ └── com/
│ └── ditclear/
│ └── swipelayout/
│ └── SwipeDragLayout.java
└── res/
└── values/
├── attrs.xml
└── strings.xml
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/android.yml
================================================
name: Loread CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Make Gradle executable
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Release apk
uses: ncipollo/release-action@v1.5.0
with:
artifacts: "build/app/outputs/apk/release/*.apk"
token: ${{ secrets.GITHUB_RElEASE_TOKEN }}
================================================
FILE: .gitignore
================================================
*.iml
.gradle
/local.properties
.DS_Store
/build
/.idea
================================================
FILE: README.md
================================================
# 序
> 路很长,纵然远望,却不知方向。
> 抽支烟,思绪无常,奔跑着彷徨。
> 逃不脱的苟且,到不了的远方…
# 简介
RSS 第三方客户端,支持 Inoreader、Feedly、TinyTinyRSS。
下载地址:[http://www.coolapk.com/apk/168423](http://www.coolapk.com/apk/168423)
# 截图

如上图,从左至右依次为“登录、首页、文章页、分类、快速设置、设置”
# 功能
目前实现以下几个功能:
- [x] 黑夜主题
- [x] 获取全文:支持根据规则或智能识别全文
- [x] 保存近期文章的阅读进度
- [x] 左右切换文章
- [x] 自动清理过期文章
- [x] 不同状态下(未读/加星/全部),各分组内文章的数量
- [x] ~~保存 离线状态下的一些网络请求(文章状态处理,图片下载),待有网再同步~~
对文章列表项的手势操作:
- [x] 左滑是切换文章的“已读/未读”状态
- [x] 右滑是切换文章的“加星/取消加星”状态
- [x] 长按是“上面的文章标记为已读,下面的文章标记为已读”
PS:
* 由于开发中本人也还在不断学习,难免有些历史遗留的错误代码以及注释,暂时未被清理,但不影响使用
# 后期规划
### Bug
- [x] 优化反色算法,解决灰反色问题
- [ ] 优化音频莫名暂停问题
- [ ] 优化 ROOM 库带来的问题
### 功能
- [x] 支持全文搜索
- [ ] 优化朗读、播放音乐的界面
- [ ] 支持本地 RSS
- [ ] 支持获取不支持 RSS 站点的文章
- [ ] 支持更换主题
- [ ] 支持设置排版:字体、字号、字距、行距、背景色
- [ ] 支持长按视频,图片,iframe候展示菜单
- [ ] 本地训练机器学习模型,判断文章喜好
- [ ] 检查添加的订阅地址是否有相似的订阅
### 技术
- [ ] 优化代码结构,拆成不同模块
- [ ] 改用最新的技术,例如 Kotlin
- [ ] 使用 CI 自动构建 APK 包
# 库的使用
* OkHttp, Gson, ROOM, Glide 等等
================================================
FILE: agentweb-core/.gitignore
================================================
/build
/src/androidTest/
/src/test/
================================================
FILE: agentweb-core/build.gradle
================================================
apply plugin: 'com.android.library'
android {
compileSdkVersion 29
buildToolsVersion '29.0.3'
defaultConfig {
minSdkVersion 22
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions{
abortOnError false
}
repositories {
flatDir {
dirs 'libs', 'providedLibs'
}
}
// defaultPublishConfig "debug"
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('androidx.test.espresso:espresso-core:3.2.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation 'junit:junit:4.13'
implementation 'com.download.library:Downloader:4.1.2'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation fileTree(include: ['*.jar'], dir: 'providedLibs')
}
================================================
FILE: agentweb-core/src/main/AndroidManifest.xml
================================================
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.just.agentweb"
>
<application>
<provider
android:name="com.just.agentweb.AgentWebFileProvider"
android:authorities="${applicationId}.AgentWebFileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/web_files_public"/>
</provider>
<activity
android:name="com.just.agentweb.ActionActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="false"
android:launchMode="standard"
android:theme="@style/actionActivity"
android:windowSoftInputMode="stateHidden|stateAlwaysHidden">
</activity>
</application>
</manifest>
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/AbsAgentWebSettings.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.content.Context;
import android.os.Build;
import android.view.View;
import android.webkit.DownloadListener;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
/**
* @author cenxiaozhong
* @update 4.0.0 ,WebDefaultSettingsManager rename to AbsAgentWebSettings
* @since 1.0.0
*/
public abstract class AbsAgentWebSettings implements IAgentWebSettings, WebListenerManager {
private WebSettings mWebSettings;
private static final String TAG = AbsAgentWebSettings.class.getSimpleName();
public static final String USERAGENT_UC = " UCBrowser/11.6.4.950 ";
public static final String USERAGENT_QQ_BROWSER = " MQQBrowser/8.0 ";
public static final String USERAGENT_AGENTWEB = AgentWebConfig.AGENTWEB_VERSION;
protected AgentWeb mAgentWeb;
public static AbsAgentWebSettings getInstance() {
return new AgentWebSettingsImpl();
}
public AbsAgentWebSettings() {
}
final void bindAgentWeb(AgentWeb agentWeb) {
this.mAgentWeb = agentWeb;
this.bindAgentWebSupport(agentWeb);
}
protected abstract void bindAgentWebSupport(AgentWeb agentWeb);
@Override
public IAgentWebSettings toSetting(WebView webView) {
settings(webView);
return this;
}
private void settings(WebView webView) {
mWebSettings = webView.getSettings();
mWebSettings.setJavaScriptEnabled(true);
mWebSettings.setSupportZoom(true);
mWebSettings.setBuiltInZoomControls(false);
mWebSettings.setSavePassword(false);
if (AgentWebUtils.checkNetwork(webView.getContext())) {
//根据cache-control获取数据。
mWebSettings.setCacheMode(WebSettings.LOAD_DEFAULT);
} else {
//没网,则从本地获取,即离线加载
mWebSettings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
//适配5.0不允许http和https混合使用情况
mWebSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
webView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
webView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
} else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
mWebSettings.setTextZoom(100);
mWebSettings.setDatabaseEnabled(true);
mWebSettings.setAppCacheEnabled(true);
mWebSettings.setLoadsImagesAutomatically(true);
mWebSettings.setSupportMultipleWindows(false);
// 是否阻塞加载网络图片 协议http or https
mWebSettings.setBlockNetworkImage(false);
// 允许加载本地文件html file协议
mWebSettings.setAllowFileAccess(true);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
// 通过 file url 加载的 Javascript 读取其他的本地文件 .建议关闭
mWebSettings.setAllowFileAccessFromFileURLs(false);
// 允许通过 file url 加载的 Javascript 可以访问其他的源,包括其他的文件和 http,https 等其他的源
mWebSettings.setAllowUniversalAccessFromFileURLs(false);
}
mWebSettings.setJavaScriptCanOpenWindowsAutomatically(true);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
mWebSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN);
} else {
mWebSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NORMAL);
}
mWebSettings.setLoadWithOverviewMode(false);
mWebSettings.setUseWideViewPort(false);
mWebSettings.setDomStorageEnabled(true);
mWebSettings.setNeedInitialFocus(true);
mWebSettings.setDefaultTextEncodingName("utf-8");//设置编码格式
mWebSettings.setDefaultFontSize(16);
mWebSettings.setMinimumFontSize(12);//设置 WebView 支持的最小字体大小,默认为 8
mWebSettings.setGeolocationEnabled(true);
String dir = AgentWebConfig.getCachePath(webView.getContext());
LogUtils.i(TAG, "dir:" + dir + " appcache:" + AgentWebConfig.getCachePath(webView.getContext()));
//设置数据库路径 api19 已经废弃,这里只针对 webkit 起作用
mWebSettings.setGeolocationDatabasePath(dir);
mWebSettings.setDatabasePath(dir);
mWebSettings.setAppCachePath(dir);
//缓存文件最大值
mWebSettings.setAppCacheMaxSize(Long.MAX_VALUE);
mWebSettings.setUserAgentString(getWebSettings()
.getUserAgentString()
.concat(USERAGENT_AGENTWEB)
.concat(USERAGENT_UC)
);
LogUtils.i(TAG, "UserAgentString : " + mWebSettings.getUserAgentString());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
// 安卓9.0后不允许多进程使用同一个数据目录,需设置前缀来区分
// 参阅 https://blog.csdn.net/lvshuchangyin/article/details/89446629
Context context = webView.getContext();
String processName = ProcessUtils.getCurrentProcessName(context);
if (!context.getApplicationContext().getPackageName().equals(processName)) {
WebView.setDataDirectorySuffix(processName);
}
}
}
@Override
public WebSettings getWebSettings() {
return mWebSettings;
}
@Override
public WebListenerManager setWebChromeClient(WebView webview, WebChromeClient webChromeClient) {
webview.setWebChromeClient(webChromeClient);
return this;
}
@Override
public WebListenerManager setWebViewClient(WebView webView, WebViewClient webViewClient) {
webView.setWebViewClient(webViewClient);
return this;
}
@Override
public WebListenerManager setDownloader(WebView webView, DownloadListener downloadListener) {
webView.setDownloadListener(downloadListener);
return this;
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/AbsAgentWebUIController.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.app.Activity;
import android.app.Dialog;
import android.os.Handler;
import android.webkit.JsPromptResult;
import android.webkit.JsResult;
import android.webkit.WebView;
/**
* 该类统一控制了与用户交互的界面
*
* @author cenxiaozhong
* @since 3.0.0
*/
public abstract class AbsAgentWebUIController {
public static boolean HAS_DESIGN_LIB = false;
private Activity mActivity;
private WebParentLayout mWebParentLayout;
private volatile boolean mIsBindWebParent = false;
protected AbsAgentWebUIController mAgentWebUIControllerDelegate;
protected String TAG = this.getClass().getSimpleName();
static {
try {
Class.forName("android.support.design.widget.Snackbar");
Class.forName("android.support.design.widget.BottomSheetDialog");
HAS_DESIGN_LIB = true;
} catch (Throwable ignore) {
HAS_DESIGN_LIB = false;
}
}
protected AbsAgentWebUIController create() {
return HAS_DESIGN_LIB ? new DefaultDesignUIController() : new DefaultUIController();
}
protected AbsAgentWebUIController getDelegate() {
AbsAgentWebUIController mAgentWebUIController = this.mAgentWebUIControllerDelegate;
if (mAgentWebUIController == null) {
this.mAgentWebUIControllerDelegate = mAgentWebUIController = create();
}
return mAgentWebUIController;
}
final synchronized void bindWebParent(WebParentLayout webParentLayout, Activity activity) {
if (!mIsBindWebParent) {
mIsBindWebParent = true;
this.mWebParentLayout = webParentLayout;
this.mActivity = activity;
bindSupportWebParent(webParentLayout, activity);
}
}
protected void toDismissDialog(Dialog dialog) {
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
}
protected void toShowDialog(Dialog dialog) {
if (dialog != null && !dialog.isShowing()) {
dialog.show();
}
}
protected abstract void bindSupportWebParent(WebParentLayout webParentLayout, Activity activity);
/**
* WebChromeClient#onJsAlert
*
* @param view
* @param url
* @param message
*/
public abstract void onJsAlert(WebView view, String url, String message);
/**
* 咨询用户是否前往其他页面
*
* @param view
* @param url
* @param callback
*/
public abstract void onOpenPagePrompt(WebView view, String url, Handler.Callback callback);
/**
* WebChromeClient#onJsConfirm
*
* @param view
* @param url
* @param message
* @param jsResult
*/
public abstract void onJsConfirm(WebView view, String url, String message, JsResult jsResult);
public abstract void onSelectItemsPrompt(WebView view, String url, String[] ways, Handler.Callback callback);
/**
* 强制下载弹窗
*
* @param url 当前下载地址。
* @param callback 用户操作回调回调
*/
public abstract void onForceDownloadAlert(String url, Handler.Callback callback);
/**
* WebChromeClient#onJsPrompt
*
* @param view
* @param url
* @param message
* @param defaultValue
* @param jsPromptResult
*/
public abstract void onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult jsPromptResult);
/**
* 显示错误页
*
* @param view
* @param errorCode
* @param description
* @param failingUrl
*/
public abstract void onMainFrameError(WebView view, int errorCode, String description, String failingUrl);
/**
* 隐藏错误页
*/
public abstract void onShowMainFrame();
/**
* 正在加载...
*
* @param msg
*/
public abstract void onLoading(String msg);
/**
* 取消正在加载...
*/
public abstract void onCancelLoading();
/**
* @param message 消息
* @param intent 说明message的来源,意图
*/
public abstract void onShowMessage(String message, String intent);
/**
* 当权限被拒回调该方法
*
* @param permissions
* @param permissionType
* @param action
*/
public abstract void onPermissionsDeny(String[] permissions, String permissionType, String action);
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/Action.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @author cenxiaozhong
* @since 2.0.0
*/
public class Action implements Parcelable {
public transient static final int ACTION_PERMISSION = 1;
public transient static final int ACTION_FILE = 2;
public transient static final int ACTION_CAMERA = 3;
public transient static final int ACTION_VIDEO = 4;
private ArrayList<String> mPermissions = new ArrayList();
private int mAction;
private int mFromIntention;
public Action() {
}
public ArrayList<String> getPermissions() {
return mPermissions;
}
public void setPermissions(ArrayList<String> permissions) {
this.mPermissions = permissions;
}
public void setPermissions(String[] permissions) {
this.mPermissions = new ArrayList<>(Arrays.asList(permissions));
}
public int getAction() {
return mAction;
}
public void setAction(int action) {
this.mAction = action;
}
protected Action(Parcel in) {
mPermissions = in.createStringArrayList();
mAction = in.readInt();
mFromIntention = in.readInt();
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeStringList(mPermissions);
dest.writeInt(mAction);
dest.writeInt(mFromIntention);
}
@Override
public int describeContents() {
return 0;
}
public static final Creator<Action> CREATOR = new Creator<Action>() {
@Override
public Action createFromParcel(Parcel in) {
return new Action(in);
}
@Override
public Action[] newArray(int size) {
return new Action[size];
}
};
public int getFromIntention() {
return mFromIntention;
}
public static Action createPermissionsAction(String[] permissions) {
Action mAction = new Action();
mAction.setAction(Action.ACTION_PERMISSION);
List<String> mList = Arrays.asList(permissions);
mAction.setPermissions(new ArrayList<String>(mList));
return mAction;
}
public Action setFromIntention(int fromIntention) {
this.mFromIntention = fromIntention;
return this;
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/ActionActivity.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.io.File;
import java.util.List;
import static android.provider.MediaStore.EXTRA_OUTPUT;
/**
* @since 2.0.0
* @author cenxiaozhong
*/
public final class ActionActivity extends Activity {
public static final String KEY_ACTION = "KEY_ACTION";
public static final String KEY_URI = "KEY_URI";
public static final String KEY_FROM_INTENTION = "KEY_FROM_INTENTION";
public static final String KEY_FILE_CHOOSER_INTENT = "KEY_FILE_CHOOSER_INTENT";
private static RationaleListener mRationaleListener;
private static PermissionListener mPermissionListener;
private static ChooserListener mChooserListener;
private static final String TAG = ActionActivity.class.getSimpleName();
private Action mAction;
public static final int REQUEST_CODE = 0x254;
public static void start(Activity activity, Action action) {
Intent mIntent = new Intent(activity, ActionActivity.class);
mIntent.putExtra(KEY_ACTION, action);
// mIntent.setExtrasClassLoader(Action.class.getClassLoader());
activity.startActivity(mIntent);
}
public static void setChooserListener(ChooserListener chooserListener) {
mChooserListener = chooserListener;
}
public static void setPermissionListener(PermissionListener permissionListener) {
mPermissionListener = permissionListener;
}
private void cancelAction() {
mChooserListener = null;
mPermissionListener = null;
mRationaleListener = null;
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (savedInstanceState != null) {
LogUtils.i(TAG, "savedInstanceState:" + savedInstanceState);
return;
}
Intent intent = getIntent();
mAction = intent.getParcelableExtra(KEY_ACTION);
if (mAction == null) {
cancelAction();
this.finish();
return;
}
if (mAction.getAction() == Action.ACTION_PERMISSION) {
permission(mAction);
} else if (mAction.getAction() == Action.ACTION_CAMERA) {
realOpenCamera();
} else if (mAction.getAction() == Action.ACTION_VIDEO){
realOpenVideo();
} else {
fetchFile(mAction);
}
}
private void fetchFile(Action action) {
if (mChooserListener == null) {
finish();
}
realOpenFileChooser();
}
private void realOpenFileChooser() {
try {
if (mChooserListener == null) {
finish();
return;
}
Intent mIntent = getIntent().getParcelableExtra(KEY_FILE_CHOOSER_INTENT);
if (mIntent == null) {
cancelAction();
return;
}
this.startActivityForResult(mIntent, REQUEST_CODE);
} catch (Throwable throwable) {
LogUtils.i(TAG, "找不到文件选择器");
chooserActionCallback(-1, null);
if (LogUtils.isDebug()) {
throwable.printStackTrace();
}
}
}
private void chooserActionCallback(int resultCode, Intent data) {
if (mChooserListener != null) {
mChooserListener.onChoiceResult(REQUEST_CODE, resultCode, data);
mChooserListener = null;
}
finish();
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == REQUEST_CODE) {
chooserActionCallback(resultCode, mUri != null ? new Intent().putExtra(KEY_URI, mUri) : data);
}
}
private void permission(Action action) {
List<String> permissions = action.getPermissions();
if (AgentWebUtils.isEmptyCollection(permissions)) {
mPermissionListener = null;
mRationaleListener = null;
finish();
return;
}
if (mRationaleListener != null) {
boolean rationale = false;
for (String permission : permissions) {
rationale = shouldShowRequestPermissionRationale(permission);
if (rationale) {
break;
}
}
mRationaleListener.onRationaleResult(rationale, new Bundle());
mRationaleListener = null;
finish();
return;
}
if (mPermissionListener != null){
requestPermissions(permissions.toArray(new String[]{}), 1);
}
}
private Uri mUri;
private void realOpenCamera() {
try {
if (mChooserListener == null){
finish();
}
File mFile = AgentWebUtils.createImageFile(this);
if (mFile == null) {
mChooserListener.onChoiceResult(REQUEST_CODE, Activity.RESULT_CANCELED, null);
mChooserListener = null;
finish();
}
Intent intent = AgentWebUtils.getIntentCaptureCompat(this, mFile);
// 指定开启系统相机的Action
mUri = intent.getParcelableExtra(EXTRA_OUTPUT);
this.startActivityForResult(intent, REQUEST_CODE);
} catch (Throwable ignore) {
LogUtils.e(TAG, "找不到系统相机");
if (mChooserListener != null) {
mChooserListener.onChoiceResult(REQUEST_CODE, Activity.RESULT_CANCELED, null);
}
mChooserListener = null;
if (LogUtils.isDebug()){
ignore.printStackTrace();
}
}
}
private void realOpenVideo(){
try {
if (mChooserListener == null){
finish();
}
File mFile = AgentWebUtils.createVideoFile(this);
if (mFile == null) {
mChooserListener.onChoiceResult(REQUEST_CODE, Activity.RESULT_CANCELED, null);
mChooserListener = null;
finish();
}
Intent intent = AgentWebUtils.getIntentVideoCompat(this, mFile);
// 指定开启系统相机的Action
mUri = intent.getParcelableExtra(EXTRA_OUTPUT);
this.startActivityForResult(intent, REQUEST_CODE);
} catch (Throwable ignore) {
LogUtils.e(TAG, "找不到系统相机");
if (mChooserListener != null) {
mChooserListener.onChoiceResult(REQUEST_CODE, Activity.RESULT_CANCELED, null);
}
mChooserListener = null;
if (LogUtils.isDebug()){
ignore.printStackTrace();
}
}
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
if (mPermissionListener != null) {
Bundle mBundle = new Bundle();
mBundle.putInt(KEY_FROM_INTENTION, mAction.getFromIntention());
mPermissionListener.onRequestPermissionsResult(permissions, grantResults, mBundle);
}
mPermissionListener = null;
finish();
}
public interface RationaleListener {
void onRationaleResult(boolean showRationale, Bundle extras);
}
public interface PermissionListener {
void onRequestPermissionsResult(@NonNull String[] permissions, @NonNull int[] grantResults, Bundle extras);
}
public interface ChooserListener {
void onChoiceResult(int requestCode, int resultCode, Intent data);
}
@Override
protected void onDestroy() {
super.onDestroy();
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWeb.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.app.Activity;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.annotation.ColorInt;
import androidx.annotation.IdRes;
import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.collection.ArrayMap;
import androidx.fragment.app.Fragment;
import java.lang.ref.WeakReference;
import java.util.Map;
/**
* @author cenxiaozhong
* @update 4.0.0
* @since 1.0.0
*/
public final class AgentWeb {
/**
* AgentWeb 's TAG
*/
private static final String TAG = AgentWeb.class.getSimpleName();
/**
* Activity
*/
private Activity mActivity;
/**
* 承载 WebParentLayout 的 ViewGroup
*/
private ViewGroup mViewGroup;
/**
* 负责创建布局 WebView ,WebParentLayout Indicator等。
*/
private WebCreator mWebCreator;
/**
* 管理 WebSettings
*/
private IAgentWebSettings mAgentWebSettings;
/**
* AgentWeb
*/
private AgentWeb mAgentWeb = null;
/**
* IndicatorController 控制Indicator
*/
private IndicatorController mIndicatorController;
/**
* WebChromeClient
*/
private com.just.agentweb.WebChromeClient mWebChromeClient;
/**
* WebViewClient
*/
private com.just.agentweb.WebViewClient mWebViewClient;
/**
* is show indicator
*/
private boolean mEnableIndicator;
/**
* IEventHandler 处理WebView相关返回事件
*/
private IEventHandler mIEventHandler;
/**
* WebView 注入对象
*/
private ArrayMap<String, Object> mJavaObjects = new ArrayMap<>();
/**
* flag
*/
private int TAG_TARGET = 0;
/**
* WebListenerManager
*/
private WebListenerManager mWebListenerManager;
/**
* 安全 Controller
*/
private WebSecurityController<WebSecurityCheckLogic> mWebSecurityController = null;
/**
* WebSecurityCheckLogic
*/
private WebSecurityCheckLogic mWebSecurityCheckLogic = null;
/**
* WebChromeClient
*/
private WebChromeClient mTargetChromeClient;
/**
* flag security 's mode
*/
private SecurityType mSecurityType = SecurityType.DEFAULT_CHECK;
/**
* Activity
*/
private static final int ACTIVITY_TAG = 0;
/**
* Fragment
*/
private static final int FRAGMENT_TAG = 1;
/**
* AgentWeb 默认注入对像
*/
private AgentWebJsInterfaceCompat mAgentWebJsInterfaceCompat = null;
/**
* JsAccessEntrace 提供快速JS方法调用
*/
private JsAccessEntrace mJsAccessEntrace = null;
/**
* URL Loader , 提供了 WebView#loadUrl(url) reload() stopLoading() postUrl()等方法
*/
private IUrlLoader mIUrlLoader = null;
/**
* WebView 生命周期 , 跟随生命周期释放CPU
*/
private WebLifeCycle mWebLifeCycle;
/**
* Video 视屏播放管理类
*/
private IVideo mIVideo = null;
/**
* WebViewClient 辅助控制开关
*/
private boolean mWebClientHelper = true;
/**
* PermissionInterceptor 权限拦截
*/
private PermissionInterceptor mPermissionInterceptor;
/**
* 是否拦截未知的Url, @link{DefaultWebClient}
*/
private boolean mIsInterceptUnkownUrl = false;
private int mUrlHandleWays = -1;
/**
* MiddlewareWebClientBase WebViewClient 中间件
*/
private MiddlewareWebClientBase mMiddleWrareWebClientBaseHeader;
/**
* MiddlewareWebChromeBase WebChromeClient 中间件
*/
private MiddlewareWebChromeBase mMiddlewareWebChromeBaseHeader;
/**
* 事件拦截
*/
private EventInterceptor mEventInterceptor;
/**
* 注入对象管理类
*/
private JsInterfaceHolder mJsInterfaceHolder = null;
private AgentWeb(AgentBuilder agentBuilder) {
TAG_TARGET = agentBuilder.mTag;
this.mActivity = agentBuilder.mActivity;
this.mViewGroup = agentBuilder.mViewGroup;
this.mIEventHandler = agentBuilder.mIEventHandler;
this.mEnableIndicator = agentBuilder.mEnableIndicator;
mWebCreator = agentBuilder.mWebCreator == null ? configWebCreator(agentBuilder.mBaseIndicatorView, agentBuilder.mIndex, agentBuilder.mLayoutParams, agentBuilder.mIndicatorColor, agentBuilder.mHeight, agentBuilder.mWebView, agentBuilder.mWebLayout) : agentBuilder.mWebCreator;
mIndicatorController = agentBuilder.mIndicatorController;
this.mWebChromeClient = agentBuilder.mWebChromeClient;
this.mWebViewClient = agentBuilder.mWebViewClient;
mAgentWeb = this;
this.mAgentWebSettings = agentBuilder.mAgentWebSettings;
if (agentBuilder.mJavaObject != null && !agentBuilder.mJavaObject.isEmpty()) {
this.mJavaObjects.putAll((Map<? extends String, ?>) agentBuilder.mJavaObject);
LogUtils.i(TAG, "mJavaObject size:" + this.mJavaObjects.size());
}
this.mPermissionInterceptor = agentBuilder.mPermissionInterceptor == null ? null : new PermissionInterceptorWrapper(agentBuilder.mPermissionInterceptor);
this.mSecurityType = agentBuilder.mSecurityType;
this.mIUrlLoader = new UrlLoaderImpl(mWebCreator.create().getWebView(), agentBuilder.mHttpHeaders);
if (this.mWebCreator.getWebParentLayout() instanceof WebParentLayout) {
WebParentLayout mWebParentLayout = (WebParentLayout) this.mWebCreator.getWebParentLayout();
mWebParentLayout.bindController(agentBuilder.mAgentWebUIController == null ? AgentWebUIControllerImplBase.build() : agentBuilder.mAgentWebUIController);
mWebParentLayout.setErrorLayoutRes(agentBuilder.mErrorLayout, agentBuilder.mReloadId);
mWebParentLayout.setErrorView(agentBuilder.mErrorView);
}
this.mWebLifeCycle = new DefaultWebLifeCycleImpl(mWebCreator.getWebView());
mWebSecurityController = new WebSecurityControllerImpl(mWebCreator.getWebView(), this.mAgentWeb.mJavaObjects, this.mSecurityType);
this.mWebClientHelper = agentBuilder.mWebClientHelper;
this.mIsInterceptUnkownUrl = agentBuilder.mIsInterceptUnkownUrl;
if (agentBuilder.mOpenOtherPage != null) {
this.mUrlHandleWays = agentBuilder.mOpenOtherPage.code;
}
this.mMiddleWrareWebClientBaseHeader = agentBuilder.mMiddlewareWebClientBaseHeader;
this.mMiddlewareWebChromeBaseHeader = agentBuilder.mChromeMiddleWareHeader;
init();
}
/**
* @return PermissionInterceptor 权限控制者
*/
public PermissionInterceptor getPermissionInterceptor() {
return this.mPermissionInterceptor;
}
public WebLifeCycle getWebLifeCycle() {
return this.mWebLifeCycle;
}
public JsAccessEntrace getJsAccessEntrace() {
JsAccessEntrace mJsAccessEntrace = this.mJsAccessEntrace;
if (mJsAccessEntrace == null) {
this.mJsAccessEntrace = mJsAccessEntrace = JsAccessEntraceImpl.getInstance(mWebCreator.getWebView());
}
return mJsAccessEntrace;
}
public AgentWeb clearWebCache() {
if (this.getWebCreator().getWebView() != null) {
AgentWebUtils.clearWebViewAllCache(mActivity, this.getWebCreator().getWebView());
} else {
AgentWebUtils.clearWebViewAllCache(mActivity);
}
return this;
}
public static AgentBuilder with(@NonNull Activity activity) {
if (activity == null) {
throw new NullPointerException("activity can not be null .");
}
return new AgentBuilder(activity);
}
public static AgentBuilder with(@NonNull Fragment fragment) {
Activity mActivity = null;
if ((mActivity = fragment.getActivity()) == null) {
throw new NullPointerException("activity can not be null .");
}
return new AgentBuilder(mActivity, fragment);
}
public boolean handleKeyEvent(int keyCode, KeyEvent keyEvent) {
if (mIEventHandler == null) {
mIEventHandler = EventHandlerImpl.getInstantce(mWebCreator.getWebView(), getInterceptor());
}
return mIEventHandler.onKeyDown(keyCode, keyEvent);
}
public boolean back() {
if (mIEventHandler == null) {
mIEventHandler = EventHandlerImpl.getInstantce(mWebCreator.getWebView(), getInterceptor());
}
return mIEventHandler.back();
}
public WebCreator getWebCreator() {
return this.mWebCreator;
}
public IEventHandler getIEventHandler() {
return this.mIEventHandler == null ? (this.mIEventHandler = EventHandlerImpl.getInstantce(mWebCreator.getWebView(), getInterceptor())) : this.mIEventHandler;
}
public IAgentWebSettings getAgentWebSettings() {
return this.mAgentWebSettings;
}
public IndicatorController getIndicatorController() {
return this.mIndicatorController;
}
public JsInterfaceHolder getJsInterfaceHolder() {
return this.mJsInterfaceHolder;
}
public IUrlLoader getUrlLoader() {
return this.mIUrlLoader;
}
public void destroy() {
this.mWebLifeCycle.onDestroy();
}
public static class PreAgentWeb {
private AgentWeb mAgentWeb;
private boolean isReady = false;
PreAgentWeb(AgentWeb agentWeb) {
this.mAgentWeb = agentWeb;
}
public PreAgentWeb ready() {
if (!isReady) {
mAgentWeb.ready();
isReady = true;
}
return this;
}
public AgentWeb get() {
ready();
return mAgentWeb;
}
public AgentWeb go(@Nullable String url) {
if (!isReady) {
ready();
}
return mAgentWeb.go(url);
}
}
private void doSafeCheck() {
WebSecurityCheckLogic mWebSecurityCheckLogic = this.mWebSecurityCheckLogic;
if (mWebSecurityCheckLogic == null) {
this.mWebSecurityCheckLogic = mWebSecurityCheckLogic = WebSecurityLogicImpl.getInstance();
}
mWebSecurityController.check(mWebSecurityCheckLogic);
}
private void doCompat() {
mJavaObjects.put("agentWeb", mAgentWebJsInterfaceCompat = new AgentWebJsInterfaceCompat(this, mActivity));
}
private WebCreator configWebCreator(BaseIndicatorView progressView, int index, ViewGroup.LayoutParams lp, int indicatorColor, int height_dp, WebView webView, IWebLayout webLayout) {
if (progressView != null && mEnableIndicator) {
return new DefaultWebCreator(mActivity, mViewGroup, lp, index, progressView, webView, webLayout);
} else {
return mEnableIndicator ?
new DefaultWebCreator(mActivity, mViewGroup, lp, index, indicatorColor, height_dp, webView, webLayout)
: new DefaultWebCreator(mActivity, mViewGroup, lp, index, webView, webLayout);
}
}
private AgentWeb go(String url) {
this.getUrlLoader().loadUrl(url);
IndicatorController mIndicatorController = null;
if (!TextUtils.isEmpty(url) && (mIndicatorController = getIndicatorController()) != null && mIndicatorController.offerIndicator() != null) {
getIndicatorController().offerIndicator().show();
}
return this;
}
private EventInterceptor getInterceptor() {
if (this.mEventInterceptor != null) {
return this.mEventInterceptor;
}
if (mIVideo instanceof VideoImpl) {
return this.mEventInterceptor = (EventInterceptor) this.mIVideo;
}
return null;
}
private void init() {
doCompat();
doSafeCheck();
}
private IVideo getIVideo() {
return mIVideo == null ? new VideoImpl(mActivity, mWebCreator.getWebView()) : mIVideo;
}
private WebViewClient getWebViewClient() {
LogUtils.i(TAG, "getDelegate:" + this.mMiddleWrareWebClientBaseHeader);
DefaultWebClient mDefaultWebClient = DefaultWebClient
.createBuilder()
.setActivity(this.mActivity)
.setWebClientHelper(this.mWebClientHelper)
.setPermissionInterceptor(this.mPermissionInterceptor)
.setWebView(this.mWebCreator.getWebView())
.setInterceptUnkownUrl(this.mIsInterceptUnkownUrl)
.setUrlHandleWays(this.mUrlHandleWays)
.build();
MiddlewareWebClientBase header = this.mMiddleWrareWebClientBaseHeader;
if (this.mWebViewClient != null) {
this.mWebViewClient.enq(this.mMiddleWrareWebClientBaseHeader);
header = this.mWebViewClient;
}
if (header != null) {
MiddlewareWebClientBase tail = header;
int count = 1;
MiddlewareWebClientBase tmp = header;
while (tmp.next() != null) {
tail = tmp = tmp.next();
count++;
}
LogUtils.i(TAG, "MiddlewareWebClientBase middleware count:" + count);
tail.setDelegate(mDefaultWebClient);
return header;
} else {
return mDefaultWebClient;
}
}
private AgentWeb ready() {
AgentWebConfig.initCookiesManager(mActivity.getApplicationContext());
IAgentWebSettings mAgentWebSettings = this.mAgentWebSettings;
if (mAgentWebSettings == null) {
this.mAgentWebSettings = mAgentWebSettings = AgentWebSettingsImpl.getInstance();
}
if (mAgentWebSettings instanceof AbsAgentWebSettings) {
((AbsAgentWebSettings) mAgentWebSettings).bindAgentWeb(this);
}
if (mWebListenerManager == null && mAgentWebSettings instanceof AbsAgentWebSettings) {
mWebListenerManager = (WebListenerManager) mAgentWebSettings;
}
mAgentWebSettings.toSetting(mWebCreator.getWebView());
if (mJsInterfaceHolder == null) {
mJsInterfaceHolder = JsInterfaceHolderImpl.getJsInterfaceHolder(mWebCreator.getWebView(), this.mSecurityType);
}
LogUtils.i(TAG, "mJavaObjects:" + mJavaObjects.size());
if (mJavaObjects != null && !mJavaObjects.isEmpty()) {
mJsInterfaceHolder.addJavaObjects(mJavaObjects);
}
if (mWebListenerManager != null) {
mWebListenerManager.setDownloader(mWebCreator.getWebView(), null);
mWebListenerManager.setWebChromeClient(mWebCreator.getWebView(), getChromeClient());
mWebListenerManager.setWebViewClient(mWebCreator.getWebView(), getWebViewClient());
}
return this;
}
private WebChromeClient getChromeClient() {
IndicatorController mIndicatorController =
(this.mIndicatorController == null) ?
IndicatorHandler.getInstance().inJectIndicator(mWebCreator.offer())
: this.mIndicatorController;
DefaultChromeClient mDefaultChromeClient =
new DefaultChromeClient(this.mActivity,
this.mIndicatorController = mIndicatorController,
null, this.mIVideo = getIVideo(),
this.mPermissionInterceptor, mWebCreator.getWebView());
LogUtils.i(TAG, "WebChromeClient:" + this.mWebChromeClient);
MiddlewareWebChromeBase header = this.mMiddlewareWebChromeBaseHeader;
if (this.mWebChromeClient != null) {
this.mWebChromeClient.enq(header);
header = this.mWebChromeClient;
}
if (header != null) {
MiddlewareWebChromeBase tail = header;
int count = 1;
MiddlewareWebChromeBase tmp = header;
for (; tmp.next() != null; ) {
tail = tmp = tmp.next();
count++;
}
LogUtils.i(TAG, "MiddlewareWebClientBase middleware count:" + count);
tail.setDelegate(mDefaultChromeClient);
return this.mTargetChromeClient = header;
} else {
return this.mTargetChromeClient = mDefaultChromeClient;
}
}
public enum SecurityType {
DEFAULT_CHECK, STRICT_CHECK;
}
public static final class AgentBuilder {
private Activity mActivity;
private Fragment mFragment;
private ViewGroup mViewGroup;
private boolean mIsNeedDefaultProgress;
private int mIndex = -1;
private BaseIndicatorView mBaseIndicatorView;
private IndicatorController mIndicatorController = null;
/*默认进度条是显示的*/
private boolean mEnableIndicator = true;
private ViewGroup.LayoutParams mLayoutParams = null;
private com.just.agentweb.WebViewClient mWebViewClient;
private com.just.agentweb.WebChromeClient mWebChromeClient;
private int mIndicatorColor = -1;
private IAgentWebSettings mAgentWebSettings;
private WebCreator mWebCreator;
private HttpHeaders mHttpHeaders = null;
private IEventHandler mIEventHandler;
private int mHeight = -1;
private ArrayMap<String, Object> mJavaObject;
private SecurityType mSecurityType = SecurityType.DEFAULT_CHECK;
private WebView mWebView;
private boolean mWebClientHelper = true;
private IWebLayout mWebLayout = null;
private PermissionInterceptor mPermissionInterceptor = null;
private AbsAgentWebUIController mAgentWebUIController;
private DefaultWebClient.OpenOtherPageWays mOpenOtherPage = null;
private boolean mIsInterceptUnkownUrl = false;
private MiddlewareWebClientBase mMiddlewareWebClientBaseHeader;
private MiddlewareWebClientBase mMiddlewareWebClientBaseTail;
private MiddlewareWebChromeBase mChromeMiddleWareHeader = null;
private MiddlewareWebChromeBase mChromeMiddleWareTail = null;
private View mErrorView;
private int mErrorLayout;
private int mReloadId;
private int mTag = -1;
public AgentBuilder(@NonNull Activity activity, @NonNull Fragment fragment) {
mActivity = activity;
mFragment = fragment;
mTag = AgentWeb.FRAGMENT_TAG;
}
public AgentBuilder(@NonNull Activity activity) {
mActivity = activity;
mTag = AgentWeb.ACTIVITY_TAG;
}
public IndicatorBuilder setAgentWebParent(@NonNull ViewGroup v, @NonNull ViewGroup.LayoutParams lp) {
this.mViewGroup = v;
this.mLayoutParams = lp;
return new IndicatorBuilder(this);
}
public IndicatorBuilder setAgentWebParent(@NonNull ViewGroup v, int index, @NonNull ViewGroup.LayoutParams lp) {
this.mViewGroup = v;
this.mLayoutParams = lp;
this.mIndex = index;
return new IndicatorBuilder(this);
}
private PreAgentWeb buildAgentWeb() {
if (mTag == AgentWeb.FRAGMENT_TAG && this.mViewGroup == null) {
throw new NullPointerException("ViewGroup is null,Please check your parameters .");
}
return new PreAgentWeb(HookManager.hookAgentWeb(new AgentWeb(this), this));
}
private void addJavaObject(String key, Object o) {
if (mJavaObject == null) {
mJavaObject = new ArrayMap<>();
}
mJavaObject.put(key, o);
}
private void addHeader(String baseUrl, String k, String v) {
if (mHttpHeaders == null) {
mHttpHeaders = HttpHeaders.create();
}
mHttpHeaders.additionalHttpHeader(baseUrl, k, v);
}
private void addHeader(String baseUrl, Map<String, String> headers) {
if (mHttpHeaders == null) {
mHttpHeaders = HttpHeaders.create();
}
mHttpHeaders.additionalHttpHeaders(baseUrl, headers);
}
}
public static class IndicatorBuilder {
private AgentBuilder mAgentBuilder = null;
public IndicatorBuilder(AgentBuilder agentBuilder) {
this.mAgentBuilder = agentBuilder;
}
public CommonBuilder useDefaultIndicator(int color) {
this.mAgentBuilder.mEnableIndicator = true;
this.mAgentBuilder.mIndicatorColor = color;
return new CommonBuilder(mAgentBuilder);
}
public CommonBuilder useDefaultIndicator() {
this.mAgentBuilder.mEnableIndicator = true;
return new CommonBuilder(mAgentBuilder);
}
public CommonBuilder closeIndicator() {
this.mAgentBuilder.mEnableIndicator = false;
this.mAgentBuilder.mIndicatorColor = -1;
this.mAgentBuilder.mHeight = -1;
return new CommonBuilder(mAgentBuilder);
}
public CommonBuilder setCustomIndicator(@NonNull BaseIndicatorView v) {
if (v != null) {
this.mAgentBuilder.mEnableIndicator = true;
this.mAgentBuilder.mBaseIndicatorView = v;
this.mAgentBuilder.mIsNeedDefaultProgress = false;
} else {
this.mAgentBuilder.mEnableIndicator = true;
this.mAgentBuilder.mIsNeedDefaultProgress = true;
}
return new CommonBuilder(mAgentBuilder);
}
public CommonBuilder useDefaultIndicator(@ColorInt int color, int height_dp) {
this.mAgentBuilder.mIndicatorColor = color;
this.mAgentBuilder.mHeight = height_dp;
return new CommonBuilder(this.mAgentBuilder);
}
}
public static class CommonBuilder {
private AgentBuilder mAgentBuilder;
public CommonBuilder(AgentBuilder agentBuilder) {
this.mAgentBuilder = agentBuilder;
}
public CommonBuilder setEventHanadler(@Nullable IEventHandler iEventHandler) {
mAgentBuilder.mIEventHandler = iEventHandler;
return this;
}
public CommonBuilder closeWebViewClientHelper() {
mAgentBuilder.mWebClientHelper = false;
return this;
}
public CommonBuilder setWebChromeClient(@Nullable com.just.agentweb.WebChromeClient webChromeClient) {
this.mAgentBuilder.mWebChromeClient = webChromeClient;
return this;
}
public CommonBuilder setWebViewClient(@Nullable com.just.agentweb.WebViewClient webChromeClient) {
this.mAgentBuilder.mWebViewClient = webChromeClient;
return this;
}
public CommonBuilder useMiddlewareWebClient(@NonNull MiddlewareWebClientBase middleWrareWebClientBase) {
if (middleWrareWebClientBase == null) {
return this;
}
if (this.mAgentBuilder.mMiddlewareWebClientBaseHeader == null) {
this.mAgentBuilder.mMiddlewareWebClientBaseHeader = this.mAgentBuilder.mMiddlewareWebClientBaseTail = middleWrareWebClientBase;
} else {
this.mAgentBuilder.mMiddlewareWebClientBaseTail.enq(middleWrareWebClientBase);
this.mAgentBuilder.mMiddlewareWebClientBaseTail = middleWrareWebClientBase;
}
return this;
}
public CommonBuilder useMiddlewareWebChrome(@NonNull MiddlewareWebChromeBase middlewareWebChromeBase) {
if (middlewareWebChromeBase == null) {
return this;
}
if (this.mAgentBuilder.mChromeMiddleWareHeader == null) {
this.mAgentBuilder.mChromeMiddleWareHeader = this.mAgentBuilder.mChromeMiddleWareTail = middlewareWebChromeBase;
} else {
this.mAgentBuilder.mChromeMiddleWareTail.enq(middlewareWebChromeBase);
this.mAgentBuilder.mChromeMiddleWareTail = middlewareWebChromeBase;
}
return this;
}
public CommonBuilder setMainFrameErrorView(@NonNull View view) {
this.mAgentBuilder.mErrorView = view;
return this;
}
public CommonBuilder setMainFrameErrorView(@LayoutRes int errorLayout, @IdRes int clickViewId) {
this.mAgentBuilder.mErrorLayout = errorLayout;
this.mAgentBuilder.mReloadId = clickViewId;
return this;
}
public CommonBuilder setAgentWebWebSettings(@Nullable IAgentWebSettings agentWebSettings) {
this.mAgentBuilder.mAgentWebSettings = agentWebSettings;
return this;
}
public PreAgentWeb createAgentWeb() {
return this.mAgentBuilder.buildAgentWeb();
}
public CommonBuilder addJavascriptInterface(@NonNull String name, @NonNull Object o) {
this.mAgentBuilder.addJavaObject(name, o);
return this;
}
public CommonBuilder setSecurityType(@NonNull SecurityType type) {
this.mAgentBuilder.mSecurityType = type;
return this;
}
public CommonBuilder setWebView(@Nullable WebView webView) {
this.mAgentBuilder.mWebView = webView;
return this;
}
public CommonBuilder setWebLayout(@Nullable IWebLayout iWebLayout) {
this.mAgentBuilder.mWebLayout = iWebLayout;
return this;
}
public CommonBuilder additionalHttpHeader(String baseUrl, String k, String v) {
this.mAgentBuilder.addHeader(baseUrl, k, v);
return this;
}
public CommonBuilder additionalHttpHeader(String baseUrl, Map<String, String> headers) {
this.mAgentBuilder.addHeader(baseUrl, headers);
return this;
}
public CommonBuilder setPermissionInterceptor(@Nullable PermissionInterceptor permissionInterceptor) {
this.mAgentBuilder.mPermissionInterceptor = permissionInterceptor;
return this;
}
public CommonBuilder setAgentWebUIController(@Nullable AgentWebUIControllerImplBase agentWebUIController) {
this.mAgentBuilder.mAgentWebUIController = agentWebUIController;
return this;
}
public CommonBuilder setOpenOtherPageWays(@Nullable DefaultWebClient.OpenOtherPageWays openOtherPageWays) {
this.mAgentBuilder.mOpenOtherPage = openOtherPageWays;
return this;
}
public CommonBuilder interceptUnkownUrl() {
this.mAgentBuilder.mIsInterceptUnkownUrl = true;
return this;
}
}
private static final class PermissionInterceptorWrapper implements PermissionInterceptor {
private WeakReference<PermissionInterceptor> mWeakReference;
private PermissionInterceptorWrapper(PermissionInterceptor permissionInterceptor) {
this.mWeakReference = new WeakReference<PermissionInterceptor>(permissionInterceptor);
}
@Override
public boolean intercept(String url, String[] permissions, String a) {
if (this.mWeakReference.get() == null) {
return false;
}
return mWeakReference.get().intercept(url, permissions, a);
}
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebConfig.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.content.Context;
import android.os.AsyncTask;
import android.os.Build;
import android.text.TextUtils;
import android.webkit.CookieManager;
import android.webkit.CookieSyncManager;
import android.webkit.ValueCallback;
import android.webkit.WebView;
import androidx.annotation.Nullable;
import java.io.File;
import static com.just.agentweb.AgentWebUtils.getAgentWebFilePath;
/**
* @since 1.0.0
* @author cenxiaozhong
*/
public class AgentWebConfig {
static final String FILE_CACHE_PATH = "agentweb-cache";
static final String AGENTWEB_CACHE_PATCH = File.separator + "agentweb-cache";
/**
* 缓存路径
*/
static String AGENTWEB_FILE_PATH;
/**
* DEBUG 模式 , 如果需要查看日志请设置为 true
*/
public static boolean DEBUG = false;
/**
* 当前操作系统是否低于 KITKAT
*/
static final boolean IS_KITKAT_OR_BELOW_KITKAT = Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT;
/**
* 默认 WebView 类型 。
*/
public static final int WEBVIEW_DEFAULT_TYPE = 1;
/**
* 使用 AgentWebView
*/
public static final int WEBVIEW_AGENTWEB_SAFE_TYPE = 2;
/**
* 自定义 WebView
*/
public static final int WEBVIEW_CUSTOM_TYPE = 3;
static int WEBVIEW_TYPE = WEBVIEW_DEFAULT_TYPE;
private static volatile boolean IS_INITIALIZED = false;
private static final String TAG = AgentWebConfig.class.getSimpleName();
/**
* AgentWeb 的版本
*/
public static final String AGENTWEB_VERSION = " agentweb/4.0.2 ";
public static final String AGENTWEB_NAME="AgentWeb";
/**
* 通过JS获取的文件大小, 这里限制最大为5MB ,太大会抛出 OutOfMemoryError
*/
public static int MAX_FILE_LENGTH = 1024 * 1024 * 5;
//获取Cookie
public static String getCookiesByUrl(String url) {
return CookieManager.getInstance() == null ? null : CookieManager.getInstance().getCookie(url);
}
public static void debug() {
DEBUG = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
WebView.setWebContentsDebuggingEnabled(true);
}
}
/**
* 删除所有已经过期的 Cookies
*/
public static void removeExpiredCookies() {
CookieManager mCookieManager = null;
if ((mCookieManager = CookieManager.getInstance()) != null) { //同步清除
mCookieManager.removeExpiredCookie();
toSyncCookies();
}
}
/**
* 删除所有 Cookies
*/
public static void removeAllCookies() {
removeAllCookies(null);
}
// 解决兼容 Android 4.4 java.lang.NoSuchMethodError: android.webkit.CookieManager.removeSessionCookies
public static void removeSessionCookies() {
removeSessionCookies(null);
}
/**
* 同步cookie
*
* @param url
* @param cookies
*/
public static void syncCookie(String url, String cookies) {
CookieManager mCookieManager = CookieManager.getInstance();
if (mCookieManager != null) {
mCookieManager.setCookie(url, cookies);
toSyncCookies();
}
}
public static void removeSessionCookies(ValueCallback<Boolean> callback) {
if (callback == null) {
callback = getDefaultIgnoreCallback();
}
if (CookieManager.getInstance() == null) {
callback.onReceiveValue(new Boolean(false));
return;
}
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
CookieManager.getInstance().removeSessionCookie();
toSyncCookies();
callback.onReceiveValue(new Boolean(true));
return;
}
CookieManager.getInstance().removeSessionCookies(callback);
toSyncCookies();
}
/**
* @param context
* @return WebView 的缓存路径
*/
public static String getCachePath(Context context) {
return context.getCacheDir().getAbsolutePath() + AGENTWEB_CACHE_PATCH;
}
/**
* @param context
* @return AgentWeb 缓存路径
*/
public static String getExternalCachePath(Context context) {
return getAgentWebFilePath(context);
}
//Android 4.4 NoSuchMethodError: android.webkit.CookieManager.removeAllCookies
public static void removeAllCookies(@Nullable ValueCallback<Boolean> callback) {
if (callback == null) {
callback = getDefaultIgnoreCallback();
}
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
CookieManager.getInstance().removeAllCookie();
toSyncCookies();
callback.onReceiveValue(!CookieManager.getInstance().hasCookies());
return;
}
CookieManager.getInstance().removeAllCookies(callback);
toSyncCookies();
}
/**
* 清空缓存
*
* @param context
*/
public static synchronized void clearDiskCache(Context context) {
try {
AgentWebUtils.clearCacheFolder(new File(getCachePath(context)), 0);
String path = getExternalCachePath(context);
if (!TextUtils.isEmpty(path)) {
File mFile = new File(path);
AgentWebUtils.clearCacheFolder(mFile, 0);
}
} catch (Throwable throwable) {
if (LogUtils.isDebug()) {
throwable.printStackTrace();
}
}
}
static synchronized void initCookiesManager(Context context) {
if (!IS_INITIALIZED) {
createCookiesSyncInstance(context);
IS_INITIALIZED = true;
}
}
private static void createCookiesSyncInstance(Context context) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
CookieSyncManager.createInstance(context);
}
}
private static void toSyncCookies() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
CookieSyncManager.getInstance().sync();
return;
}
AsyncTask.THREAD_POOL_EXECUTOR.execute(new Runnable() {
@Override
public void run() {
CookieManager.getInstance().flush();
}
});
}
static String getDatabasesCachePath(Context context) {
return context.getApplicationContext().getDir("database", Context.MODE_PRIVATE).getPath();
}
private static ValueCallback<Boolean> getDefaultIgnoreCallback() {
return new ValueCallback<Boolean>() {
@Override
public void onReceiveValue(Boolean ignore) {
LogUtils.i(TAG, "removeExpiredCookies:" + ignore);
}
};
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebFileProvider.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.content.Context;
import android.content.pm.ProviderInfo;
import androidx.annotation.NonNull;
import androidx.core.content.FileProvider;
/**
* @since 2.0.0
* @author cenxiaozhong
*/
public class AgentWebFileProvider extends FileProvider {
@Override
public void attachInfo(@NonNull Context context, @NonNull ProviderInfo info) {
super.attachInfo(context, info);
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebJsInterfaceCompat.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.app.Activity;
import android.os.Handler;
import android.os.Message;
import android.webkit.JavascriptInterface;
import java.lang.ref.WeakReference;
/**
* @author cenxiaozhong
* @since 1.0.0
*/
public class AgentWebJsInterfaceCompat {
private WeakReference<AgentWeb> mReference = null;
private WeakReference<Activity> mActivityWeakReference = null;
private String TAG = this.getClass().getSimpleName();
AgentWebJsInterfaceCompat(AgentWeb agentWeb, Activity activity) {
mReference = new WeakReference<AgentWeb>(agentWeb);
mActivityWeakReference = new WeakReference<Activity>(activity);
}
@JavascriptInterface
public void uploadFile() {
uploadFile("*/*");
}
@JavascriptInterface
public void uploadFile(String acceptType) {
LogUtils.i(TAG, acceptType + " " + mActivityWeakReference.get() + " " + mReference.get());
if (mActivityWeakReference.get() != null && mReference.get() != null) {
AgentWebUtils.showFileChooserCompat(mActivityWeakReference.get(),
mReference.get().getWebCreator().getWebView(),
null,
null,
mReference.get().getPermissionInterceptor(),
null,
acceptType,
new Handler.Callback() {
@Override
public boolean handleMessage(Message msg) {
if (mReference.get() != null) {
mReference.get().getJsAccessEntrace()
.quickCallJs("uploadFileResult",
msg.obj instanceof String ? (String) msg.obj : null);
}
return true;
}
}
);
}
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebPermissions.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.Manifest;
/**
* @author cenxiaozhong
* @since 1.0.0
*/
public class AgentWebPermissions {
public static final String[] CAMERA;
public static final String[] LOCATION;
public static final String[] STORAGE;
public static final String ACTION_CAMERA = "Camera";
public static final String ACTION_LOCATION = "Location";
public static final String ACTION_STORAGE = "Storage";
static {
CAMERA = new String[]{
Manifest.permission.CAMERA};
LOCATION = new String[]{
Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.ACCESS_COARSE_LOCATION};
STORAGE = new String[]{
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE};
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebSettingsImpl.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.app.Activity;
import android.content.Context;
import android.content.ContextWrapper;
import android.webkit.DownloadListener;
import android.webkit.WebView;
/**
* @author cenxiaozhong
* @since 1.0.0
*/
public class AgentWebSettingsImpl extends AbsAgentWebSettings {
private AgentWeb mAgentWeb;
@Override
protected void bindAgentWebSupport(AgentWeb agentWeb) {
this.mAgentWeb = agentWeb;
}
@Override
public WebListenerManager setDownloader(WebView webView, DownloadListener downloadListener) {
// Fix Android 5.1 crashing:
// ClassCastException: android.app.ContextImpl cannot be cast to android.app.Activity
if (downloadListener == null) {
Activity activity = getActivityByContext(webView.getContext());
downloadListener = DefaultDownloadImpl.create(activity, webView, mAgentWeb.getPermissionInterceptor());
}
return super.setDownloader(webView, downloadListener);
}
/**
* Copy from com.blankj.utilcode.util.ActivityUtils#getActivityByView
*/
private Activity getActivityByContext(Context context) {
if (context instanceof Activity) return (Activity) context;
while (context instanceof ContextWrapper) {
if (context instanceof Activity) {
return (Activity) context;
}
context = ((ContextWrapper) context).getBaseContext();
}
LogUtils.e( "获取 B :", context + "" );
System.out.println("输出:" + context + "");
return null;
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebUIControllerImplBase.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.app.Activity;
import android.os.Handler;
import android.webkit.JsPromptResult;
import android.webkit.JsResult;
import android.webkit.WebView;
/**
* @author cenxiaozhong
* @date 2017/12/6
* @since 3.0.0
*/
public class AgentWebUIControllerImplBase extends AbsAgentWebUIController {
public static AbsAgentWebUIController build() {
return new AgentWebUIControllerImplBase();
}
@Override
public void onJsAlert(WebView view, String url, String message) {
getDelegate().onJsAlert(view, url, message);
}
@Override
public void onOpenPagePrompt(WebView view, String url, Handler.Callback callback) {
getDelegate().onOpenPagePrompt(view, url, callback);
}
@Override
public void onJsConfirm(WebView view, String url, String message, JsResult jsResult) {
getDelegate().onJsConfirm(view, url, message, jsResult);
}
@Override
public void onSelectItemsPrompt(WebView view, String url, String[] ways, Handler.Callback callback) {
getDelegate().onSelectItemsPrompt(view, url, ways, callback);
}
@Override
public void onForceDownloadAlert(String url, Handler.Callback callback) {
getDelegate().onForceDownloadAlert(url, callback);
}
@Override
public void onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult jsPromptResult) {
getDelegate().onJsPrompt(view, url, message, defaultValue, jsPromptResult);
}
@Override
public void onMainFrameError(WebView view, int errorCode, String description, String failingUrl) {
getDelegate().onMainFrameError(view, errorCode, description, failingUrl);
}
@Override
public void onShowMainFrame() {
getDelegate().onShowMainFrame();
}
@Override
public void onLoading(String msg) {
getDelegate().onLoading(msg);
}
@Override
public void onCancelLoading() {
getDelegate().onCancelLoading();
}
@Override
public void onShowMessage(String message, String from) {
getDelegate().onShowMessage(message, from);
}
@Override
public void onPermissionsDeny(String[] permissions, String permissionType, String action) {
getDelegate().onPermissionsDeny(permissions, permissionType, action);
}
@Override
protected void bindSupportWebParent(WebParentLayout webParentLayout, Activity activity) {
getDelegate().bindSupportWebParent(webParentLayout, activity);
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebUtils.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.ContentUris;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.database.Cursor;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.os.Handler;
import android.os.Looper;
import android.os.StatFs;
import android.provider.DocumentsContract;
import android.provider.MediaStore;
import android.telephony.TelephonyManager;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.TextUtils;
import android.text.format.DateUtils;
import android.text.style.ForegroundColorSpan;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.Toast;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
import androidx.core.app.AppOpsManagerCompat;
import androidx.core.content.ContextCompat;
import androidx.core.content.FileProvider;
import androidx.core.os.EnvironmentCompat;
import androidx.loader.content.CursorLoader;
import com.google.android.material.snackbar.Snackbar;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.lang.reflect.Method;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import static com.just.agentweb.AgentWebConfig.AGENTWEB_FILE_PATH;
import static com.just.agentweb.AgentWebConfig.FILE_CACHE_PATH;
/**
* @author cenxiaozhong
* @since 1.0.0
*/
public class AgentWebUtils {
private static final String TAG = AgentWebUtils.class.getSimpleName();
private static Handler mHandler = null;
private AgentWebUtils() {
throw new UnsupportedOperationException("u can't init me");
}
public static int dp2px(Context context, float dipValue) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (dipValue * scale + 0.5f);
}
static final void clearWebView(WebView m) {
if (m == null) {
return;
}
if (Looper.myLooper() != Looper.getMainLooper()) {
return;
}
m.loadUrl("about:blank");
m.stopLoading();
if (m.getHandler() != null) {
m.getHandler().removeCallbacksAndMessages(null);
}
m.removeAllViews();
ViewGroup mViewGroup = null;
if ((mViewGroup = ((ViewGroup) m.getParent())) != null) {
mViewGroup.removeView(m);
}
m.setWebChromeClient(null);
m.setWebViewClient(null);
m.setTag(null);
m.clearHistory();
m.destroy();
m = null;
}
public static String getAgentWebFilePath(Context context) {
if (!TextUtils.isEmpty(AGENTWEB_FILE_PATH)) {
return AGENTWEB_FILE_PATH;
}
String dir = getDiskExternalCacheDir(context);
File mFile = new File(dir, FILE_CACHE_PATH);
try {
if (!mFile.exists()) {
mFile.mkdirs();
}
} catch (Throwable throwable) {
LogUtils.i(TAG, "create dir exception");
}
LogUtils.i(TAG, "path:" + mFile.getAbsolutePath() + " path:" + mFile.getPath());
return AGENTWEB_FILE_PATH = mFile.getAbsolutePath();
}
public static File createFileByName(Context context, String name, boolean cover) throws IOException {
String path = getAgentWebFilePath(context);
if (TextUtils.isEmpty(path)) {
return null;
}
File mFile = new File(path, name);
if (mFile.exists()) {
if (cover) {
mFile.delete();
mFile.createNewFile();
}
} else {
mFile.createNewFile();
}
return mFile;
}
public static int checkNetworkType(Context context) {
int netType = 0;
//连接管理对象
ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
//获取NetworkInfo对象
@SuppressLint("MissingPermission") NetworkInfo networkInfo = manager.getActiveNetworkInfo();
if (networkInfo == null) {
return netType;
}
switch (networkInfo.getType()) {
case ConnectivityManager.TYPE_WIFI:
case ConnectivityManager.TYPE_WIMAX:
case ConnectivityManager.TYPE_ETHERNET:
return 1;
case ConnectivityManager.TYPE_MOBILE:
switch (networkInfo.getSubtype()) {
case TelephonyManager.NETWORK_TYPE_LTE: // 4G
case TelephonyManager.NETWORK_TYPE_HSPAP:
case TelephonyManager.NETWORK_TYPE_EHRPD:
return 2;
case TelephonyManager.NETWORK_TYPE_UMTS: // 3G
case TelephonyManager.NETWORK_TYPE_CDMA:
case TelephonyManager.NETWORK_TYPE_EVDO_0:
case TelephonyManager.NETWORK_TYPE_EVDO_A:
case TelephonyManager.NETWORK_TYPE_EVDO_B:
return 3;
case TelephonyManager.NETWORK_TYPE_GPRS: // 2G
case TelephonyManager.NETWORK_TYPE_EDGE:
return 4;
default:
return netType;
}
default:
return netType;
}
}
public static long getAvailableStorage() {
try {
StatFs stat = new StatFs(Environment.getExternalStorageDirectory().toString());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
return stat.getAvailableBlocksLong() * stat.getBlockSizeLong();
} else {
return (long) stat.getAvailableBlocks() * (long) stat.getBlockSize();
}
} catch (RuntimeException ex) {
return 0;
}
}
static Uri getUriFromFile(Context context, File file) {
Uri uri = null;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
uri = getUriFromFileForN(context, file);
} else {
uri = Uri.fromFile(file);
}
return uri;
}
static Uri getUriFromFileForN(Context context, File file) {
Uri fileUri = FileProvider.getUriForFile(context, context.getPackageName() + ".AgentWebFileProvider", file);
return fileUri;
}
static void setIntentDataAndType(Context context,
Intent intent,
String type,
File file,
boolean writeAble) {
if (Build.VERSION.SDK_INT >= 24) {
intent.setDataAndType(getUriFromFile(context, file), type);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
if (writeAble) {
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
}
} else {
intent.setDataAndType(Uri.fromFile(file), type);
}
}
static void setIntentData(Context context,
Intent intent,
File file,
boolean writeAble) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
intent.setData(getUriFromFile(context, file));
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
if (writeAble) {
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
}
} else {
intent.setData(Uri.fromFile(file));
}
}
static String getDiskExternalCacheDir(Context context) {
File mFile = context.getExternalCacheDir();
if (Environment.MEDIA_MOUNTED.equals(EnvironmentCompat.getStorageState(mFile))) {
return mFile.getAbsolutePath();
}
return null;
}
static void grantPermissions(Context context, Intent intent, Uri uri, boolean writeAble) {
int flag = Intent.FLAG_GRANT_READ_URI_PERMISSION;
if (writeAble) {
flag |= Intent.FLAG_GRANT_WRITE_URI_PERMISSION;
}
intent.addFlags(flag);
List<ResolveInfo> resInfoList = context.getPackageManager()
.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
for (ResolveInfo resolveInfo : resInfoList) {
String packageName = resolveInfo.activityInfo.packageName;
context.grantUriPermission(packageName, uri, flag);
}
}
private static String getMIMEType(File f) {
String type = "";
String fName = f.getName();
/* 取得扩展名 */
String end = fName.substring(fName.lastIndexOf(".") + 1, fName.length()).toLowerCase();
/* 依扩展名的类型决定MimeType */
if (end.equals("pdf")) {
type = "application/pdf";//
} else if (end.equals("m4a") || end.equals("mp3") || end.equals("mid") ||
end.equals("xmf") || end.equals("ogg") || end.equals("wav")) {
type = "audio/*";
} else if (end.equals("3gp") || end.equals("mp4")) {
type = "video/*";
} else if (end.equals("jpg") || end.equals("gif") || end.equals("png") ||
end.equals("jpeg") || end.equals("bmp")) {
type = "image/*";
} else if (end.equals("apk")) {
type = "application/vnd.android.package-archive";
} else if (end.equals("pptx") || end.equals("ppt")) {
type = "application/vnd.ms-powerpoint";
} else if (end.equals("docx") || end.equals("doc")) {
type = "application/vnd.ms-word";
} else if (end.equals("xlsx") || end.equals("xls")) {
type = "application/vnd.ms-excel";
} else {
type = "*/*";
}
return type;
}
private static WeakReference<Snackbar> snackbarWeakReference;
static void show(View parent,
CharSequence text,
int duration,
@ColorInt int textColor,
@ColorInt int bgColor,
CharSequence actionText,
@ColorInt int actionTextColor,
View.OnClickListener listener) {
SpannableString spannableString = new SpannableString(text);
ForegroundColorSpan colorSpan = new ForegroundColorSpan(textColor);
spannableString.setSpan(colorSpan, 0, spannableString.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
snackbarWeakReference = new WeakReference<>(Snackbar.make(parent, spannableString, duration));
Snackbar snackbar = snackbarWeakReference.get();
View view = snackbar.getView();
view.setBackgroundColor(bgColor);
if (actionText != null && actionText.length() > 0 && listener != null) {
snackbar.setActionTextColor(actionTextColor);
snackbar.setAction(actionText, listener);
}
snackbar.show();
}
static void dismiss() {
if (snackbarWeakReference != null && snackbarWeakReference.get() != null) {
snackbarWeakReference.get().dismiss();
snackbarWeakReference = null;
}
}
public static boolean checkWifi(Context context) {
ConnectivityManager connectivity = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
if (connectivity == null) {
return false;
}
@SuppressLint("MissingPermission") NetworkInfo info = connectivity.getActiveNetworkInfo();
return info != null && info.isConnected() && info.getType() == ConnectivityManager.TYPE_WIFI;
}
public static boolean checkNetwork(Context context) {
ConnectivityManager connectivity = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
if (connectivity == null) {
return false;
}
@SuppressLint("MissingPermission") NetworkInfo info = connectivity.getActiveNetworkInfo();
return info != null && info.isConnected();
}
static boolean isOverriedMethod(Object currentObject, String methodName, String method, Class... clazzs) {
LogUtils.i(TAG, " methodName:" + methodName + " method:" + method);
boolean tag = false;
if (currentObject == null) {
return tag;
}
try {
Class clazz = currentObject.getClass();
Method mMethod = clazz.getMethod(methodName, clazzs);
String gStr = mMethod.toGenericString();
tag = !gStr.contains(method);
} catch (Exception igonre) {
if (LogUtils.isDebug()) {
igonre.printStackTrace();
}
}
LogUtils.i(TAG, "isOverriedMethod:" + tag);
return tag;
}
static Method isExistMethod(Object o, String methodName, Class... clazzs) {
if (null == o) {
return null;
}
try {
Class clazz = o.getClass();
Method mMethod = clazz.getDeclaredMethod(methodName, clazzs);
mMethod.setAccessible(true);
return mMethod;
} catch (Throwable ignore) {
if (LogUtils.isDebug()) {
ignore.printStackTrace();
}
}
return null;
}
static void clearAgentWebCache(Context context) {
try {
clearCacheFolder(new File(getAgentWebFilePath(context)), 0);
} catch (Throwable throwable) {
if (LogUtils.isDebug()) {
throwable.printStackTrace();
}
}
}
static void clearWebViewAllCache(Context context, WebView webView) {
try {
AgentWebConfig.removeAllCookies(null);
webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
context.deleteDatabase("webviewCache.db");
context.deleteDatabase("webview.db");
webView.clearCache(true);
webView.clearHistory();
webView.clearFormData();
clearCacheFolder(new File(AgentWebConfig.getCachePath(context)), 0);
} catch (Exception ignore) {
//ignore.printStackTrace();
if (AgentWebConfig.DEBUG) {
ignore.printStackTrace();
}
}
}
static void clearWebViewAllCache(Context context) {
try {
clearWebViewAllCache(context, new LollipopFixedWebView(context.getApplicationContext()));
} catch (Exception e) {
e.printStackTrace();
}
}
static int clearCacheFolder(final File dir, final int numDays) {
int deletedFiles = 0;
if (dir != null) {
Log.i("Info", "dir:" + dir.getAbsolutePath());
}
if (dir != null && dir.isDirectory()) {
try {
for (File child : dir.listFiles()) {
//first delete subdirectories recursively
if (child.isDirectory()) {
deletedFiles += clearCacheFolder(child, numDays);
}
//then delete the files and subdirectories in this dir
//only empty directories can be deleted, so subdirs have been done first
if (child.lastModified() < new Date().getTime() - numDays * DateUtils.DAY_IN_MILLIS) {
Log.i(TAG, "file name:" + child.getName());
if (child.delete()) {
deletedFiles++;
}
}
}
} catch (Exception e) {
Log.e("Info", String.format("Failed to clean the cache, result %s", e.getMessage()));
}
}
return deletedFiles;
}
static void clearCache(final Context context, final int numDays) {
Log.i("Info", String.format("Starting cache prune, deleting files older than %d days", numDays));
int numDeletedFiles = clearCacheFolder(context.getCacheDir(), numDays);
Log.i("Info", String.format("Cache pruning completed, %d files deleted", numDeletedFiles));
}
public static String[] uriToPath(Activity activity, Uri[] uris) {
if (activity == null || uris == null || uris.length == 0) {
return null;
}
try {
String[] paths = new String[uris.length];
int i = 0;
for (Uri mUri : uris) {
paths[i++] = Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN_MR2 ? getFileAbsolutePath(activity, mUri) : getRealPathBelowVersion(activity, mUri);
}
return paths;
} catch (Throwable throwable) {
if (LogUtils.isDebug()) {
throwable.printStackTrace();
}
}
return null;
}
private static String getRealPathBelowVersion(Context context, Uri uri) {
String filePath = null;
LogUtils.i(TAG, "method -> getRealPathBelowVersion " + uri + " path:" + uri.getPath() + " getAuthority:" + uri.getAuthority());
String[] projection = {MediaStore.Images.Media.DATA};
CursorLoader loader = new CursorLoader(context, uri, projection, null,
null, null);
Cursor cursor = loader.loadInBackground();
if (cursor != null) {
cursor.moveToFirst();
filePath = cursor.getString(cursor.getColumnIndex(projection[0]));
cursor.close();
}
if (filePath == null) {
filePath = uri.getPath();
}
return filePath;
}
static File createImageFile(Context context) {
File mFile = null;
try {
String timeStamp =
new SimpleDateFormat("yyyyMMddHHmmss", Locale.getDefault()).format(new Date());
String imageName = String.format("aw_%s.jpg", timeStamp);
mFile = createFileByName(context, imageName, true);
} catch (Throwable e) {
e.printStackTrace();
}
return mFile;
}
static File createVideoFile(Context context){
File mFile = null;
try {
String timeStamp =
new SimpleDateFormat("yyyyMMddHHmmss", Locale.getDefault()).format(new Date());
String imageName = String.format("aw_%s.mp4", timeStamp); //默认生成mp4
mFile = createFileByName(context, imageName, true);
} catch (Throwable e) {
e.printStackTrace();
}
return mFile;
}
public static void closeIO(Closeable closeable) {
try {
if (closeable != null) {
closeable.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
@TargetApi(19)
static String getFileAbsolutePath(Activity context, Uri fileUri) {
if (context == null || fileUri == null) {
return null;
}
LogUtils.i(TAG, "getAuthority:" + fileUri.getAuthority() + " getHost:" + fileUri.getHost() + " getPath:" + fileUri.getPath() + " getScheme:" + fileUri.getScheme() + " query:" + fileUri.getQuery());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && DocumentsContract.isDocumentUri(context, fileUri)) {
if (isExternalStorageDocument(fileUri)) {
String docId = DocumentsContract.getDocumentId(fileUri);
String[] split = docId.split(":");
String type = split[0];
if ("primary".equalsIgnoreCase(type)) {
return Environment.getExternalStorageDirectory() + "/" + split[1];
}
} else if (isDownloadsDocument(fileUri)) {
String id = DocumentsContract.getDocumentId(fileUri);
Uri contentUri = ContentUris.withAppendedId(Uri.parse("content://downloads/public_downloads"), Long.valueOf(id));
return getDataColumn(context, contentUri, null, null);
} else if (isMediaDocument(fileUri)) {
String docId = DocumentsContract.getDocumentId(fileUri);
String[] split = docId.split(":");
String type = split[0];
Uri contentUri = null;
if ("image".equals(type)) {
contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
} else if ("video".equals(type)) {
contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
} else if ("audio".equals(type)) {
contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
}
String selection = MediaStore.Images.Media._ID + "=?";
String[] selectionArgs = new String[]{split[1]};
return getDataColumn(context, contentUri, selection, selectionArgs);
} else {
}
} // MediaStore (and general)
else if (fileUri.getAuthority().equalsIgnoreCase(context.getPackageName() + ".AgentWebFileProvider")) {
String path = fileUri.getPath();
int index = path.lastIndexOf("/");
return getAgentWebFilePath(context) + File.separator + path.substring(index + 1, path.length());
} else if ("content".equalsIgnoreCase(fileUri.getScheme())) {
// Return the remote address
if (isGooglePhotosUri(fileUri)) {
return fileUri.getLastPathSegment();
}
return getDataColumn(context, fileUri, null, null);
}
// File
else if ("file".equalsIgnoreCase(fileUri.getScheme())) {
return fileUri.getPath();
}
return null;
}
static String getDataColumn(Context context, Uri uri, String selection, String[] selectionArgs) {
Cursor cursor = null;
String[] projection = {MediaStore.Images.Media.DATA};
try {
cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs, null);
if (cursor != null && cursor.moveToFirst()) {
int index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
return cursor.getString(index);
}
} finally {
if (cursor != null) {
cursor.close();
}
}
return null;
}
/**
* @param uri The Uri to check.
* @return Whether the Uri authority is ExternalStorageProvider.
*/
static boolean isExternalStorageDocument(Uri uri) {
return "com.android.externalstorage.documents".equals(uri.getAuthority());
}
/**
* @param uri The Uri to check.
* @return Whether the Uri authority is DownloadsProvider.
*/
static boolean isDownloadsDocument(Uri uri) {
return "com.android.providers.downloads.documents".equals(uri.getAuthority());
}
/**
* @param uri The Uri to check.
* @return Whether the Uri authority is MediaProvider.
*/
static boolean isMediaDocument(Uri uri) {
return "com.android.providers.media.documents".equals(uri.getAuthority());
}
/**
* @param uri The Uri to check.
* @return Whether the Uri authority is Google Photos.
*/
static boolean isGooglePhotosUri(Uri uri) {
return "com.google.android.apps.photos.content".equals(uri.getAuthority());
}
static Intent getInstallApkIntentCompat(Context context, File file) {
Intent mIntent = new Intent().setAction(Intent.ACTION_VIEW);
setIntentDataAndType(context, mIntent, "application/vnd.android.package-archive", file, false);
return mIntent;
}
public static Intent getCommonFileIntentCompat(Context context, File file) {
Intent mIntent = new Intent().setAction(Intent.ACTION_VIEW);
setIntentDataAndType(context, mIntent, getMIMEType(file), file, false);
return mIntent;
}
static Intent getIntentCaptureCompat(Context context, File file) {
Intent mIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
Uri mUri = getUriFromFile(context, file);
mIntent.addCategory(Intent.CATEGORY_DEFAULT);
mIntent.putExtra(MediaStore.EXTRA_OUTPUT, mUri);
return mIntent;
}
static Intent getIntentVideoCompat(Context context, File file){
Intent mIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
Uri mUri = getUriFromFile(context, file);
mIntent.addCategory(Intent.CATEGORY_DEFAULT);
mIntent.putExtra(MediaStore.EXTRA_OUTPUT, mUri);
return mIntent;
}
static boolean isJson(String target) {
if (TextUtils.isEmpty(target)) {
return false;
}
boolean tag = false;
try {
if (target.startsWith("[")) {
new JSONArray(target);
} else {
new JSONObject(target);
}
tag = true;
} catch (JSONException ignore) {
// ignore.printStackTrace();
tag = false;
}
return tag;
}
public static boolean isUIThread() {
return Looper.myLooper() == Looper.getMainLooper();
}
static boolean isEmptyCollection(Collection collection) {
return collection == null || collection.isEmpty();
}
static boolean isEmptyMap(Map map) {
return map == null || map.isEmpty();
}
private static Toast mToast = null;
static void toastShowShort(Context context, String msg) {
if (mToast == null) {
mToast = Toast.makeText(context.getApplicationContext(), msg, Toast.LENGTH_SHORT);
} else {
mToast.setText(msg);
}
mToast.show();
}
@Deprecated
static void getUIControllerAndShowMessage(Activity activity, String message, String from) {
if (activity == null || activity.isFinishing()) {
return;
}
WebParentLayout mWebParentLayout = (WebParentLayout) activity.findViewById(R.id.web_parent_layout_id);
AbsAgentWebUIController mAgentWebUIController = mWebParentLayout.provide();
if (mAgentWebUIController != null) {
mAgentWebUIController.onShowMessage(message, from);
}
}
public static boolean hasPermission(@NonNull Context context, @NonNull String... permissions) {
return hasPermission(context, Arrays.asList(permissions));
}
public static boolean hasPermission(@NonNull Context context, @NonNull List<String> permissions) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
return true;
}
for (String permission : permissions) {
int result = ContextCompat.checkSelfPermission(context, permission);
if (result == PackageManager.PERMISSION_DENIED) {
return false;
}
String op = AppOpsManagerCompat.permissionToOp(permission);
if (TextUtils.isEmpty(op)) {
continue;
}
result = AppOpsManagerCompat.noteProxyOp(context, op, context.getPackageName());
if (result != AppOpsManagerCompat.MODE_ALLOWED) {
return false;
}
}
return true;
}
public static List<String> getDeniedPermissions(Activity activity, String[] permissions) {
if (permissions == null || permissions.length == 0) {
return null;
}
List<String> deniedPermissions = new ArrayList<>();
for (int i = 0; i < permissions.length; i++) {
if (!hasPermission(activity, permissions[i])) {
deniedPermissions.add(permissions[i]);
}
}
return deniedPermissions;
}
public static AbsAgentWebUIController getAgentWebUIControllerByWebView(WebView webView) {
WebParentLayout mWebParentLayout = getWebParentLayoutByWebView(webView);
return mWebParentLayout.provide();
}
//获取应用的名称
public static String getApplicationName(Context context) {
PackageManager packageManager = null;
ApplicationInfo applicationInfo = null;
try {
packageManager = context.getApplicationContext().getPackageManager();
applicationInfo = packageManager.getApplicationInfo(context.getPackageName(), 0);
} catch (PackageManager.NameNotFoundException e) {
applicationInfo = null;
}
String applicationName =
(String) packageManager.getApplicationLabel(applicationInfo);
return applicationName;
}
static WebParentLayout getWebParentLayoutByWebView(WebView webView) {
ViewGroup mViewGroup = null;
if (!(webView.getParent() instanceof ViewGroup)) {
throw new IllegalStateException("please check webcreator's create method was be called ?");
}
mViewGroup = (ViewGroup) webView.getParent();
AbsAgentWebUIController mAgentWebUIController;
while (mViewGroup != null) {
LogUtils.i(TAG, "ViewGroup:" + mViewGroup);
if (mViewGroup.getId() == R.id.web_parent_layout_id) {
WebParentLayout mWebParentLayout = (WebParentLayout) mViewGroup;
LogUtils.i(TAG, "found WebParentLayout");
return mWebParentLayout;
} else {
ViewParent mViewParent = mViewGroup.getParent();
if (mViewParent instanceof ViewGroup) {
mViewGroup = (ViewGroup) mViewParent;
} else {
mViewGroup = null;
}
}
}
throw new IllegalStateException("please check webcreator's create method was be called ?");
}
public static void runInUiThread(Runnable runnable) {
if (mHandler == null) {
mHandler = new Handler(Looper.getMainLooper());
}
mHandler.post(runnable);
}
static boolean showFileChooserCompat(Activity activity,
WebView webView,
ValueCallback<Uri[]> valueCallbacks,
WebChromeClient.FileChooserParams fileChooserParams,
PermissionInterceptor permissionInterceptor,
ValueCallback valueCallback,
String mimeType,
Handler.Callback jsChannelCallback
) {
try {
Class<?> clz = Class.forName("com.just.agentweb.filechooser.FileChooser");
Object mFileChooser$Builder = clz.getDeclaredMethod("newBuilder",
Activity.class, WebView.class)
.invoke(null, activity, webView);
clz = mFileChooser$Builder.getClass();
Method mMethod = null;
if (valueCallbacks != null) {
mMethod = clz.getDeclaredMethod("setUriValueCallbacks", ValueCallback.class);
mMethod.setAccessible(true);
mMethod.invoke(mFileChooser$Builder, valueCallbacks);
}
if (fileChooserParams != null) {
mMethod = clz.getDeclaredMethod("setFileChooserParams", WebChromeClient.FileChooserParams.class);
mMethod.setAccessible(true);
mMethod.invoke(mFileChooser$Builder, fileChooserParams);
}
if (valueCallback != null) {
mMethod = clz.getDeclaredMethod("setUriValueCallback", ValueCallback.class);
mMethod.setAccessible(true);
mMethod.invoke(mFileChooser$Builder, valueCallback);
}
if (!TextUtils.isEmpty(mimeType)) {
// LogUtils.i(TAG, Arrays.toString(clz.getDeclaredMethods()));
mMethod = clz.getDeclaredMethod("setAcceptType", String.class);
mMethod.setAccessible(true);
mMethod.invoke(mFileChooser$Builder, mimeType);
}
if (jsChannelCallback != null) {
mMethod = clz.getDeclaredMethod("setJsChannelCallback", Handler.Callback.class);
mMethod.setAccessible(true);
mMethod.invoke(mFileChooser$Builder, jsChannelCallback);
}
mMethod = clz.getDeclaredMethod("setPermissionInterceptor", PermissionInterceptor.class);
mMethod.setAccessible(true);
mMethod.invoke(mFileChooser$Builder, permissionInterceptor);
mMethod = clz.getDeclaredMethod("build");
mMethod.setAccessible(true);
Object mFileChooser = mMethod.invoke(mFileChooser$Builder);
mMethod = mFileChooser.getClass().getDeclaredMethod("openFileChooser");
mMethod.setAccessible(true);
mMethod.invoke(mFileChooser);
} catch (Throwable throwable) {
if (LogUtils.isDebug()) {
throwable.printStackTrace();
}
if (throwable instanceof ClassNotFoundException) {
LogUtils.e(TAG, "Please check whether compile'com.just.agentweb:filechooser:x.x.x' dependency was added.");
}
if (valueCallbacks != null) {
LogUtils.i(TAG, "onReceiveValue empty");
return false;
}
if (valueCallback != null) {
valueCallback.onReceiveValue(null);
}
}
return true;
}
public static String md5(String str) {
try {
MessageDigest md = MessageDigest.getInstance("MD5");
md.update(str.getBytes());
return new BigInteger(1, md.digest()).toString(16);
} catch (Exception e) {
if (LogUtils.isDebug()) {
e.printStackTrace();
}
}
return "";
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebView.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Bitmap;
import android.os.Build;
import android.util.AttributeSet;
import android.util.Log;
import android.util.Pair;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.accessibility.AccessibilityManager;
import android.webkit.JsPromptResult;
import android.webkit.WebBackForwardList;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Toast;
import org.json.JSONObject;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.net.URI;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
/**
* @author cenxiaozhong
* @since 1.0.0
*/
public class AgentWebView extends LollipopFixedWebView {
private static final String TAG = AgentWebView.class.getSimpleName();
private Map<String, JsCallJava> mJsCallJavas;
private Map<String, String> mInjectJavaScripts;
private FixedOnReceivedTitle mFixedOnReceivedTitle;
private boolean mIsInited;
private Boolean mIsAccessibilityEnabledOriginal;
public AgentWebView(Context context) {
this(context, null);
}
public AgentWebView(Context context, AttributeSet attrs) {
super(context, attrs);
removeSearchBoxJavaBridge();
mIsInited = true;
mFixedOnReceivedTitle = new FixedOnReceivedTitle();
}
/**
* 经过大量的测试,按照以下方式才能保证JS脚本100%注入成功:
* 1、在第一次loadUrl之前注入JS(在addJavascriptInterface里面注入即可,setWebViewClient和setWebChromeClient要在addJavascriptInterface之前执行);
* 2、在webViewClient.onPageStarted中都注入JS;
* 3、在webChromeClient.onProgressChanged中都注入JS,并且不能通过自检查(onJsPrompt里面判断)JS是否注入成功来减少注入JS的次数,因为网页中的JS可以同时打开多个url导致无法控制检查的准确性;
*
* @deprecated Android 4.2.2及以上版本的 addJavascriptInterface 方法已经解决了安全问题,如果不使用“网页能将JS函数传到Java层”功能,不建议使用该类,毕竟系统的JS注入效率才是最高的;
*/
@Override
@Deprecated
public final void addJavascriptInterface(Object interfaceObj, String interfaceName) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
super.addJavascriptInterface(interfaceObj, interfaceName);
Log.i(TAG, "注入");
return;
} else {
Log.i(TAG, "use mJsCallJavas:" + interfaceName);
}
LogUtils.i(TAG, "addJavascriptInterface:" + interfaceObj + " interfaceName:" + interfaceName);
if (mJsCallJavas == null) {
mJsCallJavas = new HashMap<String, JsCallJava>();
}
mJsCallJavas.put(interfaceName, new JsCallJava(interfaceObj, interfaceName));
injectJavaScript();
if (LogUtils.isDebug()) {
Log.d(TAG, "injectJavaScript, addJavascriptInterface.interfaceObj = " + interfaceObj + ", interfaceName = " + interfaceName);
}
addJavascriptInterfaceSupport(interfaceObj, interfaceName);
}
protected void addJavascriptInterfaceSupport(Object interfaceObj, String interfaceName) {
}
@Override
public final void setWebChromeClient(WebChromeClient client) {
AgentWebChrome mAgentWebChrome = new AgentWebChrome(this);
mAgentWebChrome.setDelegate(client);
mFixedOnReceivedTitle.setWebChromeClient(client);
super.setWebChromeClient(mAgentWebChrome);
setWebChromeClientSupport(mAgentWebChrome);
}
protected final void setWebChromeClientSupport(WebChromeClient client) {
}
@Override
public final void setWebViewClient(WebViewClient client) {
AgentWebClient mAgentWebClient = new AgentWebClient(this);
mAgentWebClient.setDelegate(client);
super.setWebViewClient(mAgentWebClient);
setWebViewClientSupport(mAgentWebClient);
}
public final void setWebViewClientSupport(WebViewClient client) {
}
@Override
public void destroy() {
setVisibility(View.GONE);
if (mJsCallJavas != null) {
mJsCallJavas.clear();
}
if (mInjectJavaScripts != null) {
mInjectJavaScripts.clear();
}
removeAllViewsInLayout();
fixedStillAttached();
releaseConfigCallback();
if (mIsInited) {
resetAccessibilityEnabled();
LogUtils.i(TAG, "destroy web");
super.destroy();
}
}
@Override
public void clearHistory() {
if (mIsInited) {
super.clearHistory();
}
}
public static Pair<Boolean, String> isWebViewPackageException(Throwable e) {
String messageCause = e.getCause() == null ? e.toString() : e.getCause().toString();
String trace = Log.getStackTraceString(e);
if (trace.contains("android.content.pm.PackageManager$NameNotFoundException")
|| trace.contains("java.lang.RuntimeException: Cannot load WebView")
|| trace.contains("android.webkit.WebViewFactory$MissingWebViewPackageException: Failed to load WebView provider: No WebView installed")) {
LogUtils.safeCheckCrash(TAG, "isWebViewPackageException", e);
return new Pair<Boolean, String>(true, "WebView load failed, " + messageCause);
}
return new Pair<Boolean, String>(false, messageCause);
}
@Override
public void setOverScrollMode(int mode) {
try {
super.setOverScrollMode(mode);
} catch (Throwable e) {
Pair<Boolean, String> pair = isWebViewPackageException(e);
if (pair.first) {
Toast.makeText(getContext(), pair.second, Toast.LENGTH_SHORT).show();
destroy();
} else {
throw e;
}
}
}
@Override
public boolean isPrivateBrowsingEnabled() {
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1
&& getSettings() == null) {
return false; // getSettings().isPrivateBrowsingEnabled()
} else {
return super.isPrivateBrowsingEnabled();
}
}
/**
* 添加并注入JavaScript脚本(和“addJavascriptInterface”注入对象的注入时机一致,100%能注入成功);
* 注意:为了做到能100%注入,需要在注入的js中自行判断对象是否已经存在(如:if (typeof(window.Android) = 'undefined'));
*
* @param javaScript
*/
public void addInjectJavaScript(String javaScript) {
if (mInjectJavaScripts == null) {
mInjectJavaScripts = new HashMap<String, String>();
}
mInjectJavaScripts.put(String.valueOf(javaScript.hashCode()), javaScript);
injectExtraJavaScript();
}
private void injectJavaScript() {
for (Map.Entry<String, JsCallJava> entry : mJsCallJavas.entrySet()) {
this.loadUrl(buildNotRepeatInjectJS(entry.getKey(), entry.getValue().getPreloadInterfaceJs()));
}
}
private void injectExtraJavaScript() {
for (Map.Entry<String, String> entry : mInjectJavaScripts.entrySet()) {
this.loadUrl(buildNotRepeatInjectJS(entry.getKey(), entry.getValue()));
}
}
/**
* 构建一个“不会重复注入”的js脚本;
*
* @param key
* @param js
* @return
*/
public String buildNotRepeatInjectJS(String key, String js) {
String obj = String.format("__injectFlag_%1$s__", key);
StringBuilder sb = new StringBuilder();
sb.append("javascript:try{(function(){if(window.");
sb.append(obj);
sb.append("){console.log('");
sb.append(obj);
sb.append(" has been injected');return;}window.");
sb.append(obj);
sb.append("=true;");
sb.append(js);
sb.append("}())}catch(e){console.warn(e)}");
return sb.toString();
}
/**
* 构建一个“带try catch”的js脚本;
*
* @param js
* @return
*/
public String buildTryCatchInjectJS(String js) {
StringBuilder sb = new StringBuilder();
sb.append("javascript:try{");
sb.append(js);
sb.append("}catch(e){console.warn(e)}");
return sb.toString();
}
public static class AgentWebClient extends MiddlewareWebClientBase {
private AgentWebView mAgentWebView;
private AgentWebClient(AgentWebView agentWebView) {
this.mAgentWebView = agentWebView;
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
super.onPageStarted(view, url, favicon);
if (mAgentWebView.mJsCallJavas != null) {
mAgentWebView.injectJavaScript();
if (LogUtils.isDebug()) {
Log.d(TAG, "injectJavaScript, onPageStarted.url = " + view.getUrl());
}
}
if (mAgentWebView.mInjectJavaScripts != null) {
mAgentWebView.injectExtraJavaScript();
}
mAgentWebView.mFixedOnReceivedTitle.onPageStarted();
mAgentWebView.fixedAccessibilityInjectorExceptionForOnPageFinished(url);
}
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
mAgentWebView.mFixedOnReceivedTitle.onPageFinished(view);
if (LogUtils.isDebug()) {
Log.d(TAG, "onPageFinished.url = " + view.getUrl());
}
}
}
public static class AgentWebChrome extends MiddlewareWebChromeBase {
private AgentWebView mAgentWebView;
private AgentWebChrome(AgentWebView agentWebView) {
this.mAgentWebView = agentWebView;
}
@Override
public void onReceivedTitle(WebView view, String title) {
this.mAgentWebView.mFixedOnReceivedTitle.onReceivedTitle();
super.onReceivedTitle(view, title);
}
@Override
public void onProgressChanged(WebView view, int newProgress) {
if (this.mAgentWebView.mJsCallJavas != null) {
this.mAgentWebView.injectJavaScript();
if (LogUtils.isDebug()) {
Log.d(TAG, "injectJavaScript, onProgressChanged.newProgress = " + newProgress + ", url = " + view.getUrl());
}
}
if (this.mAgentWebView.mInjectJavaScripts != null) {
this.mAgentWebView.injectExtraJavaScript();
}
super.onProgressChanged(view, newProgress);
}
@Override
public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult result) {
Log.i(TAG, "onJsPrompt:" + url + " message:" + message + " d:" + defaultValue + " ");
if (this.mAgentWebView.mJsCallJavas != null && JsCallJava.isSafeWebViewCallMsg(message)) {
JSONObject jsonObject = JsCallJava.getMsgJSONObject(message);
String interfacedName = JsCallJava.getInterfacedName(jsonObject);
if (interfacedName != null) {
JsCallJava mJsCallJava = this.mAgentWebView.mJsCallJavas.get(interfacedName);
if (mJsCallJava != null) {
result.confirm(mJsCallJava.call(view, jsonObject));
}
}
return true;
} else {
return super.onJsPrompt(view, url, message, defaultValue, result);
}
}
}
/**
* 解决部分手机webView返回时不触发onReceivedTitle的问题(如:三星SM-G9008V 4.4.2);
*/
private static class FixedOnReceivedTitle {
private WebChromeClient mWebChromeClient;
private boolean mIsOnReceivedTitle;
public void setWebChromeClient(WebChromeClient webChromeClient) {
mWebChromeClient = webChromeClient;
}
public void onPageStarted() {
mIsOnReceivedTitle = false;
}
public void onPageFinished(WebView view) {
if (!mIsOnReceivedTitle && mWebChromeClient != null) {
WebBackForwardList list = null;
try {
list = view.copyBackForwardList();
} catch (NullPointerException e) {
if (LogUtils.isDebug()) {
e.printStackTrace();
}
}
if (list != null
&& list.getSize() > 0
&& list.getCurrentIndex() >= 0
&& list.getItemAtIndex(list.getCurrentIndex()) != null) {
String previousTitle = list.getItemAtIndex(list.getCurrentIndex()).getTitle();
mWebChromeClient.onReceivedTitle(view, previousTitle);
}
}
}
public void onReceivedTitle() {
mIsOnReceivedTitle = true;
}
}
// Activity在onDestory时调用webView的destroy,可以停止播放页面中的音频
private void fixedStillAttached() {
// java.lang.Throwable: Error: WebView.destroy() called while still attached!
// at android.webkit.WebViewClassic.destroy(WebViewClassic.java:4142)
// at android.webkit.WebView.destroy(WebView.java:707)
ViewParent parent = getParent();
if (parent instanceof ViewGroup) { // 由于自定义webView构建时传入了该Activity的context对象,因此需要先从父容器中移除webView,然后再销毁webView;
ViewGroup mWebViewContainer = (ViewGroup) getParent();
mWebViewContainer.removeAllViewsInLayout();
}
}
// 解决WebView内存泄漏问题;
private void releaseConfigCallback() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) { // JELLY_BEAN
try {
Field field = WebView.class.getDeclaredField("mWebViewCore");
field = field.getType().getDeclaredField("mBrowserFrame");
field = field.getType().getDeclaredField("sConfigCallback");
field.setAccessible(true);
field.set(null, null);
} catch (NoSuchFieldException e) {
if (LogUtils.isDebug()) {
e.printStackTrace();
}
} catch (IllegalAccessException e) {
if (LogUtils.isDebug()) {
e.printStackTrace();
}
}
} else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) { // KITKAT
try {
Field sConfigCallback = Class.forName("android.webkit.BrowserFrame").getDeclaredField("sConfigCallback");
if (sConfigCallback != null) {
sConfigCallback.setAccessible(true);
sConfigCallback.set(null, null);
}
} catch (NoSuchFieldException e) {
if (LogUtils.isDebug()) {
e.printStackTrace();
}
} catch (ClassNotFoundException e) {
if (LogUtils.isDebug()) {
e.printStackTrace();
}
} catch (IllegalAccessException e) {
if (LogUtils.isDebug()) {
e.printStackTrace();
}
}
}
}
/**
* Android 4.4 KitKat 使用Chrome DevTools 远程调试WebView
* WebView.setWebContentsDebuggingEnabled(true);
* http://blog.csdn.net/t12x3456/article/details/14225235
*/
@TargetApi(19)
protected void trySetWebDebuggEnabled() {
if (LogUtils.isDebug() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
try {
Class<?> clazz = WebView.class;
Method method = clazz.getMethod("setWebContentsDebuggingEnabled", boolean.class);
method.invoke(null, true);
} catch (Throwable e) {
if (LogUtils.isDebug()) {
e.printStackTrace();
}
}
}
}
@TargetApi(11)
protected boolean removeSearchBoxJavaBridge() {
try {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB
&& Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
Method method = this.getClass().getMethod("removeJavascriptInterface", String.class);
method.invoke(this, "searchBoxJavaBridge_");
return true;
}
} catch (Exception e) {
if (LogUtils.isDebug()) {
e.printStackTrace();
}
}
return false;
}
protected void fixedAccessibilityInjectorException() {
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.JELLY_BEAN_MR1
&& mIsAccessibilityEnabledOriginal == null
&& isAccessibilityEnabled()) {
mIsAccessibilityEnabledOriginal = true;
setAccessibilityEnabled(false);
}
}
protected void fixedAccessibilityInjectorExceptionForOnPageFinished(String url) {
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.JELLY_BEAN
&& getSettings().getJavaScriptEnabled()
&& mIsAccessibilityEnabledOriginal == null
&& isAccessibilityEnabled()) {
try {
try {
URLEncoder.encode(String.valueOf(new URI(url)), "utf-8");
// URLEncodedUtils.parse(new URI(url), null); // AccessibilityInjector.getAxsUrlParameterValue
} catch (IllegalArgumentException e) {
if ("bad parameter".equals(e.getMessage())) {
mIsAccessibilityEnabledOriginal = true;
setAccessibilityEnabled(false);
LogUtils.safeCheckCrash(TAG, "fixedAccessibilityInjectorExceptionForOnPageFinished.url = " + url, e);
}
}
} catch (Throwable e) {
if (LogUtils.isDebug()) {
LogUtils.e(TAG, "fixedAccessibilityInjectorExceptionForOnPageFinished", e);
}
}
}
}
private boolean isAccessibilityEnabled() {
AccessibilityManager am = (AccessibilityManager) getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
return am.isEnabled();
}
private void setAccessibilityEnabled(boolean enabled) {
AccessibilityManager am = (AccessibilityManager) getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
try {
Method setAccessibilityState = am.getClass().getDeclaredMethod("setAccessibilityState", boolean.class);
setAccessibilityState.setAccessible(true);
setAccessibilityState.invoke(am, enabled);
setAccessibilityState.setAccessible(false);
} catch (Throwable e) {
if (LogUtils.isDebug()) {
LogUtils.e(TAG, "setAccessibilityEnabled", e);
}
}
}
private void resetAccessibilityEnabled() {
if (mIsAccessibilityEnabledOriginal != null) {
setAccessibilityEnabled(mIsAccessibilityEnabledOriginal);
}
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/BaseIndicatorSpec.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
/**
* @author cenxiaozhong
* @since 1.0.0
*/
public interface BaseIndicatorSpec {
void show();
void hide();
void reset();
void setProgress(int newProgress);
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/BaseIndicatorView.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.FrameLayout;
import androidx.annotation.Nullable;
/**
* @author cenxiaozhong
* @date 2017/5/12
* @since 1.0.0
*/
public abstract class BaseIndicatorView extends FrameLayout implements BaseIndicatorSpec,LayoutParamsOffer{
public BaseIndicatorView(Context context) {
super(context);
}
public BaseIndicatorView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
}
public BaseIndicatorView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
public void reset() {
}
@Override
public void setProgress(int newProgress) {
}
@Override
public void show() {
}
@Override
public void hide() {
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/BaseJsAccessEntrace.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.os.Build;
import android.webkit.ValueCallback;
import android.webkit.WebView;
/**
* @author cenxiaozhong
* @date 2017/5/26
* @since 1.0.0
*/
public abstract class BaseJsAccessEntrace implements JsAccessEntrace {
private WebView mWebView;
public static final String TAG=BaseJsAccessEntrace.class.getSimpleName();
BaseJsAccessEntrace(WebView webView){
this.mWebView=webView;
}
@Override
public void callJs(String js, final ValueCallback<String> callback) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
this.evaluateJs(js, callback);
} else {
this.loadJs(js);
}
}
@Override
public void callJs(String js) {
this.callJs(js, null);
}
private void loadJs(String js) {
mWebView.loadUrl(js);
}
private void evaluateJs(String js, final ValueCallback<String>callback){
mWebView.evaluateJavascript(js, new ValueCallback<String>() {
@Override
public void onReceiveValue(String value) {
if (callback != null){
callback.onReceiveValue(value);
}
}
});
}
@Override
public void quickCallJs(String method, ValueCallback<String> callback, String... params) {
StringBuilder sb=new StringBuilder();
sb.append("javascript:"+method);
if(params==null||params.length==0){
sb.append("()");
}else{
sb.append("(").append(concat(params)).append(")");
}
callJs(sb.toString(),callback);
}
private String concat(String...params){
StringBuilder mStringBuilder=new StringBuilder();
for(int i=0;i<params.length;i++){
String param=params[i];
if(!AgentWebUtils.isJson(param)){
mStringBuilder.append("\"").append(param).append("\"");
}else{
mStringBuilder.append(param);
}
if(i!=params.length-1){
mStringBuilder.append(" , ");
}
}
return mStringBuilder.toString();
}
@Override
public void quickCallJs(String method, String... params) {
this.quickCallJs(method,null,params);
}
@Override
public void quickCallJs(String method) {
this.quickCallJs(method,(String[])null);
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/DefaultChromeClient.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.app.Activity;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.webkit.ConsoleMessage;
import android.webkit.GeolocationPermissions;
import android.webkit.JsPromptResult;
import android.webkit.JsResult;
import android.webkit.ValueCallback;
import android.webkit.WebChromeClient;
import android.webkit.WebStorage;
import android.webkit.WebView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import java.lang.ref.WeakReference;
import java.util.Arrays;
import java.util.List;
import static com.just.agentweb.ActionActivity.KEY_FROM_INTENTION;
/**
* @author cenxiaozhong
* @since 1.0.0
*/
public class DefaultChromeClient extends MiddlewareWebChromeBase {
/**
* Activity
*/
private WeakReference<Activity> mActivityWeakReference = null;
/**
* DefaultChromeClient 's TAG
*/
private String TAG = DefaultChromeClient.class.getSimpleName();
/**
* Android WebChromeClient path ,用于反射,用户是否重写来该方法
*/
public static final String ANDROID_WEBCHROMECLIENT_PATH = "android.webkit.WebChromeClient";
/**
* WebChromeClient
*/
private WebChromeClient mWebChromeClient;
/**
* 包装Flag
*/
private boolean mIsWrapper = false;
/**
* Video 处理类
*/
private IVideo mIVideo;
/**
* PermissionInterceptor 权限拦截器
*/
private PermissionInterceptor mPermissionInterceptor;
/**
* 当前 WebView
*/
private WebView mWebView;
/**
* Web端触发的定位 mOrigin
*/
private String mOrigin = null;
/**
* Web 端触发的定位 Callback 回调成功,或者失败
*/
private GeolocationPermissions.Callback mCallback = null;
/**
* 标志位
*/
public static final int FROM_CODE_INTENTION = 0x18;
/**
* 标识当前是获取定位权限
*/
public static final int FROM_CODE_INTENTION_LOCATION = FROM_CODE_INTENTION << 2;
/**
* AbsAgentWebUIController
*/
private WeakReference<AbsAgentWebUIController> mAgentWebUIController = null;
/**
* IndicatorController 进度条控制器
*/
private IndicatorController mIndicatorController;
/**
* 文件选择器
*/
private Object mFileChooser;
DefaultChromeClient(Activity activity,
IndicatorController indicatorController,
WebChromeClient chromeClient,
@Nullable IVideo iVideo,
PermissionInterceptor permissionInterceptor, WebView webView) {
super(chromeClient);
this.mIndicatorController = indicatorController;
mIsWrapper = chromeClient != null ? true : false;
this.mWebChromeClient = chromeClient;
mActivityWeakReference = new WeakReference<Activity>(activity);
this.mIVideo = iVideo;
this.mPermissionInterceptor = permissionInterceptor;
this.mWebView = webView;
mAgentWebUIController = new WeakReference<AbsAgentWebUIController>(AgentWebUtils.getAgentWebUIControllerByWebView(webView));
}
@Override
public void onProgressChanged(WebView view, int newProgress) {
super.onProgressChanged(view, newProgress);
if (mIndicatorController != null) {
mIndicatorController.progress(view, newProgress);
}
}
@Override
public void onReceivedTitle(WebView view, String title) {
if (mIsWrapper) {
super.onReceivedTitle(view, title);
}
}
@Override
public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
if (mAgentWebUIController.get() != null) {
mAgentWebUIController.get().onJsAlert(view, url, message);
}
result.confirm();
return true;
}
@Override
public void onReceivedIcon(WebView view, Bitmap icon) {
super.onReceivedIcon(view, icon);
}
@Override
public void onGeolocationPermissionsHidePrompt() {
super.onGeolocationPermissionsHidePrompt();
}
//location
@Override
public void onGeolocationPermissionsShowPrompt(String origin, GeolocationPermissions.Callback callback) {
onGeolocationPermissionsShowPromptInternal(origin, callback);
}
private void onGeolocationPermissionsShowPromptInternal(String origin, GeolocationPermissions.Callback callback) {
if (mPermissionInterceptor != null) {
if (mPermissionInterceptor.intercept(this.mWebView.getUrl(), AgentWebPermissions.LOCATION, "location")) {
callback.invoke(origin, false, false);
return;
}
}
Activity mActivity = mActivityWeakReference.get();
if (mActivity == null) {
callback.invoke(origin, false, false);
return;
}
List<String> deniedPermissions = null;
if ((deniedPermissions = AgentWebUtils.getDeniedPermissions(mActivity, AgentWebPermissions.LOCATION)).isEmpty()) {
LogUtils.i(TAG, "onGeolocationPermissionsShowPromptInternal:" + true);
callback.invoke(origin, true, false);
} else {
Action mAction = Action.createPermissionsAction(deniedPermissions.toArray(new String[]{}));
mAction.setFromIntention(FROM_CODE_INTENTION_LOCATION);
ActionActivity.setPermissionListener(mPermissionListener);
this.mCallback = callback;
this.mOrigin = origin;
ActionActivity.start(mActivity, mAction);
}
}
private ActionActivity.PermissionListener mPermissionListener = new ActionActivity.PermissionListener() {
@Override
public void onRequestPermissionsResult(@NonNull String[] permissions, @NonNull int[] grantResults, Bundle extras) {
if (extras.getInt(KEY_FROM_INTENTION) == FROM_CODE_INTENTION_LOCATION) {
boolean hasPermission = AgentWebUtils.hasPermission(mActivityWeakReference.get(), permissions);
if (mCallback != null) {
if (hasPermission) {
mCallback.invoke(mOrigin, true, false);
} else {
mCallback.invoke(mOrigin, false, false);
}
mCallback = null;
mOrigin = null;
}
if (!hasPermission && null != mAgentWebUIController.get()) {
mAgentWebUIController
.get()
.onPermissionsDeny(
AgentWebPermissions.LOCATION,
AgentWebPermissions.ACTION_LOCATION,
"Location");
}
}
}
};
@Override
public boolean onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult result) {
try {
if (this.mAgentWebUIController.get() != null) {
this.mAgentWebUIController.get().onJsPrompt(mWebView, url, message, defaultValue, result);
}
} catch (Exception e) {
if (LogUtils.isDebug()) {
e.printStackTrace();
}
}
return true;
}
@Override
public boolean onJsConfirm(WebView view, String url, String message, JsResult result) {
if (mAgentWebUIController.get() != null) {
mAgentWebUIController.get().onJsConfirm(view, url, message, result);
}
return true;
}
@Override
public void onExceededDatabaseQuota(String url, String databaseIdentifier, long quota, long estimatedDatabaseSize, long totalQuota, WebStorage.QuotaUpdater quotaUpdater) {
quotaUpdater.updateQuota(totalQuota * 2);
}
@Override
public void onReachedMaxAppCacheSize(long requiredStorage, long quota, WebStorage.QuotaUpdater quotaUpdater) {
quotaUpdater.updateQuota(requiredStorage * 2);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams) {
LogUtils.i(TAG, "openFileChooser>=5.0");
return openFileChooserAboveL(webView, filePathCallback, fileChooserParams);
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private boolean openFileChooserAboveL(WebView webView, ValueCallback<Uri[]> valueCallbacks, FileChooserParams fileChooserParams) {
LogUtils.i(TAG, "fileChooserParams:" + fileChooserParams.getAcceptTypes() + " getTitle:" + fileChooserParams.getTitle() + " accept:" + Arrays.toString(fileChooserParams.getAcceptTypes()) + " length:" + fileChooserParams.getAcceptTypes().length + " :" + fileChooserParams.isCaptureEnabled() + " " + fileChooserParams.getFilenameHint() + " intent:" + fileChooserParams.createIntent().toString() + " mode:" + fileChooserParams.getMode());
Activity mActivity = this.mActivityWeakReference.get();
if (mActivity == null || mActivity.isFinishing()) {
return false;
}
return AgentWebUtils.showFileChooserCompat(mActivity,
mWebView,
valueCallbacks,
fileChooserParams,
this.mPermissionInterceptor,
null,
null,
null
);
}
/**
* Android >= 4.1
*
* @param uploadFile ValueCallback , File URI callback
* @param acceptType
* @param capture
*/
@Override
public void openFileChooser(ValueCallback<Uri> uploadFile, String acceptType, String capture) {
/*believe me , i never want to do this */
LogUtils.i(TAG, "openFileChooser>=4.1");
createAndOpenCommonFileChooser(uploadFile, acceptType);
}
// Android < 3.0
@Override
public void openFileChooser(ValueCallback<Uri> valueCallback) {
Log.i(TAG, "openFileChooser<3.0");
createAndOpenCommonFileChooser(valueCallback, "*/*");
}
// Android >= 3.0
@Override
public void openFileChooser(ValueCallback valueCallback, String acceptType) {
Log.i(TAG, "openFileChooser>3.0");
createAndOpenCommonFileChooser(valueCallback, acceptType);
}
private void createAndOpenCommonFileChooser(ValueCallback valueCallback, String mimeType) {
Activity mActivity = this.mActivityWeakReference.get();
if (mActivity == null || mActivity.isFinishing()) {
valueCallback.onReceiveValue(new Object());
return;
}
AgentWebUtils.showFileChooserCompat(mActivity,
mWebView,
null,
null,
this.mPermissionInterceptor,
valueCallback,
mimeType,
null
);
}
@Override
public boolean onConsoleMessage(ConsoleMessage consoleMessage) {
super.onConsoleMessage(consoleMessage);
return true;
}
@Override
public void onShowCustomView(View view, CustomViewCallback callback) {
if (mIVideo != null) {
mIVideo.onShowCustomView(view, callback);
}
}
@Override
public void onHideCustomView() {
if (mIVideo != null) {
mIVideo.onHideCustomView();
}
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/DefaultDesignUIController.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.app.Activity;
import android.content.DialogInterface;
import android.graphics.Color;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.JsPromptResult;
import android.webkit.JsResult;
import android.webkit.WebView;
import android.widget.TextView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.bottomsheet.BottomSheetDialog;
import com.google.android.material.snackbar.Snackbar;
/**
* @author cenxiaozhong
* @date 2017/12/8
* @since 3.0.0
*/
public class DefaultDesignUIController extends DefaultUIController {
private BottomSheetDialog mBottomSheetDialog;
private static final int RECYCLERVIEW_ID = 0x1001;
private Activity mActivity = null;
private WebParentLayout mWebParentLayout;
private LayoutInflater mLayoutInflater;
@Override
public void onJsAlert(WebView view, String url, String message) {
onJsAlertInternal(view, message);
}
private void onJsAlertInternal(WebView view, String message) {
Activity mActivity = this.mActivity;
if (mActivity == null || mActivity.isFinishing()) {
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (mActivity.isDestroyed()) {
return;
}
}
try {
AgentWebUtils.show(view,
message,
Snackbar.LENGTH_SHORT,
Color.WHITE,
mActivity.getResources().getColor(R.color.black),
null,
-1,
null);
} catch (Throwable throwable) {
if (LogUtils.isDebug()){
throwable.printStackTrace();
}
}
}
@Override
public void onJsConfirm(WebView view, String url, String message, JsResult jsResult) {
super.onJsConfirm(view, url, message, jsResult);
}
@Override
public void onSelectItemsPrompt(WebView view, String url, String[] ways, Handler.Callback callback) {
showChooserInternal(view, url, ways, callback);
}
@Override
public void onForceDownloadAlert(String url, final Handler.Callback callback) {
super.onForceDownloadAlert(url, callback);
}
private void showChooserInternal(WebView view, String url, final String[] ways, final Handler.Callback callback) {
Activity mActivity;
if ((mActivity = this.mActivity) == null || mActivity.isFinishing()) {
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (mActivity.isDestroyed()) {
return;
}
}
LogUtils.i(TAG, "url:" + url + " ways:" + ways[0]);
RecyclerView mRecyclerView;
if (mBottomSheetDialog == null) {
mBottomSheetDialog = new BottomSheetDialog(mActivity);
mRecyclerView = new RecyclerView(mActivity);
mRecyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
mRecyclerView.setId(RECYCLERVIEW_ID);
mBottomSheetDialog.setContentView(mRecyclerView);
}
mRecyclerView = (RecyclerView) mBottomSheetDialog.getDelegate().findViewById(RECYCLERVIEW_ID);
mRecyclerView.setAdapter(getAdapter(ways, callback));
mBottomSheetDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
if (callback != null) {
callback.handleMessage(Message.obtain(null, -1));
}
}
});
mBottomSheetDialog.show();
}
private RecyclerView.Adapter getAdapter(final String[] ways, final Handler.Callback callback) {
return new RecyclerView.Adapter<BottomSheetHolder>() {
@Override
public BottomSheetHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
return new BottomSheetHolder(mLayoutInflater.inflate(android.R.layout.simple_list_item_1, viewGroup, false));
}
@Override
public void onBindViewHolder(BottomSheetHolder bottomSheetHolder, final int i) {
TypedValue outValue = new TypedValue();
mActivity.getTheme().resolveAttribute(android.R.attr.selectableItemBackground, outValue, true);
bottomSheetHolder.mTextView.setBackgroundResource(outValue.resourceId);
bottomSheetHolder.mTextView.setText(ways[i]);
bottomSheetHolder.mTextView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (mBottomSheetDialog != null && mBottomSheetDialog.isShowing()) {
mBottomSheetDialog.dismiss();
}
Message mMessage = Message.obtain();
mMessage.what = i;
callback.handleMessage(mMessage);
}
});
}
@Override
public int getItemCount() {
return ways.length;
}
};
}
private static class BottomSheetHolder extends RecyclerView.ViewHolder {
TextView mTextView;
public BottomSheetHolder(View itemView) {
super(itemView);
mTextView = (TextView) itemView.findViewById(android.R.id.text1);
}
}
@Override
public void onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult jsPromptResult) {
super.onJsPrompt(view, url, message, defaultValue, jsPromptResult);
}
@Override
protected void bindSupportWebParent(WebParentLayout webParentLayout, Activity activity) {
super.bindSupportWebParent(webParentLayout, activity);
this.mActivity = activity;
this.mWebParentLayout = webParentLayout;
mLayoutInflater = LayoutInflater.from(mActivity);
}
@Override
public void onShowMessage(String message, String from) {
Activity mActivity;
if ((mActivity = this.mActivity) == null || mActivity.isFinishing()) {
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (mActivity.isDestroyed()) {
return;
}
}
if (!TextUtils.isEmpty(from) && from.contains("performDownload")) {
return;
}
onJsAlertInternal(mWebParentLayout.getWebView(), message);
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/DefaultDownloadImpl.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.app.Activity;
import android.content.Context;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.webkit.WebView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.download.library.DownloadImpl;
import com.download.library.DownloadListenerAdapter;
import com.download.library.Extra;
import com.download.library.ResourceRequest;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
/**
* @author cenxiaozhong
* @date 2017/5/13
*/
public class DefaultDownloadImpl implements android.webkit.DownloadListener {
/**
* Application Context
*/
protected Context mContext;
protected ConcurrentHashMap<String, ResourceRequest> mDownloadTasks = new ConcurrentHashMap<>();
/**
* Activity
*/
protected WeakReference<Activity> mActivityWeakReference = null;
/**
* TAG 用于打印,标识
*/
private static final String TAG = DefaultDownloadImpl.class.getSimpleName();
/**
* 权限拦截
*/
protected PermissionInterceptor mPermissionListener = null;
/**
* AbsAgentWebUIController
*/
protected WeakReference<AbsAgentWebUIController> mAgentWebUIController;
private static Handler mHandler = new Handler(Looper.getMainLooper());
protected DefaultDownloadImpl(Activity activity, WebView webView, PermissionInterceptor permissionInterceptor) {
this.mContext = activity.getApplicationContext();
this.mActivityWeakReference = new WeakReference<Activity>(activity);
this.mPermissionListener = permissionInterceptor;
this.mAgentWebUIController = new WeakReference<AbsAgentWebUIController>(AgentWebUtils.getAgentWebUIControllerByWebView(webView));
}
@Override
public void onDownloadStart(final String url, final String userAgent, final String contentDisposition, final String mimetype, final long contentLength) {
mHandler.post(new Runnable() {
@Override
public void run() {
onDownloadStartInternal(url, userAgent, contentDisposition, mimetype, contentLength);
}
});
}
protected void onDownloadStartInternal(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) {
if (null == mActivityWeakReference.get() || mActivityWeakReference.get().isFinishing()) {
return;
}
if (null != this.mPermissionListener) {
if (this.mPermissionListener.intercept(url, AgentWebPermissions.STORAGE, "download")) {
return;
}
}
ResourceRequest resourceRequest = createResourceRequest(url);
this.mDownloadTasks.put(url, resourceRequest);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
List<String> mList = null;
if ((mList = checkNeedPermission()).isEmpty()) {
preDownload(url);
} else {
Action mAction = Action.createPermissionsAction(mList.toArray(new String[]{}));
ActionActivity.setPermissionListener(getPermissionListener(url));
ActionActivity.start(mActivityWeakReference.get(), mAction);
}
} else {
preDownload(url);
}
}
protected ResourceRequest createResourceRequest(String url) {
return DownloadImpl.getInstance().with(url).setEnableIndicator(true).autoOpenIgnoreMD5();
}
protected ActionActivity.PermissionListener getPermissionListener(final String url) {
return new ActionActivity.PermissionListener() {
@Override
public void onRequestPermissionsResult(@NonNull String[] permissions, @NonNull int[] grantResults, Bundle extras) {
if (checkNeedPermission().isEmpty()) {
preDownload(url);
} else {
if (null != mAgentWebUIController.get()) {
mAgentWebUIController
.get()
.onPermissionsDeny(
checkNeedPermission().
toArray(new String[]{}),
AgentWebPermissions.ACTION_STORAGE, "Download");
}
LogUtils.e(TAG, "储存权限获取失败~");
}
}
};
}
protected List<String> checkNeedPermission() {
List<String> deniedPermissions = new ArrayList<>();
if (!AgentWebUtils.hasPermission(mActivityWeakReference.get(), AgentWebPermissions.STORAGE)) {
deniedPermissions.addAll(Arrays.asList(AgentWebPermissions.STORAGE));
}
return deniedPermissions;
}
protected void preDownload(String url) {
// 移动数据
if (!isForceRequest(url) &&
AgentWebUtils.checkNetworkType(mContext) > 1) {
showDialog(url);
return;
}
performDownload(url);
}
protected boolean isForceRequest(String url) {
ResourceRequest resourceRequest = mDownloadTasks.get(url);
if (null != resourceRequest) {
return resourceRequest.getDownloadTask().isForceDownload();
}
return false;
}
protected void forceDownload(final String url) {
ResourceRequest resourceRequest = mDownloadTasks.get(url);
resourceRequest.setForceDownload(true);
performDownload(url);
}
protected void showDialog(final String url) {
Activity mActivity;
if (null == (mActivity = mActivityWeakReference.get()) || mActivity.isFinishing()) {
return;
}
AbsAgentWebUIController mAgentWebUIController;
if (null != (mAgentWebUIController = this.mAgentWebUIController.get())) {
mAgentWebUIController.onForceDownloadAlert(url, createCallback(url));
}
}
protected Handler.Callback createCallback(final String url) {
return new Handler.Callback() {
@Override
public boolean handleMessage(Message msg) {
forceDownload(url);
return true;
}
};
}
protected void performDownload(String url) {
try {
LogUtils.e(TAG, "performDownload:" + url + " exist:" + DownloadImpl.getInstance().exist(url));
// 该链接是否正在下载
if (DownloadImpl.getInstance().exist(url)) {
if (null != mAgentWebUIController.get()) {
mAgentWebUIController.get().onShowMessage(
mActivityWeakReference.get()
.getString(R.string.agentweb_download_task_has_been_exist), "preDownload");
}
return;
}
ResourceRequest resourceRequest = mDownloadTasks.get(url);
resourceRequest.addHeader("Cookie", AgentWebConfig.getCookiesByUrl(url));
taskEnqueue(resourceRequest);
} catch (Throwable ignore) {
if (LogUtils.isDebug()) {
ignore.printStackTrace();
}
}
}
protected void taskEnqueue(ResourceRequest resourceRequest) {
resourceRequest.enqueue(new DownloadListenerAdapter() {
@Override
public boolean onResult(Throwable throwable, Uri path, String url, Extra extra) {
mDownloadTasks.remove(url);
return super.onResult(throwable, path, url, extra);
}
});
}
public static DefaultDownloadImpl create(@NonNull Activity activity,
@NonNull WebView webView,
@Nullable PermissionInterceptor permissionInterceptor) {
try {
DownloadImpl.getInstance().with(activity.getApplication());
} catch (Throwable throwable) {
LogUtils.e(TAG, "implementation 'com.download.library:Downloader:x.x.x'");
if (LogUtils.isDebug()) {
throwable.printStackTrace();
}
}
return new DefaultDownloadImpl(activity, webView, permissionInterceptor);
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/DefaultUIController.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.res.Resources;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.webkit.JsPromptResult;
import android.webkit.JsResult;
import android.webkit.WebView;
import android.widget.EditText;
import androidx.appcompat.app.AlertDialog;
/**
* @author cenxiaozhong
* @date 2017/12/8
* @since 3.0.0
*/
public class DefaultUIController extends AbsAgentWebUIController {
private AlertDialog mAlertDialog;
protected AlertDialog mConfirmDialog;
private JsPromptResult mJsPromptResult = null;
private JsResult mJsResult = null;
private AlertDialog mPromptDialog = null;
private Activity mActivity;
private WebParentLayout mWebParentLayout;
private AlertDialog mAskOpenOtherAppDialog = null;
private ProgressDialog mProgressDialog;
private Resources mResources = null;
@Override
public void onJsAlert(WebView view, String url, String message) {
AgentWebUtils.toastShowShort(view.getContext().getApplicationContext(), message);
}
@Override
public void onOpenPagePrompt(WebView view, String url, final Handler.Callback callback) {
LogUtils.i(TAG, "onOpenPagePrompt");
Activity mActivity;
if ((mActivity = this.mActivity) == null || mActivity.isFinishing()) {
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (mActivity.isDestroyed()) {
return;
}
}
if (mAskOpenOtherAppDialog == null) {
mAskOpenOtherAppDialog = new AlertDialog
.Builder(mActivity)
.setMessage(mResources.getString(R.string.agentweb_leave_app_and_go_other_page,
AgentWebUtils.getApplicationName(mActivity)))
.setTitle(mResources.getString(R.string.agentweb_tips))
.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (callback != null) {
callback.handleMessage(Message.obtain(null, -1));
}
}
})//
.setPositiveButton(mResources.getString(R.string.agentweb_leave), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (callback != null) {
callback.handleMessage(Message.obtain(null, 1));
}
}
})
.create();
}
mAskOpenOtherAppDialog.show();
}
@Override
public void onJsConfirm(WebView view, String url, String message, JsResult jsResult) {
onJsConfirmInternal(message, jsResult);
}
@Override
public void onSelectItemsPrompt(WebView view, String url, final String[] ways, final Handler.Callback callback) {
showChooserInternal(ways, callback);
}
@Override
public void onForceDownloadAlert(String url, final Handler.Callback callback) {
onForceDownloadAlertInternal(callback);
}
private void onForceDownloadAlertInternal(final Handler.Callback callback) {
Activity mActivity;
if ((mActivity = this.mActivity) == null || mActivity.isFinishing()) {
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (mActivity.isDestroyed()) {
return;
}
}
AlertDialog mAlertDialog = null;
mAlertDialog = new AlertDialog.Builder(mActivity)
.setTitle(mResources.getString(R.string.agentweb_tips))
.setMessage(mResources.getString(R.string.agentweb_honeycomblow))
.setNegativeButton(mResources.getString(R.string.agentweb_download), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (dialog != null) {
dialog.dismiss();
}
if (callback != null) {
callback.handleMessage(Message.obtain());
}
}
})//
.setPositiveButton(mResources.getString(R.string.agentweb_cancel), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (dialog != null) {
dialog.dismiss();
}
}
}).create();
mAlertDialog.show();
}
private void showChooserInternal(String[] ways, final Handler.Callback callback) {
Activity mActivity;
if ((mActivity = this.mActivity) == null || mActivity.isFinishing()) {
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (mActivity.isDestroyed()) {
return;
}
}
mAlertDialog = new AlertDialog.Builder(mActivity)
.setSingleChoiceItems(ways, -1, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
LogUtils.i(TAG, "which:" + which);
if (callback != null) {
Message mMessage = Message.obtain();
mMessage.what = which;
callback.handleMessage(mMessage);
}
}
}).setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
dialog.dismiss();
if (callback != null) {
callback.handleMessage(Message.obtain(null, -1));
}
}
}).create();
mAlertDialog.show();
}
private void onJsConfirmInternal(String message, JsResult jsResult) {
LogUtils.i(TAG, "activity:" + mActivity.hashCode() + " ");
Activity mActivity = this.mActivity;
if (mActivity == null || mActivity.isFinishing()) {
toCancelJsresult(jsResult);
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (mActivity.isDestroyed()) {
toCancelJsresult(jsResult);
return;
}
}
if (mConfirmDialog == null) {
mConfirmDialog = new AlertDialog.Builder(mActivity)
.setMessage(message)
.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
toDismissDialog(mConfirmDialog);
toCancelJsresult(mJsResult);
}
})//
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
toDismissDialog(mConfirmDialog);
if (mJsResult != null) {
mJsResult.confirm();
}
}
})
.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
dialog.dismiss();
toCancelJsresult(mJsResult);
}
})
.create();
}
mConfirmDialog.setMessage(message);
this.mJsResult = jsResult;
mConfirmDialog.show();
}
private void onJsPromptInternal(String message, String defaultValue, JsPromptResult jsPromptResult) {
Activity mActivity = this.mActivity;
if (mActivity == null || mActivity.isFinishing()) {
jsPromptResult.cancel();
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (mActivity.isDestroyed()) {
jsPromptResult.cancel();
return;
}
}
if (mPromptDialog == null) {
final EditText et = new EditText(mActivity);
et.setText(defaultValue);
mPromptDialog = new AlertDialog.Builder(mActivity)
.setView(et)
.setTitle(message)
.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
toDismissDialog(mPromptDialog);
toCancelJsresult(mJsPromptResult);
}
})//
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
toDismissDialog(mPromptDialog);
if (mJsPromptResult != null) {
mJsPromptResult.confirm(et.getText().toString());
}
}
})
.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
dialog.dismiss();
toCancelJsresult(mJsPromptResult);
}
})
.create();
}
this.mJsPromptResult = jsPromptResult;
mPromptDialog.show();
}
@Override
public void onJsPrompt(WebView view, String url, String message, String defaultValue, JsPromptResult jsPromptResult) {
onJsPromptInternal(message, defaultValue, jsPromptResult);
}
@Override
public void onMainFrameError(WebView view, int errorCode, String description, String failingUrl) {
LogUtils.i(TAG, "mWebParentLayout onMainFrameError:" + mWebParentLayout);
if (mWebParentLayout != null) {
mWebParentLayout.showPageMainFrameError();
}
}
@Override
public void onShowMainFrame() {
if (mWebParentLayout != null) {
mWebParentLayout.hideErrorLayout();
}
}
@Override
public void onLoading(String msg) {
Activity mActivity;
if ((mActivity = this.mActivity) == null || mActivity.isFinishing()) {
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (mActivity.isDestroyed()) {
return;
}
}
if (mProgressDialog == null) {
mProgressDialog = new ProgressDialog(mActivity);
}
mProgressDialog.setCancelable(false);
mProgressDialog.setCanceledOnTouchOutside(false);
mProgressDialog.setMessage(msg);
mProgressDialog.show();
}
@Override
public void onCancelLoading() {
Activity mActivity;
if ((mActivity = this.mActivity) == null || mActivity.isFinishing()) {
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
if (mActivity.isDestroyed()) {
return;
}
}
if (mProgressDialog != null && mProgressDialog.isShowing()) {
mProgressDialog.dismiss();
}
mProgressDialog = null;
}
@Override
public void onShowMessage(String message, String from) {
if (!TextUtils.isEmpty(from) && from.contains("performDownload")) {
return;
}
AgentWebUtils.toastShowShort(mActivity.getApplicationContext(), message);
}
@Override
public void onPermissionsDeny(String[] permissions, String permissionType, String action) {
// AgentWebUtils.toastShowShort(mActivity.getApplicationContext(), "权限被冻结");
}
private void toCancelJsresult(JsResult result) {
if (result != null) {
result.cancel();
}
}
@Override
protected void bindSupportWebParent(WebParentLayout webParentLayout, Activity activity) {
this.mActivity = activity;
this.mWebParentLayout = webParentLayout;
mResources = this.mActivity.getResources();
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/DefaultWebClient.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.annotation.TargetApi;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.HttpAuthHandler;
import android.webkit.WebResourceError;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.annotation.RequiresApi;
import com.alipay.sdk.app.H5PayCallback;
import com.alipay.sdk.app.PayTask;
import com.alipay.sdk.util.H5PayResultModel;
import java.lang.ref.WeakReference;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.net.URISyntaxException;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* @author cenxiaozhong
* @since 3.0.0
*/
public class DefaultWebClient extends MiddlewareWebClientBase {
/**
* Activity's WeakReference
*/
private WeakReference<Activity> mWeakReference = null;
/**
* 缩放
*/
private static final int CONSTANTS_ABNORMAL_BIG = 7;
/**
* WebViewClient
*/
private WebViewClient mWebViewClient;
/**
* mWebClientHelper
*/
private boolean webClientHelper = true;
/**
* intent ' s scheme
*/
public static final String INTENT_SCHEME = "intent://";
/**
* Wechat pay scheme ,用于唤醒微信支付
*/
public static final String WEBCHAT_PAY_SCHEME = "weixin://wap/pay?";
/**
* 支付宝
*/
public static final String ALIPAYS_SCHEME = "alipays://";
/**
* http scheme
*/
public static final String HTTP_SCHEME = "http://";
/**
* https scheme
*/
public static final String HTTPS_SCHEME = "https://";
/**
* true 表示当前应用内依赖了 alipay library , false 反之
*/
private static final boolean HAS_ALIPAY_LIB;
/**
* WebViewClient's tag 用于打印
*/
private static final String TAG = DefaultWebClient.class.getSimpleName();
/**
* 直接打开其他页面
*/
public static final int DERECT_OPEN_OTHER_PAGE = 1001;
/**
* 弹窗咨询用户是否前往其他页面
*/
public static final int ASK_USER_OPEN_OTHER_PAGE = DERECT_OPEN_OTHER_PAGE >> 2;
/**
* 不允许打开其他页面
*/
public static final int DISALLOW_OPEN_OTHER_APP = DERECT_OPEN_OTHER_PAGE >> 4;
/**
* 默认为咨询用户
*/
private int mUrlHandleWays = ASK_USER_OPEN_OTHER_PAGE;
/**
* 是否拦截找不到相应页面的Url,默认拦截
*/
private boolean mIsInterceptUnkownUrl = true;
/**
* AbsAgentWebUIController
*/
private WeakReference<AbsAgentWebUIController> mAgentWebUIController = null;
/**
* WebView
*/
private WebView mWebView;
/**
* 弹窗回调
*/
private Handler.Callback mCallback = null;
/**
* MainFrameErrorMethod
*/
private Method onMainFrameErrorMethod = null;
/**
* Alipay PayTask 对象
*/
private Object mPayTask;
/**
* SMS scheme
*/
public static final String SCHEME_SMS = "sms:";
/**
* 缓存当前出现错误的页面
*/
private Set<String> mErrorUrlsSet = new HashSet<>();
/**
* 缓存等待加载完成的页面 onPageStart()执行之后 ,onPageFinished()执行之前
*/
private Set<String> mWaittingFinishSet = new HashSet<>();
static {
boolean tag = true;
try {
Class.forName("com.alipay.sdk.app.PayTask");
} catch (Throwable ignore) {
tag = false;
}
HAS_ALIPAY_LIB = tag;
LogUtils.i(TAG, "HAS_ALIPAY_LIB:" + HAS_ALIPAY_LIB);
}
DefaultWebClient(Builder builder) {
super(builder.mClient);
this.mWebView = builder.mWebView;
this.mWebViewClient = builder.mClient;
mWeakReference = new WeakReference<Activity>(builder.mActivity);
this.webClientHelper = builder.mWebClientHelper;
mAgentWebUIController = new WeakReference<AbsAgentWebUIController>(AgentWebUtils.getAgentWebUIControllerByWebView(builder.mWebView));
mIsInterceptUnkownUrl = builder.mIsInterceptUnkownScheme;
if (builder.mUrlHandleWays <= 0) {
mUrlHandleWays = ASK_USER_OPEN_OTHER_PAGE;
} else {
mUrlHandleWays = builder.mUrlHandleWays;
}
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
String url = request.getUrl().toString();
if (url.startsWith(HTTP_SCHEME) || url.startsWith(HTTPS_SCHEME)) {
return (webClientHelper && HAS_ALIPAY_LIB && isAlipay(view, url));
}
if (!webClientHelper) {
return super.shouldOverrideUrlLoading(view, request);
}
if (handleCommonLink(url)) {
return true;
}
// intent
if (url.startsWith(INTENT_SCHEME)) {
handleIntentUrl(url);
LogUtils.i(TAG, "intent url ");
return true;
}
// 微信支付
if (url.startsWith(WEBCHAT_PAY_SCHEME)) {
LogUtils.i(TAG, "lookup wechat to pay ~~");
startActivity(url);
return true;
}
if (url.startsWith(ALIPAYS_SCHEME) && lookup(url)) {
LogUtils.i(TAG, "alipays url lookup alipay ~~ ");
return true;
}
if (queryActiviesNumber(url) > 0 && deepLink(url)) {
LogUtils.i(TAG, "intercept url:" + url);
return true;
}
if (mIsInterceptUnkownUrl) {
LogUtils.i(TAG, "intercept UnkownUrl :" + request.getUrl());
return true;
}
return super.shouldOverrideUrlLoading(view, request);
}
@Override
public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
return super.shouldInterceptRequest(view, url);
}
@Override
public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host, String realm) {
super.onReceivedHttpAuthRequest(view, handler, host, realm);
}
private boolean deepLink(String url) {
switch (mUrlHandleWays) {
// 直接打开其他App
case DERECT_OPEN_OTHER_PAGE:
lookup(url);
return true;
// 咨询用户是否打开其他App
case ASK_USER_OPEN_OTHER_PAGE:
Activity mActivity = null;
if ((mActivity = mWeakReference.get()) == null) {
return false;
}
ResolveInfo resolveInfo = lookupResolveInfo(url);
if (null == resolveInfo) {
return false;
}
ActivityInfo activityInfo = resolveInfo.activityInfo;
LogUtils.e(TAG, "resolve package:" + resolveInfo.activityInfo.packageName + " app package:" + mActivity.getPackageName());
if (activityInfo != null
&& !TextUtils.isEmpty(activityInfo.packageName)
&& activityInfo.packageName.equals(mActivity.getPackageName())) {
return lookup(url);
}
if (mAgentWebUIController.get() != null) {
mAgentWebUIController.get()
.onOpenPagePrompt(this.mWebView,
mWebView.getUrl(),
getCallback(url));
}
return true;
// 默认不打开
default:
return false;
}
}
@Override
public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) {
return super.shouldInterceptRequest(view, request);
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url.startsWith(HTTP_SCHEME) || url.startsWith(HTTPS_SCHEME)) {
return (webClientHelper && HAS_ALIPAY_LIB && isAlipay(view, url));
}
if (!webClientHelper) {
return false;
}
//电话 , 邮箱 , 短信
if (handleCommonLink(url)) {
return true;
}
//Intent scheme
if (url.startsWith(INTENT_SCHEME)) {
handleIntentUrl(url);
return true;
}
//微信支付
if (url.startsWith(WEBCHAT_PAY_SCHEME)) {
startActivity(url);
return true;
}
//支付宝
if (url.startsWith(ALIPAYS_SCHEME) && lookup(url)) {
return true;
}
//打开url 相对应的页面
if (queryActiviesNumber(url) > 0 && deepLink(url)) {
LogUtils.i(TAG, "intercept OtherAppScheme");
return true;
}
// 手机里面没有页面能匹配到该链接 ,拦截下来。
if (mIsInterceptUnkownUrl) {
LogUtils.i(TAG, "intercept InterceptUnkownScheme : " + url);
return true;
}
return super.shouldOverrideUrlLoading(view, url);
}
private int queryActiviesNumber(String url) {
try {
if (mWeakReference.get() == null) {
return 0;
}
Intent intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
PackageManager mPackageManager = mWeakReference.get().getPackageManager();
List<ResolveInfo> mResolveInfos = mPackageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
return mResolveInfos == null ? 0 : mResolveInfos.size();
} catch (URISyntaxException ignore) {
if (LogUtils.isDebug()) {
ignore.printStackTrace();
}
return 0;
}
}
private void handleIntentUrl(String intentUrl) {
try {
Intent intent = null;
if (TextUtils.isEmpty(intentUrl) || !intentUrl.startsWith(INTENT_SCHEME)) {
return;
}
if (lookup(intentUrl)) {
return;
}
} catch (Throwable e) {
if (LogUtils.isDebug()) {
e.printStackTrace();
}
}
}
private ResolveInfo lookupResolveInfo(String url) {
try {
Intent intent;
Activity mActivity = null;
if ((mActivity = mWeakReference.get()) == null) {
return null;
}
PackageManager packageManager = mActivity.getPackageManager();
intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
ResolveInfo info = packageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
return info;
} catch (Throwable ignore) {
if (LogUtils.isDebug()) {
ignore.printStackTrace();
}
}
return null;
}
private boolean lookup(String url) {
try {
Intent intent;
Activity mActivity = null;
if ((mActivity = mWeakReference.get()) == null) {
return true;
}
PackageManager packageManager = mActivity.getPackageManager();
intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
ResolveInfo info = packageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
// 跳到该应用
if (info != null) {
mActivity.startActivity(intent);
return true;
}
} catch (Throwable ignore) {
if (LogUtils.isDebug()) {
ignore.printStackTrace();
}
}
return false;
}
private boolean isAlipay(final WebView view, String url) {
try {
Activity mActivity = null;
if ((mActivity = mWeakReference.get()) == null) {
return false;
}
/**
* 推荐采用的新的二合一接口(payInterceptorWithUrl),只需调用一次
*/
if (mPayTask == null) {
Class clazz = Class.forName("com.alipay.sdk.app.PayTask");
Constructor<?> mConstructor = clazz.getConstructor(Activity.class);
mPayTask = mConstructor.newInstance(mActivity);
}
final PayTask task = (PayTask) mPayTask;
boolean isIntercepted = task.payInterceptorWithUrl(url, true, new H5PayCallback() {
@Override
public void onPayResult(final H5PayResultModel result) {
final String url = result.getReturnUrl();
if (!TextUtils.isEmpty(url)) {
AgentWebUtils.runInUiThread(new Runnable() {
@Override
public void run() {
view.loadUrl(url);
}
});
}
}
});
if (isIntercepted) {
LogUtils.i(TAG, "alipay-isIntercepted:" + isIntercepted + " url:" + url);
}
return isIntercepted;
} catch (Throwable ignore) {
if (AgentWebConfig.DEBUG) {
ignore.printStackTrace();
}
}
return false;
}
private boolean handleCommonLink(String url) {
if (url.startsWith(WebView.SCHEME_TEL)
|| url.startsWith(SCHEME_SMS)
|| url.startsWith(WebView.SCHEME_MAILTO)
|| url.startsWith(WebView.SCHEME_GEO)) {
try {
Activity mActivity = null;
if ((mActivity = mWeakReference.get()) == null) {
return false;
}
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
mActivity.startActivity(intent);
} catch (ActivityNotFoundException ignored) {
if (AgentWebConfig.DEBUG) {
ignored.printStackTrace();
}
}
return true;
}
return false;
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
if (!mWaittingFinishSet.contains(url)) {
mWaittingFinishSet.add(url);
}
super.onPageStarted(view, url, favicon);
}
/**
* MainFrame Error
*
* @param view
* @param errorCode
* @param description
* @param failingUrl
*/
@Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
LogUtils.i(TAG, "onReceivedError:" + description + " CODE:" + errorCode);
onMainFrameError(view, errorCode, description, failingUrl);
}
@TargetApi(Build.VERSION_CODES.M)
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override
public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
if (request.isForMainFrame()) {
onMainFrameError(view,
error.getErrorCode(), error.getDescription().toString(),
request.getUrl().toString());
}
LogUtils.i(TAG, "onReceivedError:" + error.getDescription() + " code:" + error.getErrorCode());
}
private void onMainFrameError(WebView view, int errorCode, String description, String failingUrl) {
mErrorUrlsSet.add(failingUrl);
// 下面逻辑判断开发者是否重写了 onMainFrameError 方法 , 优先交给开发者处理
if (this.mWebViewClient != null && webClientHelper) {
Method mMethod = this.onMainFrameErrorMethod;
if (mMethod != null || (this.onMainFrameErrorMethod = mMethod = AgentWebUtils.isExistMethod(mWebViewClient, "onMainFrameError", AbsAgentWebUIController.class, WebView.class, int.class, String.class, String.class)) != null) {
try {
mMethod.invoke(this.mWebViewClient, mAgentWebUIController.get(), view, errorCode, description, failingUrl);
} catch (Throwable ignore) {
if (LogUtils.isDebug()) {
ignore.printStackTrace();
}
}
return;
}
}
if (mAgentWebUIController.get() != null) {
mAgentWebUIController.get().onMainFrameError(view, errorCode, description, failingUrl);
}
// this.mWebView.setVisibility(View.GONE);
}
@Override
public void onPageFinished(WebView view, String url) {
if (!mErrorUrlsSet.contains(url) && mWaittingFinishSet.contains(url)) {
if (mAgentWebUIController.get() != null) {
mAgentWebUIController.get().onShowMainFrame();
}
} else {
view.setVisibility(View.VISIBLE);
}
if (mWaittingFinishSet.contains(url)) {
mWaittingFinishSet.remove(url);
}
if (!mErrorUrlsSet.isEmpty()) {
mErrorUrlsSet.clear();
}
super.onPageFinished(view, url);
}
@Override
public boolean shouldOverrideKeyEvent(WebView view, KeyEvent event) {
return super.shouldOverrideKeyEvent(view, event);
}
private void startActivity(String url) {
try {
if (mWeakReference.get() == null) {
return;
}
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
mWeakReference.get().startActivity(intent);
} catch (Exception e) {
if (LogUtils.isDebug()) {
e.printStackTrace();
}
}
}
@Override
public void onReceivedHttpError(WebView view, WebResourceRequest request, WebResourceResponse errorResponse) {
super.onReceivedHttpError(view, request, errorResponse);
}
@Override
public void onScaleChanged(WebView view, float oldScale, float newScale) {
LogUtils.i(TAG, "onScaleChanged:" + oldScale + " n:" + newScale);
if (newScale - oldScale > CONSTANTS_ABNORMAL_BIG) {
view.setInitialScale((int) (oldScale / newScale * 100));
}
}
private Handler.Callback getCallback(final String url) {
if (this.mCallback != null) {
return this.mCallback;
}
return this.mCallback = new Handler.Callback() {
@Override
public boolean handleMessage(Message msg) {
switch (msg.what) {
case 1:
lookup(url);
break;
default:
return true;
}
return true;
}
};
}
public static Builder createBuilder() {
return new Builder();
}
public static class Builder {
private Activity mActivity;
private WebViewClient mClient;
private boolean mWebClientHelper;
private PermissionInterceptor mPermissionInterceptor;
private WebView mWebView;
private boolean mIsInterceptUnkownScheme;
private int mUrlHandleWays;
public Builder setActivity(Activity activity) {
this.mActivity = activity;
return this;
}
public Builder setClient(WebViewClient client) {
this.mClient = client;
return this;
}
public Builder setWebClientHelper(boolean webClientHelper) {
this.mWebClientHelper = webClientHelper;
return this;
}
public Builder setPermissionInterceptor(PermissionInterceptor permissionInterceptor) {
this.mPermissionInterceptor = permissionInterceptor;
return this;
}
public Builder setWebView(WebView webView) {
this.mWebView = webView;
return this;
}
public Builder setInterceptUnkownUrl(boolean interceptUnkownScheme) {
this.mIsInterceptUnkownScheme = interceptUnkownScheme;
return this;
}
public Builder setUrlHandleWays(int urlHandleWays) {
this.mUrlHandleWays = urlHandleWays;
return this;
}
public DefaultWebClient build() {
return new DefaultWebClient(this);
}
}
public static enum OpenOtherPageWays {
/**
* 直接打开跳转页
*/
DERECT(DefaultWebClient.DERECT_OPEN_OTHER_PAGE),
/**
* 咨询用户是否打开
*/
ASK(DefaultWebClient.ASK_USER_OPEN_OTHER_PAGE),
/**
* 禁止打开其他页面
*/
DISALLOW(DefaultWebClient.DISALLOW_OPEN_OTHER_APP);
int code;
OpenOtherPageWays(int code) {
this.code = code;
}
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/DefaultWebCreator.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.app.Activity;
import android.graphics.Color;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.webkit.WebView;
import android.widget.FrameLayout;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
/**
* @author cenxiaozhong
* @since 1.0.0
*/
public class DefaultWebCreator implements WebCreator {
private Activity mActivity;
private ViewGroup mViewGroup;
private boolean mIsNeedDefaultProgress;
private int mIndex;
private BaseIndicatorView mProgressView;
private ViewGroup.LayoutParams mLayoutParams = null;
private int mColor = -1;
/**
* 单位dp
*/
private int mHeight;
private boolean mIsCreated = false;
private IWebLayout mIWebLayout;
private BaseIndicatorSpec mBaseIndicatorSpec;
private WebView mWebView = null;
private FrameLayout mFrameLayout = null;
private View mTargetProgress;
private static final String TAG = DefaultWebCreator.class.getSimpleName();
/**
* 使用默认的进度条
* @param activity
* @param viewGroup
* @param lp
* @param index
* @param color
* @param mHeight
* @param webView
* @param webLayout
*/
protected DefaultWebCreator(@NonNull Activity activity,
@Nullable ViewGroup viewGroup,
ViewGroup.LayoutParams lp,
int index,
int color,
int mHeight,
WebView webView,
IWebLayout webLayout) {
this.mActivity = activity;
this.mViewGroup = viewGroup;
this.mIsNeedDefaultProgress = true;
this.mIndex = index;
this.mColor = color;
this.mLayoutParams = lp;
this.mHeight = mHeight;
this.mWebView = webView;
this.mIWebLayout = webLayout;
}
/**
* 关闭进度条
* @param activity
* @param viewGroup
* @param lp
* @param index
* @param webView
* @param webLayout
*/
protected DefaultWebCreator(@NonNull Activity activity, @Nullable ViewGroup viewGroup, ViewGroup.LayoutParams lp, int index, @Nullable WebView webView, IWebLayout webLayout) {
this.mActivity = activity;
this.mViewGroup = viewGroup;
this.mIsNeedDefaultProgress = false;
this.mIndex = index;
this.mLayoutParams = lp;
this.mWebView = webView;
this.mIWebLayout = webLayout;
}
/**
* 自定义Indicator
* @param activity
* @param viewGroup
* @param lp
* @param index
* @param progressView
* @param webView
* @param webLayout
*/
protected DefaultWebCreator(@NonNull Activity activity, @Nullable ViewGroup viewGroup, ViewGroup.LayoutParams lp, int index, BaseIndicatorView progressView, WebView webView, IWebLayout webLayout) {
this.mActivity = activity;
this.mViewGroup = viewGroup;
this.mIsNeedDefaultProgress = false;
this.mIndex = index;
this.mLayoutParams = lp;
this.mProgressView = progressView;
this.mWebView = webView;
this.mIWebLayout = webLayout;
}
public void setWebView(WebView webView) {
mWebView = webView;
}
public FrameLayout getFrameLayout() {
return mFrameLayout;
}
public View getTargetProgress() {
return mTargetProgress;
}
public void setTargetProgress(View targetProgress) {
this.mTargetProgress = targetProgress;
}
@Override
public DefaultWebCreator create() {
if (mIsCreated) {
return this;
}
mIsCreated = true;
ViewGroup mViewGroup = this.mViewGroup;
if (mViewGroup == null) {
mViewGroup = this.mFrameLayout = (FrameLayout) createLayout();
mActivity.setContentView(mViewGroup);
} else {
if (mIndex == -1) {
mViewGroup.addView(this.mFrameLayout = (FrameLayout) createLayout(), mLayoutParams);
} else {
mViewGroup.addView(this.mFrameLayout = (FrameLayout) createLayout(), mIndex, mLayoutParams);
}
}
return this;
}
@Override
public WebView getWebView() {
return mWebView;
}
@Override
public FrameLayout getWebParentLayout() {
return mFrameLayout;
}
private ViewGroup createLayout() {
Activity mActivity = this.mActivity;
WebParentLayout mFrameLayout = new WebParentLayout(mActivity);
mFrameLayout.setId(R.id.web_parent_layout_id);
mFrameLayout.setBackgroundColor(Color.WHITE);
View target = mIWebLayout == null ? (this.mWebView = (WebView) createWebView()) : webLayout();
FrameLayout.LayoutParams mLayoutParams = new FrameLayout.LayoutParams(-1, -1);
mFrameLayout.addView(target, mLayoutParams);
mFrameLayout.bindWebView(this.mWebView);
LogUtils.i(TAG, " instanceof AgentWebView:" + (this.mWebView instanceof AgentWebView));
if (this.mWebView instanceof AgentWebView) {
AgentWebConfig.WEBVIEW_TYPE = AgentWebConfig.WEBVIEW_AGENTWEB_SAFE_TYPE;
}
ViewStub mViewStub = new ViewStub(mActivity);
mViewStub.setId(R.id.mainframe_error_viewsub_id);
mFrameLayout.addView(mViewStub, new FrameLayout.LayoutParams(-1, -1));
if (mIsNeedDefaultProgress) {
FrameLayout.LayoutParams lp = null;
WebIndicator mWebIndicator = new WebIndicator(mActivity);
if (mHeight > 0) {
lp = new FrameLayout.LayoutParams(-2, AgentWebUtils.dp2px(mActivity, mHeight));
} else {
lp = mWebIndicator.offerLayoutParams();
}
if (mColor != -1) {
mWebIndicator.setColor(mColor);
}
lp.gravity = Gravity.TOP;
mFrameLayout.addView((View) (this.mBaseIndicatorSpec = mWebIndicator), lp);
mWebIndicator.setVisibility(View.GONE);
} else if (!mIsNeedDefaultProgress && mProgressView != null) {
mFrameLayout.addView((View) (this.mBaseIndicatorSpec = (BaseIndicatorSpec) mProgressView), mProgressView.offerLayoutParams());
mProgressView.setVisibility(View.GONE);
}
return mFrameLayout;
}
private View webLayout() {
WebView mWebView = null;
if ((mWebView = mIWebLayout.getWebView()) == null) {
mWebView = createWebView();
mIWebLayout.getLayout().addView(mWebView, -1, -1);
LogUtils.i(TAG, "add webview");
} else {
AgentWebConfig.WEBVIEW_TYPE = AgentWebConfig.WEBVIEW_CUSTOM_TYPE;
}
this.mWebView = mWebView;
return mIWebLayout.getLayout();
}
private WebView createWebView() {
WebView mWebView = null;
if (this.mWebView != null) {
mWebView = this.mWebView;
AgentWebConfig.WEBVIEW_TYPE = AgentWebConfig.WEBVIEW_CUSTOM_TYPE;
} else if (AgentWebConfig.IS_KITKAT_OR_BELOW_KITKAT) {
mWebView = new AgentWebView(mActivity);
AgentWebConfig.WEBVIEW_TYPE = AgentWebConfig.WEBVIEW_AGENTWEB_SAFE_TYPE;
} else {
mWebView = new LollipopFixedWebView(mActivity);
AgentWebConfig.WEBVIEW_TYPE = AgentWebConfig.WEBVIEW_DEFAULT_TYPE;
}
return mWebView;
}
@Override
public BaseIndicatorSpec offer() {
return mBaseIndicatorSpec;
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/DefaultWebLifeCycleImpl.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.os.Build;
import android.webkit.WebView;
/**
* @author cenxiaozhong
* @date 2017/6/3
* @since 2.0.0
*/
public class DefaultWebLifeCycleImpl implements WebLifeCycle {
private WebView mWebView;
DefaultWebLifeCycleImpl(WebView webView) {
this.mWebView = webView;
}
@Override
public void onResume() {
if (this.mWebView != null) {
if (Build.VERSION.SDK_INT >= 11){
this.mWebView.onResume();
}
this.mWebView.resumeTimers();
}
}
@Override
public void onPause() {
if (this.mWebView != null) {
if (Build.VERSION.SDK_INT >= 11){
this.mWebView.onPause();
}
this.mWebView.pauseTimers();
}
}
@Override
public void onDestroy() {
if(this.mWebView!=null){
this.mWebView.resumeTimers();
}
AgentWebUtils.clearWebView(this.mWebView);
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/EventHandlerImpl.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.view.KeyEvent;
import android.webkit.WebView;
/**
* IEventHandler 对事件的处理,主要是针对
* 视屏状态进行了处理 , 如果当前状态为 视频状态
* 则先退出视频。
*
* @author cenxiaozhong
* @date 2017/6/3
* @since 2.0.0
*/
public class EventHandlerImpl implements IEventHandler {
private WebView mWebView;
private EventInterceptor mEventInterceptor;
public static final EventHandlerImpl getInstantce(WebView view, EventInterceptor eventInterceptor) {
return new EventHandlerImpl(view, eventInterceptor);
}
public EventHandlerImpl(WebView webView, EventInterceptor eventInterceptor) {
this.mWebView = webView;
this.mEventInterceptor = eventInterceptor;
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
return back();
}
return false;
}
@Override
public boolean back() {
if (this.mEventInterceptor != null && this.mEventInterceptor.event()) {
return true;
}
if (mWebView != null && mWebView.canGoBack()) {
mWebView.goBack();
return true;
}
return false;
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/EventInterceptor.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
/**
* @author cenxiaozhong
* @date 2017/6/3
* @since 1.0.0
*/
public interface EventInterceptor {
boolean event();
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/HookManager.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
/**
* @author cenxiaozhong
* @since 1.0.0
*/
public class HookManager {
public static AgentWeb hookAgentWeb(AgentWeb agentWeb, AgentWeb.AgentBuilder agentBuilder) {
return agentWeb;
}
public static boolean permissionHook(String url,String[]permissions){
return true;
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/HttpHeaders.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.net.Uri;
import android.text.TextUtils;
import androidx.collection.ArrayMap;
import java.util.Map;
/**
* @author cenxiaozhong
* @date 2017/7/5
* @since 2.0.0
*/
public class HttpHeaders {
public static HttpHeaders create() {
return new HttpHeaders();
}
private final Map<String, Map<String, String>> mHeaders;
HttpHeaders() {
mHeaders = new ArrayMap<String, Map<String, String>>();
}
public Map<String, String> getHeaders(String url) {
String subUrl = subBaseUrl(url);
if (mHeaders.get(subUrl) == null) {
Map<String, String> headers = new ArrayMap<>();
mHeaders.put(subUrl, headers);
return headers;
}
return mHeaders.get(subUrl);
}
public void additionalHttpHeader(String url, String k, String v) {
if (null == url) {
return;
}
url = subBaseUrl(url);
Map<String, Map<String, String>> mHeaders = getHeaders();
Map<String, String> headersMap = mHeaders.get(subBaseUrl(url));
if (null == headersMap) {
headersMap = new ArrayMap<>();
}
headersMap.put(k, v);
mHeaders.put(url, headersMap);
}
public void additionalHttpHeaders(String url, Map<String, String> headers) {
if (null == url) {
return;
}
String subUrl = subBaseUrl(url);
Map<String, Map<String, String>> mHeaders = getHeaders();
Map<String, String> headersMap = headers;
if (null == headersMap) {
headersMap = new ArrayMap<>();
}
mHeaders.put(subUrl, headersMap);
}
public void removeHttpHeader(String url, String k) {
if (null == url) {
return;
}
String subUrl = subBaseUrl(url);
Map<String, Map<String, String>> mHeaders = getHeaders();
Map<String, String> headersMap = mHeaders.get(subUrl);
if (null != headersMap) {
headersMap.remove(k);
}
}
public boolean isEmptyHeaders(String url) {
url = subBaseUrl(url);
Map<String, String> heads = getHeaders(url);
return heads == null || heads.isEmpty();
}
public Map<String, Map<String, String>> getHeaders() {
return this.mHeaders;
}
private String subBaseUrl(String originUrl) {
if (TextUtils.isEmpty(originUrl)) {
return originUrl;
}
Uri originUri = Uri.parse(originUrl);
return originUri.getScheme() + "://" + originUri.getAuthority();
}
@Override
public String toString() {
return "HttpHeaders{" +
"mHeaders=" + mHeaders +
'}';
}
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/IAgentWebSettings.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.webkit.WebView;
/**
* @author cenxiaozhong
* @since 1.0.0
*/
public interface IAgentWebSettings<T extends android.webkit.WebSettings> {
IAgentWebSettings toSetting(WebView webView);
T getWebSettings();
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/IEventHandler.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import android.view.KeyEvent;
/**
* @author cenxiaozhong
* @since 1.0.0
*/
public interface IEventHandler {
boolean onKeyDown(int keyCode, KeyEvent event);
boolean back();
}
================================================
FILE: agentweb-core/src/main/java/com/just/agentweb/IUrlLoader.java
================================================
/*
* Copyright (C) Justson(https://github.com/Justson/AgentWeb)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.just.agentweb;
import java.util.Map;
/**
* @author cenxiaozhong
* @date 2017/6/3
* @update 4.0.0
* @since 2.0.0
*/
public interface IUrlLoader {
void loadUrl(String url);
void loadUrl(String url, Map<String, String> headers);
void reload();
void loadData(String data, String mimeType, String encoding);
void stopLoad
gitextract_1feoynfu/
├── .github/
│ └── workflows/
│ └── android.yml
├── .gitignore
├── README.md
├── agentweb-core/
│ ├── .gitignore
│ ├── build.gradle
│ ├── providedLibs/
│ │ └── alipaySdk-20180601.jar
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ ├── java/
│ │ └── com/
│ │ └── just/
│ │ └── agentweb/
│ │ ├── AbsAgentWebSettings.java
│ │ ├── AbsAgentWebUIController.java
│ │ ├── Action.java
│ │ ├── ActionActivity.java
│ │ ├── AgentWeb.java
│ │ ├── AgentWebConfig.java
│ │ ├── AgentWebFileProvider.java
│ │ ├── AgentWebJsInterfaceCompat.java
│ │ ├── AgentWebPermissions.java
│ │ ├── AgentWebSettingsImpl.java
│ │ ├── AgentWebUIControllerImplBase.java
│ │ ├── AgentWebUtils.java
│ │ ├── AgentWebView.java
│ │ ├── BaseIndicatorSpec.java
│ │ ├── BaseIndicatorView.java
│ │ ├── BaseJsAccessEntrace.java
│ │ ├── DefaultChromeClient.java
│ │ ├── DefaultDesignUIController.java
│ │ ├── DefaultDownloadImpl.java
│ │ ├── DefaultUIController.java
│ │ ├── DefaultWebClient.java
│ │ ├── DefaultWebCreator.java
│ │ ├── DefaultWebLifeCycleImpl.java
│ │ ├── EventHandlerImpl.java
│ │ ├── EventInterceptor.java
│ │ ├── HookManager.java
│ │ ├── HttpHeaders.java
│ │ ├── IAgentWebSettings.java
│ │ ├── IEventHandler.java
│ │ ├── IUrlLoader.java
│ │ ├── IVideo.java
│ │ ├── IWebIndicator.java
│ │ ├── IWebLayout.java
│ │ ├── IndicatorController.java
│ │ ├── IndicatorHandler.java
│ │ ├── JsAccessEntrace.java
│ │ ├── JsAccessEntraceImpl.java
│ │ ├── JsBaseInterfaceHolder.java
│ │ ├── JsCallJava.java
│ │ ├── JsCallback.java
│ │ ├── JsInterfaceHolder.java
│ │ ├── JsInterfaceHolderImpl.java
│ │ ├── JsInterfaceObjectException.java
│ │ ├── LayoutParamsOffer.java
│ │ ├── LogUtils.java
│ │ ├── LollipopFixedWebView.java
│ │ ├── MiddlewareWebChromeBase.java
│ │ ├── MiddlewareWebClientBase.java
│ │ ├── NestedScrollAgentWebView.java
│ │ ├── PermissionInterceptor.java
│ │ ├── ProcessUtils.java
│ │ ├── Provider.java
│ │ ├── QuickCallJs.java
│ │ ├── UrlCommonException.java
│ │ ├── UrlLoaderImpl.java
│ │ ├── VideoImpl.java
│ │ ├── WebChromeClient.java
│ │ ├── WebChromeClientDelegate.java
│ │ ├── WebCreator.java
│ │ ├── WebIndicator.java
│ │ ├── WebLifeCycle.java
│ │ ├── WebListenerManager.java
│ │ ├── WebParentLayout.java
│ │ ├── WebSecurityCheckLogic.java
│ │ ├── WebSecurityController.java
│ │ ├── WebSecurityControllerImpl.java
│ │ ├── WebSecurityLogicImpl.java
│ │ ├── WebViewClient.java
│ │ └── WebViewClientDelegate.java
│ └── res/
│ ├── layout/
│ │ └── agentweb_error_page.xml
│ ├── values/
│ │ ├── colors.xml
│ │ ├── ids.xml
│ │ ├── strings.xml
│ │ └── style.xml
│ └── values-zh/
│ └── strings.xml
├── app/
│ ├── .gitignore
│ ├── build.gradle
│ ├── libs/
│ │ └── okgo-3.0.4.jar
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── me/
│ │ └── wizos/
│ │ └── loread/
│ │ └── ApplicationTest.java
│ └── main/
│ ├── AndroidManifest.xml
│ ├── assets/
│ │ ├── css/
│ │ │ ├── android_studio.css
│ │ │ ├── article_theme_day.css
│ │ │ ├── article_theme_night.css
│ │ │ └── normalize.css
│ │ └── js/
│ │ ├── highlight.pack.js
│ │ ├── lazyload.js
│ │ └── media.js
│ ├── java/
│ │ └── me/
│ │ └── wizos/
│ │ └── loread/
│ │ ├── App.java
│ │ ├── Contract.java
│ │ ├── activity/
│ │ │ ├── ArticleActivity.java
│ │ │ ├── BaseActivity.java
│ │ │ ├── FeedActivity.java
│ │ │ ├── LabActivity.java
│ │ │ ├── MainActivity.java
│ │ │ ├── MusicActivity.java
│ │ │ ├── ProviderActivity.java
│ │ │ ├── RuleGenerateActivity.java
│ │ │ ├── SearchActivity.java
│ │ │ ├── SettingActivity.java
│ │ │ ├── SplashActivity.java
│ │ │ ├── TTSActivity.java
│ │ │ ├── WebActivity.java
│ │ │ └── login/
│ │ │ ├── LoginFormState.java
│ │ │ ├── LoginInoReaderActivity.java
│ │ │ ├── LoginResult.java
│ │ │ └── LoginTinyRSSActivity.java
│ │ ├── adapter/
│ │ │ ├── ArticlePagedListAdapter.java
│ │ │ ├── ArticleViewBinder.java
│ │ │ └── ExpandedAdapter.java
│ │ ├── bean/
│ │ │ ├── Enclosure.java
│ │ │ ├── LogLevel.java
│ │ │ ├── Token.java
│ │ │ ├── UserAgent.java
│ │ │ ├── domain/
│ │ │ │ ├── OutFeed.java
│ │ │ │ └── OutTag.java
│ │ │ ├── feedly/
│ │ │ │ ├── CategoryItem.java
│ │ │ │ ├── Collection.java
│ │ │ │ ├── ContentDirection.java
│ │ │ │ ├── Counts.java
│ │ │ │ ├── Entry.java
│ │ │ │ ├── FeedItem.java
│ │ │ │ ├── Origin.java
│ │ │ │ ├── Profile.java
│ │ │ │ ├── StreamContents.java
│ │ │ │ ├── StreamIds.java
│ │ │ │ ├── Subscription.java
│ │ │ │ ├── Unreadcount.java
│ │ │ │ ├── Visual.java
│ │ │ │ └── input/
│ │ │ │ ├── EditCollection.java
│ │ │ │ ├── EditFeed.java
│ │ │ │ └── MarkerAction.java
│ │ │ ├── fever/
│ │ │ │ ├── BaseResponse.java
│ │ │ │ ├── Feed.java
│ │ │ │ ├── Feeds.java
│ │ │ │ ├── Group.java
│ │ │ │ ├── GroupFeeds.java
│ │ │ │ ├── Groups.java
│ │ │ │ ├── Item.java
│ │ │ │ ├── Items.java
│ │ │ │ ├── SavedItemIds.java
│ │ │ │ └── UnreadItemIds.java
│ │ │ ├── inoreader/
│ │ │ │ ├── EditTag.java
│ │ │ │ ├── GsItemContents.java
│ │ │ │ ├── GsTag.java
│ │ │ │ ├── GsTags.java
│ │ │ │ ├── GsUnreadCount.java
│ │ │ │ ├── ItemIds.java
│ │ │ │ ├── ItemRefs.java
│ │ │ │ ├── LoginResult.java
│ │ │ │ ├── Readability.java
│ │ │ │ ├── StreamContents.java
│ │ │ │ ├── StreamPref.java
│ │ │ │ ├── StreamPrefs.java
│ │ │ │ ├── SubCategories.java
│ │ │ │ ├── Subscription.java
│ │ │ │ ├── Subscriptions.java
│ │ │ │ ├── UnreadCounts.java
│ │ │ │ ├── UserInfo.java
│ │ │ │ └── itemContents/
│ │ │ │ ├── Item.java
│ │ │ │ ├── Origin.java
│ │ │ │ ├── Self.java
│ │ │ │ └── Summary.java
│ │ │ ├── loread/
│ │ │ │ ├── LoginParam.java
│ │ │ │ ├── RequestJsonBody.java
│ │ │ │ └── Response.java
│ │ │ ├── proxynode/
│ │ │ │ ├── AnonymityLevel.java
│ │ │ │ ├── ProxyNode.java
│ │ │ │ └── ProxyType.java
│ │ │ ├── search/
│ │ │ │ ├── QuickAdd.java
│ │ │ │ ├── SearchFeedItem.java
│ │ │ │ ├── SearchFeeds.java
│ │ │ │ └── StreamFeed.java
│ │ │ └── ttrss/
│ │ │ ├── request/
│ │ │ │ ├── GetArticles.java
│ │ │ │ ├── GetCategories.java
│ │ │ │ ├── GetFeeds.java
│ │ │ │ ├── GetHeadlines.java
│ │ │ │ ├── GetSavedItemIds.java
│ │ │ │ ├── GetUnreadItemIds.java
│ │ │ │ ├── LoginParam.java
│ │ │ │ ├── RequestParam.java
│ │ │ │ ├── SearchHeadlines.java
│ │ │ │ ├── SearchMode.java
│ │ │ │ ├── SubscribeToFeed.java
│ │ │ │ ├── UnsubscribeFeed.java
│ │ │ │ └── UpdateArticle.java
│ │ │ └── result/
│ │ │ ├── ArticleItem.java
│ │ │ ├── Attachment.java
│ │ │ ├── CategoryItem.java
│ │ │ ├── FeedItem.java
│ │ │ ├── SubscribeToFeedResult.java
│ │ │ ├── TTRSSLoginResult.java
│ │ │ ├── TinyResponse.java
│ │ │ └── UpdateArticleResult.java
│ │ ├── behavior/
│ │ │ ├── BottomNavigationBehavior.java
│ │ │ └── BottomNavigationViewBehavior.java
│ │ ├── bridge/
│ │ │ ├── ArticleBridge.java
│ │ │ └── WebBridge.java
│ │ ├── config/
│ │ │ ├── AdBlock.java
│ │ │ ├── ArticleActionConfig.java
│ │ │ ├── ArticleExtractConfig.java
│ │ │ ├── ArticleTags.java
│ │ │ ├── HostConfig.java
│ │ │ ├── LinkRewriteConfig.java
│ │ │ ├── NetworkRefererConfig.java
│ │ │ ├── NetworkUserAgentConfig.java
│ │ │ ├── SaveDirectory.java
│ │ │ ├── TestConfig.java
│ │ │ ├── Unsubscribe.java
│ │ │ ├── article_action_rule/
│ │ │ │ ├── ArticleActionRule.java
│ │ │ │ └── Condition.java
│ │ │ └── article_extract_rule/
│ │ │ ├── ArticleExtractRule.java
│ │ │ └── Selector.java
│ │ ├── db/
│ │ │ ├── Article.java
│ │ │ ├── ArticleDao.java
│ │ │ ├── ArticleTag.java
│ │ │ ├── ArticleTagDao.java
│ │ │ ├── Category.java
│ │ │ ├── CategoryDao.java
│ │ │ ├── CategoryView.java
│ │ │ ├── Collection.java
│ │ │ ├── CoreDB.java
│ │ │ ├── CorePref.java
│ │ │ ├── Entry.java
│ │ │ ├── Feed.java
│ │ │ ├── FeedCategory.java
│ │ │ ├── FeedCategoryDao.java
│ │ │ ├── FeedDao.java
│ │ │ ├── FeedView.java
│ │ │ ├── Tag.java
│ │ │ ├── TagDao.java
│ │ │ ├── User.java
│ │ │ └── UserDao.java
│ │ ├── extractor/
│ │ │ ├── Extractor.java
│ │ │ ├── ExtractorUtil.java
│ │ │ └── ModPage.java
│ │ ├── gson/
│ │ │ ├── GsonEnum.java
│ │ │ ├── GsonEnumTypeAdapter.java
│ │ │ └── GsonUtil.java
│ │ ├── network/
│ │ │ ├── HttpClientManager.java
│ │ │ ├── StringConverterFactory.java
│ │ │ ├── SyncWorker.java
│ │ │ ├── api/
│ │ │ │ ├── AuthApi.java
│ │ │ │ ├── BaseApi.java
│ │ │ │ ├── FeedlyApi.java
│ │ │ │ ├── FeedlyService.java
│ │ │ │ ├── FeverApi.java
│ │ │ │ ├── FeverService.java
│ │ │ │ ├── InoReaderApi.java
│ │ │ │ ├── InoReaderService.java
│ │ │ │ ├── LoginInterface.java
│ │ │ │ ├── LoreadApi.java
│ │ │ │ ├── LoreadService.java
│ │ │ │ ├── OAuthApi.java
│ │ │ │ ├── TinyRSSApi.java
│ │ │ │ └── TinyRSSService.java
│ │ │ ├── callback/
│ │ │ │ └── CallbackX.java
│ │ │ ├── glide/
│ │ │ │ └── OkHttpAppGlideModule.java
│ │ │ └── interceptor/
│ │ │ ├── InoreaderHeaderInterceptor.java
│ │ │ ├── LoggerInterceptor.java
│ │ │ ├── LoreadTokenInterceptor.java
│ │ │ ├── RedirectInterceptor.java
│ │ │ ├── RefererInterceptor.java
│ │ │ ├── RelyInterceptor.java
│ │ │ ├── TTRSSTokenInterceptor.java
│ │ │ ├── TokenAuthenticator.java
│ │ │ └── TokenInterceptor.java
│ │ ├── service/
│ │ │ ├── AudioService.java
│ │ │ ├── MainService.java
│ │ │ ├── MusicService.java
│ │ │ └── NetworkStateReceiver.java
│ │ ├── utils/
│ │ │ ├── ArticleUtil.java
│ │ │ ├── ColorModifier.java
│ │ │ ├── DataUtil.java
│ │ │ ├── EncryptUtil.java
│ │ │ ├── FileUtil.java
│ │ │ ├── ImageUtil.java
│ │ │ ├── ImgFileType.java
│ │ │ ├── NetworkUtil.java
│ │ │ ├── RGB.java
│ │ │ ├── ScreenUtil.java
│ │ │ ├── ScriptUtil.java
│ │ │ ├── SnackbarUtil.java
│ │ │ ├── StringJoiner.java
│ │ │ ├── StringUtils.java
│ │ │ ├── SymbolUtil.java
│ │ │ ├── TimeUtil.java
│ │ │ ├── Tool.java
│ │ │ ├── UriUtil.java
│ │ │ └── VideoInjectUtil.java
│ │ ├── view/
│ │ │ ├── ExpandableListViewS.java
│ │ │ ├── FriendlyCardView.java
│ │ │ ├── IconFontView.java
│ │ │ ├── SwipeRefreshLayoutS.java
│ │ │ ├── WebViewS.java
│ │ │ ├── colorful/
│ │ │ │ ├── Colorful.java
│ │ │ │ ├── StatusBarUtil.java
│ │ │ │ ├── StatusBarView.java
│ │ │ │ └── setter/
│ │ │ │ ├── TextColorSetter.java
│ │ │ │ ├── ViewBackgroundColorSetter.java
│ │ │ │ ├── ViewBackgroundDrawableSetter.java
│ │ │ │ ├── ViewGroupSetter.java
│ │ │ │ └── ViewSetter.java
│ │ │ ├── fastscroll/
│ │ │ │ ├── FastScrollDelegate.java
│ │ │ │ ├── FastScrollListView.java
│ │ │ │ ├── FastScrollRecyclerView.java
│ │ │ │ └── ListViewS.java
│ │ │ ├── slideback/
│ │ │ │ ├── SlideBack.java
│ │ │ │ ├── SlideBackManager.java
│ │ │ │ ├── SlideLayout.java
│ │ │ │ ├── callback/
│ │ │ │ │ ├── SlideBackCallBack.java
│ │ │ │ │ └── SlideCallBack.java
│ │ │ │ └── widget/
│ │ │ │ ├── SlideBackIconView.java
│ │ │ │ └── SlideBackInterceptLayout.java
│ │ │ └── webview/
│ │ │ ├── DownloadListenerS.java
│ │ │ ├── FastScrollWebView.java
│ │ │ ├── LongClickPopWindow.java
│ │ │ ├── NestedScrollWebView.java
│ │ │ ├── SlowlyProgressBar.java
│ │ │ └── VideoImpl.java
│ │ └── viewmodel/
│ │ ├── ArticleViewModel.java
│ │ ├── InoReaderUserViewModel.java
│ │ └── TinyRSSUserViewModel.java
│ └── res/
│ ├── anim/
│ │ ├── fade_in.xml
│ │ ├── fade_out.xml
│ │ ├── in_from_bottom.xml
│ │ └── out_from_bottom.xml
│ ├── drawable/
│ │ ├── corners_bg_checked.xml
│ │ ├── corners_bg_uncheck.xml
│ │ ├── custom_progress_bar_thumb.xml
│ │ ├── custom_thumb_src.xml
│ │ ├── flyme_style_switch_button_rectangle.xml
│ │ ├── flyme_style_switch_button_round.xml
│ │ ├── ic_arrow_auto_mark_readed.xml
│ │ ├── ic_arrow_right.xml
│ │ ├── ic_browser.xml
│ │ ├── ic_close.xml
│ │ ├── ic_copy_link.xml
│ │ ├── ic_eye.xml
│ │ ├── ic_favor.xml
│ │ ├── ic_favor_fill.xml
│ │ ├── ic_mark_down.xml
│ │ ├── ic_mark_unread.xml
│ │ ├── ic_mark_up.xml
│ │ ├── ic_music.xml
│ │ ├── ic_panorama.xml
│ │ ├── ic_read.xml
│ │ ├── ic_refresh.xml
│ │ ├── ic_rename.xml
│ │ ├── ic_share.xml
│ │ ├── ic_state_all.xml
│ │ ├── ic_state_star.xml
│ │ ├── ic_state_unread.xml
│ │ ├── ic_state_unstar.xml
│ │ ├── ic_stop_loading.xml
│ │ ├── ic_unsubscribe.xml
│ │ ├── ic_user_agent.xml
│ │ ├── ic_volume.xml
│ │ ├── logo_feedly.xml
│ │ ├── logo_inoreader.xml
│ │ ├── progress_bg.xml
│ │ ├── seekbar_audio.xml
│ │ ├── selector_corners_bg.xml
│ │ ├── selector_star.xml
│ │ ├── splash_layers.xml
│ │ ├── textview_border_day.xml
│ │ └── textview_border_night.xml
│ ├── drawable-v23/
│ │ ├── logo_feedly_icon.xml
│ │ ├── logo_inoreader_icon.xml
│ │ └── logo_ttrss_icon.xml
│ ├── layout/
│ │ ├── activity_article.xml
│ │ ├── activity_feed.xml
│ │ ├── activity_lab.xml
│ │ ├── activity_login_inoreader.xml
│ │ ├── activity_login_tiny_rss.xml
│ │ ├── activity_main.xml
│ │ ├── activity_main_list_item.xml
│ │ ├── activity_music.xml
│ │ ├── activity_provider.xml
│ │ ├── activity_provider_low_version.xml
│ │ ├── activity_rule_generate.xml
│ │ ├── activity_search.xml
│ │ ├── activity_search_list_header_result_count.xml
│ │ ├── activity_search_list_header_word.xml
│ │ ├── activity_search_list_item_feed.xml
│ │ ├── activity_setting.xml
│ │ ├── activity_tts.xml
│ │ ├── activity_web.xml
│ │ ├── bottom_sheet_category.xml
│ │ ├── config_download_view.xml
│ │ ├── main_bottom_sheet_more.xml
│ │ ├── main_item_header.xml
│ │ ├── md_simplelist_item.xml
│ │ ├── setting_item_arrow.xml
│ │ ├── setting_item_session.xml
│ │ ├── setting_item_switch.xml
│ │ ├── tag_expandable_item_child.xml
│ │ ├── tag_expandable_item_group.xml
│ │ └── webview_long_clicked_popwindow.xml
│ ├── menu/
│ │ ├── menu_article.xml
│ │ └── menu_web.xml
│ ├── values/
│ │ ├── arrays.xml
│ │ ├── attr.xml
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ ├── values-zh-rCN/
│ │ └── strings.xml
│ └── xml/
│ ├── account_authenticator.xml
│ ├── account_preferences.xml
│ ├── account_sync_adapter.xml
│ └── network_security_config.xml
├── build.gradle
├── config.json
├── floatwindow/
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ ├── java/
│ │ └── com/
│ │ └── yhao/
│ │ └── floatwindow/
│ │ ├── adaptation/
│ │ │ ├── Miui.java
│ │ │ └── Rom.java
│ │ ├── base/
│ │ │ └── FloatLifecycle.java
│ │ ├── constant/
│ │ │ ├── MoveType.java
│ │ │ └── Screen.java
│ │ ├── interfaces/
│ │ │ ├── FloatView.java
│ │ │ ├── IFloatWindow.java
│ │ │ ├── LifecycleListener.java
│ │ │ ├── PermissionListener.java
│ │ │ ├── ResumedListener.java
│ │ │ └── ViewStateListener.java
│ │ ├── permission/
│ │ │ └── FloatActivity.java
│ │ ├── util/
│ │ │ ├── ActivityCounter.java
│ │ │ ├── DensityUtil.java
│ │ │ ├── LogUtil.java
│ │ │ └── PermissionUtil.java
│ │ └── view/
│ │ ├── FloatPhone.java
│ │ ├── FloatToast.java
│ │ ├── FloatWindow.java
│ │ └── IFloatWindowImpl.java
│ └── res/
│ └── values/
│ └── style.xml
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── luban/
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src/
│ ├── androidTest/
│ │ └── java/
│ │ └── top/
│ │ └── zibin/
│ │ └── luban/
│ │ └── ApplicationTest.java
│ └── main/
│ ├── AndroidManifest.xml
│ ├── java/
│ │ └── top/
│ │ └── zibin/
│ │ └── luban/
│ │ ├── Checker.java
│ │ ├── CompressionPredicate.java
│ │ ├── Engine.java
│ │ ├── FileProvider.java
│ │ ├── InputStreamProvider.java
│ │ ├── Luban.java
│ │ ├── OnCompressListener.java
│ │ └── OnRenameListener.java
│ └── res/
│ └── values/
│ └── strings.xml
├── privacy_and_security.md
├── settings.gradle
├── support/
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.txt
│ └── src/
│ └── main/
│ ├── AndroidManifest.xml
│ ├── java/
│ │ └── com/
│ │ └── yanzhenjie/
│ │ └── recyclerview/
│ │ ├── AdapterWrapper.java
│ │ ├── Controller.java
│ │ ├── ExpandableAdapter.java
│ │ ├── Horizontal.java
│ │ ├── LeftHorizontal.java
│ │ ├── OnItemClickListener.java
│ │ ├── OnItemLongClickListener.java
│ │ ├── OnItemMenuClickListener.java
│ │ ├── OnItemSwipeListener.java
│ │ ├── RightHorizontal.java
│ │ ├── StickyCreator.java
│ │ ├── StickyHeaderLayout.java
│ │ ├── StickyViewHolder.java
│ │ ├── SwipeDragLayout.java
│ │ ├── SwipeMenu.java
│ │ ├── SwipeMenuBridge.java
│ │ ├── SwipeMenuCreator.java
│ │ ├── SwipeMenuItem.java
│ │ ├── SwipeMenuLayout.java
│ │ ├── SwipeMenuView.java
│ │ ├── SwipeRecyclerView.java
│ │ ├── listview/
│ │ │ ├── FastScrollDelegate.java
│ │ │ └── FastScrollRecyclerView.java
│ │ ├── touch/
│ │ │ ├── DefaultItemTouchHelper.java
│ │ │ ├── ItemTouchHelperCallback.java
│ │ │ ├── OnItemMoveListener.java
│ │ │ ├── OnItemMovementListener.java
│ │ │ └── OnItemStateChangedListener.java
│ │ └── widget/
│ │ ├── BorderItemDecoration.java
│ │ ├── ColorDrawer.java
│ │ ├── DefaultItemDecoration.java
│ │ ├── DefaultLoadMoreView.java
│ │ ├── Drawer.java
│ │ └── StickyNestedScrollView.java
│ └── res/
│ ├── layout/
│ │ ├── support_recycler_view_item.xml
│ │ ├── support_recycler_view_item2.xml
│ │ └── support_recycler_view_load_more.xml
│ ├── values/
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ └── strings.xml
│ ├── values-zh/
│ │ └── strings.xml
│ ├── values-zh-rHK/
│ │ └── strings.xml
│ └── values-zh-rTW/
│ └── strings.xml
└── swipelayout/
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src/
└── main/
├── AndroidManifest.xml
├── java/
│ └── com/
│ └── ditclear/
│ └── swipelayout/
│ └── SwipeDragLayout.java
└── res/
└── values/
├── attrs.xml
└── strings.xml
Showing preview only (320K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3849 symbols across 346 files)
FILE: agentweb-core/src/main/java/com/just/agentweb/AbsAgentWebSettings.java
class AbsAgentWebSettings (line 35) | public abstract class AbsAgentWebSettings implements IAgentWebSettings, ...
method getInstance (line 43) | public static AbsAgentWebSettings getInstance() {
method AbsAgentWebSettings (line 47) | public AbsAgentWebSettings() {
method bindAgentWeb (line 50) | final void bindAgentWeb(AgentWeb agentWeb) {
method bindAgentWebSupport (line 55) | protected abstract void bindAgentWebSupport(AgentWeb agentWeb);
method toSetting (line 57) | @Override
method settings (line 63) | private void settings(WebView webView) {
method getWebSettings (line 140) | @Override
method setWebChromeClient (line 145) | @Override
method setWebViewClient (line 151) | @Override
method setDownloader (line 157) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/AbsAgentWebUIController.java
class AbsAgentWebUIController (line 33) | public abstract class AbsAgentWebUIController {
method create (line 52) | protected AbsAgentWebUIController create() {
method getDelegate (line 56) | protected AbsAgentWebUIController getDelegate() {
method bindWebParent (line 64) | final synchronized void bindWebParent(WebParentLayout webParentLayout,...
method toDismissDialog (line 73) | protected void toDismissDialog(Dialog dialog) {
method toShowDialog (line 79) | protected void toShowDialog(Dialog dialog) {
method bindSupportWebParent (line 85) | protected abstract void bindSupportWebParent(WebParentLayout webParent...
method onJsAlert (line 94) | public abstract void onJsAlert(WebView view, String url, String message);
method onOpenPagePrompt (line 103) | public abstract void onOpenPagePrompt(WebView view, String url, Handle...
method onJsConfirm (line 113) | public abstract void onJsConfirm(WebView view, String url, String mess...
method onSelectItemsPrompt (line 115) | public abstract void onSelectItemsPrompt(WebView view, String url, Str...
method onForceDownloadAlert (line 123) | public abstract void onForceDownloadAlert(String url, Handler.Callback...
method onJsPrompt (line 134) | public abstract void onJsPrompt(WebView view, String url, String messa...
method onMainFrameError (line 144) | public abstract void onMainFrameError(WebView view, int errorCode, Str...
method onShowMainFrame (line 149) | public abstract void onShowMainFrame();
method onLoading (line 156) | public abstract void onLoading(String msg);
method onCancelLoading (line 161) | public abstract void onCancelLoading();
method onShowMessage (line 167) | public abstract void onShowMessage(String message, String intent);
method onPermissionsDeny (line 176) | public abstract void onPermissionsDeny(String[] permissions, String pe...
FILE: agentweb-core/src/main/java/com/just/agentweb/Action.java
class Action (line 31) | public class Action implements Parcelable {
method Action (line 41) | public Action() {
method getPermissions (line 44) | public ArrayList<String> getPermissions() {
method setPermissions (line 48) | public void setPermissions(ArrayList<String> permissions) {
method setPermissions (line 52) | public void setPermissions(String[] permissions) {
method getAction (line 56) | public int getAction() {
method setAction (line 60) | public void setAction(int action) {
method Action (line 64) | protected Action(Parcel in) {
method writeToParcel (line 70) | @Override
method describeContents (line 77) | @Override
method createFromParcel (line 83) | @Override
method newArray (line 88) | @Override
method getFromIntention (line 94) | public int getFromIntention() {
method createPermissionsAction (line 98) | public static Action createPermissionsAction(String[] permissions) {
method setFromIntention (line 106) | public Action setFromIntention(int fromIntention) {
FILE: agentweb-core/src/main/java/com/just/agentweb/ActionActivity.java
class ActionActivity (line 39) | public final class ActionActivity extends Activity {
method start (line 52) | public static void start(Activity activity, Action action) {
method setChooserListener (line 60) | public static void setChooserListener(ChooserListener chooserListener) {
method setPermissionListener (line 64) | public static void setPermissionListener(PermissionListener permission...
method cancelAction (line 68) | private void cancelAction() {
method onCreate (line 74) | @Override
method fetchFile (line 99) | private void fetchFile(Action action) {
method realOpenFileChooser (line 106) | private void realOpenFileChooser() {
method chooserActionCallback (line 127) | private void chooserActionCallback(int resultCode, Intent data) {
method onActivityResult (line 135) | @Override
method permission (line 142) | private void permission(Action action) {
method realOpenCamera (line 170) | private void realOpenCamera() {
method realOpenVideo (line 197) | private void realOpenVideo(){
method onRequestPermissionsResult (line 225) | @Override
type RationaleListener (line 236) | public interface RationaleListener {
method onRationaleResult (line 237) | void onRationaleResult(boolean showRationale, Bundle extras);
type PermissionListener (line 240) | public interface PermissionListener {
method onRequestPermissionsResult (line 241) | void onRequestPermissionsResult(@NonNull String[] permissions, @NonN...
type ChooserListener (line 244) | public interface ChooserListener {
method onChoiceResult (line 245) | void onChoiceResult(int requestCode, int resultCode, Intent data);
method onDestroy (line 248) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWeb.java
class AgentWeb (line 44) | public final class AgentWeb {
method AgentWeb (line 176) | private AgentWeb(AgentBuilder agentBuilder) {
method getPermissionInterceptor (line 219) | public PermissionInterceptor getPermissionInterceptor() {
method getWebLifeCycle (line 223) | public WebLifeCycle getWebLifeCycle() {
method getJsAccessEntrace (line 227) | public JsAccessEntrace getJsAccessEntrace() {
method clearWebCache (line 236) | public AgentWeb clearWebCache() {
method with (line 246) | public static AgentBuilder with(@NonNull Activity activity) {
method with (line 253) | public static AgentBuilder with(@NonNull Fragment fragment) {
method handleKeyEvent (line 261) | public boolean handleKeyEvent(int keyCode, KeyEvent keyEvent) {
method back (line 268) | public boolean back() {
method getWebCreator (line 276) | public WebCreator getWebCreator() {
method getIEventHandler (line 280) | public IEventHandler getIEventHandler() {
method getAgentWebSettings (line 285) | public IAgentWebSettings getAgentWebSettings() {
method getIndicatorController (line 289) | public IndicatorController getIndicatorController() {
method getJsInterfaceHolder (line 293) | public JsInterfaceHolder getJsInterfaceHolder() {
method getUrlLoader (line 297) | public IUrlLoader getUrlLoader() {
method destroy (line 301) | public void destroy() {
class PreAgentWeb (line 305) | public static class PreAgentWeb {
method PreAgentWeb (line 309) | PreAgentWeb(AgentWeb agentWeb) {
method ready (line 313) | public PreAgentWeb ready() {
method get (line 321) | public AgentWeb get() {
method go (line 326) | public AgentWeb go(@Nullable String url) {
method doSafeCheck (line 334) | private void doSafeCheck() {
method doCompat (line 342) | private void doCompat() {
method configWebCreator (line 346) | private WebCreator configWebCreator(BaseIndicatorView progressView, in...
method go (line 356) | private AgentWeb go(String url) {
method getInterceptor (line 365) | private EventInterceptor getInterceptor() {
method init (line 375) | private void init() {
method getIVideo (line 380) | private IVideo getIVideo() {
method getWebViewClient (line 384) | private WebViewClient getWebViewClient() {
method ready (line 417) | private AgentWeb ready() {
method getChromeClient (line 445) | private WebChromeClient getChromeClient() {
type SecurityType (line 479) | public enum SecurityType {
class AgentBuilder (line 483) | public static final class AgentBuilder {
method AgentBuilder (line 520) | public AgentBuilder(@NonNull Activity activity, @NonNull Fragment fr...
method AgentBuilder (line 526) | public AgentBuilder(@NonNull Activity activity) {
method setAgentWebParent (line 532) | public IndicatorBuilder setAgentWebParent(@NonNull ViewGroup v, @Non...
method setAgentWebParent (line 538) | public IndicatorBuilder setAgentWebParent(@NonNull ViewGroup v, int ...
method buildAgentWeb (line 545) | private PreAgentWeb buildAgentWeb() {
method addJavaObject (line 552) | private void addJavaObject(String key, Object o) {
method addHeader (line 559) | private void addHeader(String baseUrl, String k, String v) {
method addHeader (line 566) | private void addHeader(String baseUrl, Map<String, String> headers) {
class IndicatorBuilder (line 574) | public static class IndicatorBuilder {
method IndicatorBuilder (line 577) | public IndicatorBuilder(AgentBuilder agentBuilder) {
method useDefaultIndicator (line 581) | public CommonBuilder useDefaultIndicator(int color) {
method useDefaultIndicator (line 587) | public CommonBuilder useDefaultIndicator() {
method closeIndicator (line 592) | public CommonBuilder closeIndicator() {
method setCustomIndicator (line 599) | public CommonBuilder setCustomIndicator(@NonNull BaseIndicatorView v) {
method useDefaultIndicator (line 611) | public CommonBuilder useDefaultIndicator(@ColorInt int color, int he...
class CommonBuilder (line 618) | public static class CommonBuilder {
method CommonBuilder (line 621) | public CommonBuilder(AgentBuilder agentBuilder) {
method setEventHanadler (line 625) | public CommonBuilder setEventHanadler(@Nullable IEventHandler iEvent...
method closeWebViewClientHelper (line 630) | public CommonBuilder closeWebViewClientHelper() {
method setWebChromeClient (line 635) | public CommonBuilder setWebChromeClient(@Nullable com.just.agentweb....
method setWebViewClient (line 640) | public CommonBuilder setWebViewClient(@Nullable com.just.agentweb.We...
method useMiddlewareWebClient (line 645) | public CommonBuilder useMiddlewareWebClient(@NonNull MiddlewareWebCl...
method useMiddlewareWebChrome (line 658) | public CommonBuilder useMiddlewareWebChrome(@NonNull MiddlewareWebCh...
method setMainFrameErrorView (line 671) | public CommonBuilder setMainFrameErrorView(@NonNull View view) {
method setMainFrameErrorView (line 676) | public CommonBuilder setMainFrameErrorView(@LayoutRes int errorLayou...
method setAgentWebWebSettings (line 682) | public CommonBuilder setAgentWebWebSettings(@Nullable IAgentWebSetti...
method createAgentWeb (line 687) | public PreAgentWeb createAgentWeb() {
method addJavascriptInterface (line 692) | public CommonBuilder addJavascriptInterface(@NonNull String name, @N...
method setSecurityType (line 697) | public CommonBuilder setSecurityType(@NonNull SecurityType type) {
method setWebView (line 702) | public CommonBuilder setWebView(@Nullable WebView webView) {
method setWebLayout (line 707) | public CommonBuilder setWebLayout(@Nullable IWebLayout iWebLayout) {
method additionalHttpHeader (line 712) | public CommonBuilder additionalHttpHeader(String baseUrl, String k, ...
method additionalHttpHeader (line 717) | public CommonBuilder additionalHttpHeader(String baseUrl, Map<String...
method setPermissionInterceptor (line 722) | public CommonBuilder setPermissionInterceptor(@Nullable PermissionIn...
method setAgentWebUIController (line 727) | public CommonBuilder setAgentWebUIController(@Nullable AgentWebUICon...
method setOpenOtherPageWays (line 732) | public CommonBuilder setOpenOtherPageWays(@Nullable DefaultWebClient...
method interceptUnkownUrl (line 737) | public CommonBuilder interceptUnkownUrl() {
class PermissionInterceptorWrapper (line 743) | private static final class PermissionInterceptorWrapper implements Per...
method PermissionInterceptorWrapper (line 747) | private PermissionInterceptorWrapper(PermissionInterceptor permissio...
method intercept (line 751) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebConfig.java
class AgentWebConfig (line 37) | public class AgentWebConfig {
method getCookiesByUrl (line 78) | public static String getCookiesByUrl(String url) {
method debug (line 82) | public static void debug() {
method removeExpiredCookies (line 91) | public static void removeExpiredCookies() {
method removeAllCookies (line 101) | public static void removeAllCookies() {
method removeSessionCookies (line 106) | public static void removeSessionCookies() {
method syncCookie (line 115) | public static void syncCookie(String url, String cookies) {
method removeSessionCookies (line 123) | public static void removeSessionCookies(ValueCallback<Boolean> callbac...
method getCachePath (line 144) | public static String getCachePath(Context context) {
method getExternalCachePath (line 151) | public static String getExternalCachePath(Context context) {
method removeAllCookies (line 157) | public static void removeAllCookies(@Nullable ValueCallback<Boolean> c...
method clearDiskCache (line 176) | public static synchronized void clearDiskCache(Context context) {
method initCookiesManager (line 192) | static synchronized void initCookiesManager(Context context) {
method createCookiesSyncInstance (line 199) | private static void createCookiesSyncInstance(Context context) {
method toSyncCookies (line 205) | private static void toSyncCookies() {
method getDatabasesCachePath (line 218) | static String getDatabasesCachePath(Context context) {
method getDefaultIgnoreCallback (line 222) | private static ValueCallback<Boolean> getDefaultIgnoreCallback() {
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebFileProvider.java
class AgentWebFileProvider (line 29) | public class AgentWebFileProvider extends FileProvider {
method attachInfo (line 31) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebJsInterfaceCompat.java
class AgentWebJsInterfaceCompat (line 30) | public class AgentWebJsInterfaceCompat {
method AgentWebJsInterfaceCompat (line 36) | AgentWebJsInterfaceCompat(AgentWeb agentWeb, Activity activity) {
method uploadFile (line 41) | @JavascriptInterface
method uploadFile (line 46) | @JavascriptInterface
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebPermissions.java
class AgentWebPermissions (line 26) | public class AgentWebPermissions {
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebSettingsImpl.java
class AgentWebSettingsImpl (line 30) | public class AgentWebSettingsImpl extends AbsAgentWebSettings {
method bindAgentWebSupport (line 33) | @Override
method setDownloader (line 38) | @Override
method getActivityByContext (line 52) | private Activity getActivityByContext(Context context) {
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebUIControllerImplBase.java
class AgentWebUIControllerImplBase (line 31) | public class AgentWebUIControllerImplBase extends AbsAgentWebUIController {
method build (line 33) | public static AbsAgentWebUIController build() {
method onJsAlert (line 37) | @Override
method onOpenPagePrompt (line 42) | @Override
method onJsConfirm (line 47) | @Override
method onSelectItemsPrompt (line 52) | @Override
method onForceDownloadAlert (line 57) | @Override
method onJsPrompt (line 62) | @Override
method onMainFrameError (line 67) | @Override
method onShowMainFrame (line 72) | @Override
method onLoading (line 77) | @Override
method onCancelLoading (line 82) | @Override
method onShowMessage (line 88) | @Override
method onPermissionsDeny (line 93) | @Override
method bindSupportWebParent (line 98) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebUtils.java
class AgentWebUtils (line 93) | public class AgentWebUtils {
method AgentWebUtils (line 98) | private AgentWebUtils() {
method dp2px (line 102) | public static int dp2px(Context context, float dipValue) {
method clearWebView (line 107) | static final void clearWebView(WebView m) {
method getAgentWebFilePath (line 132) | public static String getAgentWebFilePath(Context context) {
method createFileByName (line 150) | public static File createFileByName(Context context, String name, bool...
method checkNetworkType (line 167) | public static int checkNetworkType(Context context) {
method getAvailableStorage (line 205) | public static long getAvailableStorage() {
method getUriFromFile (line 219) | static Uri getUriFromFile(Context context, File file) {
method getUriFromFileForN (line 229) | static Uri getUriFromFileForN(Context context, File file) {
method setIntentDataAndType (line 235) | static void setIntentDataAndType(Context context,
method setIntentData (line 252) | static void setIntentData(Context context,
method getDiskExternalCacheDir (line 267) | static String getDiskExternalCacheDir(Context context) {
method grantPermissions (line 275) | static void grantPermissions(Context context, Intent intent, Uri uri, ...
method getMIMEType (line 290) | private static String getMIMEType(File f) {
method show (line 323) | static void show(View parent,
method dismiss (line 345) | static void dismiss() {
method checkWifi (line 352) | public static boolean checkWifi(Context context) {
method checkNetwork (line 361) | public static boolean checkNetwork(Context context) {
method isOverriedMethod (line 370) | static boolean isOverriedMethod(Object currentObject, String methodNam...
method isExistMethod (line 391) | static Method isExistMethod(Object o, String methodName, Class... claz...
method clearAgentWebCache (line 410) | static void clearAgentWebCache(Context context) {
method clearWebViewAllCache (line 420) | static void clearWebViewAllCache(Context context, WebView webView) {
method clearWebViewAllCache (line 441) | static void clearWebViewAllCache(Context context) {
method clearCacheFolder (line 451) | static int clearCacheFolder(final File dir, final int numDays) {
method clearCache (line 482) | static void clearCache(final Context context, final int numDays) {
method uriToPath (line 488) | public static String[] uriToPath(Activity activity, Uri[] uris) {
method getRealPathBelowVersion (line 509) | private static String getRealPathBelowVersion(Context context, Uri uri) {
method createImageFile (line 527) | static File createImageFile(Context context) {
method createVideoFile (line 540) | static File createVideoFile(Context context){
method closeIO (line 554) | public static void closeIO(Closeable closeable) {
method getFileAbsolutePath (line 564) | @TargetApi(19)
method getDataColumn (line 619) | static String getDataColumn(Context context, Uri uri, String selection...
method isExternalStorageDocument (line 640) | static boolean isExternalStorageDocument(Uri uri) {
method isDownloadsDocument (line 648) | static boolean isDownloadsDocument(Uri uri) {
method isMediaDocument (line 656) | static boolean isMediaDocument(Uri uri) {
method isGooglePhotosUri (line 664) | static boolean isGooglePhotosUri(Uri uri) {
method getInstallApkIntentCompat (line 668) | static Intent getInstallApkIntentCompat(Context context, File file) {
method getCommonFileIntentCompat (line 674) | public static Intent getCommonFileIntentCompat(Context context, File f...
method getIntentCaptureCompat (line 680) | static Intent getIntentCaptureCompat(Context context, File file) {
method getIntentVideoCompat (line 688) | static Intent getIntentVideoCompat(Context context, File file){
method isJson (line 697) | static boolean isJson(String target) {
method isUIThread (line 716) | public static boolean isUIThread() {
method isEmptyCollection (line 720) | static boolean isEmptyCollection(Collection collection) {
method isEmptyMap (line 724) | static boolean isEmptyMap(Map map) {
method toastShowShort (line 729) | static void toastShowShort(Context context, String msg) {
method getUIControllerAndShowMessage (line 738) | @Deprecated
method hasPermission (line 750) | public static boolean hasPermission(@NonNull Context context, @NonNull...
method hasPermission (line 754) | public static boolean hasPermission(@NonNull Context context, @NonNull...
method getDeniedPermissions (line 775) | public static List<String> getDeniedPermissions(Activity activity, Str...
method getAgentWebUIControllerByWebView (line 789) | public static AbsAgentWebUIController getAgentWebUIControllerByWebView...
method getApplicationName (line 795) | public static String getApplicationName(Context context) {
method getWebParentLayoutByWebView (line 809) | static WebParentLayout getWebParentLayoutByWebView(WebView webView) {
method runInUiThread (line 835) | public static void runInUiThread(Runnable runnable) {
method showFileChooserCompat (line 842) | static boolean showFileChooserCompat(Activity activity,
method md5 (line 911) | public static String md5(String str) {
FILE: agentweb-core/src/main/java/com/just/agentweb/AgentWebView.java
class AgentWebView (line 51) | public class AgentWebView extends LollipopFixedWebView {
method AgentWebView (line 59) | public AgentWebView(Context context) {
method AgentWebView (line 63) | public AgentWebView(Context context, AttributeSet attrs) {
method addJavascriptInterface (line 78) | @Override
method addJavascriptInterfaceSupport (line 102) | protected void addJavascriptInterfaceSupport(Object interfaceObj, Stri...
method setWebChromeClient (line 105) | @Override
method setWebChromeClientSupport (line 114) | protected final void setWebChromeClientSupport(WebChromeClient client) {
method setWebViewClient (line 117) | @Override
method setWebViewClientSupport (line 125) | public final void setWebViewClientSupport(WebViewClient client) {
method destroy (line 128) | @Override
method clearHistory (line 147) | @Override
method isWebViewPackageException (line 154) | public static Pair<Boolean, String> isWebViewPackageException(Throwabl...
method setOverScrollMode (line 167) | @Override
method isPrivateBrowsingEnabled (line 182) | @Override
method addInjectJavaScript (line 199) | public void addInjectJavaScript(String javaScript) {
method injectJavaScript (line 207) | private void injectJavaScript() {
method injectExtraJavaScript (line 213) | private void injectExtraJavaScript() {
method buildNotRepeatInjectJS (line 226) | public String buildNotRepeatInjectJS(String key, String js) {
method buildTryCatchInjectJS (line 247) | public String buildTryCatchInjectJS(String js) {
class AgentWebClient (line 256) | public static class AgentWebClient extends MiddlewareWebClientBase {
method AgentWebClient (line 260) | private AgentWebClient(AgentWebView agentWebView) {
method onPageStarted (line 265) | @Override
method onPageFinished (line 281) | @Override
class AgentWebChrome (line 293) | public static class AgentWebChrome extends MiddlewareWebChromeBase {
method AgentWebChrome (line 297) | private AgentWebChrome(AgentWebView agentWebView) {
method onReceivedTitle (line 301) | @Override
method onProgressChanged (line 307) | @Override
method onJsPrompt (line 322) | @Override
class FixedOnReceivedTitle (line 344) | private static class FixedOnReceivedTitle {
method setWebChromeClient (line 348) | public void setWebChromeClient(WebChromeClient webChromeClient) {
method onPageStarted (line 352) | public void onPageStarted() {
method onPageFinished (line 356) | public void onPageFinished(WebView view) {
method onReceivedTitle (line 375) | public void onReceivedTitle() {
method fixedStillAttached (line 381) | private void fixedStillAttached() {
method releaseConfigCallback (line 393) | private void releaseConfigCallback() {
method trySetWebDebuggEnabled (line 438) | @TargetApi(19)
method removeSearchBoxJavaBridge (line 453) | @TargetApi(11)
method fixedAccessibilityInjectorException (line 470) | protected void fixedAccessibilityInjectorException() {
method fixedAccessibilityInjectorExceptionForOnPageFinished (line 479) | protected void fixedAccessibilityInjectorExceptionForOnPageFinished(St...
method isAccessibilityEnabled (line 503) | private boolean isAccessibilityEnabled() {
method setAccessibilityEnabled (line 508) | private void setAccessibilityEnabled(boolean enabled) {
method resetAccessibilityEnabled (line 522) | private void resetAccessibilityEnabled() {
FILE: agentweb-core/src/main/java/com/just/agentweb/BaseIndicatorSpec.java
type BaseIndicatorSpec (line 25) | public interface BaseIndicatorSpec {
method show (line 27) | void show();
method hide (line 29) | void hide();
method reset (line 31) | void reset();
method setProgress (line 33) | void setProgress(int newProgress);
FILE: agentweb-core/src/main/java/com/just/agentweb/BaseIndicatorView.java
class BaseIndicatorView (line 31) | public abstract class BaseIndicatorView extends FrameLayout implements B...
method BaseIndicatorView (line 32) | public BaseIndicatorView(Context context) {
method BaseIndicatorView (line 36) | public BaseIndicatorView(Context context, @Nullable AttributeSet attrs) {
method BaseIndicatorView (line 40) | public BaseIndicatorView(Context context, @Nullable AttributeSet attrs...
method reset (line 44) | @Override
method setProgress (line 48) | @Override
method show (line 52) | @Override
method hide (line 56) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/BaseJsAccessEntrace.java
class BaseJsAccessEntrace (line 28) | public abstract class BaseJsAccessEntrace implements JsAccessEntrace {
method BaseJsAccessEntrace (line 31) | BaseJsAccessEntrace(WebView webView){
method callJs (line 34) | @Override
method callJs (line 42) | @Override
method loadJs (line 47) | private void loadJs(String js) {
method evaluateJs (line 50) | private void evaluateJs(String js, final ValueCallback<String>callback){
method quickCallJs (line 62) | @Override
method concat (line 74) | private String concat(String...params){
method quickCallJs (line 90) | @Override
method quickCallJs (line 95) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/DefaultChromeClient.java
class DefaultChromeClient (line 50) | public class DefaultChromeClient extends MiddlewareWebChromeBase {
method DefaultChromeClient (line 112) | DefaultChromeClient(Activity activity,
method onProgressChanged (line 129) | @Override
method onReceivedTitle (line 137) | @Override
method onJsAlert (line 144) | @Override
method onReceivedIcon (line 154) | @Override
method onGeolocationPermissionsHidePrompt (line 159) | @Override
method onGeolocationPermissionsShowPrompt (line 165) | @Override
method onGeolocationPermissionsShowPromptInternal (line 170) | private void onGeolocationPermissionsShowPromptInternal(String origin,...
method onRequestPermissionsResult (line 197) | @Override
method onJsPrompt (line 222) | @Override
method onJsConfirm (line 236) | @Override
method onExceededDatabaseQuota (line 245) | @Override
method onReachedMaxAppCacheSize (line 250) | @Override
method onShowFileChooser (line 255) | @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
method openFileChooserAboveL (line 262) | @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
method openFileChooser (line 287) | @Override
method openFileChooser (line 295) | @Override
method openFileChooser (line 302) | @Override
method createAndOpenCommonFileChooser (line 309) | private void createAndOpenCommonFileChooser(ValueCallback valueCallbac...
method onConsoleMessage (line 326) | @Override
method onShowCustomView (line 332) | @Override
method onHideCustomView (line 339) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/DefaultDesignUIController.java
class DefaultDesignUIController (line 46) | public class DefaultDesignUIController extends DefaultUIController {
method onJsAlert (line 54) | @Override
method onJsAlertInternal (line 59) | private void onJsAlertInternal(WebView view, String message) {
method onJsConfirm (line 85) | @Override
method onSelectItemsPrompt (line 90) | @Override
method onForceDownloadAlert (line 95) | @Override
method showChooserInternal (line 100) | private void showChooserInternal(WebView view, String url, final Strin...
method getAdapter (line 132) | private RecyclerView.Adapter getAdapter(final String[] ways, final Han...
class BottomSheetHolder (line 166) | private static class BottomSheetHolder extends RecyclerView.ViewHolder {
method BottomSheetHolder (line 168) | public BottomSheetHolder(View itemView) {
method onJsPrompt (line 174) | @Override
method bindSupportWebParent (line 179) | @Override
method onShowMessage (line 187) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/DefaultDownloadImpl.java
class DefaultDownloadImpl (line 47) | public class DefaultDownloadImpl implements android.webkit.DownloadListe...
method DefaultDownloadImpl (line 73) | protected DefaultDownloadImpl(Activity activity, WebView webView, Perm...
method onDownloadStart (line 81) | @Override
method onDownloadStartInternal (line 91) | protected void onDownloadStartInternal(String url, String userAgent, S...
method createResourceRequest (line 116) | protected ResourceRequest createResourceRequest(String url) {
method getPermissionListener (line 120) | protected ActionActivity.PermissionListener getPermissionListener(fina...
method checkNeedPermission (line 142) | protected List<String> checkNeedPermission() {
method preDownload (line 150) | protected void preDownload(String url) {
method isForceRequest (line 160) | protected boolean isForceRequest(String url) {
method forceDownload (line 168) | protected void forceDownload(final String url) {
method showDialog (line 174) | protected void showDialog(final String url) {
method createCallback (line 185) | protected Handler.Callback createCallback(final String url) {
method performDownload (line 195) | protected void performDownload(String url) {
method taskEnqueue (line 217) | protected void taskEnqueue(ResourceRequest resourceRequest) {
method create (line 227) | public static DefaultDownloadImpl create(@NonNull Activity activity,
FILE: agentweb-core/src/main/java/com/just/agentweb/DefaultUIController.java
class DefaultUIController (line 40) | public class DefaultUIController extends AbsAgentWebUIController {
method onJsAlert (line 53) | @Override
method onOpenPagePrompt (line 58) | @Override
method onJsConfirm (line 97) | @Override
method onSelectItemsPrompt (line 102) | @Override
method onForceDownloadAlert (line 107) | @Override
method onForceDownloadAlertInternal (line 112) | private void onForceDownloadAlertInternal(final Handler.Callback callb...
method showChooserInternal (line 149) | private void showChooserInternal(String[] ways, final Handler.Callback...
method onJsConfirmInternal (line 184) | private void onJsConfirmInternal(String message, JsResult jsResult) {
method onJsPromptInternal (line 234) | private void onJsPromptInternal(String message, String defaultValue, J...
method onJsPrompt (line 283) | @Override
method onMainFrameError (line 288) | @Override
method onShowMainFrame (line 297) | @Override
method onLoading (line 304) | @Override
method onCancelLoading (line 325) | @Override
method onShowMessage (line 342) | @Override
method onPermissionsDeny (line 350) | @Override
method toCancelJsresult (line 355) | private void toCancelJsresult(JsResult result) {
method bindSupportWebParent (line 362) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/DefaultWebClient.java
class DefaultWebClient (line 59) | public class DefaultWebClient extends MiddlewareWebClientBase {
method DefaultWebClient (line 169) | DefaultWebClient(Builder builder) {
method shouldOverrideUrlLoading (line 184) | @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
method shouldInterceptRequest (line 224) | @Override
method onReceivedHttpAuthRequest (line 229) | @Override
method deepLink (line 234) | private boolean deepLink(String url) {
method shouldInterceptRequest (line 270) | @Override
method shouldOverrideUrlLoading (line 275) | @Override
method queryActiviesNumber (line 315) | private int queryActiviesNumber(String url) {
method handleIntentUrl (line 332) | private void handleIntentUrl(String intentUrl) {
method lookupResolveInfo (line 349) | private ResolveInfo lookupResolveInfo(String url) {
method lookup (line 368) | private boolean lookup(String url) {
method isAlipay (line 391) | private boolean isAlipay(final WebView view, String url) {
method handleCommonLink (line 433) | private boolean handleCommonLink(String url) {
method onPageStarted (line 456) | @Override
method onReceivedError (line 474) | @Override
method onReceivedError (line 481) | @TargetApi(Build.VERSION_CODES.M)
method onMainFrameError (line 493) | private void onMainFrameError(WebView view, int errorCode, String desc...
method onPageFinished (line 516) | @Override
method shouldOverrideKeyEvent (line 535) | @Override
method startActivity (line 541) | private void startActivity(String url) {
method onReceivedHttpError (line 558) | @Override
method onScaleChanged (line 563) | @Override
method getCallback (line 571) | private Handler.Callback getCallback(final String url) {
method createBuilder (line 591) | public static Builder createBuilder() {
class Builder (line 595) | public static class Builder {
method setActivity (line 604) | public Builder setActivity(Activity activity) {
method setClient (line 609) | public Builder setClient(WebViewClient client) {
method setWebClientHelper (line 614) | public Builder setWebClientHelper(boolean webClientHelper) {
method setPermissionInterceptor (line 619) | public Builder setPermissionInterceptor(PermissionInterceptor permis...
method setWebView (line 624) | public Builder setWebView(WebView webView) {
method setInterceptUnkownUrl (line 629) | public Builder setInterceptUnkownUrl(boolean interceptUnkownScheme) {
method setUrlHandleWays (line 634) | public Builder setUrlHandleWays(int urlHandleWays) {
method build (line 639) | public DefaultWebClient build() {
type OpenOtherPageWays (line 644) | public static enum OpenOtherPageWays {
method OpenOtherPageWays (line 659) | OpenOtherPageWays(int code) {
FILE: agentweb-core/src/main/java/com/just/agentweb/DefaultWebCreator.java
class DefaultWebCreator (line 35) | public class DefaultWebCreator implements WebCreator {
method DefaultWebCreator (line 66) | protected DefaultWebCreator(@NonNull Activity activity,
method DefaultWebCreator (line 94) | protected DefaultWebCreator(@NonNull Activity activity, @Nullable View...
method DefaultWebCreator (line 114) | protected DefaultWebCreator(@NonNull Activity activity, @Nullable View...
method setWebView (line 126) | public void setWebView(WebView webView) {
method getFrameLayout (line 130) | public FrameLayout getFrameLayout() {
method getTargetProgress (line 135) | public View getTargetProgress() {
method setTargetProgress (line 139) | public void setTargetProgress(View targetProgress) {
method create (line 143) | @Override
method getWebView (line 163) | @Override
method getWebParentLayout (line 168) | @Override
method createLayout (line 173) | private ViewGroup createLayout() {
method webLayout (line 211) | private View webLayout() {
method createWebView (line 224) | private WebView createWebView() {
method offer (line 239) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/DefaultWebLifeCycleImpl.java
class DefaultWebLifeCycleImpl (line 27) | public class DefaultWebLifeCycleImpl implements WebLifeCycle {
method DefaultWebLifeCycleImpl (line 29) | DefaultWebLifeCycleImpl(WebView webView) {
method onResume (line 33) | @Override
method onPause (line 43) | @Override
method onDestroy (line 53) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/EventHandlerImpl.java
class EventHandlerImpl (line 31) | public class EventHandlerImpl implements IEventHandler {
method getInstantce (line 35) | public static final EventHandlerImpl getInstantce(WebView view, EventI...
method EventHandlerImpl (line 39) | public EventHandlerImpl(WebView webView, EventInterceptor eventInterce...
method onKeyDown (line 44) | @Override
method back (line 52) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/EventInterceptor.java
type EventInterceptor (line 24) | public interface EventInterceptor {
method event (line 25) | boolean event();
FILE: agentweb-core/src/main/java/com/just/agentweb/HookManager.java
class HookManager (line 24) | public class HookManager {
method hookAgentWeb (line 26) | public static AgentWeb hookAgentWeb(AgentWeb agentWeb, AgentWeb.AgentB...
method permissionHook (line 30) | public static boolean permissionHook(String url,String[]permissions){
FILE: agentweb-core/src/main/java/com/just/agentweb/HttpHeaders.java
class HttpHeaders (line 32) | public class HttpHeaders {
method create (line 33) | public static HttpHeaders create() {
method HttpHeaders (line 39) | HttpHeaders() {
method getHeaders (line 43) | public Map<String, String> getHeaders(String url) {
method additionalHttpHeader (line 53) | public void additionalHttpHeader(String url, String k, String v) {
method additionalHttpHeaders (line 68) | public void additionalHttpHeaders(String url, Map<String, String> head...
method removeHttpHeader (line 81) | public void removeHttpHeader(String url, String k) {
method isEmptyHeaders (line 93) | public boolean isEmptyHeaders(String url) {
method getHeaders (line 99) | public Map<String, Map<String, String>> getHeaders() {
method subBaseUrl (line 103) | private String subBaseUrl(String originUrl) {
method toString (line 111) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/IAgentWebSettings.java
type IAgentWebSettings (line 26) | public interface IAgentWebSettings<T extends android.webkit.WebSettings> {
method toSetting (line 28) | IAgentWebSettings toSetting(WebView webView);
method getWebSettings (line 30) | T getWebSettings();
FILE: agentweb-core/src/main/java/com/just/agentweb/IEventHandler.java
type IEventHandler (line 25) | public interface IEventHandler {
method onKeyDown (line 27) | boolean onKeyDown(int keyCode, KeyEvent event);
method back (line 29) | boolean back();
FILE: agentweb-core/src/main/java/com/just/agentweb/IUrlLoader.java
type IUrlLoader (line 27) | public interface IUrlLoader {
method loadUrl (line 30) | void loadUrl(String url);
method loadUrl (line 32) | void loadUrl(String url, Map<String, String> headers);
method reload (line 34) | void reload();
method loadData (line 36) | void loadData(String data, String mimeType, String encoding);
method stopLoading (line 38) | void stopLoading();
method loadDataWithBaseURL (line 40) | void loadDataWithBaseURL(String baseUrl, String data,
method postUrl (line 43) | void postUrl(String url, byte[] params);
method getHttpHeaders (line 45) | HttpHeaders getHttpHeaders();
FILE: agentweb-core/src/main/java/com/just/agentweb/IVideo.java
type IVideo (line 28) | public interface IVideo {
method onShowCustomView (line 31) | void onShowCustomView(View view, WebChromeClient.CustomViewCallback ca...
method onHideCustomView (line 34) | void onHideCustomView();
method isVideoState (line 37) | boolean isVideoState();
FILE: agentweb-core/src/main/java/com/just/agentweb/IWebIndicator.java
type IWebIndicator (line 25) | public interface IWebIndicator<T extends BaseIndicatorSpec> {
method offer (line 28) | T offer();
FILE: agentweb-core/src/main/java/com/just/agentweb/IWebLayout.java
type IWebLayout (line 34) | public interface IWebLayout<T extends WebView,V extends ViewGroup> {
method getLayout (line 40) | @NonNull
method getWebView (line 47) | @Nullable
FILE: agentweb-core/src/main/java/com/just/agentweb/IndicatorController.java
type IndicatorController (line 26) | public interface IndicatorController {
method progress (line 28) | void progress(WebView v, int newProgress);
method offerIndicator (line 30) | BaseIndicatorSpec offerIndicator();
method showIndicator (line 32) | void showIndicator();
method setProgress (line 34) | void setProgress(int newProgress);
method finish (line 36) | void finish();
FILE: agentweb-core/src/main/java/com/just/agentweb/IndicatorHandler.java
class IndicatorHandler (line 26) | public class IndicatorHandler implements IndicatorController {
method progress (line 29) | @Override
method offerIndicator (line 45) | @Override
method reset (line 50) | public void reset() {
method finish (line 57) | @Override
method setProgress (line 64) | @Override
method showIndicator (line 71) | @Override
method getInstance (line 79) | static IndicatorHandler getInstance() {
method inJectIndicator (line 84) | IndicatorHandler inJectIndicator(BaseIndicatorSpec baseIndicatorSpec) {
FILE: agentweb-core/src/main/java/com/just/agentweb/JsAccessEntrace.java
type JsAccessEntrace (line 26) | public interface JsAccessEntrace extends QuickCallJs {
method callJs (line 29) | void callJs(String js, ValueCallback<String> callback);
method callJs (line 31) | void callJs(String js);
FILE: agentweb-core/src/main/java/com/just/agentweb/JsAccessEntraceImpl.java
class JsAccessEntraceImpl (line 30) | public class JsAccessEntraceImpl extends BaseJsAccessEntrace {
method getInstance (line 35) | public static JsAccessEntraceImpl getInstance(WebView webView) {
method JsAccessEntraceImpl (line 39) | private JsAccessEntraceImpl(WebView webView) {
method safeCallJs (line 44) | private void safeCallJs(final String s, final ValueCallback valueCallb...
method callJs (line 53) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/JsBaseInterfaceHolder.java
class JsBaseInterfaceHolder (line 30) | public abstract class JsBaseInterfaceHolder implements JsInterfaceHolder {
method JsBaseInterfaceHolder (line 34) | protected JsBaseInterfaceHolder(AgentWeb.SecurityType securityType) {
method checkObject (line 38) | @Override
method checkSecurity (line 64) | protected boolean checkSecurity() {
FILE: agentweb-core/src/main/java/com/just/agentweb/JsCallJava.java
class JsCallJava (line 30) | public class JsCallJava {
method JsCallJava (line 44) | public JsCallJava(Object interfaceObj, String interfaceName) {
method genJavaMethodSign (line 89) | private String genJavaMethodSign(Method method) {
method getPreloadInterfaceJs (line 123) | public String getPreloadInterfaceJs() {
method call (line 127) | public String call(WebView webView, JSONObject jsonObject) {
method getReturn (line 205) | private String getReturn(JSONObject reqJson, int stateCode, Object res...
method promptMsgFormat (line 226) | private static String promptMsgFormat(String object, String method, St...
method isSafeWebViewCallMsg (line 243) | static boolean isSafeWebViewCallMsg(String message) {
method getMsgJSONObject (line 247) | static JSONObject getMsgJSONObject(String message) {
method getInterfacedName (line 259) | static String getInterfacedName(JSONObject jsonObject) {
FILE: agentweb-core/src/main/java/com/just/agentweb/JsCallback.java
class JsCallback (line 29) | public class JsCallback {
method JsCallback (line 37) | public JsCallback(WebView view, String injectedName, int index) {
method apply (line 49) | public void apply (Object... args) throws JsCallbackException {
method isJavaScriptObject (line 83) | private boolean isJavaScriptObject(Object obj) {
method setPermanent (line 106) | public void setPermanent (boolean value) {
class JsCallbackException (line 110) | public static class JsCallbackException extends Exception {
method JsCallbackException (line 111) | public JsCallbackException (String msg) {
FILE: agentweb-core/src/main/java/com/just/agentweb/JsInterfaceHolder.java
type JsInterfaceHolder (line 26) | public interface JsInterfaceHolder {
method addJavaObjects (line 28) | JsInterfaceHolder addJavaObjects(Map<String, Object> maps);
method addJavaObject (line 30) | JsInterfaceHolder addJavaObject(String k, Object v);
method checkObject (line 32) | boolean checkObject(Object v);
FILE: agentweb-core/src/main/java/com/just/agentweb/JsInterfaceHolderImpl.java
class JsInterfaceHolderImpl (line 29) | public class JsInterfaceHolderImpl extends JsBaseInterfaceHolder {
method getJsInterfaceHolder (line 35) | static JsInterfaceHolderImpl getJsInterfaceHolder(WebView webView, Age...
method JsInterfaceHolderImpl (line 39) | JsInterfaceHolderImpl(WebView webView, AgentWeb.SecurityType securityT...
method addJavaObjects (line 45) | @Override
method addJavaObject (line 64) | @Override
method addJavaObjectDirect (line 78) | private JsInterfaceHolder addJavaObjectDirect(String k, Object v) {
FILE: agentweb-core/src/main/java/com/just/agentweb/JsInterfaceObjectException.java
class JsInterfaceObjectException (line 25) | public class JsInterfaceObjectException extends RuntimeException {
method JsInterfaceObjectException (line 26) | JsInterfaceObjectException(String msg){
FILE: agentweb-core/src/main/java/com/just/agentweb/LayoutParamsOffer.java
type LayoutParamsOffer (line 26) | public interface LayoutParamsOffer<T extends FrameLayout.LayoutParams> {
method offerLayoutParams (line 28) | T offerLayoutParams();
FILE: agentweb-core/src/main/java/com/just/agentweb/LogUtils.java
class LogUtils (line 26) | public class LogUtils {
method isDebug (line 30) | public static boolean isDebug() {
method i (line 34) | public static void i(String tag, String message) {
method v (line 41) | public static void v(String tag, String message) {
method safeCheckCrash (line 49) | public static void safeCheckCrash(String tag, String msg, Throwable tr) {
method e (line 57) | public static void e(String tag, String msg, Throwable tr) {
method e (line 61) | public static void e(String tag, String message) {
FILE: agentweb-core/src/main/java/com/just/agentweb/LollipopFixedWebView.java
class LollipopFixedWebView (line 13) | @SuppressWarnings("unused")
method LollipopFixedWebView (line 15) | public LollipopFixedWebView(Context context) {
method LollipopFixedWebView (line 19) | public LollipopFixedWebView(Context context, AttributeSet attrs) {
method LollipopFixedWebView (line 23) | public LollipopFixedWebView(Context context, AttributeSet attrs, int d...
method LollipopFixedWebView (line 27) | @TargetApi(Build.VERSION_CODES.LOLLIPOP)
method LollipopFixedWebView (line 32) | public LollipopFixedWebView(Context context, AttributeSet attrs, int d...
method getFixedContext (line 36) | public static Context getFixedContext(Context context) {
FILE: agentweb-core/src/main/java/com/just/agentweb/MiddlewareWebChromeBase.java
class MiddlewareWebChromeBase (line 26) | public class MiddlewareWebChromeBase extends WebChromeClientDelegate {
method MiddlewareWebChromeBase (line 30) | protected MiddlewareWebChromeBase(WebChromeClient webChromeClient) {
method MiddlewareWebChromeBase (line 34) | protected MiddlewareWebChromeBase() {
method setDelegate (line 38) | @Override
method enq (line 43) | final MiddlewareWebChromeBase enq(MiddlewareWebChromeBase middlewareWe...
method next (line 50) | final MiddlewareWebChromeBase next() {
FILE: agentweb-core/src/main/java/com/just/agentweb/MiddlewareWebClientBase.java
class MiddlewareWebClientBase (line 26) | public class MiddlewareWebClientBase extends WebViewClientDelegate {
method MiddlewareWebClientBase (line 30) | MiddlewareWebClientBase(MiddlewareWebClientBase client) {
method MiddlewareWebClientBase (line 35) | protected MiddlewareWebClientBase(WebViewClient client) {
method MiddlewareWebClientBase (line 39) | protected MiddlewareWebClientBase() {
method next (line 43) | final MiddlewareWebClientBase next() {
method setDelegate (line 47) | @Override
method enq (line 53) | final MiddlewareWebClientBase enq(MiddlewareWebClientBase middleWrareW...
FILE: agentweb-core/src/main/java/com/just/agentweb/NestedScrollAgentWebView.java
class NestedScrollAgentWebView (line 31) | public class NestedScrollAgentWebView extends AgentWebView implements Ne...
method NestedScrollAgentWebView (line 37) | public NestedScrollAgentWebView(Context context) {
method initView (line 44) | private void initView() {
method onTouchEvent (line 70) | @Override
method endDrag (line 136) | private void endDrag() {
method onSecondaryPointerUp (line 141) | private void onSecondaryPointerUp(MotionEvent ev) {
method setNestedScrollingEnabled (line 155) | @Override
method isNestedScrollingEnabled (line 160) | @Override
method startNestedScroll (line 165) | @Override
method stopNestedScroll (line 170) | @Override
method hasNestedScrollingParent (line 175) | @Override
method dispatchNestedScroll (line 180) | @Override
method dispatchNestedPreScroll (line 186) | @Override
method dispatchNestedFling (line 191) | @Override
method dispatchNestedPreFling (line 196) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/PermissionInterceptor.java
type PermissionInterceptor (line 23) | public interface PermissionInterceptor {
method intercept (line 24) | boolean intercept(String url, String[] permissions, String action);
FILE: agentweb-core/src/main/java/com/just/agentweb/ProcessUtils.java
class ProcessUtils (line 18) | class ProcessUtils {
method getCurrentProcessName (line 20) | static String getCurrentProcessName(Context context) {
method getCurrentProcessNameByFile (line 29) | private static String getCurrentProcessNameByFile() {
method getCurrentProcessNameByAms (line 42) | private static String getCurrentProcessNameByAms(Context context) {
method getCurrentProcessNameByReflect (line 58) | private static String getCurrentProcessNameByReflect(Context context) {
FILE: agentweb-core/src/main/java/com/just/agentweb/Provider.java
type Provider (line 24) | public interface Provider<T> {
method provide (line 25) | T provide();
FILE: agentweb-core/src/main/java/com/just/agentweb/QuickCallJs.java
type QuickCallJs (line 30) | public interface QuickCallJs {
method quickCallJs (line 31) | @RequiresApi(Build.VERSION_CODES.KITKAT)
method quickCallJs (line 34) | void quickCallJs(String method, String... params);
method quickCallJs (line 36) | void quickCallJs(String method);
FILE: agentweb-core/src/main/java/com/just/agentweb/UrlCommonException.java
class UrlCommonException (line 22) | public class UrlCommonException extends RuntimeException {
method UrlCommonException (line 24) | public UrlCommonException() {
method UrlCommonException (line 27) | public UrlCommonException(String msg) {
FILE: agentweb-core/src/main/java/com/just/agentweb/UrlLoaderImpl.java
class UrlLoaderImpl (line 29) | public class UrlLoaderImpl implements IUrlLoader {
method UrlLoaderImpl (line 35) | UrlLoaderImpl(WebView webView, HttpHeaders httpHeaders) {
method safeLoadUrl (line 47) | private void safeLoadUrl(final String url) {
method safeReload (line 56) | private void safeReload() {
method loadUrl (line 65) | @Override
method loadUrl (line 70) | @Override
method reload (line 88) | @Override
method loadData (line 102) | @Override
method stopLoading (line 116) | @Override
method loadDataWithBaseURL (line 130) | @Override
method postUrl (line 144) | @Override
method getHttpHeaders (line 158) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/VideoImpl.java
class VideoImpl (line 39) | public class VideoImpl implements IVideo, EventInterceptor {
method VideoImpl (line 49) | public VideoImpl(Activity mActivity, WebView webView) {
method onShowCustomView (line 55) | @Override
method onHideCustomView (line 93) | @Override
method isVideoState (line 124) | @Override
method event (line 129) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/WebChromeClient.java
class WebChromeClient (line 8) | public class WebChromeClient extends MiddlewareWebChromeBase{
method WebChromeClient (line 9) | public WebChromeClient() {
FILE: agentweb-core/src/main/java/com/just/agentweb/WebChromeClientDelegate.java
class WebChromeClientDelegate (line 43) | public class WebChromeClientDelegate extends WebChromeClient {
method getDelegate (line 46) | protected WebChromeClient getDelegate() {
method WebChromeClientDelegate (line 50) | public WebChromeClientDelegate(WebChromeClient webChromeClient) {
method setDelegate (line 54) | void setDelegate(WebChromeClient delegate) {
method onProgressChanged (line 58) | @Override
method onReceivedTitle (line 67) | @Override
method onReceivedIcon (line 76) | @Override
method onReceivedTouchIconUrl (line 85) | @Override
method onShowCustomView (line 95) | @Override
method onShowCustomView (line 105) | @Override
method onHideCustomView (line 116) | @Override
method onCreateWindow (line 125) | @Override
method onRequestFocus (line 134) | @Override
method onCloseWindow (line 143) | @Override
method onJsAlert (line 152) | @Override
method onJsConfirm (line 161) | @Override
method onJsPrompt (line 170) | @Override
method onJsBeforeUnload (line 179) | @Override
method onExceededDatabaseQuota (line 188) | @Override
method onReachedMaxAppCacheSize (line 203) | @Override
method onGeolocationPermissionsShowPrompt (line 214) | @Override
method onGeolocationPermissionsHidePrompt (line 231) | @Override
method onPermissionRequest (line 242) | @Override
method onPermissionRequestCanceled (line 252) | @Override
method onJsTimeout (line 263) | @Override
method onConsoleMessage (line 271) | @Override
method onConsoleMessage (line 281) | @Override
method getDefaultVideoPoster (line 292) | @Override
method getVideoLoadingProgressView (line 300) | @Override
method getVisitedHistory (line 308) | @Override
method onShowFileChooser (line 317) | @Override
method openFileChooser (line 334) | public void openFileChooser(ValueCallback<Uri> uploadFile, String acce...
method openFileChooser (line 342) | public void openFileChooser(ValueCallback<Uri> valueCallback) {
method openFileChooser (line 351) | public void openFileChooser(ValueCallback valueCallback, String accept...
method commonRefect (line 356) | private void commonRefect(WebChromeClient o, String mothed, Object[] o...
FILE: agentweb-core/src/main/java/com/just/agentweb/WebCreator.java
type WebCreator (line 25) | public interface WebCreator extends IWebIndicator {
method create (line 26) | WebCreator create();
method getWebView (line 28) | WebView getWebView();
method getWebParentLayout (line 30) | FrameLayout getWebParentLayout();
FILE: agentweb-core/src/main/java/com/just/agentweb/WebIndicator.java
class WebIndicator (line 39) | public class WebIndicator extends BaseIndicatorView implements BaseIndic...
method WebIndicator (line 92) | public WebIndicator(Context context) {
method WebIndicator (line 96) | public WebIndicator(Context context, @Nullable AttributeSet attrs) {
method WebIndicator (line 100) | public WebIndicator(Context context, @Nullable AttributeSet attrs, int...
method init (line 105) | private void init(Context context, AttributeSet attrs, int defStyleAtt...
method setColor (line 116) | public void setColor(int color) {
method setColor (line 121) | public void setColor(String color) {
method onMeasure (line 125) | @Override
method onDraw (line 142) | @Override
method dispatchDraw (line 146) | @Override
method show (line 150) | @Override
method onSizeChanged (line 159) | @Override
method setProgress (line 176) | public void setProgress(float progress) {
method hide (line 187) | @Override
method startAnim (line 192) | private void startAnim(boolean isFinished) {
method onAnimationUpdate (line 238) | @Override
method onAnimationEnd (line 247) | @Override
method onDetachedFromWindow (line 253) | @Override
method doEnd (line 265) | private void doEnd() {
method reset (line 274) | @Override
method setProgress (line 282) | @Override
method offerLayoutParams (line 288) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/WebLifeCycle.java
type WebLifeCycle (line 24) | public interface WebLifeCycle {
method onResume (line 25) | void onResume();
method onPause (line 26) | void onPause();
method onDestroy (line 27) | void onDestroy();
FILE: agentweb-core/src/main/java/com/just/agentweb/WebListenerManager.java
type WebListenerManager (line 29) | public interface WebListenerManager {
method setWebChromeClient (line 30) | WebListenerManager setWebChromeClient(WebView webview, WebChromeClient...
method setWebViewClient (line 31) | WebListenerManager setWebViewClient(WebView webView, WebViewClient web...
method setDownloader (line 32) | WebListenerManager setDownloader(WebView webView, DownloadListener dow...
FILE: agentweb-core/src/main/java/com/just/agentweb/WebParentLayout.java
class WebParentLayout (line 40) | public class WebParentLayout extends FrameLayout implements Provider<Abs...
method WebParentLayout (line 51) | WebParentLayout(@NonNull Context context) {
method WebParentLayout (line 56) | WebParentLayout(@NonNull Context context, @Nullable AttributeSet attrs) {
method WebParentLayout (line 60) | WebParentLayout(@NonNull Context context, @Nullable AttributeSet attrs...
method bindController (line 68) | void bindController(AbsAgentWebUIController agentWebUIController) {
method showPageMainFrameError (line 73) | void showPageMainFrameError() {
method createErrorLayout (line 89) | private void createErrorLayout() {
method hideErrorLayout (line 140) | void hideErrorLayout() {
method setErrorView (line 147) | void setErrorView(@NonNull View errorView) {
method setErrorLayoutRes (line 151) | void setErrorLayoutRes(@LayoutRes int resLayout, @IdRes int id) {
method provide (line 162) | @Override
method bindWebView (line 168) | void bindWebView(WebView view) {
method getWebView (line 174) | WebView getWebView() {
FILE: agentweb-core/src/main/java/com/just/agentweb/WebSecurityCheckLogic.java
type WebSecurityCheckLogic (line 27) | public interface WebSecurityCheckLogic {
method dealHoneyComb (line 28) | void dealHoneyComb(WebView view);
method dealJsInterface (line 29) | void dealJsInterface(ArrayMap<String, Object> objects, AgentWeb.Securi...
FILE: agentweb-core/src/main/java/com/just/agentweb/WebSecurityController.java
type WebSecurityController (line 22) | public interface WebSecurityController<T> {
method check (line 23) | void check(T t);
FILE: agentweb-core/src/main/java/com/just/agentweb/WebSecurityControllerImpl.java
class WebSecurityControllerImpl (line 28) | public class WebSecurityControllerImpl implements WebSecurityController<...
method WebSecurityControllerImpl (line 34) | public WebSecurityControllerImpl(WebView view, ArrayMap<String, Object...
method check (line 40) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/WebSecurityLogicImpl.java
class WebSecurityLogicImpl (line 29) | public class WebSecurityLogicImpl implements WebSecurityCheckLogic {
method getInstance (line 31) | public static WebSecurityLogicImpl getInstance() {
method WebSecurityLogicImpl (line 35) | public WebSecurityLogicImpl(){}
method dealHoneyComb (line 37) | @TargetApi(Build.VERSION_CODES.HONEYCOMB)
method dealJsInterface (line 48) | @Override
FILE: agentweb-core/src/main/java/com/just/agentweb/WebViewClient.java
class WebViewClient (line 8) | public class WebViewClient extends MiddlewareWebClientBase {
method WebViewClient (line 9) | public WebViewClient() {
FILE: agentweb-core/src/main/java/com/just/agentweb/WebViewClientDelegate.java
class WebViewClientDelegate (line 37) | public class WebViewClientDelegate extends WebViewClient {
method WebViewClientDelegate (line 42) | WebViewClientDelegate(WebViewClient client) {
method getDelegate (line 46) | protected WebViewClient getDelegate() {
method setDelegate (line 50) | void setDelegate(WebViewClient delegate) {
method shouldOverrideUrlLoading (line 54) | @Deprecated
method shouldOverrideUrlLoading (line 63) | @Override
method onPageStarted (line 71) | @Override
method onPageFinished (line 80) | @Override
method onLoadResource (line 89) | @Override
method onPageCommitVisible (line 98) | @Override
method shouldInterceptRequest (line 107) | @Override
method shouldInterceptRequest (line 117) | @Override
method onTooManyRedirects (line 126) | @Override
method onReceivedError (line 137) | @Override
method onReceivedError (line 148) | @Override
method onReceivedHttpError (line 157) | @Override
method onFormResubmission (line 167) | @Override
method doUpdateVisitedHistory (line 178) | @Override
method onReceivedSslError (line 188) | @Override
method onReceivedClientCertRequest (line 198) | @Override
method onReceivedHttpAuthRequest (line 207) | @Override
method shouldOverrideKeyEvent (line 217) | @Override
method onUnhandledKeyEvent (line 225) | @Override
method onScaleChanged (line 235) | @Override
method onReceivedLoginRequest (line 244) | @Override
FILE: app/src/androidTest/java/me/wizos/loread/ApplicationTest.java
class ApplicationTest (line 9) | public class ApplicationTest extends ApplicationTestCase<Application> {
method ApplicationTest (line 10) | public ApplicationTest() {
FILE: app/src/main/assets/js/highlight.pack.js
function x (line 2) | function x(e){return e.replace(/&/g,"&").replace(/</g,"<").replac...
function d (line 2) | function d(e){return e.nodeName.toLowerCase()}
function R (line 2) | function R(e){return n.test(e)}
function i (line 2) | function i(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n...
function p (line 2) | function p(e){var a=[];return function e(n,t){for(var r=n.firstChild;r;r...
function v (line 2) | function v(e,n,t){var r=0,a="",i=[];function o(){return e.length&&n.leng...
function l (line 2) | function l(n){return n.v&&!n.cached_variants&&(n.cached_variants=n.v.map...
function u (line 2) | function u(e){if(r&&!e.langApiRestored){for(var n in e.langApiRestored=!...
function M (line 2) | function M(n,t){var i={};return"string"==typeof n?r("keyword",n):o(n).fo...
function S (line 2) | function S(r){function s(e){return e&&e.source||e}function f(e,n){return...
function T (line 2) | function T(n,e,a,t){var i=e;function c(e,n,t,r){if(!t&&""===n)return"";i...
function w (line 2) | function w(t,e){e=e||B.languages||o(_);var r={relevance:0,value:x(t)},a=...
function b (line 2) | function b(e){return B.tabReplace||B.useBR?e.replace(t,function(e,n){ret...
function s (line 2) | function s(e){var n,t,r,a,i,o,c,l,u,s,f=function(e){var n,t,r,a,i=e.clas...
function h (line 2) | function h(){if(!h.called){h.called=!0;var e=document.querySelectorAll("...
function D (line 2) | function D(e){return e=(e||"").toLowerCase(),_[e]||_[g[e]]}
function L (line 2) | function L(e){var n=D(e);return n&&!n.disableAutodetect}
function t (line 2) | function t(e){return"(?:"+e+")?"}
function r (line 2) | function r(e){return{cN:"string",b:"~?"+e+".*?"+e}}
function t (line 2) | function t(e,r,t){return{cN:e,b:r,relevance:t}}
FILE: app/src/main/assets/js/lazyload.js
function unveil (line 32) | function unveil() {
FILE: app/src/main/assets/js/media.js
function optimize (line 10) | function optimize() {
function handleImage (line 21) | function handleImage() {
function handleQQVideoUrl (line 72) | function handleQQVideoUrl() {
function handleIFrame (line 80) | function handleIFrame(){
function handleEmbed (line 103) | function handleEmbed(){
function handleAudio (line 122) | function handleAudio(){
function handleVideo (line 135) | function handleVideo(){
function handleTable (line 145) | function handleTable(){
function loadOnInner (line 151) | function loadOnInner(url){
function findImageById (line 161) | function findImageById(imgId) {
function onImageLoadNeedClick (line 165) | function onImageLoadNeedClick(imgId) {
function onImageLoading (line 172) | function onImageLoading(imgId) {
function onImageLoadFailed (line 178) | function onImageLoadFailed(imgId) {
function onImageError (line 184) | function onImageError(imgId) {
function onImageLoadSuccess (line 190) | function onImageLoadSuccess(imgId, displayUrl) {
function hashCode (line 196) | function hashCode(str){
FILE: app/src/main/java/me/wizos/loread/App.java
class App (line 62) | public class App extends Application implements Thread.UncaughtException...
method removeEldestEntry (line 124) | @Override
method i (line 131) | public static App i() {
method onCreate (line 142) | @Override
method onTerminate (line 197) | @Override
method network (line 205) | @NetWork(netType = NetType.AUTO)
method uncaughtException (line 229) | @Override
method onTrimMemory (line 254) | @Override
method onLowMemory (line 267) | @Override
method initCrashReport (line 276) | private void initCrashReport() {
method getWebViewBaseUrl (line 302) | public String getWebViewBaseUrl() {
method initVar (line 309) | private void initVar() {
method getGlobalAssetsFilesDir (line 317) | public String getGlobalAssetsFilesDir() {
method getGlobalConfigPath (line 321) | public String getGlobalConfigPath() {
method getUserFilesDir (line 325) | public String getUserFilesDir() {
method getUserConfigPath (line 333) | public String getUserConfigPath() {
method getUserCachePath (line 337) | public String getUserCachePath() {
method getUserBoxPath (line 341) | public String getUserBoxPath() {
method getUserStorePath (line 345) | public String getUserStorePath() {
method clearApiData (line 350) | public void clearApiData() {
method getUser (line 366) | public User getUser() {
method getKeyValue (line 376) | public CorePref getKeyValue() {
method getAuthApi (line 380) | public AuthApi getAuthApi() {
method getOAuthApi (line 384) | public OAuthApi getOAuthApi() {
method setApi (line 388) | public void setApi(BaseApi baseApi) {
method getApi (line 392) | public BaseApi getApi() {
method restartApp (line 423) | public void restartApp() {
FILE: app/src/main/java/me/wizos/loread/Contract.java
class Contract (line 7) | public class Contract {
FILE: app/src/main/java/me/wizos/loread/activity/ArticleActivity.java
class ArticleActivity (line 125) | @SuppressWarnings("unchecked")
method onCreate (line 145) | @Override
method onResume (line 172) | @Override
method onPause (line 178) | @Override
method onDestroy (line 184) | @Override
method saveArticleProgress (line 199) | public int saveArticleProgress() {
method onSaveInstanceState (line 208) | @Override
method log (line 220) | @JavascriptInterface
method readImage (line 226) | @JavascriptInterface
method openImage (line 255) | @JavascriptInterface
class MyCompressionPredicate (line 317) | private static class MyCompressionPredicate implements CompressionPred...
method apply (line 318) | @Override
class DownFileCallback (line 339) | private static class DownFileCallback extends FileCallback {
method DownFileCallback (line 351) | DownFileCallback(String destFileDir, String destFileName) {
method setParam (line 357) | void setParam(Context context, WebViewS webView, String compressedFi...
method setRefererParam (line 365) | void setRefererParam(String originalUrl, String articleUrl, boolean ...
method onSuccess (line 371) | @Override
method onError (line 490) | @Override
method downImage (line 506) | @JavascriptInterface
method openLink (line 542) | @JavascriptInterface
method useInnerBrowser (line 560) | private boolean useInnerBrowser(Intent intent){
method getMatchActivitiesSize (line 563) | private int getMatchActivitiesSize(Intent intent){
method openAudio (line 567) | @JavascriptInterface
method readability (line 576) | @JavascriptInterface
method initView (line 587) | private void initView() {
method initToolbar (line 644) | private void initToolbar() {
method onLeftBack (line 667) | public void onLeftBack() {
method onRightBack (line 677) | public void onRightBack() {
method initSelectedPage (line 687) | public void initSelectedPage(int position) {
method reInitSelectedArticle (line 694) | public void reInitSelectedArticle(int position) {
method initSelectedWebViewContent (line 712) | @SuppressLint("ClickableViewAccessibility")
class WebChromeClientX (line 774) | private static class WebChromeClientX extends WebChromeClient {
method WebChromeClientX (line 778) | WebChromeClientX(VideoImpl video, WeakReference<SlowlyProgressBar> p...
method onProgressChanged (line 783) | @Override
method onShowCustomView (line 793) | @Override
method onHideCustomView (line 801) | @Override
class WebViewClientX (line 809) | private class WebViewClientX extends WebViewClient {
method onReceivedSslError (line 811) | @Override
method shouldInterceptRequest (line 817) | @Deprecated
method shouldOverrideUrlLoading (line 837) | @Override
method onPageStarted (line 863) | @Override
method onPageFinished (line 876) | @Override
method initIconState (line 888) | private void initIconState() {
method onReadClick (line 923) | public void onReadClick(View view) {
method onClickStarIcon (line 963) | public void onClickStarIcon(View view) {
method editFavorites (line 1036) | public void editFavorites(String uid){
method newFavorites (line 1106) | public void newFavorites(String uid,@Nullable MaterialDialog lastDialog){
method onClickSaveIcon (line 1181) | public void onClickSaveIcon(View view) {
method clearDirectory (line 1198) | public void clearDirectory(String uid){
method addToSaveDirectory (line 1201) | public void addToSaveDirectory(String uid){
method editDirectory (line 1214) | public void editDirectory(String uid){
method clickOpenOriginalArticle (line 1261) | public void clickOpenOriginalArticle(View view) {
method onReadabilityClick (line 1270) | public void onReadabilityClick(View view) {
method onReadabilityClick (line 1328) | public void onReadabilityClick() {
method initFeedConfig (line 1398) | private void initFeedConfig() {
method showArticleInfo (line 1411) | public void showArticleInfo() {
method onKeyDown (line 1473) | @Override
method buildColorful (line 1492) | @Override
method onConfigurationChanged (line 1515) | @Override
method onCreateOptionsMenu (line 1519) | @Override
method onOptionsItemSelected (line 1541) | @Override
FILE: app/src/main/java/me/wizos/loread/activity/BaseActivity.java
class BaseActivity (line 17) | public abstract class BaseActivity extends AppCompatActivity {
method onCreate (line 20) | @Override
method buildColorful (line 51) | protected abstract Colorful.Builder buildColorful(Colorful.Builder mCo...
method showCurrentTheme (line 56) | protected void showCurrentTheme() {
method manualToggleTheme (line 69) | protected void manualToggleTheme() {
method onKeyDown (line 83) | @Override
FILE: app/src/main/java/me/wizos/loread/activity/FeedActivity.java
class FeedActivity (line 59) | public class FeedActivity extends BaseActivity {
method onCreate (line 73) | @Override
method createItemView2 (line 189) | private void createItemView2(final Feed feed) {
method renameFeed (line 392) | public void renameFeed(final String renamedTitle, final Feed feed) {
method copyIconUrl (line 413) | public void copyIconUrl(@Nullable View view) {
method copyHtmlUrl (line 426) | public void copyHtmlUrl(@Nullable View view) {
method copyFeedUrl (line 439) | public void copyFeedUrl(@Nullable View view) {
method showSelectFolder (line 454) | public void showSelectFolder(final View view, final String feedId) {
method clickUnsubscribe (line 501) | public void clickUnsubscribe(final View view) {
method onOptionsItemSelected (line 552) | @Override
method buildColorful (line 561) | @Override
FILE: app/src/main/java/me/wizos/loread/activity/LabActivity.java
class LabActivity (line 54) | public class LabActivity extends AppCompatActivity {
method onCreate (line 56) | @Override
method onClickBackup (line 64) | public void onClickBackup(View view) {
method onClickRestore (line 82) | public void onClickRestore(View view) {
method onClickReadConfig (line 100) | public void onClickReadConfig(View view) {
method onClickArrangeCrawlDateArticle (line 117) | public void onClickArrangeCrawlDateArticle(View view) {
method onClickClearHtmlDir (line 131) | public void onClickClearHtmlDir(View view) {
method clearHtmlDir (line 143) | private void clearHtmlDir() {
method startSyncWorkManager (line 167) | public void startSyncWorkManager(View view) {
method stopWorkManager (line 179) | public void stopWorkManager(View view) {
method openActivity (line 185) | public void openActivity(View view){
method getMatchActivitiesSize (line 203) | private int getMatchActivitiesSize(String url){
method onClickClearTags (line 233) | public void onClickClearTags(View view) {
method onClickGenTags (line 238) | public void onClickGenTags(View view) {
method onClickEditHost (line 272) | public void onClickEditHost(View view) {
method actionArticle (line 285) | public void actionArticle(View view){
method onDestroy (line 295) | @Override
FILE: app/src/main/java/me/wizos/loread/activity/MainActivity.java
class MainActivity (line 96) | public class MainActivity extends BaseActivity implements SwipeRefreshLa...
method onCreate (line 123) | @Override
method initWorkRequest (line 140) | private void initWorkRequest(){
method applyPermissions (line 208) | private void applyPermissions() {
method onResume (line 229) | @Override
method showAutoSwitchThemeSnackBar (line 237) | private void showAutoSwitchThemeSnackBar() {
method initIconView (line 262) | protected void initIconView() {
method clickSearchIcon (line 271) | public void clickSearchIcon(View view) {
method initSwipeRefreshLayout (line 277) | protected void initSwipeRefreshLayout() {
method onRefresh (line 288) | @Override
method onDestroy (line 304) | @Override
method refreshData (line 317) | protected void refreshData() { // 获取 App.articleList , 并且根据 App.articl...
method getArtData (line 325) | private void getArtData() {
method loadViewByData (line 356) | private void loadViewByData(int size) {
method showTagDialog (line 371) | public void showTagDialog(final Collection category) {
method renameTag (line 405) | public void renameTag(final String renamedTagTitle, Collection categor...
method showFeedActivity (line 427) | public void showFeedActivity(final int parentPosition, final int child...
method initArtListView (line 439) | public void initArtListView() {
method onClickCategoryIcon (line 698) | public void onClickCategoryIcon(View view) {
method initTagListView (line 794) | public void initTagListView() {
method showConfirmDialog (line 862) | private void showConfirmDialog(final int start, final int end) {
class MarkListReadedAsyncTask (line 882) | @SuppressLint("StaticFieldLeak")
method handleArticle (line 886) | private void handleArticle(int i){
method doInBackground (line 915) | @Override
method onProgressUpdate (line 1002) | @Override
method showSearchResult (line 1010) | private void showSearchResult(String keyword) {
method toggleReadState (line 1031) | private void toggleReadState(final int position) {
method toggleStarState (line 1076) | private void toggleStarState(final int position) {
method onActivityResult (line 1130) | @Override
method slvSetSelection (line 1157) | private void slvSetSelection(final int position) {
method clickRefreshIcon (line 1169) | public void clickRefreshIcon(View view) {
method onQuickSettingIconClicked (line 1173) | public void onQuickSettingIconClicked(View view) {
method clickToolbar (line 1270) | @OnClick(R.id.main_toolbar)
method onKeyDown (line 1284) | @Override
method quitDialog (line 1295) | private void quitDialog() {
method initToolbar (line 1314) | private void initToolbar() {
method buildColorful (line 1342) | @Override
FILE: app/src/main/java/me/wizos/loread/activity/MusicActivity.java
class MusicActivity (line 47) | public class MusicActivity extends BaseActivity {
method onCreate (line 48) | @Override
method applyPermissions (line 79) | private void applyPermissions() {
method onDestroy (line 97) | @Override
method buildColorful (line 107) | @Override
method run (line 124) | @Override
class PlayConnection (line 143) | public class PlayConnection implements ServiceConnection {
method onServiceConnected (line 145) | @Override
method onServiceDisconnected (line 152) | @Override
method initToolbar (line 157) | public void initToolbar() {
method initView (line 175) | public void initView(IBinder service) {
method initFloatWindow (line 314) | private void initFloatWindow() {
method onOptionsItemSelected (line 354) | @Override
FILE: app/src/main/java/me/wizos/loread/activity/ProviderActivity.java
class ProviderActivity (line 29) | public class ProviderActivity extends BaseActivity {
method onCreate (line 30) | @Override
method loginInoReader (line 40) | public void loginInoReader(View view){
method oauthInoReader (line 45) | public void oauthInoReader(View view) {
method oauthFeedly (line 51) | public void oauthFeedly(View view) {
method loginTinyRSS (line 57) | public void loginTinyRSS(View view) {
method getAccessToken (line 82) | private void getAccessToken(final String code, OAuthApi api) {
method onNewIntent (line 123) | @Override
method onActivityResult (line 152) | @Override
method buildColorful (line 162) | public Colorful.Builder buildColorful(Colorful.Builder mColorfulBuilde...
FILE: app/src/main/java/me/wizos/loread/activity/RuleGenerateActivity.java
class RuleGenerateActivity (line 9) | public class RuleGenerateActivity extends AppCompatActivity {
method onCreate (line 11) | @Override
FILE: app/src/main/java/me/wizos/loread/activity/SearchActivity.java
class SearchActivity (line 50) | public class SearchActivity extends BaseActivity {
method onCreate (line 61) | @Override
method initView (line 74) | private void initView() {
method searchAndLoadFeedsData (line 143) | private void searchAndLoadFeedsData() {
method showSelectFolder (line 192) | public void showSelectFolder(final View view, final String feedId) {
class SearchListViewAdapter (line 260) | class SearchListViewAdapter extends ArrayAdapter<SearchFeedItem> {
method SearchListViewAdapter (line 263) | public SearchListViewAdapter(Context context, List<SearchFeedItem> f...
method getCount (line 268) | @Override
method getItem (line 273) | @Override
method getItemId (line 278) | @Override
method getView (line 283) | @Override
class CustomViewHolder (line 358) | public static class CustomViewHolder {
method initToolbar (line 368) | private void initToolbar() {
method onSearchFeedsClicked (line 378) | public void onSearchFeedsClicked(View view) {
method onSearchLocalArtsClicked (line 389) | public void onSearchLocalArtsClicked(View view) {
method buildColorful (line 398) | @Override
FILE: app/src/main/java/me/wizos/loread/activity/SettingActivity.java
class SettingActivity (line 45) | public class SettingActivity extends BaseActivity {
method onCreate (line 69) | @Override
method toggleAutoSyncItem (line 79) | private void toggleAutoSyncItem() {
method initView (line 92) | private void initView() {
method onSBClick (line 154) | public void onSBClick(View view) {
method onClickAutoSyncFrequencySelect (line 176) | public void onClickAutoSyncFrequencySelect(View view) {
method showClearBeforeDay (line 216) | public void showClearBeforeDay(View view) {
method showAbout (line 253) | public void showAbout(View view) {
method joinQQGroup (line 282) | public void joinQQGroup(View view) {
method addAccount (line 300) | public void addAccount() {
method escAccount (line 307) | public void escAccount() {
method onClickSwitchUser (line 347) | public void onClickSwitchUser(View view) {
method initToolbar (line 403) | private void initToolbar() {
method onClickFeedback (line 413) | public void onClickFeedback(View view) {
method buildColorful (line 422) | @Override
FILE: app/src/main/java/me/wizos/loread/activity/SplashActivity.java
class SplashActivity (line 14) | public class SplashActivity extends BaseActivity {
method onCreate (line 17) | @Override
method buildColorful (line 53) | public Colorful.Builder buildColorful(Colorful.Builder mColorfulBuilde...
FILE: app/src/main/java/me/wizos/loread/activity/TTSActivity.java
class TTSActivity (line 31) | public class TTSActivity extends BaseActivity {
method onCreate (line 35) | @Override
method onDestroy (line 57) | @Override
class PlayConnection (line 97) | public class PlayConnection implements ServiceConnection {
method onServiceConnected (line 99) | @Override
method onServiceDisconnected (line 106) | @Override
method initToolbar (line 112) | public void initToolbar() {
method initView (line 130) | public void initView(IBinder service) {
method initFloatWindow (line 269) | private void initFloatWindow() {
method onOptionsItemSelected (line 309) | @Override
method buildColorful (line 318) | @Override
FILE: app/src/main/java/me/wizos/loread/activity/WebActivity.java
class WebActivity (line 77) | public class WebActivity extends BaseActivity implements WebBridge {
method onCreate (line 89) | @Override
method initWebView (line 136) | @SuppressLint({"ClickableViewAccessibility", "SetJavaScriptEnabled"})
method onKeyDown (line 261) | @Override
method run (line 282) | @SuppressLint("InlinedApi")
method run (line 318) | @Override
method onSaveInstanceState (line 333) | @Override
method onRecoveryInstanceState (line 340) | private void onRecoveryInstanceState(@NonNull Bundle outState) {
method landscape (line 351) | @SuppressLint("SourceLockedOrientationActivity")
method portrait (line 363) | @SuppressLint("SourceLockedOrientationActivity")
method log (line 373) | @Override
method toggleScreenOrientation (line 378) | @Override
method onReceivedTitle (line 388) | @Override
method shouldInterceptRequest (line 401) | @Override
method shouldOverrideUrlLoading (line 450) | @Override
method onPageStarted (line 494) | @Override
method onPageFinished (line 507) | @Override
method onReceivedHttpError (line 520) | @Override
method onReceivedSslError (line 526) | @Override
method onReceivedError (line 532) | @Override
method onCreateOptionsMenu (line 541) | @Override
method onOptionsItemSelected (line 549) | @Override
method onConfigurationChanged (line 684) | @Override
method exit (line 690) | private void exit() {
method onPause (line 695) | @Override
method onResume (line 701) | @Override
method onDestroy (line 707) | @Override
method buildColorful (line 720) | @Override
FILE: app/src/main/java/me/wizos/loread/activity/login/LoginFormState.java
class LoginFormState (line 8) | public class LoginFormState {
method LoginFormState (line 17) | public LoginFormState() { }
method LoginFormState (line 19) | public LoginFormState(@Nullable Integer usernameHint, @Nullable Intege...
method LoginFormState (line 25) | public LoginFormState(boolean isDataValid) {
method setHostHint (line 33) | public void setHostHint(@Nullable Integer hostHint) {
method setUsernameHint (line 37) | public void setUsernameHint(@Nullable Integer usernameHint) {
method setPasswordHint (line 41) | public void setPasswordHint(@Nullable Integer passwordHint) {
method getHostHint (line 45) | @Nullable
method getUsernameHint (line 49) | @Nullable
method getPasswordHint (line 54) | @Nullable
method setDataValid (line 59) | public void setDataValid(boolean dataValid) {
method isDataValid (line 63) | boolean isDataValid() {
FILE: app/src/main/java/me/wizos/loread/activity/login/LoginInoReaderActivity.java
class LoginInoReaderActivity (line 28) | public class LoginInoReaderActivity extends BaseActivity {
method onCreate (line 31) | @Override
method buildColorful (line 148) | public Colorful.Builder buildColorful(Colorful.Builder mColorfulBuilde...
FILE: app/src/main/java/me/wizos/loread/activity/login/LoginResult.java
class LoginResult (line 8) | public class LoginResult {
method LoginResult (line 14) | public LoginResult() {
method setSuccess (line 17) | @Nullable
method isSuccess (line 23) | @Nullable
method getData (line 28) | @Nullable
method setData (line 33) | public LoginResult setData(@Nullable String data) {
method toString (line 38) | @Override
FILE: app/src/main/java/me/wizos/loread/activity/login/LoginTinyRSSActivity.java
class LoginTinyRSSActivity (line 28) | public class LoginTinyRSSActivity extends BaseActivity {
method onCreate (line 31) | @Override
method buildColorful (line 148) | public Colorful.Builder buildColorful(Colorful.Builder mColorfulBuilde...
FILE: app/src/main/java/me/wizos/loread/adapter/ArticlePagedListAdapter.java
class ArticlePagedListAdapter (line 33) | public class ArticlePagedListAdapter extends PagedListAdapter<Article, A...
method ArticlePagedListAdapter (line 38) | public ArticlePagedListAdapter() {
method onCreateViewHolder (line 42) | @NonNull
method onBindViewHolder (line 56) | @Override
method areItemsTheSame (line 69) | @Override
method areContentsTheSame (line 74) | @Override
class ArticleViewHolder (line 86) | class ArticleViewHolder extends RecyclerView.ViewHolder {
method ArticleViewHolder (line 97) | ArticleViewHolder(@NonNull View itemView) {
method placeholder (line 108) | void placeholder(){
method bindTo (line 126) | void bindTo(Article article){
method getItem (line 198) | @Override
method setLastItem (line 210) | public void setLastItem(int position){
method setLastPos (line 214) | public void setLastPos(int position){
method load (line 225) | public void load(int index){
FILE: app/src/main/java/me/wizos/loread/adapter/ExpandedAdapter.java
class ExpandedAdapter (line 28) | public class ExpandedAdapter extends ExpandableAdapter<RecyclerView.View...
method ExpandedAdapter (line 34) | public ExpandedAdapter(Context context) {
method setParents (line 42) | public void setParents(List<Collection> parents) {
method getParents (line 45) | public List<Collection> getParents() {
method notifyDataChanged (line 50) | public void notifyDataChanged() {
method getGroup (line 57) | public Collection getGroup(int groupPos){
method getChild (line 61) | public Collection getChild(int groupPos, int childPos) {
method getChildren (line 65) | private List<Collection> getChildren(int groupPos) {
method parentItemCount (line 88) | @Override
method childItemCount (line 94) | @Override
method createParentHolder (line 101) | @Override
method createChildHolder (line 108) | @Override
method bindParentHolder (line 115) | @Override
method bindChildHolder (line 121) | @Override
class ParentHolder (line 127) | static class ParentHolder extends RecyclerView.ViewHolder {
method ParentHolder (line 134) | ParentHolder(@NonNull View itemView) {
method setData (line 142) | public void setData(@NonNull ExpandedAdapter mAdapter, @NonNull Coll...
class ChildHolder (line 189) | static class ChildHolder extends RecyclerView.ViewHolder {
method ChildHolder (line 193) | ChildHolder(@NonNull View itemView) {
method setData (line 199) | public void setData(Collection feed) {
FILE: app/src/main/java/me/wizos/loread/bean/Enclosure.java
class Enclosure (line 9) | public class Enclosure {
method getHref (line 16) | public String getHref() {
method setHref (line 20) | public void setHref(String href) {
method getType (line 24) | public String getType() {
method setType (line 28) | public void setType(String type) {
method toString (line 32) | public String toString() {
FILE: app/src/main/java/me/wizos/loread/bean/Token.java
class Token (line 12) | public class Token {
method getAccess_token (line 50) | public String getAccess_token() {
method setAccess_token (line 54) | public void setAccess_token(String access_token) {
method getRefresh_token (line 58) | public String getRefresh_token() {
method setRefresh_token (line 62) | public void setRefresh_token(String refresh_token) {
method getToken_type (line 66) | public String getToken_type() {
method setToken_type (line 73) | public void setToken_type(String token_type) {
method getExpires_in (line 81) | public long getExpires_in() {
method setExpires_in (line 85) | public void setExpires_in(long refresh_token) {
method getAuth (line 89) | public String getAuth() {
method setAuth (line 93) | public void setAuth(String auth) {
method toString (line 98) | @Override
FILE: app/src/main/java/me/wizos/loread/bean/UserAgent.java
class UserAgent (line 8) | public class UserAgent {
method UserAgent (line 12) | public UserAgent(String name, String value) {
method getName (line 17) | public String getName() {
method setName (line 21) | public void setName(String name) {
method getValue (line 25) | public String getValue() {
method setValue (line 29) | public void setValue(String value) {
FILE: app/src/main/java/me/wizos/loread/bean/domain/OutFeed.java
class OutFeed (line 7) | public class OutFeed {
method OutFeed (line 12) | public OutFeed(String title, String feedUrl, String htmlUrl) {
method getTitle (line 18) | public String getTitle() {
method setTitle (line 22) | public void setTitle(String title) {
method getFeedUrl (line 26) | public String getFeedUrl() {
method setFeedUrl (line 30) | public void setFeedUrl(String feedUrl) {
method getHtmlUrl (line 34) | public String getHtmlUrl() {
method setHtmlUrl (line 38) | public void setHtmlUrl(String htmlUrl) {
method toString (line 42) | @Override
FILE: app/src/main/java/me/wizos/loread/bean/domain/OutTag.java
class OutTag (line 9) | public class OutTag {
method getTitle (line 13) | public String getTitle() {
method setTitle (line 17) | public void setTitle(String title) {
method getOutFeeds (line 21) | public ArrayList<OutFeed> getOutFeeds() {
method setOutFeeds (line 25) | public void setOutFeeds(ArrayList<OutFeed> outFeeds) {
method addOutFeed (line 29) | public OutTag addOutFeed(OutFeed outFeed) {
method toString (line 38) | @Override
FILE: app/src/main/java/me/wizos/loread/bean/feedly/CategoryItem.java
class CategoryItem (line 11) | public class CategoryItem {
method getId (line 18) | public String getId() {
method setId (line 22) | public void setId(String id) {
method getLabel (line 26) | public String getLabel() {
method setLabel (line 30) | public void setLabel(String label) {
method convert (line 35) | public Category convert() {
FILE: app/src/main/java/me/wizos/loread/bean/feedly/Collection.java
class Collection (line 15) | public class Collection {
method getId (line 37) | public String getId() {
method setId (line 41) | public void setId(String id) {
method getLabel (line 45) | public String getLabel() {
method setLabel (line 49) | public void setLabel(String label) {
method isCustomizable (line 53) | public boolean isCustomizable() {
method setCustomizable (line 57) | public void setCustomizable(boolean customizable) {
method isEnterprise (line 61) | public boolean isEnterprise() {
method setEnterprise (line 65) | public void setEnterprise(boolean enterprise) {
method getNumFeeds (line 69) | public int getNumFeeds() {
method setNumFeeds (line 73) | public void setNumFeeds(int numFeeds) {
method getFeedItems (line 77) | public ArrayList<FeedItem> getFeedItems() {
method setFeedItems (line 81) | public void setFeedItems(ArrayList<FeedItem> feedItems) {
method getCategoryItem (line 86) | public CategoryItem getCategoryItem() {
method getCategory (line 93) | public Category getCategory() {
method getFeeds (line 100) | public ArrayList<Feed> getFeeds() {
FILE: app/src/main/java/me/wizos/loread/bean/feedly/ContentDirection.java
class ContentDirection (line 9) | public class ContentDirection {
method getContent (line 15) | public String getContent() {
method setContent (line 19) | public void setContent(String content) {
method getDirection (line 23) | public String getDirection() {
method setDirection (line 27) | public void setDirection(String direction) {
FILE: app/src/main/java/me/wizos/loread/bean/feedly/Counts.java
class Counts (line 11) | public class Counts {
method getUnreadcounts (line 17) | public ArrayList<Unreadcount> getUnreadcounts() {
method setUnreadcounts (line 21) | public void setUnreadcounts(ArrayList<Unreadcount> unreadcounts) {
method getUpdated (line 25) | public long getUpdated() {
method setUpdated (line 29) | public void setUpdated(long updated) {
FILE: app/src/main/java/me/wizos/loread/bean/feedly/Entry.java
class Entry (line 19) | public class Entry {
method getId (line 168) | public String getId() {
method setId (line 172) | public void setId(String id) {
method getOriginId (line 176) | public String getOriginId() {
method setOriginId (line 180) | public void setOriginId(String originId) {
method getFingerprint (line 184) | public String getFingerprint() {
method setFingerprint (line 188) | public void setFingerprint(String fingerprint) {
method getTitle (line 192) | public String getTitle() {
method setTitle (line 196) | public void setTitle(String title) {
method getAuthor (line 200) | public String getAuthor() {
method setAuthor (line 204) | public void setAuthor(String author) {
method getContent (line 208) | public ContentDirection getContent() {
method setContent (line 212) | public void setContent(ContentDirection content) {
method getSummary (line 216) | public ContentDirection getSummary() {
method setSummary (line 220) | public void setSummary(ContentDirection summary) {
method getPublished (line 224) | public long getPublished() {
method setPublished (line 228) | public void setPublished(long published) {
method getCrawled (line 232) | public long getCrawled() {
method setCrawled (line 236) | public void setCrawled(long crawled) {
method getUpdated (line 240) | public long getUpdated() {
method setUpdated (line 244) | public void setUpdated(long updated) {
method getOrigin (line 248) | public Origin getOrigin() {
method setOrigin (line 252) | public void setOrigin(Origin origin) {
method getCanonicalUrl (line 256) | public String getCanonicalUrl() {
method setCanonicalUrl (line 260) | public void setCanonicalUrl(String canonicalUrl) {
method getCanonical (line 264) | public ArrayList<Enclosure> getCanonical() {
method setCanonical (line 268) | public void setCanonical(ArrayList<Enclosure> canonical) {
method getAlternate (line 272) | public ArrayList<Enclosure> getAlternate() {
method setAlternate (line 276) | public void setAlternate(ArrayList<Enclosure> alternate) {
method getEnclosure (line 280) | public ArrayList<Enclosure> getEnclosure() {
method setEnclosure (line 284) | public void setEnclosure(ArrayList<Enclosure> enclosure) {
method getKeywords (line 288) | public ArrayList<String> getKeywords() {
method setKeywords (line 292) | public void setKeywords(ArrayList<String> keywords) {
method isUnread (line 296) | public boolean isUnread() {
method setUnread (line 300) | public void setUnread(boolean unread) {
method convert (line 304) | public Article convert(BaseApi.ArticleChanger articleChanger) {
FILE: app/src/main/java/me/wizos/loread/bean/feedly/FeedItem.java
class FeedItem (line 15) | public class FeedItem {
method getId (line 52) | public String getId() {
method setId (line 55) | public void setId(String id) {
method getFeedId (line 58) | public String getFeedId() {
method setFeedId (line 61) | public void setFeedId(String feedId) {
method getTitle (line 64) | public String getTitle() {
method setTitle (line 67) | public void setTitle(String title) {
method getDescription (line 70) | public String getDescription() {
method setDescription (line 73) | public void setDescription(String description) {
method getWebsite (line 76) | public String getWebsite() {
method setWebsite (line 79) | public void setWebsite(String website) {
method getIconUrl (line 82) | public String getIconUrl() {
method setIconUrl (line 85) | public void setIconUrl(String iconUrl) {
method getVisualUrl (line 88) | public String getVisualUrl() {
method setVisualUrl (line 91) | public void setVisualUrl(String visualUrl) {
method getLanguage (line 94) | public String getLanguage() {
method setLanguage (line 97) | public void setLanguage(String language) {
method getSubscribers (line 100) | public int getSubscribers() {
method setSubscribers (line 103) | public void setSubscribers(int subscribers) {
method getUpdated (line 106) | public long getUpdated() {
method setUpdated (line 109) | public void setUpdated(long updated) {
method getVelocity (line 112) | public float getVelocity() {
method setVelocity (line 115) | public void setVelocity(float velocity) {
method getTopics (line 118) | public ArrayList<String> getTopics() {
method setTopics (line 121) | public void setTopics(ArrayList<String> topics) {
method isPartial (line 124) | public boolean isPartial() {
method setPartial (line 127) | public void setPartial(boolean partial) {
method getContentType (line 130) | public String getContentType() {
method setContentType (line 133) | public void setContentType(String contentType) {
method getState (line 136) | public String getState() {
method setState (line 139) | public void setState(String state) {
method convert2Feed (line 143) | public Feed convert2Feed() {
method toString (line 154) | @NotNull
FILE: app/src/main/java/me/wizos/loread/bean/feedly/Origin.java
class Origin (line 9) | public class Origin {
method getStreamId (line 17) | public String getStreamId() {
method setStreamId (line 21) | public void setStreamId(String streamId) {
method getHtmlUrl (line 25) | public String getHtmlUrl() {
method setHtmlUrl (line 29) | public void setHtmlUrl(String htmlUrl) {
method getTitle (line 33) | public String getTitle() {
method setTitle (line 37) | public void setTitle(String title) {
FILE: app/src/main/java/me/wizos/loread/bean/feedly/Profile.java
class Profile (line 12) | public class Profile {
method getUser (line 53) | public User getUser() {
method getId (line 63) | public String getId() {
method setId (line 67) | public void setId(String id) {
method getLogin (line 71) | public String getLogin() {
method setLogin (line 75) | public void setLogin(String login) {
method getEmail (line 79) | public String getEmail() {
method setEmail (line 83) | public void setEmail(String email) {
method getFullName (line 87) | public String getFullName() {
method setFullName (line 91) | public void setFullName(String fullName) {
FILE: app/src/main/java/me/wizos/loread/bean/feedly/StreamContents.java
class StreamContents (line 9) | public class StreamContents {
method getId (line 16) | public String getId() {
method setId (line 20) | public void setId(String id) {
method getUpdated (line 24) | public long getUpdated() {
method setUpdated (line 28) | public void setUpdated(long updated) {
method getContinuation (line 32) | public String getContinuation() {
method setContinuation (line 36) | public void setContinuation(String continuation) {
method getItems (line 40) | public ArrayList<Entry> getItems() {
method setItems (line 44) | public void setItems(ArrayList<Entry> items) {
FILE: app/src/main/java/me/wizos/loread/bean/feedly/StreamIds.java
class StreamIds (line 11) | public class StreamIds {
method getIds (line 18) | public ArrayList<String> getIds() {
method setIds (line 22) | public void setIds(ArrayList<String> ids) {
method getContinuation (line 26) | public String getContinuation() {
method setContinuation (line 30) | public void setContinuation(String continuation) {
FILE: app/src/main/java/me/wizos/loread/bean/feedly/Unreadcount.java
class Unreadcount (line 9) | public class Unreadcount {
method getId (line 17) | public String getId() {
method setId (line 21) | public void setId(String id) {
method getCount (line 25) | public int getCount() {
method setCount (line 29) | public void setCount(int count) {
method getUpdated (line 33) | public long getUpdated() {
method setUpdated (line 37) | public void setUpdated(long updated) {
FILE: app/src/main/java/me/wizos/loread/bean/feedly/Visual.java
class Visual (line 9) | public class Visual {
method getUrl (line 34) | public Origin getUrl() {
method setUrl (line 38) | public void setUrl(Origin url) {
method getContentType (line 42) | public Origin getContentType() {
method setContentType (line 46) | public void setContentType(Origin contentType) {
method getWidth (line 50) | public int getWidth() {
method setWidth (line 54) | public void setWidth(int width) {
method getHeight (line 58) | public int getHeight() {
method setHeight (line 62) | public void setHeight(int height) {
FILE: app/src/main/java/me/wizos/loread/bean/feedly/input/EditCollection.java
class EditCollection (line 11) | public class EditCollection {
method EditCollection (line 34) | public EditCollection(String id) {
method getId (line 38) | public String getId() {
method setId (line 42) | public void setId(String id) {
method getLabel (line 46) | public String getLabel() {
method setLabel (line 50) | public void setLabel(String label) {
method getDescription (line 54) | public String getDescription() {
method setDescription (line 58) | public void setDescription(String description) {
method getFeeds (line 62) | public ArrayList<EditFeed> getFeeds() {
method setFeeds (line 66) | public void setFeeds(ArrayList<EditFeed> feeds) {
FILE: app/src/main/java/me/wizos/loread/bean/feedly/input/EditFeed.java
class EditFeed (line 16) | public class EditFeed {
method EditFeed (line 21) | public EditFeed() {
method EditFeed (line 25) | public EditFeed(String feedId) {
method getId (line 36) | public String getId() {
method setId (line 40) | public void setId(String id) {
method getTitle (line 44) | public String getTitle() {
method setTitle (line 48) | public void setTitle(String title) {
method getCategoryItems (line 52) | public ArrayList<CategoryItem> getCategoryItems() {
method setCategoryItems (line 56) | public void setCategoryItems(ArrayList<CategoryItem> categoryItems) {
method toString (line 61) | @Override
FILE: app/src/main/java/me/wizos/loread/bean/feedly/input/MarkerAction.java
class MarkerAction (line 11) | public class MarkerAction {
method getAction (line 50) | public String getAction() {
method setAction (line 54) | public void setAction(String action) {
method getType (line 58) | public String getType() {
method setType (line 62) | public void setType(String type) {
method getEntryIds (line 66) | public List<String> getEntryIds() {
method setEntryIds (line 70) | public void setEntryIds(List<String> entryIds) {
method getFeedIds (line 74) | public List<String> getFeedIds() {
method setFeedIds (line 78) | public void setFeedIds(List<String> feedIds) {
method getCategoryIds (line 82) | public List<String> getCategoryIds() {
method setCategoryIds (line 86) | public void setCategoryIds(List<String> categoryIds) {
FILE: app/src/main/java/me/wizos/loread/bean/fever/BaseResponse.java
class BaseResponse (line 5) | public class BaseResponse {
method getApiVersion (line 15) | public int getApiVersion() {
method getAuth (line 19) | public int getAuth() {
method getLastRefreshedOnTime (line 23) | public long getLastRefreshedOnTime() {
method isSuccessful (line 28) | public boolean isSuccessful(){
FILE: app/src/main/java/me/wizos/loread/bean/fever/Group.java
class Group (line 9) | public class Group {
method getId (line 15) | public int getId() {
method getTitle (line 19) | public String getTitle() {
method getFeedIds (line 23) | public String[] getFeedIds(){
method getCategry (line 31) | public Category getCategry(){
FILE: app/src/main/java/me/wizos/loread/bean/fever/GroupFeeds.java
class GroupFeeds (line 5) | public class GroupFeeds {
method getGroupId (line 11) | public int getGroupId() {
method getFeedIds (line 15) | public String getFeedIds() {
FILE: app/src/main/java/me/wizos/loread/bean/fever/Groups.java
class Groups (line 12) | public class Groups extends BaseResponse {
method getGroups (line 19) | public List<Group> getGroups() {
method getFeedsGroups (line 23) | public List<GroupFeeds> getFeedsGroups() {
FILE: app/src/main/java/me/wizos/loread/bean/fever/Item.java
class Item (line 5) | public class Item {
method getId (line 28) | public int getId() {
method getFeedId (line 32) | public int getFeedId() {
method getTitle (line 36) | public String getTitle() {
method getAuthor (line 40) | public String getAuthor() {
method getHtml (line 44) | public String getHtml() {
method getUrl (line 48) | public String getUrl() {
method getIsSaved (line 52) | public int getIsSaved() {
method getIsRead (line 56) | public int getIsRead() {
method getCreatedOnTime (line 60) | public long getCreatedOnTime() {
FILE: app/src/main/java/me/wizos/loread/bean/fever/Items.java
class Items (line 7) | public class Items extends BaseResponse {
method getTotalItems (line 14) | public String getTotalItems() {
method getItems (line 18) | public List<Item> getItems() {
FILE: app/src/main/java/me/wizos/loread/bean/fever/SavedItemIds.java
class SavedItemIds (line 7) | public class SavedItemIds extends BaseResponse {
method getSavedItemIds (line 11) | public String[] getSavedItemIds(){
FILE: app/src/main/java/me/wizos/loread/bean/fever/UnreadItemIds.java
class UnreadItemIds (line 7) | public class UnreadItemIds extends BaseResponse {
method getUreadItemIds (line 10) | public String[] getUreadItemIds(){
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/GsTag.java
class GsTag (line 9) | public class GsTag {
method getId (line 15) | public String getId() {
method setId (line 19) | public void setId(String id) {
method getSortid (line 23) | public String getSortid() {
method setSortid (line 27) | public void setSortid(String sortid) {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/GsTags.java
class GsTags (line 11) | @Parcel
method getCategories (line 16) | public ArrayList<Category> getCategories() {
method setCategories (line 20) | public void setCategories(ArrayList<Category> categories) {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/GsUnreadCount.java
class GsUnreadCount (line 10) | public class GsUnreadCount {
method getMax (line 17) | public int getMax() {
method setMax (line 21) | public void setMax(int max) {
method getUnreadcounts (line 25) | public ArrayList<UnreadCounts> getUnreadcounts() {
method setUnreadcounts (line 29) | public void setUnreadcounts(ArrayList<UnreadCounts> unreadcounts) {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/ItemIds.java
class ItemIds (line 10) | public class ItemIds {
method ItemIds (line 20) | public ItemIds() {
method getItems (line 27) | public ArrayList<String> getItems() {
method setItems (line 31) | public void setItems(ArrayList<String> items) {
method setItemRefs (line 35) | public void setItemRefs(ArrayList<ItemRefs> itemRefs) {
method getItemRefs (line 39) | public ArrayList<ItemRefs> getItemRefs() {
method setContinuation (line 43) | public void setContinuation(String continuation) {
method getContinuation (line 47) | public String getContinuation() {
method addItemRefs (line 51) | public void addItemRefs(ArrayList<ItemRefs> itemRefs) {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/ItemRefs.java
class ItemRefs (line 10) | public class ItemRefs {
method getId (line 21) | public String getId() {
method setId (line 25) | public void setId(String id) {
method setDirectStreamIds (line 29) | public void setDirectStreamIds(ArrayList<String> directStreamIds) {
method getDirectStreamIds (line 33) | public ArrayList<String> getDirectStreamIds() {
method setTimestampUsec (line 37) | public void setTimestampUsec(long timestampUsec) {
method getTimestampUsec (line 41) | public long getTimestampUsec() {
method getLongId (line 45) | public String getLongId() {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/LoginResult.java
class LoginResult (line 12) | public class LoginResult {
method LoginResult (line 18) | public LoginResult(String result) {
method getError (line 45) | public String getError() {
method setError (line 49) | public void setError(String error) {
method getAuth (line 53) | public String getAuth() {
method setAuth (line 57) | public void setAuth(String auth) {
method toString (line 61) | @Override
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/Readability.java
class Readability (line 12) | @Parcel
method getTitle (line 56) | public String getTitle() {
method setTitle (line 60) | public void setTitle(String title) {
method getAuthor (line 64) | public String getAuthor() {
method setAuthor (line 68) | public void setAuthor(String author) {
method getDate_published (line 72) | public String getDate_published() {
method setDate_published (line 76) | public void setDate_published(String date_published) {
method getDek (line 80) | public String getDek() {
method setDek (line 84) | public void setDek(String dek) {
method getLead_image_url (line 88) | public String getLead_image_url() {
method setLead_image_url (line 92) | public void setLead_image_url(String lead_image_url) {
method getContent (line 96) | public String getContent() {
method setContent (line 100) | public void setContent(String content) {
method getNext_page_url (line 104) | public String getNext_page_url() {
method setNext_page_url (line 108) | public void setNext_page_url(String next_page_url) {
method getUrl (line 112) | public String getUrl() {
method setUrl (line 116) | public void setUrl(String url) {
method getDomain (line 120) | public String getDomain() {
method setDomain (line 124) | public void setDomain(String domain) {
method getExcerpt (line 128) | public String getExcerpt() {
method setExcerpt (line 132) | public void setExcerpt(String excerpt) {
method getWord_count (line 136) | public int getWord_count() {
method setWord_count (line 140) | public void setWord_count(int word_count) {
method getDirection (line 144) | public String getDirection() {
method setDirection (line 148) | public void setDirection(String direction) {
method getTotal_pages (line 152) | public int getTotal_pages() {
method setTotal_pages (line 156) | public void setTotal_pages(int total_pages) {
method getRendered_pages (line 160) | public int getRendered_pages() {
method setRendered_pages (line 164) | public void setRendered_pages(int rendered_pages) {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/StreamContents.java
class StreamContents (line 13) | @Parcel
method getDirection (line 40) | public String getDirection() {
method setDirection (line 44) | public void setDirection(String direction) {
method getId (line 48) | public String getId() {
method setId (line 52) | public void setId(String id) {
method getTitle (line 56) | public String getTitle() {
method setTitle (line 60) | public void setTitle(String title) {
method getDescription (line 64) | public String getDescription() {
method setDescription (line 68) | public void setDescription(String description) {
method getSelf (line 72) | public Self getSelf() {
method setSelf (line 76) | public void setSelf(Self self) {
method getUpdated (line 80) | public long getUpdated() {
method setUpdated (line 84) | public void setUpdated(long updated) {
method getUpdatedUsec (line 88) | public long getUpdatedUsec() {
method setUpdatedUsec (line 92) | public void setUpdatedUsec(long updatedUsec) {
method getItems (line 96) | public ArrayList<Item> getItems() {
method setItems (line 100) | public void setItems(ArrayList<Item> items) {
method getContinuation (line 104) | public String getContinuation() {
method setContinuation (line 108) | public void setContinuation(String continuation) {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/StreamPref.java
class StreamPref (line 9) | public class StreamPref {
method getValue (line 17) | public String getValue() {
method setValue (line 21) | public void setValue(String value) {
method getId (line 25) | public String getId() {
method setId (line 29) | public void setId(String id) {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/StreamPrefs.java
class StreamPrefs (line 10) | @Parcel
method getStreamPrefsMaps (line 15) | public Map<String, ArrayList<StreamPref>> getStreamPrefsMaps() {
method setStreamPrefs (line 19) | public void setStreamPrefs(Map<String, ArrayList<StreamPref>> streamPr...
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/SubCategories.java
class SubCategories (line 8) | public class SubCategories {
method getId (line 15) | public String getId() {
method setId (line 19) | public void setId(String id) {
method getLabel (line 23) | public String getLabel() {
method setLabel (line 27) | public void setLabel(String label) {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/Subscription.java
class Subscription (line 13) | public class Subscription {
method convert2Feed (line 32) | public Feed convert2Feed() {
method getId (line 43) | public String getId() {
method setId (line 46) | public void setId(String id) {
method getTitle (line 49) | public String getTitle() {
method setTitle (line 52) | public void setTitle(String title) {
method getCategories (line 55) | public ArrayList<SubCategories> getCategories() {
method setCategories (line 58) | public void setCategories(ArrayList<SubCategories> categories) {
method getSortId (line 61) | public String getSortId() {
method setSortId (line 64) | public void setSortId(String sortId) {
method getFirstItemMsec (line 67) | public long getFirstItemMsec() {
method setFirstItemMsec (line 70) | public void setFirstItemMsec(long firstItemMsec) {
method getUrl (line 73) | public String getUrl() {
method setUrl (line 76) | public void setUrl(String url) {
method getHtmlUrl (line 79) | public String getHtmlUrl() {
method setHtmlUrl (line 82) | public void setHtmlUrl(String htmlUrl) {
method getIconUrl (line 85) | public String getIconUrl() {
method setIconUrl (line 88) | public void setIconUrl(String iconUrl) {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/Subscriptions.java
class Subscriptions (line 10) | public class Subscriptions {
method getSubscriptions (line 13) | public ArrayList<Subscription> getSubscriptions() {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/UnreadCounts.java
class UnreadCounts (line 8) | public class UnreadCounts {
method getId (line 19) | public String getId() {
method setId (line 23) | public void setId(String id) {
method getCount (line 27) | public int getCount() {
method setCount (line 31) | public void setCount(int count) {
method getNewestItemTimestampUsec (line 35) | public long getNewestItemTimestampUsec() {
method setNewestItemTimestampUsec (line 39) | public void setNewestItemTimestampUsec(long newestItemTimestampUsec) {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/UserInfo.java
class UserInfo (line 10) | @Parcel
method getUserId (line 32) | public long getUserId() {
method setUserId (line 36) | public void setUserId(long userId) {
method getUserName (line 40) | public String getUserName() {
method setUserName (line 44) | public void setUserName(String userName) {
method getUserProfileId (line 48) | public String getUserProfileId() {
method setUserProfileId (line 52) | public void setUserProfileId(String userProfileId) {
method getUserEmail (line 56) | public String getUserEmail() {
method setUserEmail (line 60) | public void setUserEmail(String userEmail) {
method getIsBloggerUser (line 64) | public Boolean getIsBloggerUser() {
method setIsBloggerUser (line 68) | public void setIsBloggerUser(Boolean isBloggerUser) {
method getSignupTimeSec (line 72) | public long getSignupTimeSec() {
method setSignupTimeSec (line 76) | public void setSignupTimeSec(long signupTimeSec) {
method getIsMultiLoginEnabled (line 80) | public Boolean getIsMultiLoginEnabled() {
method setIsMultiLoginEnabled (line 84) | public void setIsMultiLoginEnabled(Boolean isMultiLoginEnabled) {
method getUser (line 88) | public User getUser() {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/itemContents/Item.java
class Item (line 15) | public class Item {
method getCrawlTimeMsec (line 39) | public long getCrawlTimeMsec() {
method setCrawlTimeMsec (line 43) | public void setCrawlTimeMsec(long crawlTimeMsec) {
method getTimestampUsec (line 47) | public long getTimestampUsec() {
method setTimestampUsec (line 51) | public void setTimestampUsec(long timestampUsec) {
method getId (line 55) | public String getId() {
method setId (line 59) | public void setId(String id) {
method getCategories (line 63) | public ArrayList<String> getCategories() {
method setCategories (line 67) | public void setCategories(ArrayList<String> categories) {
method getTitle (line 71) | public String getTitle() {
method setTitle (line 75) | public void setTitle(String title) {
method getPublished (line 79) | public long getPublished() {
method setPublished (line 83) | public void setPublished(long published) {
method getUpdated (line 87) | public long getUpdated() {
method setUpdated (line 91) | public void setUpdated(long updated) {
method getStarred (line 95) | public long getStarred() {
method setStarred (line 99) | public void setStarred(long starred) {
method getEnclosure (line 103) | public ArrayList<Enclosure> getEnclosure() {
method setEnclosure (line 107) | public void setEnclosure(ArrayList<Enclosure> enclosure) {
method getCanonical (line 111) | public ArrayList<Enclosure> getCanonical() {
method setCanonical (line 115) | public void setCanonical(ArrayList<Enclosure> canonical) {
method getAlternate (line 119) | public ArrayList<Enclosure> getAlternate() {
method setAlternate (line 123) | public void setAlternate(ArrayList<Enclosure> alternate) {
method getSummary (line 127) | public Summary getSummary() {
method setSummary (line 131) | public void setSummary(Summary summary) {
method getAuthor (line 135) | public String getAuthor() {
method setAuthor (line 139) | public void setAuthor(String author) {
method getOrigin (line 143) | public Origin getOrigin() {
method setOrigin (line 147) | public void setOrigin(Origin origin) {
method convert (line 152) | public Article convert(BaseApi.ArticleChanger articleChanger) {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/itemContents/Origin.java
class Origin (line 7) | @Parcel
method getHtmlUrl (line 19) | public String getHtmlUrl() {
method setHtmlUrl (line 23) | public void setHtmlUrl(String htmlUrl) {
method getStreamId (line 27) | public String getStreamId() {
method setStreamId (line 31) | public void setStreamId(String streamId) {
method getTitle (line 35) | public String getTitle() {
method setTitle (line 39) | public void setTitle(String title) {
method toString (line 43) | public String toString() {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/itemContents/Self.java
class Self (line 7) | @Parcel
method getHref (line 12) | public String getHref() {
method setHref (line 16) | public void setHref(String href) {
FILE: app/src/main/java/me/wizos/loread/bean/inoreader/itemContents/Summary.java
class Summary (line 7) | @Parcel
method getContent (line 15) | public String getContent() {
method setContent (line 19) | public void setContent(String content) {
method getDirection (line 23) | public String getDirection() {
method setDirection (line 27) | public void setDirection(String direction) {
FILE: app/src/main/java/me/wizos/loread/bean/proxynode/AnonymityLevel.java
type AnonymityLevel (line 5) | public enum AnonymityLevel implements GsonEnum<AnonymityLevel> {
method AnonymityLevel (line 14) | AnonymityLevel(String anonymityLevel) {
method getAnonymityLevel (line 19) | public String getAnonymityLevel() {
method parse (line 23) | public static AnonymityLevel parse(String level) {
method deserialize (line 40) | @Override
method serialize (line 45) | @Override
FILE: app/src/main/java/me/wizos/loread/bean/proxynode/ProxyNode.java
class ProxyNode (line 10) | public class ProxyNode implements Serializable {
method ProxyNode (line 16) | public ProxyNode() {
method ProxyNode (line 19) | public ProxyNode(ProxyType type, AnonymityLevel level, String hostname...
method toString (line 26) | @Override
method getProxyType (line 37) | public Proxy.Type getProxyType() {
FILE: app/src/main/java/me/wizos/loread/bean/proxynode/ProxyType.java
type ProxyType (line 5) | public enum ProxyType implements GsonEnum<ProxyType> {
method ProxyType (line 8) | ProxyType(String proxyType) {
method getProxyType (line 13) | public String getProxyType() {
method parse (line 17) | public static ProxyType parse(String type) {
method deserialize (line 30) | @Override
method serialize (line 35) | @Override
FILE: app/src/main/java/me/wizos/loread/bean/search/SearchFeedItem.java
class SearchFeedItem (line 9) | public class SearchFeedItem extends FeedItem {
method getLastUpdated (line 20) | public long getLastUpdated() {
method setLastUpdated (line 24) | public void setLastUpdated(long lastUpdated) {
method getScore (line 28) | public float getScore() {
method setScore (line 32) | public void setScore(float score) {
method getCoverage (line 36) | public float getCoverage() {
method setCoverage (line 40) | public void setCoverage(float coverage) {
method getCoverageScore (line 44) | public float getCoverageScore() {
method setCoverageScore (line 48) | public void setCoverageScore(float coverageScore) {
method getAverageReadTime (line 52) | public float getAverageReadTime() {
method setAverageReadTime (line 56) | public void setAverageReadTime(float averageReadTime) {
method getWebsiteTitle (line 60) | public String getWebsiteTitle() {
method setWebsiteTitle (line 64) | public void setWebsiteTitle(String websiteTitle) {
FILE: app/src/main/java/me/wizos/loread/bean/search/SearchFeeds.java
class SearchFeeds (line 9) | public class SearchFeeds {
method getHint (line 16) | public String getHint() {
method setHint (line 20) | public void setHint(String hint) {
method getQueryType (line 24) | public String getQueryType() {
method setQueryType (line 28) | public void setQueryType(String queryType) {
method getScheme (line 32) | public String getScheme() {
method setScheme (line 36) | public void setScheme(String scheme) {
method getRelated (line 40) | public ArrayList<String> getRelated() {
method setRelated (line 44) | public void setRelated(ArrayList<String> related) {
method getResults (line 48) | public ArrayList<SearchFeedItem> getResults() {
method setResults (line 52) | public void setResults(ArrayList<SearchFeedItem> results) {
method toString (line 56) | @Override
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/request/GetArticles.java
class GetArticles (line 10) | public class GetArticles {
method GetArticles (line 16) | public GetArticles(String sid) {
method setArticleIds (line 20) | public void setArticleIds(String articleIds) {
method setArticleIds (line 23) | public void setArticleIds(HashSet<String> articleIdSet) {
method setArticleIds (line 26) | public void setArticleIds(List<String> articleIdList) {
method setSid (line 29) | public void setSid(String sid) {
method getSid (line 32) | public String getSid() {
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/request/GetCategories.java
class GetCategories (line 3) | public class GetCategories {
method GetCategories (line 9) | public GetCategories(String sid) {
method getSid (line 13) | public String getSid() {
method setSid (line 17) | public void setSid(String sid) {
method isUnread_only (line 21) | public boolean isUnread_only() {
method setUnread_only (line 25) | public void setUnread_only(boolean unread_only) {
method isInclude_empty (line 29) | public boolean isInclude_empty() {
method setInclude_empty (line 33) | public void setInclude_empty(boolean include_empty) {
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/request/GetFeeds.java
class GetFeeds (line 3) | public class GetFeeds {
method GetFeeds (line 7) | public GetFeeds(String sid) {
method getSid (line 22) | public String getSid() {
method setSid (line 26) | public void setSid(String sid) {
method getCat_id (line 30) | public int getCat_id() {
method setCat_id (line 34) | public void setCat_id(int cat_id) {
method isUnread_only (line 38) | public boolean isUnread_only() {
method setUnread_only (line 42) | public void setUnread_only(boolean unread_only) {
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/request/GetHeadlines.java
class GetHeadlines (line 3) | public class GetHeadlines {
method getOp (line 37) | public String getOp() {
method setOp (line 41) | public void setOp(String op) {
method getSid (line 45) | public String getSid() {
method setSid (line 49) | public void setSid(String sid) {
method getView_mode (line 53) | public String getView_mode() {
method setView_mode (line 57) | public void setView_mode(String view_mode) {
method getFeed_id (line 61) | public String getFeed_id() {
method setFeed_id (line 65) | public void setFeed_id(String feed_id) {
method getOrder_by (line 69) | public String getOrder_by() {
method setOrder_by (line 73) | public void setOrder_by(String order_by) {
method getLimit (line 77) | public int getLimit() {
method setLimit (line 81) | public void setLimit(int limit) {
method getSkip (line 85) | public int getSkip() {
method setSkip (line 89) | public void setSkip(int skip) {
method getSince_id (line 93) | public String getSince_id() {
method setSince_id (line 97) | public void setSince_id(String since_id) {
method isIs_cat (line 101) | public boolean isIs_cat() {
method setIs_cat (line 105) | public void setIs_cat(boolean is_cat) {
method isShow_content (line 109) | public boolean isShow_content() {
method setShow_content (line 113) | public void setShow_content(boolean show_content) {
method isInclude_attachments (line 117) | public boolean isInclude_attachments() {
method setInclude_attachments (line 121) | public void setInclude_attachments(boolean include_attachments) {
method isHas_sandbox (line 125) | public boolean isHas_sandbox() {
method setHas_sandbox (line 129) | public void setHas_sandbox(boolean has_sandbox) {
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/request/GetSavedItemIds.java
class GetSavedItemIds (line 3) | public class GetSavedItemIds {
method GetSavedItemIds (line 7) | public GetSavedItemIds(String sid) {
method setSid (line 11) | public void setSid(String sid) {
method getSid (line 14) | public String getSid() {
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/request/GetUnreadItemIds.java
class GetUnreadItemIds (line 3) | public class GetUnreadItemIds {
method GetUnreadItemIds (line 7) | public GetUnreadItemIds(String sid) {
method setSid (line 11) | public void setSid(String sid) {
method getSid (line 14) | public String getSid() {
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/request/LoginParam.java
class LoginParam (line 3) | public class LoginParam {
method getUser (line 8) | public String getUser() {
method setUser (line 12) | public void setUser(String user) {
method getPassword (line 16) | public String getPassword() {
method setPassword (line 20) | public void setPassword(String password) {
method toString (line 24) | @Override
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/request/RequestParam.java
class RequestParam (line 3) | public class RequestParam {
method setSid (line 7) | public void setSid(String sid) {
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/request/SearchHeadlines.java
class SearchHeadlines (line 3) | public class SearchHeadlines {
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/request/SearchMode.java
type SearchMode (line 3) | public enum SearchMode {
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/request/SubscribeToFeed.java
class SubscribeToFeed (line 3) | public class SubscribeToFeed {
method SubscribeToFeed (line 9) | public SubscribeToFeed(String sid) {
method getSid (line 13) | public String getSid() {
method setSid (line 17) | public void setSid(String sid) {
method getCategory_id (line 21) | public String getCategory_id() {
method setCategory_id (line 25) | public void setCategory_id(String category_id) {
method getFeed_url (line 29) | public String getFeed_url() {
method setFeed_url (line 33) | public void setFeed_url(String feed_url) {
method toString (line 37) | @Override
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/request/UnsubscribeFeed.java
class UnsubscribeFeed (line 5) | public class UnsubscribeFeed {
method UnsubscribeFeed (line 11) | public UnsubscribeFeed(String sid) {
method getOp (line 15) | public String getOp() {
method setOp (line 19) | public void setOp(String op) {
method getSid (line 23) | public String getSid() {
method setSid (line 27) | public void setSid(String sid) {
method getFeedId (line 31) | public int getFeedId() {
method setFeedId (line 35) | public void setFeedId(int feedId) {
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/request/UpdateArticle.java
class UpdateArticle (line 5) | public class UpdateArticle {
method UpdateArticle (line 22) | public UpdateArticle(String sid) {
method getSid (line 26) | public String getSid() {
method setSid (line 30) | public void setSid(String sid) {
method getArticle_ids (line 34) | public String getArticle_ids() {
method setArticle_ids (line 38) | public void setArticle_ids(String article_ids) {
method addArticle_id (line 42) | public void addArticle_id(String article_id) {
method getField (line 50) | public int getField() {
method setField (line 54) | public void setField(int field) {
method getMode (line 58) | public int getMode() {
method setMode (line 62) | public void setMode(int mode) {
method getData (line 66) | public String getData() {
method setData (line 70) | public void setData(String data) {
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/result/ArticleItem.java
class ArticleItem (line 11) | public class ArticleItem {
method convert (line 46) | public Article convert(BaseApi.ArticleChanger articleChanger) {
method toString (line 89) | @Override
method getId (line 119) | public int getId() {
method getGuid (line 123) | public String getGuid() {
method isUnread (line 127) | public boolean isUnread() {
method isMarked (line 131) | public boolean isMarked() {
method isPublished (line 135) | public boolean isPublished() {
method getUpdated (line 139) | public long getUpdated() {
method isIs_updated (line 143) | public boolean isIs_updated() {
method getTitle (line 147) | public String getTitle() {
method getLink (line 151) | public String getLink() {
method getAuthor (line 155) | public String getAuthor() {
method getContent (line 159) | public String getContent() {
method getAttachments (line 163) | public List<Enclosure> getAttachments() {
method getTags (line 167) | public List<String> getTags() {
method getLabels (line 171) | public List<Object> getLabels() {
method getComments_link (line 175) | public String getComments_link() {
method getComments_count (line 179) | public int getComments_count() {
method getFeed_id (line 183) | public String getFeed_id() {
method getFeed_title (line 187) | public String getFeed_title() {
method getFlavor_image (line 191) | public String getFlavor_image() {
method getFlavor_stream (line 195) | public String getFlavor_stream() {
method getLang (line 199) | public String getLang() {
method getNote (line 203) | public String getNote() {
method getScore (line 207) | public int getScore() {
method isAlways_display_attachments (line 211) | public boolean isAlways_display_attachments() {
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/result/CategoryItem.java
class CategoryItem (line 7) | public class CategoryItem {
method getId (line 16) | public String getId() {
method setId (line 20) | public void setId(String id) {
method getTitle (line 24) | public String getTitle() {
method setTitle (line 28) | public void setTitle(String title) {
method getUnread (line 32) | public int getUnread() {
method setUnread (line 36) | public void setUnread(int unread) {
method getOrder_id (line 40) | public int getOrder_id() {
method setOrder_id (line 44) | public void setOrder_id(int order_id) {
method convert (line 49) | public Category convert() {
method toString (line 59) | @Override
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/result/FeedItem.java
class FeedItem (line 8) | public class FeedItem {
method getFeedUrl (line 29) | public String getFeedUrl() {
method setFeedUrl (line 32) | public void setFeedUrl(String feedUrl) {
method getSiteUrl (line 35) | public String getSiteUrl() {
method setSiteUrl (line 38) | public void setSiteUrl(String siteUrl) {
method getTitle (line 41) | public String getTitle() {
method setTitle (line 44) | public void setTitle(String title) {
method getId (line 47) | public int getId() {
method setId (line 50) | public void setId(int id) {
method getUnread (line 53) | public int getUnread() {
method setUnread (line 56) | public void setUnread(int unread) {
method getCatId (line 59) | public int getCatId() {
method setCatId (line 62) | public void setCatId(int catId) {
method getOrderId (line 65) | public int getOrderId() {
method setOrderId (line 68) | public void setOrderId(int orderId) {
method getLastUpdated (line 71) | public long getLastUpdated() {
method setLastUpdated (line 74) | public void setLastUpdated(long lastUpdated) {
method isHasIcon (line 77) | public boolean isHasIcon() {
method setHasIcon (line 80) | public void setHasIcon(boolean hasIcon) {
method convert2Feed (line 85) | public Feed convert2Feed() {
method toString (line 96) | @Override
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/result/SubscribeToFeedResult.java
class SubscribeToFeedResult (line 3) | public class SubscribeToFeedResult {
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/result/TTRSSLoginResult.java
class TTRSSLoginResult (line 3) | public class TTRSSLoginResult {
method getSession_id (line 7) | public String getSession_id() {
method setSession_id (line 11) | public void setSession_id(String session_id) {
method getApi_level (line 15) | public int getApi_level() {
method setApi_level (line 19) | public void setApi_level(int api_level) {
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/result/TinyResponse.java
class TinyResponse (line 5) | public class TinyResponse<T> {
method isSuccessful (line 12) | public boolean isSuccessful() {
method getSeq (line 21) | public int getSeq() {
method setSeq (line 25) | public void setSeq(int seq) {
method getStatus (line 29) | public int getStatus() {
method setStatus (line 33) | public void setStatus(int status) {
method getContent (line 37) | public T getContent() {
method setContent (line 41) | public void setContent(T content) {
method getMsg (line 45) | public String getMsg() {
method setMsg (line 49) | public void setMsg(String msg) {
method toString (line 54) | @Override
FILE: app/src/main/java/me/wizos/loread/bean/ttrss/result/UpdateArticleResult.java
class UpdateArticleResult (line 3) | public class UpdateArticleResult {
method getStatus (line 7) | public String getStatus() {
method setStatus (line 11) | public void setStatus(String status) {
method getUpdated (line 15) | public int getUpdated() {
method setUpdated (line 19) | public void setUpdated(int updated) {
FILE: app/src/main/java/me/wizos/loread/behavior/BottomNavigationBehavior.java
class BottomNavigationBehavior (line 18) | public class BottomNavigationBehavior extends CoordinatorLayout.Behavior...
method BottomNavigationBehavior (line 21) | public BottomNavigationBehavior(Context context, AttributeSet attrs) {
method onStartNestedScroll (line 26) | @Override
method onNestedPreScroll (line 32) | @Override
FILE: app/src/main/java/me/wizos/loread/behavior/BottomNavigationViewBehavior.java
class BottomNavigationViewBehavior (line 35) | public class BottomNavigationViewBehavior extends CoordinatorLayout.Beha...
method BottomNavigationViewBehavior (line 36) | public BottomNavigationViewBehavior() {
method BottomNavigationViewBehavior (line 40) | public BottomNavigationViewBehavior(Context context, AttributeSet attr...
method onLayoutChild (line 44) | @Override
method layoutDependsOn (line 51) | @Override
method onDependentViewChanged (line 56) | @Override
FILE: app/src/main/java/me/wizos/loread/bridge/ArticleBridge.java
type ArticleBridge (line 19) | public interface ArticleBridge {
method log (line 22) | void log(String paramString);
method readImage (line 33) | void readImage(String articleId,String imgHashCode, String originalUrl);
method downImage (line 38) | void downImage(String articleId,String imgHashCode, String originalUrl...
method openImage (line 40) | void openImage(String articleId, String url);
method openLink (line 42) | void openLink(String link);
method openAudio (line 44) | void openAudio(String link);
method readability (line 46) | void readability();
FILE: app/src/main/java/me/wizos/loread/bridge/WebBridge.java
type WebBridge (line 3) | public interface WebBridge {
method log (line 5) | void log(String msg);
method toggleScreenOrientation (line 6) | void toggleScreenOrientation();
FILE: app/src/main/java/me/wizos/loread/config/AdBlock.java
class AdBlock (line 21) | public class AdBlock {
method AdBlock (line 28) | private AdBlock() {}
method i (line 29) | public static AdBlock i() {
method reset (line 40) | public void reset() {
method loadHosts (line 45) | private static void loadHosts() {
method getDomain (line 67) | private static String getDomain(String url) {
method isAd (line 83) | public boolean isAd(String url) {
FILE: app/src/main/java/me/wizos/loread/config/ArticleActionConfig.java
class ArticleActionConfig (line 30) | public class ArticleActionConfig {
method ArticleActionConfig (line 32) | private ArticleActionConfig() { }
method i (line 33) | public static ArticleActionConfig i() {
method save (line 50) | public void save() {
method reset (line 53) | public void reset() {
method exeRules (line 61) | public void exeRules(String uid, long timeMillis){
method exeRule (line 67) | private void exeRule(String uid, ArticleActionRule articleActionRule, ...
method doActionWithArticles (line 193) | private void doActionWithArticles(List<Article> articles, ArticleActio...
method getNeedActionArticlesWithNotMatch (line 245) | private List<Article> getNeedActionArticlesWithNotMatch(List<Article> ...
FILE: app/src/main/java/me/wizos/loread/config/ArticleExtractConfig.java
class ArticleExtractConfig (line 23) | public class ArticleExtractConfig {
method ArticleExtractConfig (line 25) | private ArticleExtractConfig() { }
method i (line 26) | public static ArticleExtractConfig i() {
method save (line 44) | public void save() {
method reset (line 47) | public void reset() {
method getRuleByDomain (line 57) | public ArticleExtractRule getRuleByDomain(String domain){
method saveRuleByDomain (line 73) | public void saveRuleByDomain(Document document, String domain, String...
method optimizeCSSSelector (line 83) | private static String optimizeCSSSelector(String cssQuery) {
method saveSiteRule (line 97) | private static void saveSiteRule(String domain, String cssSelector) {
method getRuleByCssSelector (line 109) | public ArticleExtractRule getRuleByCssSelector(Document document){
method getRuleByRegex (line 123) | public ArticleExtractRule getRuleByRegex(String page){
FILE: app/src/main/java/me/wizos/loread/config/ArticleTags.java
class ArticleTags (line 27) | public class ArticleTags {
method ArticleTags (line 29) | private ArticleTags() { }
method i (line 30) | public static ArticleTags i() {
method reset (line 48) | public void reset() {
method save (line 51) | public void save() {
method removeArticle (line 58) | public void removeArticle(String articleId){
method addArticleTags (line 61) | public void addArticleTags(List<ArticleTag> articleTags){
method addArticleTag (line 66) | public void addArticleTag(ArticleTag articleTag){
method newTag (line 80) | public void newTag(String directory){
FILE: app/src/main/java/me/wizos/loread/config/LinkRewriteConfig.java
class LinkRewriteConfig (line 22) | public class LinkRewriteConfig {
method LinkRewriteConfig (line 23) | private LinkRewriteConfig() { }
method i (line 24) | public static LinkRewriteConfig i() {
method reset (line 43) | public void reset() {
method save (line 46) | public void save() {
method getRedirectUrl (line 57) | public String getRedirectUrl(String url) {
FILE: app/src/main/java/me/wizos/loread/config/NetworkRefererConfig.java
class NetworkRefererConfig (line 17) | public class NetworkRefererConfig {
method i (line 19) | public static NetworkRefererConfig i() {
method save (line 35) | public void save() {
method reset (line 38) | public void reset() {
method guessRefererByUrl (line 54) | public String guessRefererByUrl(String imgUrl) {
method addReferer (line 83) | public void addReferer(String imgUrl, String articleUrl){
method getRefererByPolicy2 (line 95) | public String getRefererByPolicy2(String refererPolicy, String article...
method getRefererByPolicy (line 117) | public String getRefererByPolicy(String refererPolicy, String articleU...
FILE: app/src/main/java/me/wizos/loread/config/NetworkUserAgentConfig.java
class NetworkUserAgentConfig (line 19) | public class NetworkUserAgentConfig {
method NetworkUserAgentConfig (line 21) | private NetworkUserAgentConfig() {}
method i (line 22) | public static NetworkUserAgentConfig i() {
method save (line 43) | public void save() {
method getHoldUserAgent (line 54) | public String getHoldUserAgent() {
method setHoldUserAgent (line 58) | public void setHoldUserAgent(String holdUserAgent) {
method getUserAgents (line 62) | public ArrayMap<String, String> getUserAgents() {
method guessUserAgentByUrl (line 67) | public String guessUserAgentByUrl(String url) {
method guessUserAgentByUrl1 (line 84) | public String guessUserAgentByUrl1(String url) {
method guessUserAgentByUrl2 (line 113) | public String guessUserAgentByUrl2(String url) {
method reset (line 126) | public void reset() {
FILE: app/src/main/java/me/wizos/loread/config/SaveDirectory.java
class SaveDirectory (line 33) | public class SaveDirectory {
method SaveDirectory (line 49) | private SaveDirectory() { }
method i (line 51) | public static SaveDirectory i() {
method reset (line 71) | public void reset() {
method save (line 74) | public void save() {
method getDirNameSettingByFeed (line 79) | public String getDirNameSettingByFeed(String feedId){
method getSaveDir (line 127) | public String getSaveDir(String feedId, String articleId) {
method getDirectoriesOptionValue (line 162) | public List<String> getDirectoriesOptionValue(){
method getDirectoriesOptionName (line 173) | public String[] getDirectoriesOptionName(){
method setFeedDirectory (line 187) | public void setFeedDirectory(String feedId, String directory){
method setArticleDirectory (line 195) | public void setArticleDirectory(String articleId, String directory){
method newDirectory (line 203) | public void newDirectory(String directory){
FILE: app/src/main/java/me/wizos/loread/config/TestConfig.java
class TestConfig (line 17) | public class TestConfig {
method TestConfig (line 19) | private TestConfig() { }
method i (line 21) | public static TestConfig i() {
method save (line 41) | public void save() {
method reset (line 44) | public void reset() {
method isTtsFile (line 56) | public boolean isTtsFile() {
method getDisplayMode (line 61) | public String getDisplayMode(String feedId) {
method addDisplayRouter (line 68) | public void addDisplayRouter(String feedId, String displayMode) {
method removeDisplayRouter (line 72) | public void removeDisplayRouter(String key) {
FILE: app/src/main/java/me/wizos/loread/config/Unsubscribe.java
class Unsubscribe (line 33) | public class Unsubscribe {
method genBackupFile2 (line 34) | public static void genBackupFile2(User user, List<Feed> feeds) {
method genBackupFile (line 101) | @Deprecated
method createSelfClosingElement (line 177) | private static Element createSelfClosingElement(String tagName) {
method createVoidElement (line 181) | private static Element createVoidElement(String tagName, String baseUr...
method genBackupFile3 (line 191) | public static void genBackupFile3(User user, List<Feed> feeds) {
FILE: app/src/main/java/me/wizos/loread/config/article_action_rule/ArticleActionRule.java
class ArticleActionRule (line 5) | public class ArticleActionRule {
method getTarget (line 13) | public String getTarget() {
method setTarget (line 17) | public void setTarget(String target) {
method getAttr (line 21) | public String getAttr() {
method setAttr (line 25) | public void setAttr(String attr) {
method getJudge (line 29) | public String getJudge() {
method setJudge (line 33) | public void setJudge(String judge) {
method getValue (line 37) | public String getValue() {
method setValue (line 41) | public void setValue(String value) {
method getActions (line 45) | public Set<String> getActions() {
method setActions (line 49) | public void setActions(Set<String> actions) {
method toString (line 53) | @Override
FILE: app/src/main/java/me/wizos/loread/config/article_extract_rule/ArticleExtractRule.java
class ArticleExtractRule (line 5) | public class ArticleExtractRule {
method getSelector (line 19) | public Selector getSelector() {
method getDocumentTrim (line 23) | public String getDocumentTrim() {
method getContent (line 27) | public String getContent() {
method setContent (line 31) | public void setContent(String content) {
method getContentStrip (line 35) | public String getContentStrip() {
method getContentTrim (line 39) | public String getContentTrim() {
FILE: app/src/main/java/me/wizos/loread/config/article_extract_rule/Selector.java
type Selector (line 3) | public enum Selector {
method Selector (line 8) | Selector(String selector) { }
method getSelector (line 10) | public String getSelector() {
method setSelector (line 14) | public void setSelector(String selector) {
FILE: app/src/main/java/me/wizos/loread/db/Article.java
class Article (line 18) | @Entity(primaryKeys = {"id","uid"},
method getUid (line 46) | @NotNull
method setUid (line 51) | public void setUid(String uid) {
method getId (line 55) | @NotNull
method setId (line 60) | public void setId(String id) {
method getTitle (line 64) | public String getTitle() {
method setTitle (line 68) | public void setTitle(String title) {
method getContent (line 72) | public String getContent() {
method setContent (line 76) | public void setContent(String content) {
method getSummary (line 80) | public String getSummary() {
method setSummary (line 84) | public void setSummary(String summary) {
method getImage (line 88) | public String getImage() {
method setImage (line 92) | public void setImage(String image) {
method getEnclosure (line 96) | public String getEnclosure() {
method setEnclosure (line 100) | public void setEnclosure(String enclosure) {
method getFeedId (line 104) | public String getFeedId() {
method setFeedId (line 108) | public void setFeedId(String feedId) {
method getFeedTitle (line 112) | public String getFeedTitle() {
method setFeedTitle (line 116) | public void setFeedTitle(String feedTitle) {
method getAuthor (line 120) | public String getAuthor() {
method setAuthor (line 124) | public void setAuthor(String author) {
method getLink (line 128) | public String getLink() {
method setLink (line 132) | public void setLink(String link) {
method getPubDate (line 136) | public long getPubDate() {
method setPubDate (line 140) | public void setPubDate(long pubDate) {
method getCrawlDate (line 144) | public long getCrawlDate() {
method setCrawlDate (line 148) | public void setCrawlDate(long crawlDate) {
method getReadStatus (line 152) | public int getReadStatus() {
method setReadStatus (line 156) | public void setReadStatus(int readStatus) {
method getStarStatus (line 160) | public int getStarStatus() {
method setStarStatus (line 164) | public void setStarStatus(int starStatus) {
method getSaveStatus (line 168) | public int getSaveStatus() {
method setSaveStatus (line 172) | public void setSaveStatus(int saveStatus) {
method getReadUpdated (line 176) | public long getReadUpdated() {
method setReadUpdated (line 180) | public void setReadUpdated(long readUpdated) {
method getStarUpdated (line 184) | public long getStarUpdated() {
method setStarUpdated (line 188) | public void setStarUpdated(long starUpdated) {
method clone (line 192) | @Override
method toString (line 201) | @Override
FILE: app/src/main/java/me/wizos/loread/db/ArticleDao.java
type ArticleDao (line 29) | @Dao
method getById (line 31) | @Query("SELECT * FROM article WHERE uid = :uid AND id = :id LIMIT 1")
method getAll (line 43) | @Query("SELECT * FROM article " +
method getStared (line 49) | @Query("SELECT * FROM article " +
method getUnread (line 56) | @Query("SELECT * FROM article " +
method getAllByCategoryId (line 63) | @Query("SELECT article.* FROM article " +
method getUnreadByCategoryId (line 70) | @Query("SELECT article.* FROM article " +
method getStaredByCategoryId (line 78) | @Query("SELECT article.* FROM article " +
method getStaredByTagId (line 88) | @Query("SELECT article.* FROM article " +
method getAllByUncategory (line 97) | @Query("SELECT article.* FROM article " +
method getUnreadByUncategory (line 104) | @Query("SELECT article.* FROM article " +
method getStaredByUncategory (line 112) | @Query("SELECT article.* FROM article " +
method getStaredByUnTag (line 121) | @Query("SELECT article.* FROM article " +
method getAllByFeedId (line 131) | @Query("SELECT * FROM article " +
method getUnreadByFeedId (line 137) | @Query("SELECT * FROM article " +
method getStaredByFeedId (line 144) | @Query("SELECT * FROM article " +
method getAllByKeyword (line 152) | @Query("SELECT * FROM article " +
method getAllNoOrder (line 184) | @Query("SELECT * FROM article WHERE uid = :uid")
method getAllNoOrder (line 187) | @Query("SELECT * FROM article " +
method getStaredNoOrder (line 193) | @Query("SELECT * FROM article " +
method getUnreadNoOrder (line 197) | @Query("SELECT * FROM article " +
method getUnreadCount (line 202) | @Query("SELECT count(1) FROM article " +
method getStarCount (line 207) | @Query("SELECT count(1) FROM article " +
method getAllCount (line 212) | @Query("SELECT count(1) FROM article " +
method getUncategoryUnreadCount (line 216) | @Query("SELECT count(1) FROM article " +
method getUncategoryStarCount (line 223) | @Query("SELECT count(1) FROM article " +
method getUncategoryAllCount (line 230) | @Query("SELECT count(1) FROM article " +
method getLastReadTimeMillis (line 236) | @Query("SELECT readUpdated FROM article " +
method getLastStarTimeMillis (line 241) | @Query("SELECT starUpdated FROM article " +
method getBackup (line 246) | @Query("SELECT * FROM article " +
method getNeedReadability (line 252) | @Query("SELECT article.* FROM article " +
method getNotTagStar (line 259) | @Query("SELECT article.* FROM article " +
method getArticles (line 268) | @Query("SELECT * FROM article " +
method getActionRuleArticlesRaw (line 273) | @RawQuery
method getActionRuleArticlesRaw2 (line 276) | @RawQuery
method getLastArticle (line 286) | @Query("SELECT * FROM article WHERE uid = :uid ORDER BY id DESC LIMIT 1")
method getDuplicatesLink (line 289) | @Query("SELECT link FROM article " +
method getDuplicates (line 294) | @Query("SELECT * FROM article " +
method insert (line 301) | @Insert(onConflict = OnConflictStrategy.REPLACE)
method insert (line 305) | @Insert(onConflict = OnConflictStrategy.REPLACE)
method update (line 309) | @Update
method update (line 313) | @Update
method updateIdleCrawlDate (line 323) | @Query("UPDATE Article SET crawlDate = :targetTimeMillis WHERE uid = :...
method deleteUnStarByFeedId (line 326) | @Query("DELETE FROM article WHERE uid = :uid AND feedId = :feedId AND ...
method delete (line 329) | @Delete
method delete (line 333) | @Delete
method getReadedUnstarBeFiledLtTime (line 337) | @Query("SELECT * FROM article WHERE uid = :uid AND readStatus = " + Ap...
method getReadedStaredBeFiledLtTime (line 340) | @Query("SELECT * FROM article WHERE uid = :uid AND readStatus = " + Ap...
method getReadedUnstarLtTime (line 343) | @Query("SELECT * FROM article WHERE uid = :uid AND readStatus = " + Ap...
method clear (line 346) | @Query("DELETE FROM article WHERE uid = (:uid)")
FILE: app/src/main/java/me/wizos/loread/db/ArticleTag.java
class ArticleTag (line 15) | @Entity(primaryKeys = {"uid","articleId","tagId"},
method ArticleTag (line 27) | public ArticleTag(@NonNull String uid, @NonNull String articleId, @Non...
method toString (line 33) | @Override
method getUid (line 42) | @NonNull
method setUid (line 47) | public void setUid(@NonNull String uid) {
method getTagId (line 51) | @NotNull
method setTagId (line 57) | public void setTagId(@NotNull String tagId) {
method getArticleId (line 62) | @NotNull
method setArticleId (line 67) | public void setArticleId(@NotNull String articleId) {
FILE: app/src/main/java/me/wizos/loread/db/ArticleTagDao.java
type ArticleTagDao (line 13) | @Dao
method getAll (line 15) | @Query("SELECT * FROM articletag WHERE uid = :uid")
method getByArticleId (line 18) | @Query("SELECT * FROM articletag WHERE uid = :uid AND articleId = :art...
method getByTagId (line 21) | @Query("SELECT * FROM articletag WHERE uid = :uid AND tagId = :tagId")
method getNotArticles (line 24) | @Query("SELECT articletag.* FROM articletag " +
method getCountByTagId (line 31) | @Query("SELECT count(*) FROM articletag WHERE uid = :uid AND tagId = :...
method insert (line 35) | @Insert(onConflict = OnConflictStrategy.REPLACE)
method insert (line 39) | @Insert(onConflict = OnConflictStrategy.REPLACE)
method update (line 43) | @Update
method updateCategoryId (line 47) | @Query("UPDATE articletag SET tagId = :newTagId where uid = :uid AND ...
method delete (line 51) | @Delete
method delete (line 55) | @Delete
method deleteByArticleId (line 59) | @Query("DELETE FROM articletag WHERE uid = :uid AND articleId = :artic...
method deleteByTagId (line 62) | @Query("DELETE FROM articletag WHERE uid = (:uid) AND tagId = :tagId")
method clear (line 65) | @Query("DELETE FROM articletag WHERE uid = (:uid)")
FILE: app/src/main/java/me/wizos/loread/db/Category.java
class Category (line 19) | @Entity(primaryKeys = {"id","uid"},
method getUid (line 36) | public String getUid() {
method setUid (line 40) | public void setUid(String uid) {
method getId (line 44) | public String getId() {
method setId (line 48) | public void setId(String id) {
method getTitle (line 52) | public String getTitle() {
method setTitle (line 56) | public void setTitle(String title) {
method getUnreadCount (line 60) | public int getUnreadCount() {
method setUnreadCount (line 64) | public void setUnreadCount(int unreadCount) {
method getStarCount (line 68) | public int getStarCount() {
method setStarCount (line 72) | public void setStarCount(int starCount) {
method getAllCount (line 76) | public int getAllCount() {
method setAllCount (line 80) | public void setAllCount(int allCount) {
method convert2CategoryItem (line 84) | public CategoryItem convert2CategoryItem() {
method toString (line 91) | @Override
FILE: app/src/main/java/me/wizos/loread/db/CategoryDao.java
type CategoryDao (line 14) | @Dao
method getAll (line 16) | @Query("SELECT * FROM category WHERE uid = :uid ORDER BY title COLLATE...
method getCategoriesUnreadCount (line 21) | @Query("SELECT id,title,unreadCount as count FROM category WHERE uid =...
method getCategoriesStarCount (line 24) | @Query("SELECT id,title,starCount as count FROM category WHERE uid = :...
method getCategoriesAllCount (line 27) | @Query("SELECT id,title,allCount as count FROM category WHERE uid = :u...
method getAllLiveData (line 31) | @Query("SELECT * FROM category WHERE uid = :uid ORDER BY title COLLATE...
method getByFeedId (line 35) | @Query("SELECT category.* FROM category " +
method getById (line 41) | @Query("SELECT * FROM category WHERE uid = :uid AND id = :id LIMIT 1")
method getCategoriesRealTimeCount (line 44) | @Query("SELECT * FROM categoryview WHERE uid = :uid" )
method insert (line 47) | @Insert(onConflict = OnConflictStrategy.REPLACE)
method insert (line 50) | @Insert(onConflict = OnConflictStrategy.REPLACE)
method updateId (line 54) | @Query("UPDATE category SET id = :newId where uid = :uid AND id = :old...
method update (line 57) | @Update
method update (line 61) | @Update
method delete (line 65) | @Delete
method clear (line 69) | @Query("DELETE FROM category WHERE uid = (:uid)")
FILE: app/src/main/java/me/wizos/loread/db/CategoryView.java
class CategoryView (line 10) | @DatabaseView(
FILE: app/src/main/java/me/wizos/loread/db/Collection.java
class Collection (line 6) | public class Collection {
method getId (line 11) | public String getId() {
method setId (line 15) | public void setId(String id) {
method getTitle (line 19) | public String getTitle() {
method setTitle (line 23) | public void setTitle(String title) {
method getCount (line 27) | public int getCount() {
method setCount (line 31) | public void setCount(int count) {
method convert2CategoryItem (line 35) | public CategoryItem convert2CategoryItem() {
method toString (line 42) | @Override
FILE: app/src/main/java/me/wizos/loread/db/CoreDB.java
class CoreDB (line 26) | @Database(
method init (line 36) | public static synchronized void init(Context context) {
method i (line 57) | public static CoreDB i(){
method createTriggers (line 82) | private static void createTriggers(SupportSQLiteDatabase db) {
method userDao (line 306) | public abstract UserDao userDao();
method articleDao (line 307) | public abstract ArticleDao articleDao();
method feedDao (line 308) | public abstract FeedDao feedDao();
method categoryDao (line 309) | public abstract CategoryDao categoryDao();
method feedCategoryDao (line 310) | public abstract FeedCategoryDao feedCategoryDao();
method tagDao (line 313) | public abstract TagDao tagDao();
method articleTagDao (line 314) | public abstract ArticleTagDao articleTagDao();
method coverFeedCategories (line 316) | public void coverFeedCategories(EditFeed editFeed) {
FILE: app/src/main/java/me/wizos/loread/db/CorePref.java
class CorePref (line 15) | public class CorePref {
method CorePref (line 20) | private CorePref() {
method i (line 23) | @SuppressLint("CommitPrefEdits")
method getString (line 39) | public String getString(String key, String value) {
method putString (line 42) | public void putString(String key, String value){
method remove (line 46) | public void remove(String key){
FILE: app/src/main/java/me/wizos/loread/db/Entry.java
class Entry (line 3) | public class Entry {
method getId (line 7) | public String getId() {
method setId (line 11) | public void setId(String id) {
method getEntry (line 15) | public String getEntry() {
method setEntry (line 19) | public void setEntry(String entry) {
FILE: app/src/main/java/me/wizos/loread/db/Feed.java
class Feed (line 16) | @Entity(
method getUid (line 42) | public String getUid() {
method setUid (line 46) | public void setUid(String uid) {
method getId (line 50) | public String getId() {
method setId (line 55) | public void setId(String id) {
method getTitle (line 60) | public String getTitle() {
method setTitle (line 65) | public void setTitle(String title) {
method getFeedUrl (line 70) | public String getFeedUrl() {
method setFeedUrl (line 75) | public void setFeedUrl(String feedUrl) {
method getHtmlUrl (line 80) | public String getHtmlUrl() {
method setHtmlUrl (line 85) | public void setHtmlUrl(String htmlUrl) {
method getIconUrl (line 90) | public String getIconUrl() {
method setIconUrl (line 95) | public void setIconUrl(String iconUrl) {
method getDisplayMode (line 100) | public int getDisplayMode() {
method setDisplayMode (line 105) | public void setDisplayMode(int displayMode) {
method getUnreadCount (line 110) | public int getUnreadCount() {
method setUnreadCount (line 115) | public void setUnreadCount(int unreadCount) {
method getStarCount (line 120) | public int getStarCount() {
method setStarCount (line 125) | public void setStarCount(int starCount) {
method getAllCount (line 130) | public int getAllCount() {
method setAllCount (line 135) | public void setAllCount(int allCount) {
method getState (line 140) | public long getState() {
method setState (line 145) | public void setState(long state) {
FILE: app/src/main/java/me/wizos/loread/db/FeedCategory.java
class FeedCategory (line 13) | @Entity(primaryKeys = {"uid","categoryId","feedId"},
method FeedCategory (line 29) | public FeedCategory(@NonNull String uid, @NonNull String feedId, @NonN...
method toString (line 47) | @Override
method getUid (line 56) | @NonNull
method setUid (line 61) | public void setUid(@NonNull String uid) {
method getId (line 65) | public String getId() {
method setId (line 70) | public void setId(String uid) {
method getCategoryId (line 75) | public String getCategoryId() {
method setCategoryId (line 80) | public void setCategoryId(String categoryId) {
method getFeedId (line 89) | public String getFeedId() {
method setFeedId (line 94) | public void setFeedId(String feedId) {
FILE: app/src/main/java/me/wizos/loread/db/FeedCategoryDao.java
type FeedCategoryDao (line 13) | @Dao
method getAll (line 15) | @Query("SELECT * FROM feedcategory WHERE uid = :uid")
method getByCategoryId (line 18) | @Query("SELECT * FROM feedcategory WHERE uid = :uid AND categoryId = :...
method getCountByCategoryId (line 21) | @Query("SELECT count(*) FROM feedcategory WHERE uid = :uid AND categor...
method insert (line 25) | @Insert(onConflict = OnConflictStrategy.REPLACE)
method insert (line 29) | @Insert(onConflict = OnConflictStrategy.REPLACE)
method update (line 33) | @Update
method updateCategoryId (line 37) | @Query("UPDATE feedcategory SET categoryId = :newCategoryId where uid...
method delete (line 41) | @Delete
method deleteByFeedId (line 45) | @Query("DELETE FROM feedcategory WHERE uid = (:uid) AND feedId = :feed...
method clear (line 48) | @Query("DELETE FROM feedcategory WHERE uid = (:uid)")
FILE: app/src/main/java/me/wizos/loread/db/FeedDao.java
type FeedDao (line 14) | @Dao
method getAll (line 16) | @Query("SELECT * FROM feed WHERE uid = :uid")
method getAllLiveData (line 19) | @Query("SELECT * FROM feed WHERE uid = :uid")
method getById (line 23) | @Query("SELECT * FROM feed WHERE uid = :uid AND id = :id LIMIT 1")
method getByCategoryId (line 32) | @Query("SELECT * FROM feed " +
method getFeedsUnreadCountByCategoryId (line 38) | @Query("SELECT id,title,unreadCount as count FROM feed " +
method getFeedsStarCountByCategoryId (line 44) | @Query("SELECT id,title,starCount as count FROM feed " +
method getFeedsAllCountByCategoryId (line 50) | @Query("SELECT id,title,allCount as count FROM feed " +
method getFeedsRealTimeCount (line 57) | @Query("SELECT * FROM FeedView WHERE uid = :uid" )
method insert (line 60) | @Insert(onConflict = OnConflictStrategy.REPLACE)
method insert (line 63) | @Insert(onConflict = OnConflictStrategy.REPLACE)
method update (line 67) | @Update
method update (line 70) | @Update
method delete (line 74) | @Delete
method delete (line 77) | @Delete
method deleteById (line 81) | @Query("DELETE FROM feed WHERE uid = (:uid) AND id = :id")
method clear (line 84) | @Query("DELETE FROM feed WHERE uid = (:uid)")
FILE: app/src/main/java/me/wizos/loread/db/FeedView.java
class FeedView (line 11) | @DatabaseView(
FILE: app/src/main/java/me/wizos/loread/db/Tag.java
class Tag (line 14) | @Entity(primaryKeys = {"id","uid"},
method getUid (line 28) | public String getUid() {
method setUid (line 32) | public void setUid(String uid) {
method getId (line 36) | public String getId() {
method setId (line 40) | public void setId(String id) {
method getTitle (line 44) | public String getTitle() {
method setTitle (line 48) | public void setTitle(String title) {
method getUnreadCount (line 52) | public int getUnreadCount() {
method setUnreadCount (line 56) | public void setUnreadCount(int unreadCount) {
method getStarCount (line 60) | public int getStarCount() {
method setStarCount (line 64) | public void setStarCount(int starCount) {
method getAllCount (line 68) | public int getAllCount() {
method setAllCount (line 72) | public void setAllCount(int allCount) {
method convert (line 76) | public Category convert(){
FILE: app/src/main/java/me/wizos/loread/db/TagDao.java
type TagDao (line 14) | @Dao
method getAll (line 16) | @Query("SELECT * FROM tag WHERE uid = :uid ORDER BY title COLLATE NOCA...
method getAllLiveData (line 19) | @Query("SELECT * FROM tag WHERE uid = :uid ORDER BY title COLLATE NOCA...
method getById (line 23) | @Query("SELECT * FROM tag WHERE uid = :uid AND id = :id LIMIT 1")
method insert (line 27) | @Insert(onConflict = OnConflictStrategy.REPLACE)
method insert (line 30) | @Insert(onConflict = OnConflictStrategy.REPLACE)
method update (line 34) | @Update
method update (line 38) | @Update
method delete (line 42) | @Delete
method clear (line 46) | @Query("DELETE FROM tag WHERE uid = (:uid)")
FILE: app/src/main/java/me/wizos/loread/db/User.java
class User (line 16) | @Entity(
method setToken (line 60) | public void setToken(Token token) {
method getId (line 72) | public String getId() {
method setId (line 76) | public void setId(String id) {
method getSource (line 80) | public String getSource() {
method setSource (line 84) | public void setSource(String source) {
method getUserId (line 88) | public String getUserId() {
method setUserId (line 92) | public void setUserId(String userId) {
method getUserEmail (line 96) | public String getUserEmail() {
method setUserEmail (line 100) | public void setUserEmail(String userEmail) {
method getUserPassword (line 104) | public String getUserPassword() {
method setUserPassword (line 108) | public void setUserPassword(String userPassword) {
method getUserName (line 112) | public String getUserName() {
method setUserName (line 116) | public void setUserName(String userName) {
method getTokenType (line 120) | public String getTokenType() {
method setTokenType (line 124) | public void setTokenType(String tokenType) {
method getAccessToken (line 128) | public String getAccessToken() {
method setAccessToken (line 132) | public void setAccessToken(String accessToken) {
method getRefreshToken (line 136) | public String getRefreshToken() {
method setRefreshToken (line 140) | public void setRefreshToken(String refreshToken) {
method getAuth (line 144) | public String getAuth() {
method setAuth (line 148) | public void setAuth(String auth) {
method getExpiresTimestamp (line 152) | public long getExpiresTimestamp() {
method setExpiresTimestamp (line 156) | public void setExpiresTimestamp(long expiresTimestamp) {
method getStreamType (line 160) | public int getStreamType(){
method setStreamType (line 163) | public void setStreamType(int streamType) {
method getStreamId (line 167) | public String getStreamId() {
method setStreamId (line 170) | public void setStreamId(String streamId) {
method getStreamTitle (line 174) | public String getStreamTitle() {
method setStreamTitle (line 178) | public void setStreamTitle(String streamTitle) {
method getStreamStatus (line 182) | public int getStreamStatus() {
method setStreamStatus (line 186) | public void setStreamStatus(int streamStatus) {
method isAutoSync (line 190) | public boolean isAutoSync() {
method setAutoSync (line 194) | public void setAutoSync(boolean autoSync) {
method getAutoSyncFrequency (line 198) | public int getAutoSyncFrequency() {
method setAutoSyncFrequency (line 205) | public void setAutoSyncFrequency(int autoSyncFrequency) {
method isAutoSyncOnlyWifi (line 209) | public boolean isAutoSyncOnlyWifi() {
method setAutoSyncOnlyWifi (line 213) | public void setAutoSyncOnlyWifi(boolean autoSyncOnlyWifi) {
method isDownloadImgOnlyWifi (line 217) | public boolean isDownloadImgOnlyWifi() {
method setDownloadImgOnlyWifi (line 221) | public void setDownloadImgOnlyWifi(boolean downloadImgOnlyWifi) {
method isOpenLinkBySysBrowser (line 225) | public boolean isOpenLinkBySysBrowser() {
method setOpenLinkBySysBrowser (line 229) | public void setOpenLinkBySysBrowser(boolean openLinkBySysBrowser) {
method isMarkReadOnScroll (line 233) | public boolean isMarkReadOnScroll() {
method setMarkReadOnScroll (line 237) | public void setMarkReadOnScroll(boolean markReadOnScroll) {
method getCachePeriod (line 241) | public int getCachePeriod() {
method setCachePeriod (line 245) | public void setCachePeriod(int cachePeriod) {
method isAutoToggleTheme (line 249) | public boolean isAutoToggleTheme() {
method setAutoToggleTheme (line 253) | public void setAutoToggleTheme(boolean autoToggleTheme) {
method getThemeMode (line 257) | public int getThemeMode() {
method setThemeMode (line 261) | public void setThemeMode(int themeMode) {
method getAudioSpeed (line 265) | public float getAudioSpeed() {
method setAudioSpeed (line 269) | public void setAudioSpeed(float audioSpeed) {
method getHost (line 273) | public String getHost() {
method setHost (line 277) | public void setHost(String host) {
method toString (line 281) | @Override
FILE: app/src/main/java/me/wizos/loread/db/UserDao.java
type UserDao (line 13) | @Dao
method loadAll (line 15) | @Query("SELECT * FROM user")
method getById (line 18) | @Query("SELECT * FROM user WHERE id = :uid LIMIT 1")
method insert (line 21) | @Insert(onConflict = OnConflictStrategy.REPLACE)
method update (line 25) | @Update
method delete (line 29) | @Delete
method delete (line 33) | @Query("DELETE FROM user WHERE id = (:uid)")
method clear (line 37) | @Query("DELETE FROM user")
FILE: app/src/main/java/me/wizos/loread/extractor/Extractor.java
class Extractor (line 43) | public class Extractor {
method Extractor (line 45) | public Extractor(Document doc) {
class CountInfo (line 51) | static class CountInfo {
method cleanBodyElement (line 66) | private void cleanBodyElement(Element body) {
method computeInfo (line 94) | private CountInfo computeInfo(Node node) {
method computeScore (line 165) | private double computeScore(Element tag) {
method calcSbdi (line 176) | private double calcSbdi(CountInfo countInfo){
method countPunctuationNum (line 185) | private int countPunctuationNum(String text){
method increase_tag_weight (line 191) | private void increase_tag_weight(Element element, CountInfo countInfo){
method computeVar (line 198) | private double computeVar(ArrayList<Integer> data) {
method getContentElement (line 223) | public Element getContentElement() {
method getNews (line 260) | public ModPage getNews() throws Exception {
method getTime (line 289) | private String getTime(Element contentElement) throws Exception {
method getDate (line 323) | private String getDate(Element contentElement) throws Exception {
method strSim (line 351) | private double strSim(String a, String b) {
method getTitle (line 369) | private String getTitle(final Element contentElement) throws Exception {
method getTitleByEditDistance (line 430) | private String getTitleByEditDistance(Element contentElement) throws E...
method lcs (line 465) | private int lcs(String x, String y) {
method editDistance (line 487) | private int editDistance(String word1, String word2) {
FILE: app/src/main/java/me/wizos/loread/extractor/ExtractorUtil.java
class ExtractorUtil (line 22) | public class ExtractorUtil {
method getContent (line 24) | public static String getContent(String url, Document doc) { // throws ...
method getContentByRule (line 59) | private static String getContentByRule(Uri uri, Document doc, ArticleE...
method getContentByExtractor (line 89) | private static String getContentByExtractor(String domain, Document do...
FILE: app/src/main/java/me/wizos/loread/extractor/ModPage.java
class ModPage (line 25) | public class ModPage {
method getUrl (line 34) | public String getUrl() {
method setUrl (line 38) | public void setUrl(String url) {
method getTitle (line 42) | public String getTitle() {
method setTitle (line 46) | public void setTitle(String title) {
method getContent (line 50) | public String getContent() {
method setContent (line 60) | public void setContent(String content) {
method getTime (line 64) | public String getTime() {
method setTime (line 68) | public void setTime(String time) {
method toString (line 72) | @Override
method getContentElement (line 77) | public Element getContentElement() {
method setContentElement (line 81) | public void setContentElement(Element contentElement) {
FILE: app/src/main/java/me/wizos/loread/gson/GsonEnum.java
type GsonEnum (line 3) | public interface GsonEnum<E> {
method serialize (line 4) | String serialize();
method deserialize (line 5) | E deserialize(String jsonEnum);
FILE: app/src/main/java/me/wizos/loread/gson/GsonEnumTypeAdapter.java
class GsonEnumTypeAdapter (line 13) | public class GsonEnumTypeAdapter<E> implements JsonSerializer<E>, JsonDe...
method GsonEnumTypeAdapter (line 17) | public GsonEnumTypeAdapter(GsonEnum<E> gsonEnum) {
method serialize (line 21) | @Override
method deserialize (line 29) | @Override
FILE: app/src/main/java/me/wizos/loread/gson/GsonUtil.java
class GsonUtil (line 14) | public class GsonUtil {
method fromJson (line 17) | public static <T> T fromJson(InputStream inputStream, TypeToken<T> tok...
method fromJson (line 26) | public static <T> T fromJson(String jsonText, TypeToken<T> token) {
FILE: app/src/main/java/me/wizos/loread/network/HttpClientManager.java
class HttpClientManager (line 20) | public class HttpClientManager {
method HttpClientManager (line 21) | private HttpClientManager() {
method i (line 32) | public static HttpClientManager i() {
method simpleClient (line 118) | public OkHttpClient simpleClient() {
method loreadHttpClient (line 122) | public OkHttpClient loreadHttpClient() {
method ttrssHttpClient (line 126) | public OkHttpClient ttrssHttpClient() {return ttrssHttpClient;}
method inoreaderHttpClient (line 128) | public OkHttpClient inoreaderHttpClient() {
method feedlyHttpClient (line 132) | public OkHttpClient feedlyHttpClient() {
method imageHttpClient (line 136) | public OkHttpClient imageHttpClient() {
FILE: app/src/main/java/me/wizos/loread/network/StringConverterFactory.java
class StringConverterFactory (line 11) | public class StringConverterFactory extends Converter.Factory {
method create (line 13) | public static StringConverterFactory create() {
method responseBodyConverter (line 19) | @Override
class StringBodyConverter (line 30) | private static class StringBodyConverter<T> implements Converter<Respo...
method StringBodyConverter (line 31) | StringBodyConverter() {}
method convert (line 33) | @Override
FILE: app/src/main/java/me/wizos/loread/network/SyncWorker.java
class SyncWorker (line 14) | public class SyncWorker extends Worker {
method SyncWorker (line 19) | public SyncWorker(@NonNull Context context, @NonNull WorkerParameters ...
method doWork (line 23) | @NonNull
method onStopped (line 35) | @Override
FILE: app/src/main/java/me/wizos/loread/network/api/AuthApi.java
class AuthApi (line 3) | public abstract class AuthApi<T, E> extends BaseApi<T, E> {
method setAuthorization (line 5) | public void setAuthorization(String authorization){
method getAuthorization (line 8) | public String getAuthorization(){
FILE: app/src/main/java/me/wizos/loread/network/api/BaseApi.java
class BaseApi (line 44) | public abstract class BaseApi<T, E> {
method sync (line 48) | abstract public void sync();
method fetchUserInfo (line 50) | abstract public void fetchUserInfo(CallbackX cb);
method renameTag (line 52) | abstract public void renameTag(String sourceTagId, String destTagId, C...
method editFeedCategories (line 54) | abstract public void editFeedCategories(List<E> lastCategoryItems, Edi...
method addFeed (line 56) | abstract public void addFeed(EditFeed editFeed, CallbackX cb);
method unsubscribeFeed (line 58) | abstract public void unsubscribeFeed(String feedId, CallbackX cb);
method renameFeed (line 60) | abstract public void renameFeed(String feedId, String renamedTitle, Ca...
method markArticleReaded (line 62) | abstract public void markArticleReaded(String articleId, CallbackX cb);
method markArticleUnread (line 64) | abstract public void markArticleUnread(String articleId, CallbackX cb);
method markArticleStared (line 66) | abstract public void markArticleStared(String articleId, CallbackX cb);
method markArticleUnstar (line 68) | abstract public void markArticleUnstar(String articleId, CallbackX cb);
method markArticleListReaded (line 70) | abstract public void markArticleListReaded(List<String> articleIds, Ca...
type ArticleChanger (line 72) | public interface ArticleChanger {
method change (line 73) | Article change(Article article);
method deleteExpiredArticles (line 77) | void deleteExpiredArticles() {
method fetchReadability (line 112) | void fetchReadability(String uid, long syncTimeMillis){
method handleNotTagStarArticles (line 154) | void handleNotTagStarArticles(String uid, long syncTimeMillis){
method clearNotArticleTags (line 185) | void clearNotArticleTags(String uid){
method coverSaveCategories (line 192) | void coverSaveCategories(List<Category> cloudyCategories) {
method coverSaveFeeds (line 222) | void coverSaveFeeds(List<Feed> cloudyFeeds) {
method coverFeedCategory (line 261) | void coverFeedCategory(List<FeedCategory> cloudyFeedCategories) {
method handleDuplicateArticle (line 283) | void handleDuplicateArticle() {
method handleCrawlDate (line 311) | void handleCrawlDate(){
method updateCollectionCount (line 319) | void updateCollectionCount() {
FILE: app/src/main/java/me/wizos/loread/network/api/FeedlyApi.java
class FeedlyApi (line 59) | public class FeedlyApi extends OAuthApi<Feed, CategoryItem> {
method FeedlyApi (line 76) | public FeedlyApi() {
method setAuthorization (line 89) | @Override
method getOAuthUrl (line 94) | public String getOAuthUrl() {
method getAccessToken (line 108) | public void getAccessToken(String authorizationCode,CallbackX cb) {
method refreshingAccessToken (line 134) | public void refreshingAccessToken(String refreshToken, CallbackX cb) {
method refreshingAccessToken (line 162) | public String refreshingAccessToken(String refreshToken) throws IOExce...
method fetchUserInfo (line 177) | public void fetchUserInfo(CallbackX cb){
method sync (line 196) | @Override
method handleException (line 352) | private void handleException(Exception e) {
method renameTag (line 362) | public void renameTag(String tagId, String targetName, CallbackX cb) {
method editTag (line 366) | private void editTag(@Nullable String tagId, @Nullable String targetNa...
method addFeed (line 394) | @Override
method renameFeed (line 415) | @Override
method editFeedCategories (line 440) | @Override
method unsubscribeFeed (line 459) | public void unsubscribeFeed(String feedId, CallbackX cb) {
method markArticles (line 484) | private void markArticles(String action, List<String> ids, CallbackX c...
method markArticle (line 507) | private void markArticle(String action, String articleId, CallbackX cb) {
method markArticleListReaded (line 512) | @Override
method markArticleReaded (line 518) | public void markArticleReaded(String articleId,CallbackX cb) {
method markArticleUnread (line 523) | public void markArticleUnread(String articleId,CallbackX cb) {
method markArticleStared (line 527) | public void markArticleStared(String articleId,CallbackX cb) {
method markArticleUnstar (line 531) | public void markArticleUnstar(String articleId,CallbackX cb) {
method fetchArticle (line 536) | private void fetchArticle(int allSize, int syncedSize, List<String> su...
method handleUnreadRefs (line 553) | private HashSet<String> handleUnreadRefs(List<String> ids) {
method handleStaredRefs (line 594) | private HashSet<String> handleStaredRefs(List<String> streamIds) {
method splitRefs (line 644) | private ArrayList<HashSet<String>> splitRefs(HashSet<String> tempUnrea...
method getFeedArticleNeedReadability (line 670) | private ArrayMap<String, ArrayList<Article>> getFeedArticleNeedReadabi...
FILE: app/src/main/java/me/wizos/loread/network/api/FeedlyService.java
type FeedlyService (line 34) | public interface FeedlyService {
method getAccessToken (line 36) | @FormUrlEncoded
method refreshingAccessToken (line 46) | @FormUrlEncoded
method getUserInfo (line 55) | @GET("profile")
method getCollections (line 60) | @GET("collections")
method editCollections (line 65) | @GET("collections")
method getUnreadRefs (line 71) | @GET("streams/ids")
method getStarredRefs (line 80) | @GET("streams/ids")
method getItemContents (line 88) | @Headers("Accept: application/json")
method getFeedsMeta (line 96) | @Headers("Accept: application/json")
method getFeedMeta (line 100) | @GET("feeds/{feedId}")
method getStreamContent (line 104) | @GET("streams/{feedId}/contents")
method getSearchFeeds (line 109) | @GET("search/feeds")
method editFeed (line 112) | @Headers("Accept: application/json")
method delFeed (line 121) | @Headers("Accept: application/json")
method markers (line 130) | @Headers("Accept: application/json")
FILE: app/src/main/java/me/wizos/loread/network/api/InoReaderApi.java
class InoReaderApi (line 64) | public class InoReaderApi extends OAuthApi<Feed, CategoryItem> implement...
method InoReaderApi (line 104) | public InoReaderApi() {
method InoReaderApi (line 122) | public InoReaderApi(String host) {
method setHost (line 139) | public static void setHost(String host) {
method login (line 144) | public void login(String accountId, String accountPd,CallbackX cb){
method setAuthorization (line 171) | @Override
method getOAuthUrl (line 176) | public String getOAuthUrl() {
method getAccessToken (line 184) | public void getAccessToken(String authorizationCode,CallbackX cb) {
method refreshingAccessToken (line 209) | public void refreshingAccessToken(String refreshToken, CallbackX cb) {
method refreshingAccessToken (line 238) | public String refreshingAccessToken(String refreshToken) throws IOExce...
method fetchUserInfo (line 259) | public void fetchUserInfo( CallbackX cb){
method sync (line 282) | @Override
method fetchArticle (line 412) | private void fetchArticle(int allSize, int syncedSize, List<String> su...
method fetchUnreadRefs (line 429) | private HashSet<String> fetchUnreadRefs() throws IOException {
method fetchStaredRefs (line 483) | private HashSet<String> fetchStaredRefs() throws HttpException, IOExce...
method genRequestBody (line 538) | private RequestBody genRequestBody(List<String> ids) {
method renameTag (line 546) | public void renameTag(String sourceTagId, String targetName, CallbackX...
method unsubscribeFeed (line 573) | public void unsubscribeFeed(String feedId,CallbackX cb) {
method addFeed (line 599) | public void addFeed(@NonNull EditFeed editFeed, CallbackX cb) {
method renameFeed (line 625) | public void renameFeed(String feedId, String renamedTitle, CallbackX c...
method editFeedCategories (line 651) | @Override
method markArticleListReaded (line 695) | public void markArticleListReaded(List<String> articleIDs,CallbackX cb) {
method markArticleReaded (line 723) | @Override
method markArticleUnread (line 750) | public void markArticleUnread(String articleID,CallbackX cb) {
method markArticleStared (line 777) | public void markArticleStared(String articleID,CallbackX cb) {
method markArticleUnstar (line 804) | public void markArticleUnstar(String articleID,CallbackX cb) {
method splitRefs (line 837) | public ArrayList<HashSet<String>> splitRefs(HashSet<String> tempUnread...
FILE: app/src/main/java/me/wizos/loread/network/api/InoReaderService.java
type InoReaderService (line 25) | public interface InoReaderService {
method getAccessToken (line 26) | @FormUrlEncoded
method refreshingAccessToken (line 36) | @FormUrlEncoded
method login (line 46) | @FormUrlEncoded
method getUserInfo (line 53) | @GET("/reader/api/0/user-info")
method getCategoryItems (line 59) | @GET("reader/api/0/tag/list")
method getFeeds (line 64) | @GET("reader/api/0/subscription/list")
method getStreamItemsIds (line 69) | @GET("reader/api/0/stream/items/ids")
method getUnreadRefs (line 79) | @GET("reader/api/0/stream/items/ids")
method syncStarredRefs (line 89) | @GET("reader/api/0/stream/items/ids")
method getItemContents (line 99) | @POST("reader/api/0/stream/items/contents")
method addFeed (line 106) | @POST("reader/api/0/subscription/quickadd")
method editFeed (line 111) | @POST("reader/api/0/subscription/edit")
method markArticle (line 118) | @POST("reader/api/0/edit-tag")
method renameTag (line 126) | @POST("reader/api/0/rename-tag")
FILE: app/src/main/java/me/wizos/loread/network/api/LoginInterface.java
type LoginInterface (line 4) | public interface LoginInterface {
method login (line 5) | void login(String accountId, String accountPd, CallbackX cb);
FILE: app/src/main/java/me/wizos/loread/network/api/LoreadApi.java
class LoreadApi (line 68) | public class LoreadApi extends AuthApi<Feed, me.wizos.loread.bean.feedly...
method LoreadApi (line 72) | public LoreadApi() {
method setHost (line 85) | public static void setHost(String host) {
method login (line 90) | public LoginResult login(String accountId, String accountPd) throws IO...
method login (line 103) | public void login(String accountId, String accountPd,CallbackX cb){
method fetchUserInfo (line 129) | public void fetchUserInfo(CallbackX cb){
method sync (line 133) | @Override
method handleException (line 308) | private void handleException(String msg) {
method renameTag (line 313) | @Override
method addFeed (line 318) | public void addFeed(EditFeed editFeed, CallbackX cb) {
method renameFeed (line 343) | @Override
method editFeed (line 356) | public void editFeed(@NonNull String feedId, @Nullable String feedTitl...
method editFeedCategories (line 360) | @Override
method unsubscribeFeed (line 365) | public void unsubscribeFeed(String feedId,CallbackX cb) {
method markArticles (line 386) | private void markArticles(int field, int mode, List<String> ids,Callba...
method markArticle (line 408) | private void markArticle(int field, int mode, String articleId,Callbac...
method markArticleListReaded (line 430) | public void markArticleListReaded(List<String> articleIds,CallbackX cb) {
method markArticleReaded (line 434) | public void markArticleReaded(String articleId, CallbackX cb) {
method markArticleUnread (line 438) | public void markArticleUnread(String articleId, CallbackX cb) {
method markArticleStared (line 442) | public void markArticleStared(String articleId, CallbackX cb) {
method markArticleUnstar (line 446) | public void markArticleUnstar(String articleId,CallbackX cb) {
method handleUnreadRefs (line 450) | private HashSet<String> handleUnreadRefs(String[] ids) {
method handleStaredRefs (line 493) | private HashSet<String> handleStaredRefs(String[] ids) {
FILE: app/src/main/java/me/wizos/loread/network/api/LoreadService.java
type LoreadService (line 35) | public interface LoreadService {
method login (line 37) | @Headers("Accept: application/json")
method getCategories (line 43) | @Headers("Accept: application/json")
method getFeeds (line 50) | @Headers("Accept: application/json")
method getUnreadItemIds (line 57) | @Headers("Accept: application/json")
method getSavedItemIds (line 63) | @Headers("Accept: application/json")
method getHeadlines (line 69) | @Headers("Accept: application/json")
method getArticles (line 76) | @Headers("Accept: application/json")
method updateArticle (line 83) | @Headers("Accept: application/json")
method subscribeToFeed (line 91) | @Headers("Accept: application/json")
method unsubscribeFeed (line 98) | @Headers("Accept: application/json")
FILE: app/src/main/java/me/wizos/loread/network/api/OAuthApi.java
class OAuthApi (line 7) | public abstract class OAuthApi<T, E> extends AuthApi<T, E> {
method getOAuthUrl (line 9) | abstract public String getOAuthUrl();
method getAccessToken (line 19) | abstract public void getAccessToken(String authorizationCode, Callback...
method refreshingAccessToken (line 26) | abstract public String refreshingAccessToken(String refreshToken) thro...
method refreshingAccessToken (line 27) | abstract public void refreshingAccessToken(String refreshToken, Callba...
FILE: app/src/main/java/me/wizos/loread/network/api/TinyRSSApi.java
class TinyRSSApi (line 66) | public class TinyRSSApi extends AuthApi<Feed, me.wizos.loread.bean.feedl...
method TinyRSSApi (line 70) | public TinyRSSApi() {
method TinyRSSApi (line 74) | public TinyRSSApi(String host) {
method setHost (line 93) | public static void setHost(String host) {
method login (line 98) | public LoginResult login(String accountId, String accountPd) throws IO...
method login (line 111) | public void login(String accountId, String accountPd,CallbackX cb){
method fetchUserInfo (line 137) | public void fetchUserInfo(CallbackX cb){
method sync (line 142) | @Override
method handleException (line 306) | private void handleException(Exception e, String msg) {
method renameTag (line 312) | @Override
method addFeed (line 317) | public void addFeed(EditFeed editFeed, CallbackX cb) {
method renameFeed (line 342) | @Override
method editFeed (line 355) | public void editFeed(@NonNull String feedId, @Nullable String feedTitl...
method editFeedCategories (line 359) | @Override
method unsubscribeFeed (line 364) | public void unsubscribeFeed(String feedId,CallbackX cb) {
method markArticles (line 387) | private void markArticles(int field, int mode, List<String> ids,Callba...
method markArticle (line 415) | private void markArticle(int field, int mode, String articleId,Callbac...
method markArticleListReaded (line 437) | public void markArticleListReaded(List<String> articleIds,CallbackX cb) {
method markArticleReaded (line 441) | public void markArticleReaded(String articleId, CallbackX cb) {
method markArticleUnread (line 445) | public void markArticleUnread(String articleId, CallbackX cb) {
method markArticleStared (line 449) | public void markArticleStared(String articleId, CallbackX cb) {
method markArticleUnstar (line 453) | public void markArticleUnstar(String articleId,CallbackX cb) {
method handleUnreadRefs (line 457) | private HashSet<String> handleUnreadRefs(String[] ids) {
method handleStaredRefs (line 500) | private HashSet<String> handleStaredRefs(String[] ids) {
FILE: app/src/main/java/me/wizos/loread/network/api/TinyRSSService.java
type TinyRSSService (line 34) | public interface TinyRSSService {
method isLoginIn (line 35) | @Headers("Accept: application/json")
method login (line 42) | @Headers("Accept: application/json")
method getCategories (line 48) | @Headers("Accept: application/json")
method getFeeds (line 54) | @Headers("Accept: application/json")
method getUnreadItemIds (line 60) | @Headers("Accept: application/json")
method getSavedItemIds (line 65) | @Headers("Accept: application/json")
method getHeadlines (line 70) | @Headers("Accept: application/json")
method getArticles (line 76) | @Headers("Accept: application/json")
method updateArticle (line 82) | @Headers("Accept: application/json")
method subscribeToFeed (line 88) | @Headers("Accept: application/json")
method unsubscribeFeed (line 94) | @Headers("Accept: application/json")
FILE: app/src/main/java/me/wizos/loread/network/callback/CallbackX.java
type CallbackX (line 7) | public interface CallbackX<T,E> {
method onSuccess (line 8) | void onSuccess(T result);
method onFailure (line 9) | void onFailure(E error);
FILE: app/src/main/java/me/wizos/loread/network/glide/OkHttpAppGlideModule.java
class OkHttpAppGlideModule (line 27) | @GlideModule
method registerComponents (line 29) | @Override
method applyOptions (line 34) | @Override
FILE: app/src/main/java/me/wizos/loread/network/interceptor/InoreaderHeaderInterceptor.java
class InoreaderHeaderInterceptor (line 12) | public class InoreaderHeaderInterceptor implements Interceptor {
method intercept (line 13) | @NotNull
FILE: app/src/main/java/me/wizos/loread/network/interceptor/LoggerInterceptor.java
class LoggerInterceptor (line 29) | public class LoggerInterceptor implements Interceptor {
method intercept (line 30) | @NotNull
FILE: app/src/main/java/me/wizos/loread/network/interceptor/
Condensed preview — 522 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,488K chars).
[
{
"path": ".github/workflows/android.yml",
"chars": 596,
"preview": "name: Loread CI\n\non:\n push:\n branches: [ master ]\n pull_request:\n branches: [ master ]\n\njobs:\n build:\n\n runs"
},
{
"path": ".gitignore",
"chars": 56,
"preview": "*.iml\n.gradle\n/local.properties\n.DS_Store\n/build\n/.idea\n"
},
{
"path": "README.md",
"chars": 978,
"preview": "# 序\n\n> 路很长,纵然远望,却不知方向。\n\n> 抽支烟,思绪无常,奔跑着彷徨。\n\n> 逃不脱的苟且,到不了的远方…\n\n\n# 简介\n\nRSS 第三方客户端,支持 Inoreader、Feedly、TinyTinyRSS。\n\n下载地址:[h"
},
{
"path": "agentweb-core/.gitignore",
"chars": 36,
"preview": "/build\n/src/androidTest/\n/src/test/\n"
},
{
"path": "agentweb-core/build.gradle",
"chars": 1202,
"preview": "apply plugin: 'com.android.library'\n\nandroid {\n compileSdkVersion 29\n buildToolsVersion '29.0.3'\n\n defaultConfi"
},
{
"path": "agentweb-core/src/main/AndroidManifest.xml",
"chars": 950,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package=\"com.just.agentweb\"\n >\n\n <a"
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/AbsAgentWebSettings.java",
"chars": 5852,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/AbsAgentWebUIController.java",
"chars": 4427,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/Action.java",
"chars": 2711,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/ActionActivity.java",
"chars": 8420,
"preview": "\n/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 "
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/AgentWeb.java",
"chars": 23978,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/AgentWebConfig.java",
"chars": 6298,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/AgentWebFileProvider.java",
"chars": 1063,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/AgentWebJsInterfaceCompat.java",
"chars": 2156,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/AgentWebPermissions.java",
"chars": 1370,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/AgentWebSettingsImpl.java",
"chars": 2227,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/AgentWebUIControllerImplBase.java",
"chars": 2958,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/AgentWebUtils.java",
"chars": 29824,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/AgentWebView.java",
"chars": 19599,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/BaseIndicatorSpec.java",
"chars": 843,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/BaseIndicatorView.java",
"chars": 1525,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/BaseJsAccessEntrace.java",
"chars": 3048,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/DefaultChromeClient.java",
"chars": 10492,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/DefaultDesignUIController.java",
"chars": 7531,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/DefaultDownloadImpl.java",
"chars": 7725,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/DefaultUIController.java",
"chars": 11016,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/DefaultWebClient.java",
"chars": 17685,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/DefaultWebCreator.java",
"chars": 8218,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/DefaultWebLifeCycleImpl.java",
"chars": 1628,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/EventHandlerImpl.java",
"chars": 1700,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/EventInterceptor.java",
"chars": 783,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/HookManager.java",
"chars": 967,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/HttpHeaders.java",
"chars": 3382,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/IAgentWebSettings.java",
"chars": 893,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/IEventHandler.java",
"chars": 846,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/IUrlLoader.java",
"chars": 1223,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/IVideo.java",
"chars": 967,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/IWebIndicator.java",
"chars": 789,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/IWebLayout.java",
"chars": 1216,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/IndicatorController.java",
"chars": 972,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/IndicatorHandler.java",
"chars": 1934,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/JsAccessEntrace.java",
"chars": 913,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/JsAccessEntraceImpl.java",
"chars": 1788,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/JsBaseInterfaceHolder.java",
"chars": 1990,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/JsCallJava.java",
"chars": 11454,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/JsCallback.java",
"chars": 3661,
"preview": "\n\n/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0"
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/JsInterfaceHolder.java",
"chars": 947,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/JsInterfaceHolderImpl.java",
"chars": 2550,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/JsInterfaceObjectException.java",
"chars": 865,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/LayoutParamsOffer.java",
"chars": 865,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/LogUtils.java",
"chars": 1715,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/LollipopFixedWebView.java",
"chars": 1591,
"preview": "package com.just.agentweb;\n\nimport android.annotation.TargetApi;\nimport android.content.Context;\nimport android.os.Build"
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/MiddlewareWebChromeBase.java",
"chars": 1548,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/MiddlewareWebClientBase.java",
"chars": 1742,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/NestedScrollAgentWebView.java",
"chars": 6749,
"preview": "/*\n * Copyright (C) LeonDevLifeLog(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Versio"
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/PermissionInterceptor.java",
"chars": 821,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/ProcessUtils.java",
"chars": 2827,
"preview": "package com.just.agentweb;\n\nimport android.app.ActivityManager;\nimport android.app.Application;\nimport android.content.C"
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/Provider.java",
"chars": 773,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/QuickCallJs.java",
"chars": 1091,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/UrlCommonException.java",
"chars": 878,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/UrlLoaderImpl.java",
"chars": 3895,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/VideoImpl.java",
"chars": 4904,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/WebChromeClient.java",
"chars": 190,
"preview": "package com.just.agentweb;\n\n/**\n * @author cenxiaozhong\n * @date 2019/4/13\n * @since 1.0.0\n */\npublic class WebChromeCli"
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/WebChromeClientDelegate.java",
"chars": 12222,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/WebCreator.java",
"chars": 917,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/WebIndicator.java",
"chars": 9846,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/WebLifeCycle.java",
"chars": 822,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/WebListenerManager.java",
"chars": 1183,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/WebParentLayout.java",
"chars": 5216,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/WebSecurityCheckLogic.java",
"chars": 938,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/WebSecurityController.java",
"chars": 757,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/WebSecurityControllerImpl.java",
"chars": 1560,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/WebSecurityLogicImpl.java",
"chars": 2057,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/WebViewClient.java",
"chars": 188,
"preview": "package com.just.agentweb;\n\n/**\n * @author cenxiaozhong\n * @date 2019/4/13\n * @since 1.0.0\n */\npublic class WebViewClien"
},
{
"path": "agentweb-core/src/main/java/com/just/agentweb/WebViewClientDelegate.java",
"chars": 8100,
"preview": "/*\n * Copyright (C) Justson(https://github.com/Justson/AgentWeb)\n *\n * Licensed under the Apache License, Version 2.0 ("
},
{
"path": "agentweb-core/src/main/res/layout/agentweb_error_page.xml",
"chars": 534,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n "
},
{
"path": "agentweb-core/src/main/res/values/colors.xml",
"chars": 190,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <color name=\"black\">#000000</color>\n <color name=\"white\">#ffff"
},
{
"path": "agentweb-core/src/main/res/values/ids.xml",
"chars": 300,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <item name=\"web_parent_layout_id\" type=\"id\"></item>\n <item nam"
},
{
"path": "agentweb-core/src/main/res/values/strings.xml",
"chars": 1413,
"preview": "<resources>\n <string name=\"agentweb_download_task_has_been_exist\">The task already exists, do not repeat click to dow"
},
{
"path": "agentweb-core/src/main/res/values/style.xml",
"chars": 318,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<resources xmlns:tools=\"http://schemas.android.com/tools\">\n\n <style name=\"act"
},
{
"path": "agentweb-core/src/main/res/values-zh/strings.xml",
"chars": 1179,
"preview": "<resources>\n <string name=\"agentweb_download_task_has_been_exist\">该任务已经存在 , 请勿重复点击下载!</string>\n <string name=\"agen"
},
{
"path": "app/.gitignore",
"chars": 47,
"preview": "/build/\n/src/androidTest/\n/src/test/\n/release/\n"
},
{
"path": "app/build.gradle",
"chars": 7367,
"preview": "apply plugin: 'com.android.application'\n\nandroid {\n compileSdkVersion 29\n buildToolsVersion '29.0.3'\n\n defaultC"
},
{
"path": "app/proguard-rules.pro",
"chars": 668,
"preview": "# Add project specific ProGuard replaceUrl here.\n# By default, the flags in this file are appended to flags specified\n# "
},
{
"path": "app/src/androidTest/java/me/wizos/loread/ApplicationTest.java",
"chars": 346,
"preview": "package me.wizos.loread;\n\nimport android.app.Application;\nimport android.test.ApplicationTestCase;\n\n/**\n * <a href=\"http"
},
{
"path": "app/src/main/AndroidManifest.xml",
"chars": 11170,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmln"
},
{
"path": "app/src/main/assets/css/android_studio.css",
"chars": 774,
"preview": "/*\nDate: 24 Fev 2015\nAuthor: Pedro Oliveira <kanytu@gmail . com>\n*/\n\n.hljs {\n color: #a9b7c6;\n background: #282b2e;\n "
},
{
"path": "app/src/main/assets/css/article_theme_day.css",
"chars": 764,
"preview": "/* #f8f8f8;灰白\n background-color:rgba(0,0,0,0);*/\n\nbody {\n //color: #333;\ncolor:#293845;\n background-color: #FFF"
},
{
"path": "app/src/main/assets/css/article_theme_night.css",
"chars": 1057,
"preview": "::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n background: #2c3e50;\n}\n\n::-webkit-scrollbar-thumb {\n backg"
},
{
"path": "app/src/main/assets/css/normalize.css",
"chars": 6236,
"preview": "/* 重置 */\nhtml, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, ad"
},
{
"path": "app/src/main/assets/js/highlight.pack.js",
"chars": 73199,
"preview": "/*! highlight.js v9.18.1 | BSD3 License | git.io/hljslicense */\n!function(e){var n=\"object\"==typeof window&&window||\"obj"
},
{
"path": "app/src/main/assets/js/lazyload.js",
"chars": 1334,
"preview": "/*\n * 图片懒加载, 用于 image.js;\n * 对 Unveil 进行了一定的修改\n *\n * jQuery Unveil\n * A very lightweight jQuery plugin to lazy load imag"
},
{
"path": "app/src/main/assets/js/media.js",
"chars": 6313,
"preview": "/*\n * 设置图片的默认加载行为\n */\n\n// ArticleBridge.log(\"触发脚本\" );\n// 在这里调用是因为在第一次打开ArticleActivity时,渲染WebView的内容比较慢,此时在ArticleActivi"
},
{
"path": "app/src/main/java/me/wizos/loread/App.java",
"chars": 14877,
"preview": "package me.wizos.loread;\n\nimport android.app.Application;\nimport android.content.Intent;\nimport android.os.AsyncTask;\nim"
},
{
"path": "app/src/main/java/me/wizos/loread/Contract.java",
"chars": 982,
"preview": "package me.wizos.loread;\n\n/**\n * Created by Wizos on 2019/2/8.\n */\n\npublic class Contract {\n public static final Stri"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/ArticleActivity.java",
"chars": 71164,
"preview": "package me.wizos.loread.activity;\n\nimport android.annotation.SuppressLint;\nimport android.app.Activity;\nimport android.c"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/BaseActivity.java",
"chars": 2697,
"preview": "package me.wizos.loread.activity;\n\nimport android.os.Bundle;\nimport android.view.KeyEvent;\n\nimport androidx.appcompat.ap"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/FeedActivity.java",
"chars": 26389,
"preview": "package me.wizos.loread.activity;\n\nimport android.content.ClipData;\nimport android.content.ClipboardManager;\nimport andr"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/LabActivity.java",
"chars": 10467,
"preview": "package me.wizos.loread.activity;\n\nimport android.content.Intent;\nimport android.content.pm.PackageManager;\nimport andro"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/MainActivity.java",
"chars": 66246,
"preview": "package me.wizos.loread.activity;\n\nimport android.annotation.SuppressLint;\nimport android.app.AlertDialog;\nimport androi"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/MusicActivity.java",
"chars": 13785,
"preview": "package me.wizos.loread.activity;\n\nimport android.content.ComponentName;\nimport android.content.Intent;\nimport android.c"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/ProviderActivity.java",
"chars": 6067,
"preview": "package me.wizos.loread.activity;\n\nimport android.content.Intent;\nimport android.net.Uri;\nimport android.os.Build;\nimpor"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/RuleGenerateActivity.java",
"chars": 382,
"preview": "package me.wizos.loread.activity;\n\nimport android.os.Bundle;\n\nimport androidx.appcompat.app.AppCompatActivity;\n\nimport m"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/SearchActivity.java",
"chars": 19622,
"preview": "package me.wizos.loread.activity;\n\nimport android.content.Context;\nimport android.content.Intent;\nimport android.os.Bund"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/SettingActivity.java",
"chars": 19784,
"preview": "package me.wizos.loread.activity;\n\nimport android.content.ClipData;\nimport android.content.ClipboardManager;\nimport andr"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/SplashActivity.java",
"chars": 1899,
"preview": "package me.wizos.loread.activity;\n\nimport android.content.Intent;\nimport android.os.Bundle;\nimport android.text.TextUtil"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/TTSActivity.java",
"chars": 12591,
"preview": "package me.wizos.loread.activity;\n\nimport android.content.ComponentName;\nimport android.content.Intent;\nimport android.c"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/WebActivity.java",
"chars": 39195,
"preview": "package me.wizos.loread.activity;\n\nimport android.annotation.SuppressLint;\nimport android.content.ClipData;\nimport andro"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/login/LoginFormState.java",
"chars": 1500,
"preview": "package me.wizos.loread.activity.login;\n\nimport androidx.annotation.Nullable;\n\n/**\n * Data validation state of the login"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/login/LoginInoReaderActivity.java",
"chars": 6235,
"preview": "package me.wizos.loread.activity.login;\n\nimport android.os.Bundle;\nimport android.text.Editable;\nimport android.text.Tex"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/login/LoginResult.java",
"chars": 874,
"preview": "package me.wizos.loread.activity.login;\n\nimport androidx.annotation.Nullable;\n\n/**\n * Authentication result : success (u"
},
{
"path": "app/src/main/java/me/wizos/loread/activity/login/LoginTinyRSSActivity.java",
"chars": 6220,
"preview": "package me.wizos.loread.activity.login;\n\nimport android.os.Bundle;\nimport android.text.Editable;\nimport android.text.Tex"
},
{
"path": "app/src/main/java/me/wizos/loread/adapter/ArticlePagedListAdapter.java",
"chars": 9494,
"preview": "package me.wizos.loread.adapter;\n\nimport android.content.Context;\nimport android.text.Html;\nimport android.text.TextUtil"
},
{
"path": "app/src/main/java/me/wizos/loread/adapter/ArticleViewBinder.java",
"chars": 6932,
"preview": "//package me.wizos.loread.adapter;\n//\n//import android.content.Context;\n//import android.text.Html;\n//import android.tex"
},
{
"path": "app/src/main/java/me/wizos/loread/adapter/ExpandedAdapter.java",
"chars": 7726,
"preview": "package me.wizos.loread.adapter;\n\nimport android.content.Context;\nimport android.util.ArrayMap;\nimport android.view.Layo"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/Enclosure.java",
"chars": 795,
"preview": "package me.wizos.loread.bean;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Wizos on 2019/2/8.\n"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/LogLevel.java",
"chars": 366,
"preview": "//package me.wizos.loreadx.bean;\n//\n//public enum LogLevel {\n// debug(\"debug\"),info(\"info\"),warning(\"warning\"),error("
},
{
"path": "app/src/main/java/me/wizos/loread/bean/Token.java",
"chars": 2922,
"preview": "package me.wizos.loread.bean;\n\nimport android.text.TextUtils;\n\nimport com.google.gson.annotations.SerializedName;\nimport"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/UserAgent.java",
"chars": 527,
"preview": "package me.wizos.loread.bean;\n\n\n/**\n * @author Wizos on 2018/6/28.\n */\n\npublic class UserAgent {\n private String name"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/domain/OutFeed.java",
"chars": 1028,
"preview": "package me.wizos.loread.bean.domain;\n\n/**\n * Created by Wizos on 2019/5/15.\n */\n\npublic class OutFeed {\n private Stri"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/domain/OutTag.java",
"chars": 893,
"preview": "package me.wizos.loread.bean.domain;\n\nimport java.util.ArrayList;\n\n/**\n * Created by Wizos on 2019/5/15.\n */\n\npublic cla"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/CategoryItem.java",
"chars": 729,
"preview": "package me.wizos.loread.bean.feedly;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport me.wizos.loread.db.Cate"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/Collection.java",
"chars": 2357,
"preview": "package me.wizos.loread.bean.feedly;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.ArrayList;\n\ni"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/ContentDirection.java",
"chars": 580,
"preview": "package me.wizos.loread.bean.feedly;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Wizos on 201"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/Counts.java",
"chars": 681,
"preview": "package me.wizos.loread.bean.feedly;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.ArrayList;\n\n/"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/Entry.java",
"chars": 8593,
"preview": "package me.wizos.loread.bean.feedly;\n\nimport android.text.TextUtils;\n\nimport com.google.gson.annotations.SerializedName;"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/FeedItem.java",
"chars": 4785,
"preview": "package me.wizos.loread.bean.feedly;\n\nimport org.jetbrains.annotations.NotNull;\n\nimport java.util.ArrayList;\n\nimport me."
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/Origin.java",
"chars": 745,
"preview": "package me.wizos.loread.bean.feedly;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Wizos on 201"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/Profile.java",
"chars": 2070,
"preview": "package me.wizos.loread.bean.feedly;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport me.wizos.loread.Contrac"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/StreamContents.java",
"chars": 881,
"preview": "package me.wizos.loread.bean.feedly;\n\nimport java.util.ArrayList;\n\n/**\n * Created by Wizos on 2019/2/8.\n */\n\npublic clas"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/StreamIds.java",
"chars": 644,
"preview": "package me.wizos.loread.bean.feedly;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.ArrayList;\n\n/"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/Subscription.java",
"chars": 4433,
"preview": "//package me.wizos.loreadx.bean.feedly;\n//\n//import com.google.gson.annotations.SerializedName;\n//\n//import java.util.Ar"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/Unreadcount.java",
"chars": 711,
"preview": "package me.wizos.loread.bean.feedly;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Wizos on 201"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/Visual.java",
"chars": 1073,
"preview": "package me.wizos.loread.bean.feedly;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Wizos on 201"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/input/EditCollection.java",
"chars": 1322,
"preview": "package me.wizos.loread.bean.feedly.input;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.ArrayLi"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/input/EditFeed.java",
"chars": 1627,
"preview": "package me.wizos.loread.bean.feedly.input;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport me.wizos.loread.A"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/feedly/input/MarkerAction.java",
"chars": 2136,
"preview": "package me.wizos.loread.bean.feedly.input;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.List;\n\n"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/fever/BaseResponse.java",
"chars": 684,
"preview": "package me.wizos.loread.bean.fever;\n\nimport com.google.gson.annotations.SerializedName;\n\npublic class BaseResponse {\n "
},
{
"path": "app/src/main/java/me/wizos/loread/bean/fever/Feed.java",
"chars": 1420,
"preview": "//package me.wizos.loreadx.bean.fever;\n//\n//import com.google.gson.annotations.SerializedName;\n//\n//import me.wizos.lore"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/fever/Feeds.java",
"chars": 481,
"preview": "//package me.wizos.loreadx.bean.fever;\n//\n//import com.google.gson.annotations.SerializedName;\n//\n//import java.util.Lis"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/fever/Group.java",
"chars": 752,
"preview": "package me.wizos.loread.bean.fever;\n\nimport android.text.TextUtils;\n\nimport com.google.gson.annotations.SerializedName;\n"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/fever/GroupFeeds.java",
"chars": 359,
"preview": "package me.wizos.loread.bean.fever;\n\nimport com.google.gson.annotations.SerializedName;\n\npublic class GroupFeeds {\n @"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/fever/Groups.java",
"chars": 558,
"preview": "package me.wizos.loread.bean.fever;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.List;\n\n/**\n * "
},
{
"path": "app/src/main/java/me/wizos/loread/bean/fever/Item.java",
"chars": 1154,
"preview": "package me.wizos.loread.bean.fever;\n\nimport com.google.gson.annotations.SerializedName;\n\npublic class Item {\n @Serial"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/fever/Items.java",
"chars": 417,
"preview": "package me.wizos.loread.bean.fever;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.List;\n\npublic "
},
{
"path": "app/src/main/java/me/wizos/loread/bean/fever/SavedItemIds.java",
"chars": 429,
"preview": "package me.wizos.loread.bean.fever;\n\nimport android.text.TextUtils;\n\nimport com.google.gson.annotations.SerializedName;\n"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/fever/UnreadItemIds.java",
"chars": 433,
"preview": "package me.wizos.loread.bean.fever;\n\nimport android.text.TextUtils;\n\nimport com.google.gson.annotations.SerializedName;\n"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/EditTag.java",
"chars": 157,
"preview": "//package me.wizos.loreadx.bean.inoreader;\n//\n///**\n// * Created by Wizos on 2019/5/12.\n// */\n//\n//public class EditTag "
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/GsItemContents.java",
"chars": 2392,
"preview": "//package me.wizos.loread.bean.gson;\n//\n//import com.google.gson.annotations.SerializedName;\n//\n//import java.util.Array"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/GsTag.java",
"chars": 509,
"preview": "package me.wizos.loread.bean.inoreader;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Wizos on "
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/GsTags.java",
"chars": 476,
"preview": "package me.wizos.loread.bean.inoreader;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport org.parceler.Parcel;"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/GsUnreadCount.java",
"chars": 644,
"preview": "package me.wizos.loread.bean.inoreader;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.ArrayList;"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/ItemIds.java",
"chars": 1134,
"preview": "package me.wizos.loread.bean.inoreader;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.ArrayList;"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/ItemRefs.java",
"chars": 1368,
"preview": "package me.wizos.loread.bean.inoreader;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.ArrayList;"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/LoginResult.java",
"chars": 1525,
"preview": "package me.wizos.loread.bean.inoreader;\n\nimport android.text.TextUtils;\n\nimport me.wizos.loread.App;\nimport me.wizos.lor"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/Readability.java",
"chars": 3187,
"preview": "package me.wizos.loread.bean.inoreader;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport org.parceler.Parcel;"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/StreamContents.java",
"chars": 2151,
"preview": "package me.wizos.loread.bean.inoreader;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport org.parceler.Parcel;"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/StreamPref.java",
"chars": 521,
"preview": "package me.wizos.loread.bean.inoreader;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * ID 和 Value\n * Create"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/StreamPrefs.java",
"chars": 589,
"preview": "package me.wizos.loread.bean.inoreader;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport org.parceler.Parcel;"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/SubCategories.java",
"chars": 510,
"preview": "package me.wizos.loread.bean.inoreader;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Wizos on "
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/Subscription.java",
"chars": 2215,
"preview": "package me.wizos.loread.bean.inoreader;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.ArrayList;"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/Subscriptions.java",
"chars": 375,
"preview": "package me.wizos.loread.bean.inoreader;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.ArrayList;"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/UnreadCounts.java",
"chars": 823,
"preview": "package me.wizos.loread.bean.inoreader;\n\nimport com.google.gson.annotations.SerializedName;\n\n/**\n * Created by Wizos on "
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/UserInfo.java",
"chars": 2186,
"preview": "package me.wizos.loread.bean.inoreader;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport org.parceler.Parcel;"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/itemContents/Item.java",
"chars": 4606,
"preview": "package me.wizos.loread.bean.inoreader.itemContents;\n\nimport java.util.ArrayList;\n\nimport me.wizos.loread.App;\nimport me"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/itemContents/Origin.java",
"chars": 915,
"preview": "package me.wizos.loread.bean.inoreader.itemContents;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport org.par"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/itemContents/Self.java",
"chars": 340,
"preview": "package me.wizos.loread.bean.inoreader.itemContents;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport org.par"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/inoreader/itemContents/Summary.java",
"chars": 583,
"preview": "package me.wizos.loread.bean.inoreader.itemContents;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport org.par"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/loread/LoginParam.java",
"chars": 764,
"preview": "//package me.wizos.loread.bean.loread;\n//\n//public class LoginParam extends RequestJsonBody{\n// private String user ="
},
{
"path": "app/src/main/java/me/wizos/loread/bean/loread/RequestJsonBody.java",
"chars": 401,
"preview": "//package me.wizos.loread.bean.loread;\n//\n//public class RequestJsonBody {\n// private String op;\n// private String"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/loread/Response.java",
"chars": 915,
"preview": "//package me.wizos.loread.bean.loread;\n//\n//import com.google.gson.annotations.SerializedName;\n//import com.socks.librar"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/proxynode/AnonymityLevel.java",
"chars": 1465,
"preview": "package me.wizos.loread.bean.proxynode;\n\nimport me.wizos.loread.gson.GsonEnum;\n\npublic enum AnonymityLevel implements Gs"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/proxynode/ProxyNode.java",
"chars": 1242,
"preview": "package me.wizos.loread.bean.proxynode;\n\nimport java.io.Serializable;\nimport java.net.Proxy;\n\n/**\n * 代理节点并不能被用于翻墙,因为会被“G"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/proxynode/ProxyType.java",
"chars": 1014,
"preview": "package me.wizos.loread.bean.proxynode;\n\nimport me.wizos.loread.gson.GsonEnum;\n\npublic enum ProxyType implements GsonEnu"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/search/QuickAdd.java",
"chars": 1150,
"preview": "//package me.wizos.loreadx.bean.search;\n//\n//import com.google.gson.annotations.SerializedName;\n//\n///**\n// * Created by"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/search/SearchFeedItem.java",
"chars": 1514,
"preview": "package me.wizos.loread.bean.search;\n\nimport me.wizos.loread.bean.feedly.FeedItem;\n\n/**\n * Created by Wizos on 2017/12/3"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/search/SearchFeeds.java",
"chars": 1424,
"preview": "package me.wizos.loread.bean.search;\n\nimport java.util.ArrayList;\n\n/**\n * Created by Wizos on 2017/12/31.\n */\n\npublic cl"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/search/StreamFeed.java",
"chars": 542,
"preview": "//package me.wizos.loreadx.bean.search;\n//\n//import com.google.gson.annotations.SerializedName;\n//\n///**\n// * Created by"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/request/GetArticles.java",
"chars": 891,
"preview": "package me.wizos.loread.bean.ttrss.request;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport java.util.HashSe"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/request/GetCategories.java",
"chars": 776,
"preview": "package me.wizos.loread.bean.ttrss.request;\n\npublic class GetCategories {\n private String sid;\n private String op "
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/request/GetFeeds.java",
"chars": 930,
"preview": "package me.wizos.loread.bean.ttrss.request;\n\npublic class GetFeeds {\n private String sid;\n private String op = \"ge"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/request/GetHeadlines.java",
"chars": 2675,
"preview": "package me.wizos.loread.bean.ttrss.request;\n\npublic class GetHeadlines {\n private String op = \"getHeadlines\";\n pri"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/request/GetSavedItemIds.java",
"chars": 340,
"preview": "package me.wizos.loread.bean.ttrss.request;\n\npublic class GetSavedItemIds {\n private String sid;\n private String o"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/request/GetUnreadItemIds.java",
"chars": 343,
"preview": "package me.wizos.loread.bean.ttrss.request;\n\npublic class GetUnreadItemIds {\n private String sid;\n private String "
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/request/LoginParam.java",
"chars": 684,
"preview": "package me.wizos.loread.bean.ttrss.request;\n\npublic class LoginParam {\n private String user = \"admin\";\n private St"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/request/RequestParam.java",
"chars": 190,
"preview": "package me.wizos.loread.bean.ttrss.request;\n\npublic class RequestParam {\n private String op;\n private String sid;\n"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/request/SearchHeadlines.java",
"chars": 867,
"preview": "package me.wizos.loread.bean.ttrss.request;\n\npublic class SearchHeadlines {\n private String op = \"getHeadlines\";\n "
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/request/SearchMode.java",
"chars": 158,
"preview": "package me.wizos.loread.bean.ttrss.request;\n\npublic enum SearchMode {\n all_feeds,\n this_feed,\n //(category cont"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/request/SubscribeToFeed.java",
"chars": 1023,
"preview": "package me.wizos.loread.bean.ttrss.request;\n\npublic class SubscribeToFeed {\n private String sid;\n private String o"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/request/UnsubscribeFeed.java",
"chars": 702,
"preview": "package me.wizos.loread.bean.ttrss.request;\n\nimport com.google.gson.annotations.SerializedName;\n\npublic class Unsubscrib"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/request/UpdateArticle.java",
"chars": 1410,
"preview": "package me.wizos.loread.bean.ttrss.request;\n\nimport android.text.TextUtils;\n\npublic class UpdateArticle {\n private St"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/result/ArticleItem.java",
"chars": 5305,
"preview": "package me.wizos.loread.bean.ttrss.result;\n\nimport java.util.List;\n\nimport me.wizos.loread.App;\nimport me.wizos.loread.b"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/result/Attachment.java",
"chars": 312,
"preview": "//package me.wizos.loreadx.bean.ttrss.result;\n//\n//public class Attachment {\n// private String content_url;\n// pri"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/result/CategoryItem.java",
"chars": 1387,
"preview": "package me.wizos.loread.bean.ttrss.result;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport me.wizos.loread.d"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/result/FeedItem.java",
"chars": 2758,
"preview": "package me.wizos.loread.bean.ttrss.result;\n\nimport com.google.gson.annotations.SerializedName;\n\nimport me.wizos.loread.A"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/result/SubscribeToFeedResult.java",
"chars": 130,
"preview": "package me.wizos.loread.bean.ttrss.result;\n\npublic class SubscribeToFeedResult {\n private int code;\n private int f"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/result/TTRSSLoginResult.java",
"chars": 456,
"preview": "package me.wizos.loread.bean.ttrss.result;\n\npublic class TTRSSLoginResult {\n private String session_id;\n private i"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/result/TinyResponse.java",
"chars": 1249,
"preview": "package me.wizos.loread.bean.ttrss.result;\n\nimport com.google.gson.annotations.SerializedName;\n\npublic class TinyRespons"
},
{
"path": "app/src/main/java/me/wizos/loread/bean/ttrss/result/UpdateArticleResult.java",
"chars": 417,
"preview": "package me.wizos.loread.bean.ttrss.result;\n\npublic class UpdateArticleResult {\n private String status;\n private in"
},
{
"path": "app/src/main/java/me/wizos/loread/behavior/BottomNavigationBehavior.java",
"chars": 1775,
"preview": "package me.wizos.loread.behavior;\n\nimport android.animation.ObjectAnimator;\nimport android.content.Context;\nimport andro"
}
]
// ... and 322 more files (download for full content)
About this extraction
This page contains the full source code of the wizos/loread GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 522 files (2.2 MB), approximately 596.2k tokens, and a symbol index with 3849 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.