├── .gitignore ├── README.md ├── host-sample └── host │ ├── app │ ├── build.gradle │ ├── libs │ │ └── common-utils-lib-1.0.0.jar │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ ├── external │ │ │ ├── README │ │ │ └── demo3.apk │ │ └── plugins │ │ │ ├── demo1.jar │ │ │ ├── demo2.jar │ │ │ └── webview.jar │ │ ├── java │ │ └── com │ │ │ └── qihoo360 │ │ │ └── replugin │ │ │ └── sample │ │ │ └── host │ │ │ ├── FileProvider.java │ │ │ ├── MainActivity.java │ │ │ ├── PluginFragmentActivity.java │ │ │ └── SampleApplication.java │ │ └── res │ │ ├── layout │ │ ├── activity_main.xml │ │ └── activity_plugin_fragment.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_round.png │ │ └── notification_out.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── values │ │ ├── colors.xml │ │ ├── public.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── fileprovider_path.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── settings.gradle │ └── utils │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ └── main │ ├── AndroidManifest.xml │ └── java │ └── com │ └── qihoo360 │ └── replugin │ └── common │ └── utils │ └── TimeUtils.java ├── plugin-sample ├── plugin-demo1 │ ├── README.md │ ├── app │ │ ├── build.gradle │ │ ├── case.gradle │ │ ├── libs │ │ │ ├── common-utils-lib-1.0.0.jar │ │ │ ├── fragment.jar │ │ │ └── plugin-library.aar │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── aidl │ │ │ └── com │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── sample │ │ │ │ └── demo2 │ │ │ │ └── IDemo2.aidl │ │ │ ├── java │ │ │ └── com │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── sample │ │ │ │ └── demo1 │ │ │ │ ├── BaseActivity.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── MainApp.java │ │ │ │ ├── TestItem.java │ │ │ │ ├── activity │ │ │ │ ├── file_provider │ │ │ │ │ ├── BitmapUtils.java │ │ │ │ │ └── FileProviderActivity.java │ │ │ │ ├── for_result │ │ │ │ │ └── ForResultActivity.java │ │ │ │ ├── fragment │ │ │ │ │ └── StandardFragmentActivity.java │ │ │ │ ├── intent_filter │ │ │ │ │ └── IntentFilterDemoActivity1.java │ │ │ │ ├── notify_test │ │ │ │ │ └── NotifyActivity.java │ │ │ │ ├── preference │ │ │ │ │ ├── PrefActivity1.java │ │ │ │ │ └── PrefActivity2.java │ │ │ │ ├── single_instance │ │ │ │ │ └── TIActivity1.java │ │ │ │ ├── single_top │ │ │ │ │ └── SingleTopActivity1.java │ │ │ │ ├── standard │ │ │ │ │ └── StandardActivity.java │ │ │ │ ├── task_affinity │ │ │ │ │ ├── TAActivity1.java │ │ │ │ │ ├── TAActivity2.java │ │ │ │ │ ├── TAActivity3.java │ │ │ │ │ ├── TAActivity4.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── task_affinity_2 │ │ │ │ │ ├── TA2Activity1.java │ │ │ │ │ ├── TA2Activity2.java │ │ │ │ │ ├── TA2Activity3.java │ │ │ │ │ ├── TA2Activity4.java │ │ │ │ │ └── package-info.java │ │ │ │ ├── theme │ │ │ │ │ ├── ThemeBlackNoTitleBarActivity.java │ │ │ │ │ ├── ThemeBlackNoTitleBarFullscreenActivity.java │ │ │ │ │ └── ThemeDialogActivity.java │ │ │ │ └── webview │ │ │ │ │ └── WebViewActivity.java │ │ │ │ ├── fragment │ │ │ │ ├── DemoCodeFragment.java │ │ │ │ └── DemoFragment.java │ │ │ │ ├── provider │ │ │ │ ├── FileProvider.java │ │ │ │ └── Provider2.java │ │ │ │ ├── receivers │ │ │ │ └── PluginDemo1Receiver.java │ │ │ │ ├── service │ │ │ │ ├── PluginDemoAppService.java │ │ │ │ ├── PluginDemoService1.java │ │ │ │ └── PluginDemoService2.java │ │ │ │ ├── support │ │ │ │ ├── LogX.java │ │ │ │ └── NotifyUtils.java │ │ │ │ └── webview │ │ │ │ ├── IWebPage.java │ │ │ │ ├── ViewProxy.java │ │ │ │ └── WebPageProxy.java │ │ │ └── res │ │ │ ├── layout │ │ │ ├── activity_plugin_fragment.xml │ │ │ ├── layout_notify.xml │ │ │ ├── main.xml │ │ │ ├── main_fragment.xml │ │ │ ├── simple.xml │ │ │ ├── simple_2.xml │ │ │ └── simple_4.xml │ │ │ ├── mipmap-xhdpi │ │ │ └── app_icon.png │ │ │ ├── values │ │ │ └── strings.xml │ │ │ └── xml │ │ │ ├── fileprovider_path.xml │ │ │ └── pref_headers.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── library │ │ ├── .gitignore │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── androidTest │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── sample │ │ │ │ └── library │ │ │ │ └── ExampleInstrumentedTest.java │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── qihoo360 │ │ │ │ │ └── replugin │ │ │ │ │ └── sample │ │ │ │ │ └── library │ │ │ │ │ └── LibMainActivity.java │ │ │ └── res │ │ │ │ ├── layout │ │ │ │ ├── content_lib_main.xml │ │ │ │ └── lib_activity_main.xml │ │ │ │ └── values │ │ │ │ └── strings.xml │ │ │ └── test │ │ │ └── java │ │ │ └── com │ │ │ └── qihoo360 │ │ │ └── replugin │ │ │ └── sample │ │ │ └── library │ │ │ └── ExampleUnitTest.java │ └── settings.gradle ├── plugin-demo2 │ ├── README.md │ ├── app │ │ ├── build.gradle │ │ ├── case.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── aidl │ │ │ └── com │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── sample │ │ │ │ └── demo2 │ │ │ │ └── IDemo2.aidl │ │ │ ├── java │ │ │ └── com │ │ │ │ └── qihoo360 │ │ │ │ └── replugin │ │ │ │ └── sample │ │ │ │ └── demo2 │ │ │ │ ├── Demo2Impl.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── MainApp.java │ │ │ │ ├── activity │ │ │ │ ├── appcompat │ │ │ │ │ └── AppCompatActivityDemo.java │ │ │ │ └── for_result │ │ │ │ │ └── ForResultActivity.java │ │ │ │ ├── databinding │ │ │ │ ├── DataBindingActivity.java │ │ │ │ └── Entry.java │ │ │ │ ├── receivers │ │ │ │ └── PluginDemo2Receiver.java │ │ │ │ ├── service │ │ │ │ └── PluginDemo2Service.java │ │ │ │ ├── support │ │ │ │ └── LogX.java │ │ │ │ └── testcase │ │ │ │ └── TestMultiDex.java │ │ │ └── res │ │ │ ├── layout │ │ │ ├── databinding_test.xml │ │ │ └── from_demo1.xml │ │ │ ├── mipmap-xhdpi │ │ │ └── app_icon.png │ │ │ └── values │ │ │ └── strings.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle └── plugin-demo3-kotlin │ ├── README.md │ ├── app │ ├── build.gradle │ ├── libs │ │ └── fragment.jar │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── aidl │ │ └── com │ │ │ └── qihoo360 │ │ │ └── replugin │ │ │ └── sample │ │ │ └── demo2 │ │ │ └── IDemo2.aidl │ │ ├── java │ │ └── com │ │ │ └── qihoo360 │ │ │ └── replugin │ │ │ └── sample │ │ │ └── demo3 │ │ │ ├── BaseActivity.kt │ │ │ ├── MainActivity.kt │ │ │ ├── MainApp.kt │ │ │ ├── TestItem.kt │ │ │ ├── activity │ │ │ └── theme │ │ │ │ └── ThemeBlackNoTitleBarActivity.kt │ │ │ ├── receivers │ │ │ └── PluginDemo3Receiver.kt │ │ │ ├── service │ │ │ └── PluginDemoService1.kt │ │ │ └── support │ │ │ └── LogX.kt │ │ └── res │ │ ├── layout │ │ ├── main.xml │ │ ├── main_fragment.xml │ │ └── simple.xml │ │ ├── mipmap-xhdpi │ │ └── app_icon.png │ │ └── values │ │ └── strings.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle ├── replugin-host-gradle-androidx ├── README.md ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src │ └── main │ ├── groovy │ └── com │ │ └── qihoo360 │ │ └── replugin │ │ └── gradle │ │ ├── compat │ │ ├── ScopeCompat.groovy │ │ └── VariantCompat.groovy │ │ └── host │ │ ├── AppConstant.groovy │ │ ├── RePlugin.groovy │ │ ├── creator │ │ ├── FileCreators.groovy │ │ ├── IFileCreator.groovy │ │ └── impl │ │ │ ├── java │ │ │ └── RePluginHostConfigCreator.groovy │ │ │ └── json │ │ │ ├── PluginBuiltinJsonCreator.groovy │ │ │ ├── PluginInfo.groovy │ │ │ └── PluginInfoParser.groovy │ │ └── handlemanifest │ │ └── ComponentsGenerator.groovy │ └── resources │ └── META-INF │ └── gradle-plugins │ └── replugin-host-gradle-androidx.properties ├── replugin-host-library-androidx ├── README.md ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── replugin-host-lib-androidx │ ├── build.gradle │ ├── replugin-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── aidl │ │ └── com │ │ │ └── qihoo360 │ │ │ ├── loader2 │ │ │ ├── IPlugin.aidl │ │ │ ├── IPluginClient.aidl │ │ │ ├── IPluginHost.aidl │ │ │ ├── PluginBinderInfo.aidl │ │ │ ├── mgr │ │ │ │ └── IServiceConnection.aidl │ │ │ └── sp │ │ │ │ └── IPref.aidl │ │ │ ├── mobilesafe │ │ │ └── svcmanager │ │ │ │ └── IServiceChannel.aidl │ │ │ └── replugin │ │ │ ├── IBinderGetter.aidl │ │ │ ├── component │ │ │ └── service │ │ │ │ └── server │ │ │ │ └── IPluginServiceServer.aidl │ │ │ ├── model │ │ │ └── PluginInfo.aidl │ │ │ └── packages │ │ │ ├── IPluginManagerServer.aidl │ │ │ └── PluginRunningList.aidl │ │ └── java │ │ └── com │ │ └── qihoo360 │ │ ├── i │ │ ├── Factory.java │ │ ├── Factory2.java │ │ ├── IModule.java │ │ ├── IPlugin.java │ │ └── IPluginManager.java │ │ ├── loader │ │ ├── utils │ │ │ ├── PackageUtils.java │ │ │ ├── PatchClassLoaderUtils.java │ │ │ ├── ProcessLocker.java │ │ │ ├── StringUtils.java │ │ │ └── SysUtils.java │ │ └── utils2 │ │ │ └── FilePermissionUtils.java │ │ ├── loader2 │ │ ├── BinderCursor.java │ │ ├── BuildCompat.java │ │ ├── Builder.java │ │ ├── CertUtils.java │ │ ├── Constant.java │ │ ├── DumpUtils.java │ │ ├── Finder.java │ │ ├── FinderBuiltin.java │ │ ├── LaunchModeStates.java │ │ ├── Loader.java │ │ ├── MP.java │ │ ├── PMF.java │ │ ├── Plugin.java │ │ ├── PluginBinderInfo.java │ │ ├── PluginCommImpl.java │ │ ├── PluginContainers.java │ │ ├── PluginContext.java │ │ ├── PluginDesc.java │ │ ├── PluginIntent.java │ │ ├── PluginLibraryInternalProxy.java │ │ ├── PluginManager.java │ │ ├── PluginNativeLibsHelper.java │ │ ├── PluginProcessMain.java │ │ ├── PluginProcessPer.java │ │ ├── PluginProviderStub.java │ │ ├── PluginStatusController.java │ │ ├── PluginTable.java │ │ ├── PmBase.java │ │ ├── PmHostSvc.java │ │ ├── ProcessStates.java │ │ ├── StubProcessManager.java │ │ ├── TaskAffinityStates.java │ │ ├── V5FileInfo.java │ │ ├── V5Finder.java │ │ ├── VMRuntimeCompat.java │ │ ├── alc │ │ │ ├── ActivityController.java │ │ │ └── IActivityWatcher.java │ │ ├── mgr │ │ │ ├── PluginProviderClient.java │ │ │ └── PluginServiceClient.java │ │ └── sp │ │ │ └── PrefImpl.java │ │ ├── mobilesafe │ │ ├── api │ │ │ ├── AppVar.java │ │ │ ├── IPC.java │ │ │ ├── Intents.java │ │ │ ├── Pref.java │ │ │ └── Tasks.java │ │ ├── loader │ │ │ ├── a │ │ │ │ └── DummyActivity.java │ │ │ ├── p │ │ │ │ └── DummyProvider.java │ │ │ └── s │ │ │ │ └── DummyService.java │ │ ├── parser │ │ │ └── manifest │ │ │ │ ├── ManifestParser.java │ │ │ │ ├── XmlHandler.java │ │ │ │ └── bean │ │ │ │ ├── ComponentBean.java │ │ │ │ └── DataBean.java │ │ └── svcmanager │ │ │ ├── ParcelBinder.java │ │ │ ├── PluginServiceManager.java │ │ │ ├── PluginServiceRecord.java │ │ │ ├── PluginServiceReferenceManager.java │ │ │ ├── QihooServiceManager.java │ │ │ ├── ServiceChannelCursor.java │ │ │ ├── ServiceChannelImpl.java │ │ │ ├── ServiceProvider.java │ │ │ └── ServiceWrapper.java │ │ └── replugin │ │ ├── ContextInjector.java │ │ ├── DefaultRePluginCallbacks.java │ │ ├── DefaultRePluginEventCallbacks.java │ │ ├── IHostBinderFetcher.java │ │ ├── PluginDexClassLoader.java │ │ ├── PluginDexClassLoaderPatch.java │ │ ├── RePlugin.java │ │ ├── RePluginApplication.java │ │ ├── RePluginCallbacks.java │ │ ├── RePluginClassLoader.java │ │ ├── RePluginConfig.java │ │ ├── RePluginConstants.java │ │ ├── RePluginEventCallbacks.java │ │ ├── RePluginInternal.java │ │ ├── base │ │ ├── AMSUtils.java │ │ ├── IPC.java │ │ ├── LocalBroadcastHelper.java │ │ └── ThreadUtils.java │ │ ├── component │ │ ├── ComponentList.java │ │ ├── activity │ │ │ ├── ActivityInjector.java │ │ │ └── DynamicClassProxyActivity.java │ │ ├── app │ │ │ └── PluginApplicationClient.java │ │ ├── dummy │ │ │ ├── DummyActivity.java │ │ │ ├── DummyProvider.java │ │ │ ├── DummyReceiver.java │ │ │ ├── DummyService.java │ │ │ └── ForwardActivity.java │ │ ├── process │ │ │ ├── PluginProcessHost.java │ │ │ ├── ProcessPitProviderBase.java │ │ │ ├── ProcessPitProviderLoader0.java │ │ │ ├── ProcessPitProviderLoader1.java │ │ │ ├── ProcessPitProviderP0.java │ │ │ ├── ProcessPitProviderP1.java │ │ │ ├── ProcessPitProviderP2.java │ │ │ ├── ProcessPitProviderPersist.java │ │ │ └── ProcessPitProviderUI.java │ │ ├── provider │ │ │ ├── PluginPitProviderBase.java │ │ │ ├── PluginPitProviderP0.java │ │ │ ├── PluginPitProviderP1.java │ │ │ ├── PluginPitProviderP2.java │ │ │ ├── PluginPitProviderPersist.java │ │ │ ├── PluginPitProviderUI.java │ │ │ ├── PluginProviderClient.java │ │ │ ├── PluginProviderClient2.java │ │ │ └── PluginProviderHelper.java │ │ ├── receiver │ │ │ ├── PluginReceiverHelper.java │ │ │ └── PluginReceiverProxy.java │ │ ├── service │ │ │ ├── PluginServiceClient.java │ │ │ ├── PluginServiceDispatcherManager.java │ │ │ ├── PluginServiceServerFetcher.java │ │ │ ├── ServiceDispatcher.java │ │ │ └── server │ │ │ │ ├── ConnectionBindRecord.java │ │ │ │ ├── IntentBindRecord.java │ │ │ │ ├── PluginPitService.java │ │ │ │ ├── PluginServiceServer.java │ │ │ │ ├── ProcessBindRecord.java │ │ │ │ ├── ProcessRecord.java │ │ │ │ └── ServiceRecord.java │ │ └── utils │ │ │ ├── ApkCommentReader.java │ │ │ ├── IntentMatcherHelper.java │ │ │ └── PluginClientHelper.java │ │ ├── debugger │ │ └── DebuggerReceivers.java │ │ ├── ext │ │ └── parser │ │ │ ├── AbstractApkParser.java │ │ │ ├── ApkParser.java │ │ │ ├── exception │ │ │ └── ParserException.java │ │ │ ├── parser │ │ │ ├── BinaryXmlParser.java │ │ │ ├── StringPoolEntry.java │ │ │ ├── XmlNamespaces.java │ │ │ ├── XmlStreamer.java │ │ │ └── XmlTranslator.java │ │ │ ├── struct │ │ │ ├── ChunkHeader.java │ │ │ ├── ChunkType.java │ │ │ ├── ResourceValue.java │ │ │ ├── StringPool.java │ │ │ ├── StringPoolHeader.java │ │ │ └── xml │ │ │ │ ├── Attribute.java │ │ │ │ ├── Attributes.java │ │ │ │ ├── NullHeader.java │ │ │ │ ├── XmlHeader.java │ │ │ │ ├── XmlNamespaceEndTag.java │ │ │ │ ├── XmlNamespaceStartTag.java │ │ │ │ ├── XmlNodeEndTag.java │ │ │ │ ├── XmlNodeHeader.java │ │ │ │ ├── XmlNodeStartTag.java │ │ │ │ └── XmlResourceMapHeader.java │ │ │ └── utils │ │ │ ├── Buffers.java │ │ │ ├── ParseUtils.java │ │ │ └── xml │ │ │ ├── AggregateTranslator.java │ │ │ ├── CharSequenceTranslator.java │ │ │ ├── CodePointTranslator.java │ │ │ ├── EntityArrays.java │ │ │ ├── LookupTranslator.java │ │ │ ├── NumericEntityEscaper.java │ │ │ ├── UnicodeUnpairedSurrogateRemover.java │ │ │ └── XmlEscaper.java │ │ ├── helper │ │ ├── HostConfigHelper.java │ │ ├── JSONHelper.java │ │ ├── LogDebug.java │ │ └── LogRelease.java │ │ ├── model │ │ ├── PluginInfo.java │ │ └── PluginInfoList.java │ │ ├── packages │ │ ├── PluginFastInstallProvider.java │ │ ├── PluginFastInstallProviderProxy.java │ │ ├── PluginInfoUpdater.java │ │ ├── PluginManagerProxy.java │ │ ├── PluginManagerServer.java │ │ ├── PluginPublishFileGenerator.java │ │ ├── PluginRunningList.java │ │ └── RePluginInstaller.java │ │ └── utils │ │ ├── AssetsUtils.java │ │ ├── Charsets.java │ │ ├── CloseableUtils.java │ │ ├── Dex2OatUtils.java │ │ ├── FileUtils.java │ │ ├── IOUtils.java │ │ ├── InterpretDex2OatHelper.java │ │ ├── ReflectUtils.java │ │ ├── StringBuilderWriter.java │ │ ├── Validate.java │ │ ├── basic │ │ ├── ArrayMap.java │ │ ├── ArraySet.java │ │ ├── ByteConvertor.java │ │ ├── ContainerHelpers.java │ │ ├── MapCollections.java │ │ ├── SecurityUtil.java │ │ └── SimpleArrayMap.java │ │ └── pkg │ │ └── PackageFilesUtil.java └── settings.gradle ├── replugin-plugin-gradle-androidx ├── README.md ├── bintray.gradle ├── build.gradle ├── config.gradle ├── config.properties ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src │ └── main │ ├── groovy │ └── com │ │ └── qihoo360 │ │ └── replugin │ │ └── gradle │ │ └── plugin │ │ ├── AppConstant.groovy │ │ ├── ReClassPlugin.groovy │ │ ├── debugger │ │ └── PluginDebugger.groovy │ │ ├── injector │ │ ├── BaseInjector.groovy │ │ ├── IClassInjector.groovy │ │ ├── Injectors.groovy │ │ ├── identifier │ │ │ ├── GetIdentifierExprEditor.groovy │ │ │ └── GetIdentifierInjector.groovy │ │ ├── loaderactivity │ │ │ └── LoaderActivityInjector.groovy │ │ ├── localbroadcast │ │ │ ├── LocalBroadcastExprEditor.groovy │ │ │ └── LocalBroadcastInjector.groovy │ │ └── provider │ │ │ ├── ProviderExprEditor.groovy │ │ │ ├── ProviderExprEditor2.groovy │ │ │ ├── ProviderInjector.groovy │ │ │ └── ProviderInjector2.groovy │ │ ├── inner │ │ ├── ClassFileVisitor.groovy │ │ ├── CommonData.groovy │ │ ├── ReClassTransform.groovy │ │ └── Util.groovy │ │ ├── manifest │ │ ├── IManifest.groovy │ │ ├── ManifestAPI.groovy │ │ └── ManifestReader.groovy │ │ └── util │ │ └── CmdUtil.groovy │ └── resources │ └── META-INF │ └── gradle-plugins │ └── replugin-plugin-gradle-androidx.properties ├── replugin-plugin-library-androidx ├── README.md ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── replugin-plugin-lib-androidx │ ├── bintray.gradle │ ├── build.gradle │ ├── proguard-rules.pro │ ├── replugin-library-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── aidl │ │ └── com │ │ │ └── qihoo360 │ │ │ ├── loader2 │ │ │ └── IPlugin.aidl │ │ │ └── replugin │ │ │ └── IBinderGetter.aidl │ │ └── java │ │ └── com │ │ └── qihoo360 │ │ └── replugin │ │ ├── Entry.java │ │ ├── MethodInvoker.java │ │ ├── RePlugin.java │ │ ├── RePluginCompat.java │ │ ├── RePluginEnv.java │ │ ├── RePluginFramework.java │ │ ├── RePluginInternal.java │ │ ├── RePluginServiceManager.java │ │ ├── base │ │ └── IPC.java │ │ ├── helper │ │ ├── JSONHelper.java │ │ ├── LogDebug.java │ │ └── LogRelease.java │ │ ├── i │ │ └── IPluginManager.java │ │ ├── loader │ │ ├── a │ │ │ ├── PluginActivity.java │ │ │ ├── PluginActivityGroup.java │ │ │ ├── PluginAppCompatActivity.java │ │ │ ├── PluginExpandableListActivity.java │ │ │ ├── PluginFragmentActivity.java │ │ │ ├── PluginListActivity.java │ │ │ ├── PluginPreferenceActivity.java │ │ │ └── PluginTabActivity.java │ │ ├── b │ │ │ └── PluginLocalBroadcastManager.java │ │ ├── p │ │ │ └── PluginProviderClient.java │ │ └── s │ │ │ └── PluginServiceClient.java │ │ ├── model │ │ └── PluginInfo.java │ │ ├── packages │ │ └── PluginRunningList.java │ │ └── utils │ │ ├── ParcelUtils.java │ │ └── ReflectUtils.java └── settings.gradle ├── rp-config-key.gradle ├── rp-config.gradle └── rp-publish.gradle /host-sample/host/app/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | apply plugin: 'com.android.application' 18 | 19 | android { 20 | compileSdkVersion 29 21 | buildToolsVersion "29.0.2" 22 | defaultConfig { 23 | applicationId "com.qihoo360.replugin.sample.host" 24 | minSdkVersion 14 25 | targetSdkVersion 29 26 | versionCode 1 27 | versionName "1.0" 28 | } 29 | buildTypes { 30 | release { 31 | minifyEnabled false 32 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 33 | } 34 | } 35 | } 36 | 37 | apply plugin: 'replugin-host-gradle-androidx' 38 | repluginHostConfig { 39 | useAppCompat = false 40 | 41 | // 可以在这里自定义常驻进程的名字 42 | // persistentName = ":XXXXService" 43 | } 44 | 45 | dependencies { 46 | implementation fileTree(include: ['*.jar'], dir: 'libs') 47 | implementation 'androidx.appcompat:appcompat:1.1.0' 48 | implementation 'androidx.legacy:legacy-support-v4:1.0.0' 49 | implementation 'io.github.froyohuang:replugin-host-lib-androidx:2.3.3.0' 50 | } 51 | -------------------------------------------------------------------------------- /host-sample/host/app/libs/common-utils-lib-1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/libs/common-utils-lib-1.0.0.jar -------------------------------------------------------------------------------- /host-sample/host/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\***\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /host-sample/host/app/src/main/assets/external/README: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | 18 | 外置插件的模拟安装说明: 19 | 1.为演示安装外置插件的过程,此处临时将外置插件放在Host的assets/external/目录下,其实开发者完全可以将待安装的外置插件放到/sdcard、/data等其他目录下(注意存储权限); 20 | 2.其中拷贝assets/external/目录下的××.apk文件到/data/data/packageName/files/目录下的过程类似于外置插件在首次安装时的下载过程; 21 | 3.其中demo3.apk为replugin-sample/plugin/plugin-demo3-kotlin工程所编译生成的安装包文件; -------------------------------------------------------------------------------- /host-sample/host/app/src/main/assets/external/demo3.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/src/main/assets/external/demo3.apk -------------------------------------------------------------------------------- /host-sample/host/app/src/main/assets/plugins/demo1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/src/main/assets/plugins/demo1.jar -------------------------------------------------------------------------------- /host-sample/host/app/src/main/assets/plugins/demo2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/src/main/assets/plugins/demo2.jar -------------------------------------------------------------------------------- /host-sample/host/app/src/main/assets/plugins/webview.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/src/main/assets/plugins/webview.jar -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/layout/activity_plugin_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 16 | 20 | 21 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/mipmap-hdpi/notification_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/src/main/res/mipmap-hdpi/notification_out.png -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | #3F51B5 20 | #303F9F 21 | #FF4081 22 | 23 | -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/values/public.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | RePlugin AndroidX Sample 19 | Start plugin demo1 20 | Start Kotlin Plugin (demo3) 21 | Start plugin webview 22 | Start plugin demo1(forResult) 23 | Start plugin demo1(Fragment from demo1) 24 | Install or update external plugin from assets 25 | Install or update external plugin from sdcard 26 | -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /host-sample/host/app/src/main/res/xml/fileprovider_path.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /host-sample/host/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | buildscript { 17 | { p, cfg = "rp-config.gradle" -> if (new File(p, cfg).exists()) apply from: "${p}/${cfg}" else if (p.exists()) call(p.parentFile) }(buildscript.sourceFile.parentFile) 18 | repositories { 19 | google() 20 | jcenter() 21 | maven{ 22 | url "https://dl.bintray.com/froyo-github/Replugin-AndroidX" 23 | } 24 | // mavenLocal() 25 | } 26 | dependencies { 27 | classpath 'com.android.tools.build:gradle:3.5.3' 28 | classpath "io.github.froyohuang:replugin-host-gradle-androidx:2.3.3.0" 29 | } 30 | } 31 | 32 | allprojects { 33 | repositories { 34 | google() 35 | jcenter() 36 | maven{ 37 | url "https://dl.bintray.com/froyo-github/Replugin-AndroidX" 38 | } 39 | // mavenLocal() 40 | } 41 | } 42 | 43 | task clean(type: Delete) { 44 | delete rootProject.buildDir 45 | } 46 | -------------------------------------------------------------------------------- /host-sample/host/gradle.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | # use this file except in compliance with the License. You may obtain a copy of 6 | # the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed To in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | # License for the specific language governing permissions and limitations under 14 | # the License. 15 | # 16 | 17 | # Project-wide Gradle settings. 18 | 19 | # IDE (e.g. Android Studio) users: 20 | # Gradle settings configured through the IDE *will override* 21 | # any settings specified in this file. 22 | 23 | # For more details on how to configure your build environment visit 24 | # http://www.gradle.org/docs/current/userguide/build_environment.html 25 | 26 | # Specifies the JVM arguments used for the daemon process. 27 | # The setting is particularly useful for tweaking memory settings. 28 | org.gradle.jvmargs=-Xmx1536m 29 | 30 | # When configured, Gradle will run in incubating parallel mode. 31 | # This option should only be used with decoupled projects. More details, visit 32 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 33 | # org.gradle.parallel=true 34 | android.useAndroidX=true 35 | # Automatically convert third-party libraries to use AndroidX 36 | android.enableJetifier=true -------------------------------------------------------------------------------- /host-sample/host/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/host-sample/host/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /host-sample/host/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Jul 05 11:26:00 CST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /host-sample/host/settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | include ':app', ':utils' 18 | -------------------------------------------------------------------------------- /host-sample/host/utils/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | apply plugin: 'com.android.application' 18 | 19 | android { 20 | compileSdkVersion 29 21 | buildToolsVersion "29.0.2" 22 | 23 | defaultConfig { 24 | applicationId "com.qihoo360.replugin.common.utils" 25 | minSdkVersion 14 26 | targetSdkVersion 29 27 | versionCode 1 28 | versionName "1.0" 29 | } 30 | buildTypes { 31 | release { 32 | minifyEnabled false 33 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 34 | } 35 | } 36 | } 37 | 38 | dependencies { 39 | compile fileTree(include: ['*.jar'], dir: 'libs') 40 | compile 'com.android.support:support-v4:25.3.1' 41 | } 42 | 43 | task makeJar(type: Jar, dependsOn: ['build']) { 44 | destinationDir = file('build/outputs/jar/') 45 | baseName = "common-utils-lib" 46 | version = "1.0.0" 47 | from('build/intermediates/classes/debug') 48 | exclude('**/BuildConfig.class') 49 | exclude('**/BuildConfig\$*.class') 50 | exclude('**/R.class') 51 | exclude('**/R\$*.class') 52 | include('**/*.class') 53 | } -------------------------------------------------------------------------------- /host-sample/host/utils/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\Liuzhiwei-ms\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /host-sample/host/utils/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 16 | 17 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/plugin-sample/plugin-demo1/README.md -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/case.gradle: -------------------------------------------------------------------------------- 1 | 2 | dependencies { 3 | 4 | if (android.defaultConfig.multiDexEnabled){ 5 | 6 | compile 'com.squareup.okhttp3:okhttp:3.4.1' 7 | compile 'com.google.code.gson:gson:2.6.2' 8 | compile 'com.squareup.pagerduty:pagerduty-incidents:2.0.0' 9 | compile 'com.google.android.gms:play-services:9.6.1' 10 | 11 | } 12 | 13 | } -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/libs/common-utils-lib-1.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/plugin-sample/plugin-demo1/app/libs/common-utils-lib-1.0.0.jar -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/libs/fragment.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/plugin-sample/plugin-demo1/app/libs/fragment.jar -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/libs/plugin-library.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/froyohuang/RePlugin-AndroidX/5fc59fe4e573609dfd8fb01aa00a07f84b743c33/plugin-sample/plugin-demo1/app/libs/plugin-library.aar -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\***\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # --------------------------------------------- 20 | # **不要改动** 21 | # 插件框架、崩溃后台等需要 22 | -repackageclasses 'demo1' 23 | -allowaccessmodification 24 | 25 | -renamesourcefileattribute demo1 26 | -keepattributes SourceFile,LineNumberTable 27 | 28 | # --------------------------------------------- 29 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/aidl/com/qihoo360/replugin/sample/demo2/IDemo2.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | package com.qihoo360.replugin.sample.demo2; 17 | 18 | /** 19 | * @author RePlugin Team 20 | */ 21 | interface IDemo2 { 22 | void hello(String str); 23 | } 24 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/BaseActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1; 18 | 19 | import android.app.Activity; 20 | import android.os.Bundle; 21 | import android.view.View; 22 | import android.widget.Button; 23 | import android.widget.TextView; 24 | 25 | /** 26 | * @author RePlugin Team 27 | */ 28 | public abstract class BaseActivity extends Activity { 29 | 30 | TextView name; 31 | 32 | Button btn; 33 | 34 | @Override 35 | protected void onCreate(Bundle savedInstanceState) { 36 | super.onCreate(savedInstanceState); 37 | setContentView(R.layout.simple); 38 | name = (TextView) findViewById(R.id.name); 39 | btn = (Button) findViewById(R.id.btn); 40 | name.setText(title()); 41 | btn.setText(btnTxt()); 42 | } 43 | 44 | public abstract void jump(View v); 45 | 46 | public abstract String title(); 47 | 48 | public abstract String btnTxt(); 49 | } 50 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/MainApp.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1; 18 | 19 | import android.app.Application; 20 | import android.content.Intent; 21 | 22 | import com.qihoo360.replugin.sample.demo1.service.PluginDemoAppService; 23 | 24 | /** 25 | * @author RePlugin Team 26 | */ 27 | public class MainApp extends Application { 28 | 29 | @Override 30 | public void onCreate() { 31 | super.onCreate(); 32 | 33 | // 在插件启动时就去开启一个服务,以模拟个别插件的复杂行为 34 | testStartService(); 35 | } 36 | 37 | private void testStartService() { 38 | Intent i = new Intent(this, PluginDemoAppService.class); 39 | i.setAction("MyNameIsApp"); 40 | startService(i); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/TestItem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1; 18 | 19 | import android.view.View; 20 | 21 | /** 22 | * @author RePlugin Team 23 | */ 24 | public class TestItem { 25 | 26 | public String title; 27 | 28 | public View.OnClickListener mClickListener; 29 | 30 | public TestItem(String title, View.OnClickListener listener) { 31 | this.title = title; 32 | this.mClickListener = listener; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/for_result/ForResultActivity.java: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin.sample.demo1.activity.for_result; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | 6 | import com.qihoo360.replugin.loader.a.PluginActivity; 7 | 8 | /** 9 | * @author RePlugin Team 10 | */ 11 | public class ForResultActivity extends PluginActivity { 12 | 13 | @Override 14 | protected void onCreate(Bundle savedInstanceState) { 15 | super.onCreate(savedInstanceState); 16 | 17 | Intent intent = new Intent(); 18 | intent.putExtra("data", "data from demo1 plugin, resultCode is 0x012"); 19 | setResult(0x012, intent); 20 | 21 | finish(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/fragment/StandardFragmentActivity.java: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin.sample.demo1.activity.fragment; 2 | 3 | import android.os.Bundle; 4 | 5 | import androidx.annotation.Nullable; 6 | import androidx.fragment.app.Fragment; 7 | import androidx.fragment.app.FragmentActivity; 8 | 9 | import com.qihoo360.replugin.sample.demo1.R; 10 | import com.qihoo360.replugin.sample.demo1.fragment.DemoCodeFragment; 11 | 12 | public class StandardFragmentActivity extends FragmentActivity { 13 | @Override 14 | protected void onCreate(@Nullable Bundle savedInstanceState) { 15 | super.onCreate(savedInstanceState); 16 | setContentView(R.layout.activity_plugin_fragment); 17 | Fragment fragment = new DemoCodeFragment(); 18 | getSupportFragmentManager().beginTransaction().add(R.id.container2, fragment).commit();//添加Fragment到UI 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/intent_filter/IntentFilterDemoActivity1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.intent_filter; 18 | 19 | import android.view.View; 20 | 21 | import com.qihoo360.replugin.sample.demo1.BaseActivity; 22 | 23 | /** 24 | * @author RePlugin Team 25 | */ 26 | public class IntentFilterDemoActivity1 extends BaseActivity { 27 | 28 | @Override 29 | public void jump(View v) { 30 | 31 | } 32 | 33 | @Override 34 | public String title() { 35 | return IntentFilterDemoActivity1.class.getSimpleName(); 36 | } 37 | 38 | @Override 39 | public String btnTxt() { 40 | return "null"; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/notify_test/NotifyActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.notify_test; 18 | 19 | import android.app.Activity; 20 | import android.os.Bundle; 21 | import android.util.Log; 22 | import android.view.Window; 23 | import android.widget.TextView; 24 | 25 | import com.qihoo360.replugin.sample.demo1.R; 26 | 27 | import static com.qihoo360.replugin.sample.demo1.support.NotifyUtils.NOTIFY_KEY; 28 | import static com.qihoo360.replugin.sample.demo1.support.NotifyUtils.TAG; 29 | 30 | 31 | /** 32 | * @author RePlugin Team 33 | */ 34 | public class NotifyActivity extends Activity { 35 | 36 | @Override 37 | protected void onCreate(Bundle savedInstanceState) { 38 | super.onCreate(savedInstanceState); 39 | requestWindowFeature(Window.FEATURE_NO_TITLE); 40 | setContentView(R.layout.layout_notify); 41 | try { 42 | ((TextView)findViewById(R.id.btn_show_notify)).setText(getIntent().getStringExtra(NOTIFY_KEY)); 43 | } catch (Exception e) { 44 | Log.e(TAG, e.getMessage()); 45 | finish(); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/preference/PrefActivity2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.preference; 18 | 19 | import android.content.SharedPreferences; 20 | import android.os.Bundle; 21 | import android.preference.PreferenceActivity; 22 | 23 | import com.qihoo360.replugin.sample.demo1.R; 24 | 25 | /** 26 | * PreferenceActivity 示例2 27 | * 28 | * @author RePlugin Team 29 | */ 30 | public class PrefActivity2 extends PreferenceActivity implements SharedPreferences.OnSharedPreferenceChangeListener { 31 | 32 | @Override 33 | protected void onCreate(Bundle savedInstanceState) { 34 | super.onCreate(savedInstanceState); 35 | addPreferencesFromResource(R.xml.pref_headers); 36 | } 37 | 38 | @Override 39 | public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { 40 | 41 | } 42 | } -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/single_instance/TIActivity1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.single_instance; 18 | 19 | import android.view.View; 20 | 21 | import com.qihoo360.replugin.sample.demo1.BaseActivity; 22 | 23 | /** 24 | * @author RePlugin Team 25 | */ 26 | public class TIActivity1 extends BaseActivity { 27 | 28 | @Override 29 | public void jump(View v) { 30 | finish(); 31 | } 32 | 33 | @Override 34 | public String title() { 35 | return this.getClass().getSimpleName(); 36 | } 37 | 38 | @Override 39 | public String btnTxt() { 40 | return "back"; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/single_top/SingleTopActivity1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.single_top; 18 | 19 | import android.content.Intent; 20 | import android.view.View; 21 | 22 | import com.qihoo360.replugin.sample.demo1.BaseActivity; 23 | 24 | /** 25 | * @author RePlugin Team 26 | */ 27 | public class SingleTopActivity1 extends BaseActivity { 28 | 29 | @Override 30 | public void jump(View v) { 31 | startActivity(new Intent(this, SingleTopActivity1.class)); 32 | } 33 | 34 | @Override 35 | public String title() { 36 | return this.getClass().getSimpleName(); 37 | } 38 | 39 | @Override 40 | public String btnTxt() { 41 | return "Start Self"; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/standard/StandardActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.standard; 18 | 19 | import android.content.Intent; 20 | import android.view.View; 21 | 22 | import com.qihoo360.replugin.sample.demo1.BaseActivity; 23 | import com.qihoo360.replugin.sample.demo1.activity.single_top.SingleTopActivity1; 24 | 25 | /** 26 | * @author RePlugin Team 27 | */ 28 | 29 | public class StandardActivity extends BaseActivity { 30 | 31 | @Override 32 | public void jump(View v) { 33 | startActivity(new Intent(this, SingleTopActivity1.class)); 34 | } 35 | 36 | @Override 37 | public String title() { 38 | return this.getClass().getSimpleName(); 39 | } 40 | 41 | @Override 42 | public String btnTxt() { 43 | return "Start Single Top"; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/task_affinity/TAActivity1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.task_affinity; 18 | 19 | import android.content.Intent; 20 | import android.view.View; 21 | 22 | import com.qihoo360.replugin.sample.demo1.BaseActivity; 23 | 24 | /** 25 | * @author RePlugin Team 26 | */ 27 | public class TAActivity1 extends BaseActivity { 28 | 29 | @Override 30 | public void jump(View v) { 31 | startActivity(new Intent(this, TAActivity3.class)); 32 | } 33 | 34 | @Override 35 | public String title() { 36 | return this.getClass().getSimpleName(); 37 | } 38 | 39 | @Override 40 | public String btnTxt() { 41 | return TAActivity3.class.getSimpleName(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/task_affinity/TAActivity2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.task_affinity; 18 | 19 | import android.content.Intent; 20 | import android.view.View; 21 | 22 | import com.qihoo360.replugin.sample.demo1.BaseActivity; 23 | 24 | /** 25 | * @author RePlugin Team 26 | */ 27 | public class TAActivity2 extends BaseActivity { 28 | 29 | @Override 30 | public void jump(View v) { 31 | startActivity(new Intent(this, TAActivity4.class)); 32 | } 33 | 34 | @Override 35 | public String title() { 36 | return this.getClass().getSimpleName(); 37 | } 38 | 39 | @Override 40 | public String btnTxt() { 41 | return TAActivity4.class.getSimpleName(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/task_affinity/TAActivity3.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.task_affinity; 18 | 19 | import android.content.Intent; 20 | import android.view.View; 21 | 22 | import com.qihoo360.replugin.sample.demo1.BaseActivity; 23 | 24 | /** 25 | * @author RePlugin Team 26 | */ 27 | public class TAActivity3 extends BaseActivity { 28 | 29 | @Override 30 | public void jump(View v) { 31 | startActivity(new Intent(this, TAActivity2.class)); 32 | } 33 | 34 | @Override 35 | public String title() { 36 | return this.getClass().getSimpleName(); 37 | } 38 | 39 | @Override 40 | public String btnTxt() { 41 | return TAActivity2.class.getSimpleName(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/task_affinity/TAActivity4.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.task_affinity; 18 | 19 | import android.view.View; 20 | 21 | import com.qihoo360.replugin.sample.demo1.BaseActivity; 22 | 23 | /** 24 | * @author RePlugin Team 25 | */ 26 | public class TAActivity4 extends BaseActivity { 27 | 28 | @Override 29 | public void jump(View v) { 30 | } 31 | 32 | @Override 33 | public String title() { 34 | return this.getClass().getSimpleName(); 35 | } 36 | 37 | @Override 38 | public String btnTxt() { 39 | return ""; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/task_affinity/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.task_affinity; 18 | /** 19 | * 测试 两个 TaskAffinity 20 | * MainActivity : Standard 21 | * TA1Activity : SingleTask + ta_1 22 | * TA2Activity : SingleTask + ta_1 23 | * TA3Activity : SingleTask + ta_2 24 | * TA4Activity : SingleTask + ta_2 25 | * 26 | * 27 | * Path | Stack 28 | * Main --(start)--> TA1 | TA1 29 | * ...................... | Main 30 | * 31 | * TA1 --(start)--> TA3 | TA3 32 | * ........................| TA1 33 | * ........................| Main 34 | * 35 | * TA3 --(start)--> TA2 | Ta1 > TA2 36 | * ........................| TA3 37 | * ........................| Main 38 | * 39 | * TA2 --(start)--> TA4 | TA3 > TA4 40 | * ........................| Ta1 > TA2 41 | * ........................| Main 42 | */ 43 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/task_affinity_2/TA2Activity1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.task_affinity_2; 18 | 19 | import android.content.Intent; 20 | import android.view.View; 21 | 22 | import com.qihoo360.replugin.sample.demo1.BaseActivity; 23 | 24 | /** 25 | * @author RePlugin Team 26 | */ 27 | public class TA2Activity1 extends BaseActivity { 28 | 29 | @Override 30 | public void jump(View v) { 31 | startActivity(new Intent(this, TA2Activity2.class)); 32 | } 33 | 34 | @Override 35 | public String title() { 36 | return this.getClass().getSimpleName(); 37 | } 38 | 39 | @Override 40 | public String btnTxt() { 41 | return TA2Activity2.class.getSimpleName(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/task_affinity_2/TA2Activity2.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.task_affinity_2; 18 | 19 | import android.content.Intent; 20 | import android.view.View; 21 | 22 | import com.qihoo360.replugin.sample.demo1.BaseActivity; 23 | 24 | /** 25 | * @author RePlugin Team 26 | */ 27 | public class TA2Activity2 extends BaseActivity { 28 | 29 | @Override 30 | public void jump(View v) { 31 | startActivity(new Intent(this, TA2Activity3.class)); 32 | } 33 | 34 | @Override 35 | public String title() { 36 | return this.getClass().getSimpleName(); 37 | } 38 | 39 | @Override 40 | public String btnTxt() { 41 | return TA2Activity3.class.getSimpleName(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/task_affinity_2/TA2Activity3.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.task_affinity_2; 18 | 19 | import android.content.Intent; 20 | import android.view.View; 21 | 22 | import com.qihoo360.replugin.sample.demo1.BaseActivity; 23 | 24 | /** 25 | * @author RePlugin Team 26 | */ 27 | public class TA2Activity3 extends BaseActivity { 28 | 29 | @Override 30 | public void jump(View v) { 31 | startActivity(new Intent(this, TA2Activity4.class)); 32 | } 33 | 34 | @Override 35 | public String title() { 36 | return this.getClass().getSimpleName(); 37 | } 38 | 39 | @Override 40 | public String btnTxt() { 41 | return TA2Activity4.class.getSimpleName(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/task_affinity_2/TA2Activity4.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.task_affinity_2; 18 | 19 | import android.content.Intent; 20 | import android.view.View; 21 | 22 | import com.qihoo360.replugin.sample.demo1.BaseActivity; 23 | 24 | /** 25 | * @author RePlugin Team 26 | */ 27 | public class TA2Activity4 extends BaseActivity { 28 | 29 | @Override 30 | public void jump(View v) { 31 | startActivity(new Intent(this, TA2Activity3.class)); 32 | } 33 | 34 | @Override 35 | public String title() { 36 | return this.getClass().getSimpleName(); 37 | } 38 | 39 | @Override 40 | public String btnTxt() { 41 | return TA2Activity3.class.getSimpleName(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/activity/task_affinity_2/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.activity.task_affinity_2; 18 | /** 19 | * 测试 两个 TaskAffinity 20 | * MainActivity : Standard 21 | * TA1Activity : SingleTask + ta_3 22 | * TA2Activity : SingleTask + ta_3 23 | * TA3Activity : Standard + ta_3 24 | * TA4Activity : Standard + ta_3 25 | * 26 | * 27 | * Path | Stack 28 | * Main --(start)--> TA1 | TA1 29 | * ...................... | Main 30 | * 31 | * TA1 --(start)--> TA2 | TA1 > TA2 32 | * ........................| Main 33 | * 34 | * TA2 --(start)--> TA3 | Ta1 > TA2 > T3 35 | * ........................| Main 36 | * 37 | * TA3 --(start)--> TA4 | Ta1 > TA2 > T3 > T4 38 | * ........................| Main 39 | * 40 | * TA4 --(start)--> TA3 | Ta1 > TA2 > T3 > T4 > T3 41 | * ........................| Main 42 | */ 43 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/fragment/DemoCodeFragment.java: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin.sample.demo1.fragment; 2 | 3 | import android.os.Bundle; 4 | import android.view.View; 5 | import android.widget.TextView; 6 | 7 | import com.qihoo360.replugin.sample.demo1.R; 8 | 9 | /** 10 | * 描述类作用 11 | *

12 | * 作者 coder 13 | * 创建时间 2017/7/6 14 | */ 15 | 16 | public class DemoCodeFragment extends DemoFragment { 17 | 18 | @Override 19 | public void onViewCreated(View view, Bundle savedInstanceState) { 20 | super.onViewCreated(view, savedInstanceState); 21 | TextView textView = (TextView) view.findViewById(R.id.text); 22 | textView.setText("DemoCodeFragment from plugin demo1"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/fragment/DemoFragment.java: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin.sample.demo1.fragment; 2 | 3 | import androidx.fragment.app.Fragment; 4 | import android.os.Bundle; 5 | import android.util.Log; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | 10 | import com.qihoo360.replugin.RePlugin; 11 | import com.qihoo360.replugin.sample.demo1.R; 12 | 13 | /** 14 | * 描述类作用 15 | *

16 | * 作者 coder 17 | * 创建时间 2017/7/5 18 | */ 19 | 20 | public class DemoFragment extends Fragment { 21 | 22 | public DemoFragment() { 23 | } 24 | 25 | private static final String TAG = "DemoFragment"; 26 | 27 | @Override 28 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 29 | Log.d(TAG, "onCreateView() called with: inflater = [" + inflater + "], container = [" + container + "], savedInstanceState = [" + savedInstanceState + "]"); 30 | /** 31 | * 需要注意不能使用inflater及container因为他们的Context是宿主的 32 | */ 33 | return LayoutInflater.from(RePlugin.getPluginContext()).inflate(R.layout.main_fragment, container, false); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/receivers/PluginDemo1Receiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.receivers; 18 | 19 | import android.content.BroadcastReceiver; 20 | import android.content.Context; 21 | import android.content.Intent; 22 | import android.text.TextUtils; 23 | import android.widget.Toast; 24 | 25 | /** 26 | * @author RePlugin Team 27 | */ 28 | public class PluginDemo1Receiver extends BroadcastReceiver { 29 | 30 | public static final String ACTION = "com.qihoo360.repluginapp.replugin.receiver.ACTION1"; 31 | 32 | @Override 33 | public void onReceive(Context context, Intent intent) { 34 | String action = intent.getAction(); 35 | if (!TextUtils.isEmpty(action)) { 36 | if (action.equals(ACTION)) { 37 | String name = intent.getStringExtra("name"); 38 | Toast.makeText(context, "Plugin1-action: " + action + ", name = " + name, Toast.LENGTH_LONG).show(); 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/webview/IWebPage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2017 Qihoo 360 Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 | * use this file except in compliance with the License. You may obtain a copy of 6 | * the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed To in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 | * License for the specific language governing permissions and limitations under 14 | * the License. 15 | */ 16 | 17 | package com.qihoo360.replugin.sample.demo1.webview; 18 | 19 | import android.webkit.WebView; 20 | 21 | /** 22 | * @author RePlugin Team 23 | */ 24 | public interface IWebPage { 25 | 26 | /** 27 | * 获取WebView对象 28 | * @return 29 | */ 30 | WebView getWebView(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/java/com/qihoo360/replugin/sample/demo1/webview/WebPageProxy.java: -------------------------------------------------------------------------------- 1 | package com.qihoo360.replugin.sample.demo1.webview; 2 | 3 | import android.content.Context; 4 | import android.view.View; 5 | import android.webkit.WebView; 6 | 7 | import java.lang.reflect.Method; 8 | 9 | /** 10 | * @author RePlugin Team 11 | */ 12 | public class WebPageProxy extends ViewProxy implements IWebPage { 13 | 14 | private static final String PLUGIN_NAME = "webview"; 15 | 16 | private static final String CLASS_NAME = "com.qihoo360.replugin.sample.webview.views.SimpleWebPage"; 17 | 18 | private static Method sGetWebViewMethod; 19 | 20 | private static final ViewProxy.Creator CREATOR = new ViewProxy.Creator(PLUGIN_NAME, CLASS_NAME); 21 | 22 | protected WebPageProxy(View view) { 23 | super(view); 24 | } 25 | 26 | public static WebPageProxy create(Context c) { 27 | boolean b = CREATOR.init(); 28 | if (!b) { 29 | return null; 30 | } 31 | View v = CREATOR.newViewInstance(c); 32 | return new WebPageProxy(v); 33 | } 34 | 35 | static WebPageProxy createByObject(View wv) { 36 | boolean b = CREATOR.init(); 37 | if (!b) { 38 | return null; 39 | } 40 | return new WebPageProxy(wv); 41 | } 42 | 43 | @Override 44 | public WebView getWebView() { 45 | if (sGetWebViewMethod == null) { 46 | sGetWebViewMethod = CREATOR.fetchMethodByName("getWebView"); 47 | } 48 | if (sGetWebViewMethod == null) { 49 | return null; 50 | } 51 | Object obj = invoke(sGetWebViewMethod); 52 | if (obj instanceof WebView) { 53 | return (WebView) obj; 54 | } 55 | return null; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/res/layout/activity_plugin_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 16 | 20 | 21 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/res/layout/layout_notify.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 24 | 25 | 33 | 34 | 41 | 42 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 23 | 24 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/res/layout/main_fragment.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /plugin-sample/plugin-demo1/app/src/main/res/layout/simple.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 23 | 24 | 30 | 31 |