├── .gitignore ├── .idea ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── gradle.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── CommonUtils ├── .gitignore ├── CommonUtils.iml ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── bobo │ │ └── commonutils │ │ └── ApplicationTest.java │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── bobo │ │ └── commonutils │ │ ├── deviceinfo │ │ ├── CpuUtils.java │ │ └── DeviceInfoUtils.java │ │ ├── file │ │ ├── AESHelper.java │ │ ├── AesFileEncryptor.java │ │ ├── EasyFileEncryptor.java │ │ ├── FileEncryptor.java │ │ ├── FileUtils.java │ │ └── ImageVideoThumbnailUtils.java │ │ ├── inferface │ │ └── UpdateProgressInferface.java │ │ └── utils │ │ ├── ProxyUtil.java │ │ └── RunCmdApi.java │ └── res │ └── values │ └── strings.xml ├── DroidPlugin ├── .gitignore ├── AndroidManifest.xml ├── DroidPlugin.iml ├── LICENSE.txt ├── build.gradle ├── lib │ └── layoutlib.jar ├── proguard-project.txt ├── project.properties ├── res │ ├── drawable-xxhdpi │ │ ├── plugin_activity_loading.xml │ │ └── plugin_activity_loading_bitmap.9.png │ ├── values-v11 │ │ └── styles.xml │ ├── values-v14 │ │ └── styles.xml │ └── values │ │ ├── strings.xml │ │ └── styles.xml └── src │ ├── android │ └── app │ │ └── IServiceConnection.aidl │ └── com │ └── morgoo │ ├── droidplugin │ ├── MyCrashHandler.java │ ├── PluginApplication.java │ ├── PluginHelper.java │ ├── PluginManagerService.java │ ├── PluginPatchManager.java │ ├── PluginServiceProvider.java │ ├── am │ │ ├── BaseActivityManagerService.java │ │ ├── MyActivityManagerService.java │ │ ├── RunningActivities.java │ │ ├── RunningProcessList.java │ │ ├── ServiceStubMap.java │ │ └── StaticProcessList.java │ ├── core │ │ ├── Env.java │ │ ├── PluginClassLoader.java │ │ ├── PluginDirHelper.java │ │ └── PluginProcessManager.java │ ├── hook │ │ ├── BaseHookHandle.java │ │ ├── Hook.java │ │ ├── HookFactory.java │ │ ├── HookedMethodHandler.java │ │ ├── binder │ │ │ ├── BinderHook.java │ │ │ ├── IAppOpsServiceBinderHook.java │ │ │ ├── IAudioServiceBinderHook.java │ │ │ ├── IClipboardBinderHook.java │ │ │ ├── IContentServiceBinderHook.java │ │ │ ├── IDisplayManagerBinderHook.java │ │ │ ├── IGraphicsStatsBinderHook.java │ │ │ ├── IInputMethodManagerBinderHook.java │ │ │ ├── ILocationManagerBinderHook.java │ │ │ ├── IMediaRouterServiceBinderHook.java │ │ │ ├── IMmsBinderHook.java │ │ │ ├── IMountServiceBinderHook.java │ │ │ ├── INotificationManagerBinderHook.java │ │ │ ├── IPhoneSubInfoBinderHook.java │ │ │ ├── ISearchManagerBinderHook.java │ │ │ ├── ISessionManagerBinderHook.java │ │ │ ├── ISmsBinderHook.java │ │ │ ├── ISubBinderHook.java │ │ │ ├── ITelephonyBinderHook.java │ │ │ ├── ITelephonyRegistryBinderHook.java │ │ │ ├── IWifiManagerBinderHook.java │ │ │ ├── IWindowManagerBinderHook.java │ │ │ ├── MyServiceManager.java │ │ │ ├── ServiceManagerBinderHook.java │ │ │ └── ServiceManagerCacheBinderHook.java │ │ ├── handle │ │ │ ├── IActivityManagerHookHandle.java │ │ │ ├── IAppOpsServiceHookHandle.java │ │ │ ├── IAudioServiceHookHandle.java │ │ │ ├── IClipboardHookHandle.java │ │ │ ├── IContentProviderInvokeHandle.java │ │ │ ├── IContentServiceHandle.java │ │ │ ├── IDisplayManagerHookHandle.java │ │ │ ├── IGraphicsStatsHookHandle.java │ │ │ ├── IInputMethodManagerHookHandle.java │ │ │ ├── ILocationManagerHookHandle.java │ │ │ ├── IMediaRouterServiceHookHandle.java │ │ │ ├── IMmsHookHandle.java │ │ │ ├── IMountServiceHookHandle.java │ │ │ ├── INotificationManagerHookHandle.java │ │ │ ├── IPackageManagerHookHandle.java │ │ │ ├── IPhoneSubInfoHookHandle.java │ │ │ ├── ISearchManagerHookHandle.java │ │ │ ├── ISessionManagerHookHandle.java │ │ │ ├── ISmsHookHandle.java │ │ │ ├── ISubBinderHookHandle.java │ │ │ ├── ITelephonyHookHandle.java │ │ │ ├── ITelephonyRegistryHookHandle.java │ │ │ ├── IWifiManagerHookHandle.java │ │ │ ├── IWindowManagerHookHandle.java │ │ │ ├── IWindowSessionInvokeHandle.java │ │ │ ├── LibCoreHookHandle.java │ │ │ ├── PluginCallback.java │ │ │ ├── PluginInstrumentation.java │ │ │ ├── ReplaceCallingPackageHookedMethodHandler.java │ │ │ └── WebViewFactoryProviderHookHandle.java │ │ ├── proxy │ │ │ ├── IActivityManagerHook.java │ │ │ ├── IContentProviderHook.java │ │ │ ├── IPackageManagerHook.java │ │ │ ├── IWindowSessionHook.java │ │ │ ├── InstrumentationHook.java │ │ │ ├── LibCoreHook.java │ │ │ ├── PluginCallbackHook.java │ │ │ ├── ProxyHook.java │ │ │ └── WebViewFactoryProviderHook.java │ │ └── xhook │ │ │ └── SQLiteDatabaseHook.java │ ├── pm │ │ ├── IApplicationCallback.aidl │ │ ├── IPackageDataObserver.aidl │ │ ├── IPluginManager.aidl │ │ ├── IPluginManagerImpl.java │ │ ├── PluginManager.java │ │ └── parser │ │ │ ├── IntentMatcher.java │ │ │ ├── PackageParser.java │ │ │ ├── PackageParserApi15.java │ │ │ ├── PackageParserApi16.java │ │ │ ├── PackageParserApi20.java │ │ │ ├── PackageParserApi21.java │ │ │ ├── PackageParserApi22.java │ │ │ ├── PackageParserApi22Preview1.java │ │ │ └── PluginPackageParser.java │ ├── reflect │ │ ├── FieldUtils.java │ │ ├── MemberUtils.java │ │ ├── MethodUtils.java │ │ ├── Utils.java │ │ └── Validate.java │ └── stub │ │ ├── AbstractContentProviderStub.java │ │ ├── AbstractServiceStub.java │ │ ├── ActivityStub.java │ │ ├── ContentProviderStub.java │ │ ├── MyFakeIBinder.java │ │ ├── ServcesManager.java │ │ ├── ServiceStub.java │ │ └── ShortcutProxyActivity.java │ └── helper │ ├── AttributeCache.java │ ├── ComponentNameComparator.java │ ├── Log.java │ ├── MyProxy.java │ ├── Utils.java │ ├── compat │ ├── ActivityManagerCompat.java │ ├── ActivityManagerNativeCompat.java │ ├── ActivityThreadCompat.java │ ├── BuildCompat.java │ ├── BundleCompat.java │ ├── CompatibilityInfoCompat.java │ ├── ContentProviderCompat.java │ ├── ContentProviderHolderCompat.java │ ├── IActivityManagerCompat.java │ ├── IAppOpsServiceCompat.java │ ├── IAudioServiceCompat.java │ ├── IClipboardCompat.java │ ├── IContentServiceCompat.java │ ├── IDisplayManagerCompat.java │ ├── IGraphicsStatsCompat.java │ ├── IInputMethodManagerCompat.java │ ├── ILocationManagerCompat.java │ ├── IMediaRouterServiceCompat.java │ ├── IMmsCompat.java │ ├── IMountServiceCompat.java │ ├── INotificationManagerCompat.java │ ├── IPackageDataObserverCompat.java │ ├── IPhoneSubInfoCompat.java │ ├── ISearchManagerCompat.java │ ├── ISessionManagerCompat.java │ ├── ISmsCompat.java │ ├── ISubCompat.java │ ├── ITelephonyCompat.java │ ├── ITelephonyRegistryCompat.java │ ├── IWifiManagerCompat.java │ ├── IWindowManagerCompat.java │ ├── NativeLibraryHelperCompat.java │ ├── PackageManagerCompat.java │ ├── ParceledListSliceCompat.java │ ├── ProcessCompat.java │ ├── QueuedWorkCompat.java │ ├── ServiceManagerCompat.java │ ├── SingletonCompat.java │ ├── SystemPropertiesCompat.java │ ├── UserHandleCompat.java │ ├── VMRuntimeCompat.java │ └── WebViewFactoryCompat.java │ └── utils │ └── ProcessUtils.java ├── README.md ├── android-utils-api.iml ├── app ├── .gitignore ├── app.iml ├── build.gradle ├── dynamic_libs │ └── framework.jar ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── utils │ │ └── bobo │ │ └── com │ │ └── boboutils │ │ └── ApplicationTest.java │ └── main │ ├── AndroidManifest.xml │ ├── aidl │ ├── com │ │ └── bobo │ │ │ └── service │ │ │ └── utils │ │ │ └── IWakeupService.aidl │ └── utils │ │ └── bobo │ │ └── com │ │ └── boboutils │ │ └── App │ │ ├── overlay │ │ └── IOverlayViewService.aidl │ │ └── zombieservice │ │ ├── IZombieServiceFirst.aidl │ │ └── IZombieServiceSecond.aidl │ ├── assets │ ├── part_1.jpg │ ├── part_10.jpg │ ├── part_11.jpg │ ├── part_12.jpg │ ├── part_13.jpg │ ├── part_14.jpg │ ├── part_15.jpg │ ├── part_16.jpg │ ├── part_17.jpg │ ├── part_18.jpg │ ├── part_19.jpg │ ├── part_2.jpg │ ├── part_3.jpg │ ├── part_4.jpg │ ├── part_5.jpg │ ├── part_6.jpg │ ├── part_7.jpg │ ├── part_8.jpg │ ├── part_9.jpg │ └── weixin_1280.apk │ ├── java │ ├── com │ │ └── bobo │ │ │ └── service │ │ │ └── utils │ │ │ ├── BindMultiAppServiceHelp.java │ │ │ ├── BindWakeupServerServiceHelp.java │ │ │ ├── NoMarketDialogHelp.java │ │ │ ├── Sample.java │ │ │ ├── SilentInstallHelp.java │ │ │ └── WakeupServerService.java │ ├── utils │ │ └── bobo │ │ │ └── com │ │ │ └── boboutils │ │ │ ├── App │ │ │ ├── AppWidgetApiActivity.java │ │ │ ├── AsyncTaskRunAlways.java │ │ │ ├── CustomStatusBarImgBackgroundActivity.java │ │ │ ├── DynamicViewPageActivity.java │ │ │ ├── ForegroundService.java │ │ │ ├── ForgegroundServiceActivity.java │ │ │ ├── LocationActivity.java │ │ │ ├── LocationService.java │ │ │ ├── NotificationActivity.java │ │ │ ├── NotificationWithChannelActivity.java │ │ │ ├── QuickSetting │ │ │ │ └── QuickSettingService.java │ │ │ ├── RecyclerView │ │ │ │ └── GridLayoutManagerActivity.java │ │ │ ├── RequestOneLocationActivity.java │ │ │ ├── ScreenPinningActivity.java │ │ │ ├── SecretCodeReceiver.java │ │ │ ├── ShowWhenLockActivity.java │ │ │ ├── SystemOverlayActivity.java │ │ │ ├── TempActivity.java │ │ │ ├── TestService.java │ │ │ ├── TestServiceActivity.java │ │ │ ├── ToastActivity.java │ │ │ ├── VibratorActivity.java │ │ │ ├── WakeLockGetAndReleaseActivity.java │ │ │ ├── WakeLockTestApi.java │ │ │ ├── WebViewActivity.java │ │ │ ├── appwidget │ │ │ │ ├── CustomViewAppWidget.java │ │ │ │ ├── CustomViewFileProvider.java │ │ │ │ └── UpdateAppWidgetService.java │ │ │ ├── audio │ │ │ │ └── AudioRecordActivity.java │ │ │ ├── call │ │ │ │ ├── AudioRecorder8Dot0Service.java │ │ │ │ ├── AudioRecorderService.java │ │ │ │ ├── CallAudioRecord8Dot0Activity.java │ │ │ │ ├── CallAudioRecordActivity.java │ │ │ │ ├── PhoneCall8Dot0Receiver.java │ │ │ │ └── PhoneCallReceiver.java │ │ │ ├── customanim │ │ │ │ ├── FloatingPelletsActivity.java │ │ │ │ └── FloatingPelletsView.java │ │ │ ├── customview │ │ │ │ ├── CanvasLearnActivity.java │ │ │ │ ├── CustomAccessibilityActivity.java │ │ │ │ └── longdrawable │ │ │ │ │ ├── BitmapArrayDrawable.java │ │ │ │ │ ├── LongDrawableActivity.java │ │ │ │ │ └── LongScreenshotScrollView.java │ │ │ ├── overlay │ │ │ │ ├── OverlayViewService.java │ │ │ │ └── OverlayViewServiceHelp.java │ │ │ ├── reflect │ │ │ │ └── ReflectDemoActivity.java │ │ │ └── zombieservice │ │ │ │ ├── ZombieServiceFirst.java │ │ │ │ ├── ZombieServiceSecond.java │ │ │ │ └── ZombieServiceStartActivity.java │ │ │ ├── CoordinatorLayoutDemoActivity.java │ │ │ ├── DemosActivity.java │ │ │ ├── MainActivity.java │ │ │ ├── MultiApp │ │ │ ├── BasicDeviceAdminReceiver.java │ │ │ ├── BasicManagedProfileFragment.java │ │ │ ├── EnableProfileActivity.java │ │ │ ├── MainActivity.java │ │ │ ├── MultiAppByDroidPluginActivity.java │ │ │ └── SetupProfileFragment.java │ │ │ ├── MyApp.java │ │ │ ├── SimpleWebServerProxy.java │ │ │ ├── accessibility │ │ │ ├── AccessibilityListenerService.java │ │ │ └── AccessibilityServiceActivity.java │ │ │ ├── deviceinfo │ │ │ ├── CupInfosActivity.java │ │ │ ├── DeviceInfosActivity.java │ │ │ └── ScreenInfoActivity.java │ │ │ ├── file │ │ │ ├── CommonFileListFragment.java │ │ │ └── FileEncryptorActivity.java │ │ │ ├── jobscheduler │ │ │ ├── JobSchedulerAndThreadAndAsyncTask.java │ │ │ └── TestJobService.java │ │ │ └── service │ │ │ └── MyTileService.java │ └── vavi │ │ ├── sound │ │ └── pcm │ │ │ └── resampling │ │ │ └── ssrc │ │ │ └── SSRC.java │ │ └── util │ │ ├── I0Bessel.java │ │ └── SplitRadixFft.java │ └── res │ ├── drawable-hdpi │ ├── document.png │ ├── dpi_icon.png │ └── folder.png │ ├── drawable-mdpi │ └── dpi_icon.png │ ├── drawable-nodpi │ └── example_appwidget_preview.png │ ├── drawable-xhdpi │ ├── check_on.png │ ├── custom_status_bar_img.png │ └── dpi_icon.png │ ├── drawable-xxhdpi │ ├── badge.png │ └── dpi_icon.png │ ├── drawable-xxxhdpi │ └── dpi_icon.png │ ├── drawable │ ├── corrdinator_activity_header_gradient.xml │ ├── ic_feedback.xml │ ├── ic_info.xml │ └── ic_launcher_badged.xml │ ├── layout │ ├── activity_app_cutom_accessibility.xml │ ├── activity_app_foreground_service.xml │ ├── activity_app_location.xml │ ├── activity_app_long_drawable.xml │ ├── activity_app_notificaion_with_channel.xml │ ├── activity_app_request_one_location.xml │ ├── activity_app_temp.xml │ ├── activity_app_two_button.xml │ ├── activity_app_vibrator.xml │ ├── activity_app_wakelock_get_release.xml │ ├── activity_app_webview.xml │ ├── activity_app_widget_api.xml │ ├── activity_audio_record.xml │ ├── activity_coordinator_layout_demo.xml │ ├── activity_cpu_infos.xml │ ├── activity_custom_statusbar_img_bg.xml │ ├── activity_dynamic_view_page.xml │ ├── activity_floating_pellets.xml │ ├── activity_grid_layout_manager.xml │ ├── activity_jobscheduler_thread_asynctask.xml │ ├── activity_main.xml │ ├── activity_main_real.xml │ ├── activity_notification.xml │ ├── activity_screen_info.xml │ ├── activity_screen_pinning.xml │ ├── activity_setup.xml │ ├── activity_show_when_lock.xml │ ├── activity_simple_web_server_proxy.xml │ ├── activity_text_view.xml │ ├── common_file_list_item.xml │ ├── custom_view_app_widget.xml │ ├── fragment_activity.xml │ ├── fragment_collection_object.xml │ ├── fragment_common_file_list.xml │ ├── fragment_main.xml │ ├── fragment_setup_profile.xml │ ├── system_overlay.xml │ ├── text_row_item.xml │ ├── toolbar_corrdinator_layout_header.xml │ └── two_line_list_item_with_switch.xml │ ├── menu │ └── menu_main.xml │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── mipmap-mdpi │ └── ic_launcher.png │ ├── mipmap-xhdpi │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ ├── values-v14 │ └── dimens.xml │ ├── values-v21 │ └── styles.xml │ ├── values-w820dp │ └── dimens.xml │ ├── values-zh-rcn │ └── strings.xml │ ├── values │ ├── colors.xml │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml │ └── xml │ ├── accessibility_listener_service.xml │ ├── basic_device_admin_receiver.xml │ ├── custom_view_app_widget_info.xml │ ├── device_filter.xml │ └── filepaths.xml ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle ├── simplewebserver ├── .gitignore ├── build.gradle ├── libs │ ├── ant-zip.jar │ ├── commons-io-2.4.jar │ └── jangod-core.jar ├── proguard-rules.pro ├── simplewebserver.iml └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── bobo │ │ └── simplewebserver │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ └── WebServer │ │ │ ├── 403.html │ │ │ ├── 404.html │ │ │ ├── 503.html │ │ │ ├── attachments │ │ │ └── demo.apk │ │ │ ├── hello.html │ │ │ ├── index.html │ │ │ ├── index.html.bak │ │ │ └── readme.txt │ ├── java │ │ ├── org │ │ │ └── join │ │ │ │ └── ws │ │ │ │ ├── Constants.java │ │ │ │ ├── CrashHandler.java │ │ │ │ ├── WSApplication.java │ │ │ │ ├── receiver │ │ │ │ ├── NetworkReceiver.java │ │ │ │ ├── OnNetworkListener.java │ │ │ │ ├── OnStorageListener.java │ │ │ │ ├── OnWsListener.java │ │ │ │ ├── StorageReceiver.java │ │ │ │ └── WSReceiver.java │ │ │ │ ├── serv │ │ │ │ ├── GzipFilter.java │ │ │ │ ├── TempCacheFilter.java │ │ │ │ ├── UrlPattern.java │ │ │ │ ├── WebServer.java │ │ │ │ ├── WorkerThread.java │ │ │ │ ├── entity │ │ │ │ │ ├── GzipByteArrayEntity.java │ │ │ │ │ ├── GzipEntity.java │ │ │ │ │ └── GzipFileEntity.java │ │ │ │ ├── req │ │ │ │ │ ├── HttpDelHandler.java │ │ │ │ │ ├── HttpDownHandler.java │ │ │ │ │ ├── HttpFBHandler.java │ │ │ │ │ ├── HttpProgressHandler.java │ │ │ │ │ ├── HttpUpHandler.java │ │ │ │ │ └── objs │ │ │ │ │ │ └── FileRow.java │ │ │ │ ├── support │ │ │ │ │ ├── GzipUtil.java │ │ │ │ │ ├── HttpGetParser.java │ │ │ │ │ ├── HttpPostParser.java │ │ │ │ │ ├── MIME.java │ │ │ │ │ ├── MimeType.java │ │ │ │ │ └── Progress.java │ │ │ │ └── view │ │ │ │ │ ├── BaseView.java │ │ │ │ │ ├── FileView.java │ │ │ │ │ ├── StringView.java │ │ │ │ │ ├── TempHandler.java │ │ │ │ │ ├── TempView.java │ │ │ │ │ └── ViewFactory.java │ │ │ │ ├── service │ │ │ │ ├── WSService.java │ │ │ │ └── WebService.java │ │ │ │ ├── ui │ │ │ │ ├── PreferActivity.java │ │ │ │ ├── WSActivity.java │ │ │ │ ├── WebServActivity.java │ │ │ │ └── widget │ │ │ │ │ ├── FileBrowser.java │ │ │ │ │ └── ProgressBarPreference.java │ │ │ │ └── util │ │ │ │ ├── CommonUtil.java │ │ │ │ └── CopyUtil.java │ │ ├── temp │ │ │ └── net │ │ │ │ └── asfun │ │ │ │ └── jangod │ │ │ │ ├── lib │ │ │ │ └── tag │ │ │ │ │ ├── AbsResTag.java │ │ │ │ │ ├── ResColorTag.java │ │ │ │ │ ├── ResStrTag.java │ │ │ │ │ └── UUIDTag.java │ │ │ │ └── template │ │ │ │ ├── LazyBindings.java │ │ │ │ ├── Processor.java │ │ │ │ └── TemplateEngine.java │ │ └── upload │ │ │ └── org │ │ │ └── apache │ │ │ └── commons │ │ │ └── fileupload │ │ │ ├── FileItem.java │ │ │ ├── FileItemFactory.java │ │ │ ├── FileItemHeaders.java │ │ │ ├── FileItemHeadersSupport.java │ │ │ ├── FileItemIterator.java │ │ │ ├── FileItemStream.java │ │ │ ├── FileUpload.java │ │ │ ├── FileUploadBase.java │ │ │ ├── FileUploadException.java │ │ │ ├── InvalidFileNameException.java │ │ │ ├── MultipartStream.java │ │ │ ├── ParameterParser.java │ │ │ ├── ProgressListener.java │ │ │ ├── RequestContext.java │ │ │ ├── UploadContext.java │ │ │ ├── disk │ │ │ ├── DiskFileItem.java │ │ │ ├── DiskFileItemFactory.java │ │ │ └── package-info.java │ │ │ ├── httpserv │ │ │ ├── HttpServFileUpload.java │ │ │ └── HttpServRequestContext.java │ │ │ ├── package-info.java │ │ │ └── util │ │ │ ├── Closeable.java │ │ │ ├── FileItemHeadersImpl.java │ │ │ ├── LimitedInputStream.java │ │ │ ├── Streams.java │ │ │ ├── mime │ │ │ ├── Base64Decoder.java │ │ │ ├── MimeUtility.java │ │ │ ├── ParseException.java │ │ │ ├── QuotedPrintableDecoder.java │ │ │ └── package-info.java │ │ │ └── package-info.java │ └── res │ │ ├── drawable-hdpi │ │ ├── ic_launcher.png │ │ └── ic_noti_running.png │ │ ├── drawable-mdpi │ │ ├── ic_launcher.png │ │ └── ic_noti_running.png │ │ ├── drawable-xhdpi │ │ └── ic_launcher.png │ │ ├── drawable │ │ ├── btn_toggle.xml │ │ ├── btn_toggle_off_normal.xml │ │ ├── btn_toggle_off_pressed.xml │ │ ├── btn_toggle_on_normal.xml │ │ ├── btn_toggle_on_pressed.xml │ │ ├── file_def.png │ │ ├── folder_def.png │ │ └── folder_parent.png │ │ ├── layout │ │ ├── capture.xml │ │ ├── filebrowser.xml │ │ ├── main.xml │ │ ├── prefer_widget_checkbox.xml │ │ ├── prefer_widget_edit.xml │ │ └── prefer_widget_wait.xml │ │ ├── menu │ │ └── main.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values-zh-rCN │ │ └── strings.xml │ │ ├── values │ │ ├── colors.xml │ │ ├── ids.xml │ │ ├── items.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ └── prefer.xml │ └── test │ └── java │ └── com │ └── bobo │ └── simplewebserver │ └── ExampleUnitTest.java └── webrtcnoise ├── .gitignore ├── CMakeLists.txt ├── app.iml ├── build.gradle ├── proguard-rules.pro ├── src ├── androidTest │ └── java │ │ └── com │ │ └── test │ │ └── jni │ │ └── ExampleInstrumentedTest.java ├── main │ ├── AndroidManifest.xml │ ├── cpp │ │ ├── audio_ns.cpp │ │ ├── audio_ns.h │ │ ├── defines.h │ │ ├── fft4g.cpp │ │ ├── fft4g.h │ │ ├── native-lib.cpp │ │ ├── noise_suppression.cpp │ │ ├── noise_suppression.h │ │ ├── ns_core.cpp │ │ ├── ns_core.h │ │ ├── signal_processing_library.h │ │ ├── spl_inl.h │ │ ├── typedefs.h │ │ └── windows_private.h │ ├── java │ │ └── com │ │ │ └── test │ │ │ └── jni │ │ │ ├── AudioEncodeUtil.java │ │ │ ├── MainActivity.java │ │ │ └── WebrtcProcessor.java │ └── res │ │ ├── layout │ │ └── activity_webrtc_noise_main.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ └── strings.xml └── test │ └── java │ └── com │ └── test │ └── jni │ └── ExampleUnitTest.java └── webrtcnoise.iml /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | /captures 8 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /CommonUtils/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /CommonUtils/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion '25.0.0' 6 | 7 | defaultConfig { 8 | minSdkVersion 14 9 | targetSdkVersion 23 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | compile fileTree(dir: 'libs', include: ['*.jar']) 23 | } 24 | -------------------------------------------------------------------------------- /CommonUtils/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:\Users\huangzb1\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 | -------------------------------------------------------------------------------- /CommonUtils/src/androidTest/java/com/bobo/commonutils/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.bobo.commonutils; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /CommonUtils/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /CommonUtils/src/main/java/com/bobo/commonutils/file/AesFileEncryptor.java: -------------------------------------------------------------------------------- 1 | package com.bobo.commonutils.file; 2 | 3 | import com.bobo.commonutils.inferface.UpdateProgressInferface; 4 | 5 | 6 | import javax.crypto.Cipher; 7 | 8 | /** 9 | * AES文件加密解密接口 10 | * Encrypt or decrypt file by AES (Advanced Encryption Standard) 11 | * @author zhenbohuang 12 | * 13 | */ 14 | public class AesFileEncryptor implements FileEncryptor{ 15 | AESHelper mAESHelper = new AESHelper(); 16 | @Override 17 | public int encryptFile(String srcFile, String desFile,String key,UpdateProgressInferface progressInferface) { 18 | if(FileUtils.getFileType(srcFile)!=FileUtils.TYPE_FILE){ 19 | return FAILED_INVALID_SOURCE_FILE; 20 | } 21 | //FileUtils.copyfile(new File(srcFile), new File(desFile), true); 22 | if(mAESHelper.AESCipher(Cipher.ENCRYPT_MODE, srcFile, desFile, key)){ 23 | return SUCCEEDED; 24 | } 25 | return FAILED_UNKNOWN; 26 | } 27 | 28 | @Override 29 | public int decryptFile(String srcFile, String desFile,String key,UpdateProgressInferface progressInferface) { 30 | if(FileUtils.getFileType(srcFile)!=FileUtils.TYPE_FILE){ 31 | return FAILED_INVALID_SOURCE_FILE; 32 | } 33 | //FileUtils.copyfile(new File(srcFile), new File(desFile), true); 34 | if(mAESHelper.AESCipher(Cipher.DECRYPT_MODE, srcFile, desFile, key)){ 35 | return SUCCEEDED; 36 | } 37 | return FAILED_UNKNOWN; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /CommonUtils/src/main/java/com/bobo/commonutils/inferface/UpdateProgressInferface.java: -------------------------------------------------------------------------------- 1 | package com.bobo.commonutils.inferface; 2 | 3 | 4 | /** 5 | * 进度提醒相关接口 6 | * update progress inferface 7 | * @author zhenbohuang 8 | * 9 | */ 10 | public interface UpdateProgressInferface { 11 | /** 12 | * @param percent: cur percent 13 | * @param object: custom object 14 | */ 15 | public void progressUpdate(int percent, Object object); 16 | } 17 | -------------------------------------------------------------------------------- /CommonUtils/src/main/java/com/bobo/commonutils/utils/RunCmdApi.java: -------------------------------------------------------------------------------- 1 | package com.bobo.commonutils.utils; 2 | 3 | import android.util.Log; 4 | 5 | import java.io.BufferedReader; 6 | import java.io.DataOutputStream; 7 | import java.io.InputStreamReader; 8 | import java.util.Vector; 9 | 10 | /** 11 | * Created by bobohuang(bobohuang!985@qq.com) on 2016/7/5. 12 | */ 13 | public class RunCmdApi { 14 | private static final String TAG = "RunCmdApi"; 15 | public static void execCmd(String cmd) { 16 | try { 17 | Log.i(TAG, "command = " + cmd); 18 | Runtime localException = Runtime.getRuntime(); 19 | Process exec = localException.exec(cmd); 20 | exec.waitFor(); 21 | } catch (Exception e) { 22 | Log.e(TAG, e.getMessage()); 23 | } 24 | } 25 | 26 | public static Vector execCmdWithReturn(String cmd) { 27 | Vector result = new Vector(); 28 | try { 29 | Log.d(TAG, "execCmdWithReturn:" + cmd); 30 | Process process = Runtime.getRuntime().exec(cmd); 31 | DataOutputStream outputStream = new DataOutputStream(process.getOutputStream()); 32 | outputStream.writeBytes(cmd + ";exit\n"); 33 | outputStream.flush(); 34 | BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream())); 35 | String line; 36 | while((line = bufferedReader.readLine()) != null) { 37 | result.add(line); 38 | } 39 | process.waitFor(); 40 | } catch (Exception e) { 41 | Log.e(TAG, e.getMessage()); 42 | } 43 | return result; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /CommonUtils/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | CommonUtils 3 | 4 | -------------------------------------------------------------------------------- /DroidPlugin/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /DroidPlugin/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | dependencies { 4 | provided fileTree(dir: 'lib', include: '*.jar') 5 | compile fileTree(dir: 'libs', include: '*.jar') 6 | } 7 | 8 | android { 9 | compileSdkVersion rootProject.ext.compileSdkVersion 10 | buildToolsVersion rootProject.ext.buildToolsVersion 11 | sourceSets { 12 | main { 13 | manifest.srcFile 'AndroidManifest.xml' 14 | java.srcDirs = ['src'] 15 | resources.srcDirs = ['src'] 16 | aidl.srcDirs = ['src'] 17 | renderscript.srcDirs = ['src'] 18 | res.srcDirs = ['res'] 19 | assets.srcDirs = ['assets'] 20 | jniLibs.srcDirs = ['libs'] 21 | } 22 | 23 | debug.setRoot('build-types/debug') 24 | release.setRoot('build-types/release') 25 | } 26 | 27 | lintOptions { 28 | abortOnError false 29 | } 30 | 31 | defaultConfig{ 32 | 33 | // 建议改为自己的 packageName + .droidplugin_stub ,防止跟其它本插件使用者冲突 34 | def authorityName = "com.morgoo.droidplugin_stub" 35 | 36 | buildConfigField "String", "AUTHORITY_NAME", "\"${authorityName}\"" 37 | manifestPlaceholders = [ 38 | authorityName:"${authorityName}", 39 | ] 40 | } 41 | 42 | buildToolsVersion '25.0.0' 43 | } 44 | -------------------------------------------------------------------------------- /DroidPlugin/lib/layoutlib.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/DroidPlugin/lib/layoutlib.jar -------------------------------------------------------------------------------- /DroidPlugin/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | 22 | 23 | -------------------------------------------------------------------------------- /DroidPlugin/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-21 15 | -------------------------------------------------------------------------------- /DroidPlugin/res/drawable-xxhdpi/plugin_activity_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /DroidPlugin/res/drawable-xxhdpi/plugin_activity_loading_bitmap.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/DroidPlugin/res/drawable-xxhdpi/plugin_activity_loading_bitmap.9.png -------------------------------------------------------------------------------- /DroidPlugin/res/values-v11/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 25 | 26 | 27 | 28 | 31 | 32 | 35 | 36 | -------------------------------------------------------------------------------- /DroidPlugin/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 36 | 37 | -------------------------------------------------------------------------------- /DroidPlugin/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 25 | 26 | 启动插件ing... 27 | 插件代理服务 28 | 插件代理服务 29 | 插件管理服务 30 | 31 | -------------------------------------------------------------------------------- /DroidPlugin/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 25 | 26 | 29 | 30 | 33 | 34 | -------------------------------------------------------------------------------- /DroidPlugin/src/android/app/IServiceConnection.aidl: -------------------------------------------------------------------------------- 1 | /* //device/java/android/android/app/IServiceConnection.aidl 2 | ** 3 | ** Copyright 2007, The Android Open Source Project 4 | ** 5 | ** Licensed under the Apache License, Version 2.0 (the "License"); 6 | ** you may not use this file except in compliance with the License. 7 | ** You may obtain a copy of the License at 8 | ** 9 | ** http://www.apache.org/licenses/LICENSE-2.0 10 | ** 11 | ** Unless required by applicable law or agreed to in writing, software 12 | ** distributed under the License is distributed on an "AS IS" BASIS, 13 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | ** See the License for the specific language governing permissions and 15 | ** limitations under the License. 16 | */ 17 | 18 | package android.app; 19 | 20 | import android.content.ComponentName; 21 | 22 | /** @hide */ 23 | oneway interface IServiceConnection { 24 | void connected(in ComponentName name, IBinder service); 25 | } 26 | 27 | -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/droidplugin/PluginApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | ** DroidPlugin Project 3 | ** 4 | ** Copyright(c) 2015 Andy Zhang 5 | ** 6 | ** This file is part of DroidPlugin. 7 | ** 8 | ** DroidPlugin is free software: you can redistribute it and/or 9 | ** modify it under the terms of the GNU Lesser General Public 10 | ** License as published by the Free Software Foundation, either 11 | ** version 3 of the License, or (at your option) any later version. 12 | ** 13 | ** DroidPlugin is distributed in the hope that it will be useful, 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ** Lesser General Public License for more details. 17 | ** 18 | ** You should have received a copy of the GNU Lesser General Public 19 | ** License along with DroidPlugin. If not, see 20 | ** 21 | **/ 22 | 23 | package com.morgoo.droidplugin; 24 | 25 | import android.app.Application; 26 | import android.content.Context; 27 | 28 | /** 29 | * Created by Andy Zhang(zhangyong232@gmail.com) 2014/12/5. 30 | */ 31 | public class PluginApplication extends Application { 32 | 33 | private static final String TAG = PluginApplication.class.getSimpleName(); 34 | 35 | @Override 36 | public void onCreate() { 37 | super.onCreate(); 38 | PluginHelper.getInstance().applicationOnCreate(getBaseContext()); 39 | } 40 | 41 | 42 | @Override 43 | protected void attachBaseContext(Context base) { 44 | PluginHelper.getInstance().applicationAttachBaseContext(base); 45 | super.attachBaseContext(base); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/droidplugin/hook/handle/IDisplayManagerHookHandle.java: -------------------------------------------------------------------------------- 1 | package com.morgoo.droidplugin.hook.handle; 2 | 3 | import android.content.Context; 4 | import android.text.TextUtils; 5 | 6 | import com.morgoo.droidplugin.hook.BaseHookHandle; 7 | import com.morgoo.droidplugin.hook.HookedMethodHandler; 8 | 9 | import java.lang.reflect.Method; 10 | 11 | /** 12 | * IDisplayManagerHookHandle 13 | * 14 | * @author Liu Yichen 15 | * @date 16/6/13 16 | */ 17 | public class IDisplayManagerHookHandle extends BaseHookHandle { 18 | 19 | 20 | public IDisplayManagerHookHandle(Context hostContext) { 21 | super(hostContext); 22 | } 23 | 24 | @Override 25 | protected void init() { 26 | 27 | sHookedMethodHandlers.put("createVirtualDisplay", new createVirtualDisplay(mHostContext)); 28 | } 29 | 30 | private static class createVirtualDisplay extends HookedMethodHandler { 31 | 32 | 33 | public createVirtualDisplay(Context hostContext) { 34 | super(hostContext); 35 | } 36 | 37 | @Override 38 | protected boolean beforeInvoke(Object receiver, Method method, Object[] args) throws Throwable { 39 | 40 | final int pkgIndex = 2; 41 | if (args != null && args.length > 0 && args[pkgIndex] instanceof String) { 42 | String pkg = (String) args[pkgIndex]; 43 | if (!TextUtils.equals(pkg, mHostContext.getPackageName())) { 44 | args[pkgIndex] = mHostContext.getPackageName(); 45 | } 46 | } 47 | return super.beforeInvoke(receiver, method, args); 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/droidplugin/hook/handle/ReplaceCallingPackageHookedMethodHandler.java: -------------------------------------------------------------------------------- 1 | package com.morgoo.droidplugin.hook.handle; 2 | 3 | import android.content.Context; 4 | import android.os.Build; 5 | import android.os.RemoteException; 6 | 7 | import com.morgoo.droidplugin.hook.HookedMethodHandler; 8 | import com.morgoo.droidplugin.pm.PluginManager; 9 | 10 | import java.lang.reflect.Method; 11 | 12 | class ReplaceCallingPackageHookedMethodHandler extends HookedMethodHandler { 13 | 14 | public ReplaceCallingPackageHookedMethodHandler(Context hostContext) { 15 | super(hostContext); 16 | } 17 | 18 | @Override 19 | protected boolean beforeInvoke(Object receiver, Method method, Object[] args) throws Throwable { 20 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { 21 | if (args != null && args.length > 0) { 22 | for (int index = 0; index < args.length; index++) { 23 | if (args[index] != null && (args[index] instanceof String)) { 24 | String str = ((String) args[index]); 25 | if (isPackagePlugin(str)) { 26 | args[index] = mHostContext.getPackageName(); 27 | } 28 | } 29 | } 30 | } 31 | } 32 | return super.beforeInvoke(receiver, method, args); 33 | } 34 | 35 | private static boolean isPackagePlugin(String packageName) throws RemoteException { 36 | return PluginManager.getInstance().isPluginPackage(packageName); 37 | } 38 | } -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/droidplugin/pm/IApplicationCallback.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | ** DroidPlugin Project 3 | ** 4 | ** Copyright(c) 2015 Andy Zhang 5 | ** 6 | ** This file is part of DroidPlugin. 7 | ** 8 | ** DroidPlugin is free software: you can redistribute it and/or 9 | ** modify it under the terms of the GNU Lesser General Public 10 | ** License as published by the Free Software Foundation, either 11 | ** version 3 of the License, or (at your option) any later version. 12 | ** 13 | ** DroidPlugin is distributed in the hope that it will be useful, 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ** Lesser General Public License for more details. 17 | ** 18 | ** You should have received a copy of the GNU Lesser General Public 19 | ** License along with DroidPlugin. If not, see 20 | ** 21 | **/ 22 | 23 | 24 | 25 | package com.morgoo.droidplugin.pm; 26 | 27 | /** 28 | * API for package data change related callbacks from the Package Manager. 29 | * Some usage scenarios include deletion of cache directory, generate 30 | * statistics related to code, data, cache usage 31 | * {@hide} 32 | */ 33 | interface IApplicationCallback { 34 | Bundle onCallback(in Bundle extra); 35 | } 36 | -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/droidplugin/pm/IPackageDataObserver.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | ** DroidPlugin Project 3 | ** 4 | ** Copyright(c) 2015 Andy Zhang 5 | ** 6 | ** This file is part of DroidPlugin. 7 | ** 8 | ** DroidPlugin is free software: you can redistribute it and/or 9 | ** modify it under the terms of the GNU Lesser General Public 10 | ** License as published by the Free Software Foundation, either 11 | ** version 3 of the License, or (at your option) any later version. 12 | ** 13 | ** DroidPlugin is distributed in the hope that it will be useful, 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ** Lesser General Public License for more details. 17 | ** 18 | ** You should have received a copy of the GNU Lesser General Public 19 | ** License along with DroidPlugin. If not, see 20 | ** 21 | **/ 22 | 23 | package com.morgoo.droidplugin.pm; 24 | 25 | /** 26 | * API for package data change related callbacks from the Package Manager. 27 | * Some usage scenarios include deletion of cache directory, generate 28 | * statistics related to code, data, cache usage 29 | */ 30 | oneway interface IPackageDataObserver { 31 | void onRemoveCompleted(in String packageName, boolean succeeded); 32 | } 33 | -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/droidplugin/reflect/Validate.java: -------------------------------------------------------------------------------- 1 | /* 2 | ** DroidPlugin Project 3 | ** 4 | ** Copyright(c) 2015 Andy Zhang 5 | ** 6 | ** This file is part of DroidPlugin. 7 | ** 8 | ** DroidPlugin is free software: you can redistribute it and/or 9 | ** modify it under the terms of the GNU Lesser General Public 10 | ** License as published by the Free Software Foundation, either 11 | ** version 3 of the License, or (at your option) any later version. 12 | ** 13 | ** DroidPlugin is distributed in the hope that it will be useful, 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ** Lesser General Public License for more details. 17 | ** 18 | ** You should have received a copy of the GNU Lesser General Public 19 | ** License along with DroidPlugin. If not, see 20 | ** 21 | **/ 22 | 23 | package com.morgoo.droidplugin.reflect; 24 | 25 | /** 26 | * Created by Andy Zhang(zhangyong232@gmail.com)ClassUtils on 2015/3/26. 27 | */ 28 | class Validate { 29 | 30 | static void isTrue(final boolean expression, final String message, final Object... values) { 31 | if (expression == false) { 32 | throw new IllegalArgumentException(String.format(message, values)); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/helper/ComponentNameComparator.java: -------------------------------------------------------------------------------- 1 | /* 2 | ** DroidPlugin Project 3 | ** 4 | ** Copyright(c) 2015 Andy Zhang 5 | ** 6 | ** This file is part of DroidPlugin. 7 | ** 8 | ** DroidPlugin is free software: you can redistribute it and/or 9 | ** modify it under the terms of the GNU Lesser General Public 10 | ** License as published by the Free Software Foundation, either 11 | ** version 3 of the License, or (at your option) any later version. 12 | ** 13 | ** DroidPlugin is distributed in the hope that it will be useful, 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ** Lesser General Public License for more details. 17 | ** 18 | ** You should have received a copy of the GNU Lesser General Public 19 | ** License along with DroidPlugin. If not, see 20 | ** 21 | **/ 22 | 23 | package com.morgoo.helper; 24 | 25 | import android.content.ComponentName; 26 | import android.text.TextUtils; 27 | 28 | import java.util.Comparator; 29 | 30 | public class ComponentNameComparator implements Comparator { 31 | 32 | @Override 33 | public int compare(ComponentName lhs, ComponentName rhs) { 34 | if (lhs == null && rhs == null) { 35 | return 0; 36 | } else if (lhs != null && rhs == null) { 37 | return 1; 38 | } else if (lhs == null && rhs != null) { 39 | return -1; 40 | } else { 41 | if (TextUtils.equals(lhs.getPackageName(), rhs.getPackageName()) && TextUtils.equals(lhs.getShortClassName(), rhs.getShortClassName())) { 42 | return 0; 43 | } else { 44 | return lhs.compareTo(rhs); 45 | } 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/helper/compat/ActivityManagerCompat.java: -------------------------------------------------------------------------------- 1 | /* 2 | ** DroidPlugin Project 3 | ** 4 | ** Copyright(c) 2015 Andy Zhang 5 | ** 6 | ** This file is part of DroidPlugin. 7 | ** 8 | ** DroidPlugin is free software: you can redistribute it and/or 9 | ** modify it under the terms of the GNU Lesser General Public 10 | ** License as published by the Free Software Foundation, either 11 | ** version 3 of the License, or (at your option) any later version. 12 | ** 13 | ** DroidPlugin is distributed in the hope that it will be useful, 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ** Lesser General Public License for more details. 17 | ** 18 | ** You should have received a copy of the GNU Lesser General Public 19 | ** License along with DroidPlugin. If not, see 20 | ** 21 | **/ 22 | 23 | package com.morgoo.helper.compat; 24 | 25 | /** 26 | * Created by Andy Zhang(zhangyong232@gmail.com) on 2015/4/13. 27 | */ 28 | public class ActivityManagerCompat { 29 | public static final int INTENT_SENDER_SERVICE = 4; 30 | 31 | public static final int INTENT_SENDER_ACTIVITY = 2; 32 | } 33 | -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/helper/compat/ActivityManagerNativeCompat.java: -------------------------------------------------------------------------------- 1 | /* 2 | ** DroidPlugin Project 3 | ** 4 | ** Copyright(c) 2015 Andy Zhang 5 | ** 6 | ** This file is part of DroidPlugin. 7 | ** 8 | ** DroidPlugin is free software: you can redistribute it and/or 9 | ** modify it under the terms of the GNU Lesser General Public 10 | ** License as published by the Free Software Foundation, either 11 | ** version 3 of the License, or (at your option) any later version. 12 | ** 13 | ** DroidPlugin is distributed in the hope that it will be useful, 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ** Lesser General Public License for more details. 17 | ** 18 | ** You should have received a copy of the GNU Lesser General Public 19 | ** License along with DroidPlugin. If not, see 20 | ** 21 | **/ 22 | 23 | package com.morgoo.helper.compat; 24 | 25 | import com.morgoo.droidplugin.reflect.MethodUtils; 26 | 27 | import java.lang.reflect.InvocationTargetException; 28 | 29 | /** 30 | * Created by Andy Zhang(zhangyong232@gmail.com) on 2015/5/1. 31 | */ 32 | public class ActivityManagerNativeCompat { 33 | 34 | private static Class sClass; 35 | 36 | public static Class Class() throws ClassNotFoundException { 37 | if (sClass == null) { 38 | sClass = Class.forName("android.app.ActivityManagerNative"); 39 | } 40 | return sClass; 41 | } 42 | 43 | public static Object getDefault() throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { 44 | return MethodUtils.invokeStaticMethod(Class(), "getDefault"); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/helper/compat/IActivityManagerCompat.java: -------------------------------------------------------------------------------- 1 | /* 2 | ** DroidPlugin Project 3 | ** 4 | ** Copyright(c) 2015 Andy Zhang 5 | ** 6 | ** This file is part of DroidPlugin. 7 | ** 8 | ** DroidPlugin is free software: you can redistribute it and/or 9 | ** modify it under the terms of the GNU Lesser General Public 10 | ** License as published by the Free Software Foundation, either 11 | ** version 3 of the License, or (at your option) any later version. 12 | ** 13 | ** DroidPlugin is distributed in the hope that it will be useful, 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ** Lesser General Public License for more details. 17 | ** 18 | ** You should have received a copy of the GNU Lesser General Public 19 | ** License along with DroidPlugin. If not, see 20 | ** 21 | **/ 22 | 23 | package com.morgoo.helper.compat; 24 | 25 | /** 26 | * Created by Andy Zhang(zhangyong232@gmail.com) on 2015/5/1. 27 | */ 28 | public class IActivityManagerCompat { 29 | 30 | private static Class sClass; 31 | 32 | public static Class Class() throws ClassNotFoundException { 33 | if (sClass == null) { 34 | sClass = Class.forName("android.app.IActivityManager"); 35 | } 36 | return sClass; 37 | } 38 | 39 | public static boolean isIActivityManager(Object obj){ 40 | if (obj == null) { 41 | return false; 42 | } else { 43 | try { 44 | Class clazz = Class(); 45 | return clazz.isInstance(obj); 46 | } catch (ClassNotFoundException e) { 47 | return false; 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/helper/compat/IDisplayManagerCompat.java: -------------------------------------------------------------------------------- 1 | package com.morgoo.helper.compat; 2 | 3 | import android.os.IBinder; 4 | 5 | import com.morgoo.droidplugin.reflect.MethodUtils; 6 | 7 | import java.lang.reflect.InvocationTargetException; 8 | 9 | /** 10 | * IDisplayManagerCompat 11 | * 12 | * @author Liu Yichen 13 | * @date 16/6/13 14 | */ 15 | public class IDisplayManagerCompat { 16 | 17 | private static Class sClass; 18 | 19 | public static Class Class() throws ClassNotFoundException { 20 | if (sClass == null) { 21 | sClass = Class.forName("android.hardware.display.IDisplayManager"); 22 | } 23 | return sClass; 24 | } 25 | 26 | public static Object asInterface(IBinder binder) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { 27 | Class clazz = Class.forName("android.hardware.display.IDisplayManager$Stub"); 28 | return MethodUtils.invokeStaticMethod(clazz, "asInterface", binder); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/helper/compat/IPackageDataObserverCompat.java: -------------------------------------------------------------------------------- 1 | /* 2 | ** DroidPlugin Project 3 | ** 4 | ** Copyright(c) 2015 Andy Zhang 5 | ** 6 | ** This file is part of DroidPlugin. 7 | ** 8 | ** DroidPlugin is free software: you can redistribute it and/or 9 | ** modify it under the terms of the GNU Lesser General Public 10 | ** License as published by the Free Software Foundation, either 11 | ** version 3 of the License, or (at your option) any later version. 12 | ** 13 | ** DroidPlugin is distributed in the hope that it will be useful, 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ** Lesser General Public License for more details. 17 | ** 18 | ** You should have received a copy of the GNU Lesser General Public 19 | ** License along with DroidPlugin. If not, see 20 | ** 21 | **/ 22 | 23 | package com.morgoo.helper.compat; 24 | 25 | /** 26 | * Created by Andy Zhang(zhangyong232@gmail.com) on 2015/5/4. 27 | */ 28 | public class IPackageDataObserverCompat { 29 | 30 | private static Class sClass; 31 | 32 | public static Class Class() throws ClassNotFoundException { 33 | if (sClass == null) { 34 | sClass = Class.forName("android.content.pm.IPackageDataObserver"); 35 | } 36 | return sClass; 37 | } 38 | 39 | public static boolean isIPackageDataObserver(Object obj) throws ClassNotFoundException { 40 | if (obj == null) { 41 | return false; 42 | } else { 43 | Class clazz = Class(); 44 | return clazz.isInstance(obj); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/helper/compat/PackageManagerCompat.java: -------------------------------------------------------------------------------- 1 | /* 2 | ** DroidPlugin Project 3 | ** 4 | ** Copyright(c) 2015 Andy Zhang 5 | ** 6 | ** This file is part of DroidPlugin. 7 | ** 8 | ** DroidPlugin is free software: you can redistribute it and/or 9 | ** modify it under the terms of the GNU Lesser General Public 10 | ** License as published by the Free Software Foundation, either 11 | ** version 3 of the License, or (at your option) any later version. 12 | ** 13 | ** DroidPlugin is distributed in the hope that it will be useful, 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ** Lesser General Public License for more details. 17 | ** 18 | ** You should have received a copy of the GNU Lesser General Public 19 | ** License along with DroidPlugin. If not, see 20 | ** 21 | **/ 22 | 23 | package com.morgoo.helper.compat; 24 | 25 | /** 26 | * Created by Andy Zhang(zhangyong232@gmail.com) on 2015/4/13. 27 | */ 28 | public class PackageManagerCompat { 29 | public static final int DELETE_FAILED_INTERNAL_ERROR = -1; 30 | public static final int DELETE_SUCCEEDED = 1; 31 | public static final int INSTALL_SUCCEEDED = 1; 32 | public static final int INSTALL_FAILED_INTERNAL_ERROR = -110; 33 | public static final int INSTALL_FAILED_INVALID_APK = -2; 34 | public static final int INSTALL_REPLACE_EXISTING = 0x00000002; 35 | public static final int INSTALL_FAILED_ALREADY_EXISTS = -1; 36 | public static final int INSTALL_FAILED_NOT_SUPPORT_ABI = -3;} 37 | -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/helper/compat/ParceledListSliceCompat.java: -------------------------------------------------------------------------------- 1 | /* 2 | ** DroidPlugin Project 3 | ** 4 | ** Copyright(c) 2015 Andy Zhang 5 | ** 6 | ** This file is part of DroidPlugin. 7 | ** 8 | ** DroidPlugin is free software: you can redistribute it and/or 9 | ** modify it under the terms of the GNU Lesser General Public 10 | ** License as published by the Free Software Foundation, either 11 | ** version 3 of the License, or (at your option) any later version. 12 | ** 13 | ** DroidPlugin is distributed in the hope that it will be useful, 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ** Lesser General Public License for more details. 17 | ** 18 | ** You should have received a copy of the GNU Lesser General Public 19 | ** License along with DroidPlugin. If not, see 20 | ** 21 | **/ 22 | 23 | package com.morgoo.helper.compat; 24 | 25 | /** 26 | * Created by Andy Zhang(zhangyong232@gmail.com) on 2015/5/4. 27 | */ 28 | public class ParceledListSliceCompat { 29 | 30 | private static Class sClass; 31 | 32 | public static Class Class() throws ClassNotFoundException { 33 | if (sClass == null) { 34 | sClass = Class.forName("android.content.pm.ParceledListSlice"); 35 | } 36 | return sClass; 37 | } 38 | 39 | public static boolean isParceledListSlice(Object obj){ 40 | if (obj == null) { 41 | return false; 42 | } else { 43 | try { 44 | Class clazz = Class(); 45 | return clazz.isInstance(obj); 46 | } catch (ClassNotFoundException e) { 47 | return false; 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/helper/compat/QueuedWorkCompat.java: -------------------------------------------------------------------------------- 1 | /* 2 | ** DroidPlugin Project 3 | ** 4 | ** Copyright(c) 2015 Andy Zhang 5 | ** 6 | ** This file is part of DroidPlugin. 7 | ** 8 | ** DroidPlugin is free software: you can redistribute it and/or 9 | ** modify it under the terms of the GNU Lesser General Public 10 | ** License as published by the Free Software Foundation, either 11 | ** version 3 of the License, or (at your option) any later version. 12 | ** 13 | ** DroidPlugin is distributed in the hope that it will be useful, 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ** Lesser General Public License for more details. 17 | ** 18 | ** You should have received a copy of the GNU Lesser General Public 19 | ** License along with DroidPlugin. If not, see 20 | ** 21 | **/ 22 | 23 | package com.morgoo.helper.compat; 24 | 25 | import com.morgoo.droidplugin.reflect.MethodUtils; 26 | 27 | import java.lang.reflect.InvocationTargetException; 28 | 29 | /** 30 | * Created by Andy Zhang(zhangyong232@gmail.com) on 2015/5/1. 31 | */ 32 | public class QueuedWorkCompat { 33 | 34 | private static Class sClass; 35 | 36 | private static Class Class() throws ClassNotFoundException { 37 | if (sClass == null) { 38 | sClass = Class.forName("android.app.QueuedWork"); 39 | } 40 | return sClass; 41 | } 42 | 43 | public static void waitToFinish() { 44 | try { 45 | MethodUtils.invokeStaticMethod(Class(), "waitToFinish"); 46 | } catch (Exception e) { 47 | e.printStackTrace(); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /DroidPlugin/src/com/morgoo/helper/compat/UserHandleCompat.java: -------------------------------------------------------------------------------- 1 | /* 2 | ** DroidPlugin Project 3 | ** 4 | ** Copyright(c) 2015 Andy Zhang 5 | ** 6 | ** This file is part of DroidPlugin. 7 | ** 8 | ** DroidPlugin is free software: you can redistribute it and/or 9 | ** modify it under the terms of the GNU Lesser General Public 10 | ** License as published by the Free Software Foundation, either 11 | ** version 3 of the License, or (at your option) any later version. 12 | ** 13 | ** DroidPlugin is distributed in the hope that it will be useful, 14 | ** but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | ** Lesser General Public License for more details. 17 | ** 18 | ** You should have received a copy of the GNU Lesser General Public 19 | ** License along with DroidPlugin. If not, see 20 | ** 21 | **/ 22 | 23 | package com.morgoo.helper.compat; 24 | 25 | import android.os.UserHandle; 26 | 27 | import com.morgoo.droidplugin.reflect.MethodUtils; 28 | 29 | import java.lang.reflect.InvocationTargetException; 30 | 31 | /** 32 | * Created by Andy Zhang(zhangyong232@gmail.com) on 2015/4/13. 33 | */ 34 | public class UserHandleCompat { 35 | 36 | // UserHandle.getCallingUserId() 37 | public static int getCallingUserId() { 38 | try { 39 | return (int) MethodUtils.invokeStaticMethod(UserHandle.class, "getCallingUserId"); 40 | } catch (Exception e) { 41 | e.printStackTrace(); 42 | } 43 | return 0; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # android-utils-api 2 | android上一些实用技巧、实用功能代码示例,不断更新中
3 | 1:如何使用Android原生接口,实现“应用双开”
4 | 2:Android如何实时监控CPU频率
5 | 所有内容会在博客和微信号上同步介绍,欢迎大家关注我的微信公众号:Android源代码
6 | 或者我的博客:
7 | [我的博客](http://blog.csdn.net/zhenbohuang) 8 | -------------------------------------------------------------------------------- /android-utils-api.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 24 5 | buildToolsVersion '25.0.0' 6 | 7 | defaultConfig { 8 | applicationId "utils.bobo.com.boboutils" 9 | minSdkVersion 21 10 | targetSdkVersion 24 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(include: ['*.jar'], dir: 'libs') 24 | compile project(':CommonUtils') 25 | compile project(':simplewebserver') 26 | compile 'com.android.support.constraint:constraint-layout:1.1.3' 27 | provided files('dynamic_libs/framework.jar') 28 | compile 'com.android.support:appcompat-v7:23.4.0' 29 | compile 'com.android.support:design:23.4.0' 30 | compile 'com.android.support:recyclerview-v7:23.1.0' 31 | compile project(path: ':DroidPlugin') 32 | compile project(':webrtcnoise') 33 | } 34 | tasks.withType(JavaCompile) { 35 | doFirst { 36 | println "==========================================================="; 37 | println options.bootClasspath; 38 | 39 | def provided = []; 40 | fileTree(dir: 'dynamic_libs', include: ['*.jar']).each { 41 | provided.add(it.getAbsolutePath()); 42 | } 43 | options.bootClasspath.split(File.pathSeparator).each { 44 | provided.add(it); 45 | } 46 | options.bootClasspath = provided.join(File.pathSeparator) 47 | 48 | println options.bootClasspath; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /app/dynamic_libs/framework.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/dynamic_libs/framework.jar -------------------------------------------------------------------------------- /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 D:\Users\huangzb1\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 | -------------------------------------------------------------------------------- /app/src/androidTest/java/utils/bobo/com/boboutils/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/aidl/com/bobo/service/utils/IWakeupService.aidl: -------------------------------------------------------------------------------- 1 | 2 | package com.bobo.service.utils; 3 | 4 | // Declare any non-default types here with import statements 5 | interface IWakeupService { 6 | void log(String clientPackageName); 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/aidl/utils/bobo/com/boboutils/App/overlay/IOverlayViewService.aidl: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.App.overlay; 2 | 3 | import android.os.Bundle; 4 | 5 | // Declare any non-default types here with import statements 6 | interface IOverlayViewService { 7 | void showOverlay(in Bundle param); 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/aidl/utils/bobo/com/boboutils/App/zombieservice/IZombieServiceFirst.aidl: -------------------------------------------------------------------------------- 1 | // IZombieServiceFirst.aidl 2 | package utils.bobo.com.boboutils.App.zombieservice; 3 | 4 | // Declare any non-default types here with import statements 5 | 6 | interface IZombieServiceFirst { 7 | /** 8 | * Demonstrates some basic types that you can use as parameters 9 | * and return values in AIDL. 10 | */ 11 | void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, 12 | double aDouble, String aString); 13 | String getServiceName(); 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/aidl/utils/bobo/com/boboutils/App/zombieservice/IZombieServiceSecond.aidl: -------------------------------------------------------------------------------- 1 | // IZombieServiceSecond.aidl 2 | package utils.bobo.com.boboutils.App.zombieservice; 3 | 4 | // Declare any non-default types here with import statements 5 | 6 | interface IZombieServiceSecond { 7 | /** 8 | * Demonstrates some basic types that you can use as parameters 9 | * and return values in AIDL. 10 | */ 11 | void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat, 12 | double aDouble, String aString); 13 | String getServiceName(); 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/assets/part_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_1.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_10.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_11.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_12.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_13.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_14.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_15.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_16.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_17.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_18.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_19.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_2.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_3.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_4.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_5.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_6.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_7.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_8.jpg -------------------------------------------------------------------------------- /app/src/main/assets/part_9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/part_9.jpg -------------------------------------------------------------------------------- /app/src/main/assets/weixin_1280.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/assets/weixin_1280.apk -------------------------------------------------------------------------------- /app/src/main/java/com/bobo/service/utils/NoMarketDialogHelp.java: -------------------------------------------------------------------------------- 1 | package com.bobo.service.utils; 2 | 3 | import android.app.Activity; 4 | import android.app.AlertDialog; 5 | import android.content.DialogInterface; 6 | import android.content.Intent; 7 | 8 | /** 9 | * Created by bobohuang on 2018/12/25. 10 | */ 11 | 12 | public class NoMarketDialogHelp { 13 | public static boolean showDialogIfNeed(final Activity activity){ 14 | Intent intent = activity.getIntent(); 15 | if (intent == null){ 16 | return false; 17 | } 18 | boolean ifFromMarket = intent.getBooleanExtra("ifFromMarket",false); 19 | if(ifFromMarket) { 20 | return false; 21 | } 22 | AlertDialog.Builder builder = new AlertDialog.Builder(activity); 23 | builder.setCancelable(false); 24 | builder.setMessage("请使用“应用中心”下载安装应用"); 25 | builder.setPositiveButton("确定", new DialogInterface.OnClickListener() { 26 | @Override 27 | public void onClick(DialogInterface dialog, int which) { 28 | activity.finish(); 29 | } 30 | }); 31 | builder.create().show(); 32 | return true; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/bobo/service/utils/Sample.java: -------------------------------------------------------------------------------- 1 | package com.bobo.service.utils; 2 | 3 | import android.content.Context; 4 | 5 | /** 6 | * Created by bobohuang on 2018/10/27. 7 | */ 8 | 9 | public class Sample { 10 | public void test(){ 11 | Context context = null; 12 | BindMultiAppServiceHelp.bindService(context); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/src/main/java/com/bobo/service/utils/WakeupServerService.java: -------------------------------------------------------------------------------- 1 | package com.bobo.service.utils; 2 | 3 | import android.app.Service; 4 | import android.content.Intent; 5 | import android.os.IBinder; 6 | import android.util.Log; 7 | 8 | public class WakeupServerService extends Service { 9 | private static final String TAG = "WakeupServerService"; 10 | public WakeupServerService() { 11 | } 12 | 13 | @Override 14 | public IBinder onBind(Intent intent) { 15 | return mIBinder; 16 | } 17 | private IBinder mIBinder = new IWakeupService.Stub() { 18 | @Override 19 | public void log(String clientPackageName){ 20 | Log.e(TAG, clientPackageName+" bind " + WakeupServerService.this.getPackageName()); 21 | } 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/App/AsyncTaskRunAlways.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.App; 2 | 3 | import android.os.AsyncTask; 4 | import android.util.Log; 5 | 6 | /** 7 | * Created by huangzb1 on 2018/3/7. 8 | */ 9 | 10 | public class AsyncTaskRunAlways extends AsyncTask { 11 | private static final String TAG = "AsyncTaskRunAlways"; 12 | private String mTag; 13 | public AsyncTaskRunAlways(String tag){ 14 | mTag = tag; 15 | } 16 | @Override 17 | protected Void doInBackground(Void... params) { 18 | int index = 1; 19 | while (!isCancelled()){ 20 | Log.d(TAG, mTag+"; doInBackground; index="+index); 21 | try { 22 | Thread.sleep(1000); 23 | } catch (InterruptedException e) { 24 | e.printStackTrace(); 25 | } 26 | index++; 27 | } 28 | return null; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/App/CustomStatusBarImgBackgroundActivity.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.App; 2 | 3 | import android.app.Activity; 4 | import android.app.Notification; 5 | import android.app.NotificationManager; 6 | import android.app.PendingIntent; 7 | import android.content.Context; 8 | import android.content.Intent; 9 | import android.graphics.Color; 10 | import android.os.Build; 11 | import android.os.Bundle; 12 | import android.os.Handler; 13 | import android.support.v7.app.AppCompatActivity; 14 | import android.view.View; 15 | import android.widget.TextView; 16 | 17 | import utils.bobo.com.boboutils.R; 18 | 19 | public class CustomStatusBarImgBackgroundActivity extends Activity { 20 | private static final String TAG = "CustomStatusBarImgBackgroundActivity"; 21 | @Override 22 | protected void onCreate(Bundle savedInstanceState) { 23 | super.onCreate(savedInstanceState); 24 | if (Build.VERSION.SDK_INT >= 21){ 25 | View decorView = getWindow().getDecorView(); 26 | decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); 27 | getWindow().setStatusBarColor(Color.TRANSPARENT); 28 | } 29 | setContentView(R.layout.activity_custom_statusbar_img_bg); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/App/ForegroundService.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.App; 2 | 3 | import android.app.Notification; 4 | import android.app.PendingIntent; 5 | import android.app.Service; 6 | import android.content.Intent; 7 | import android.os.IBinder; 8 | 9 | import utils.bobo.com.boboutils.R; 10 | 11 | public class ForegroundService extends Service { 12 | public ForegroundService() { 13 | } 14 | 15 | @Override 16 | public IBinder onBind(Intent intent) { 17 | // TODO: Return the communication channel to the service. 18 | throw new UnsupportedOperationException("Not yet implemented"); 19 | } 20 | public void onCreate(){ 21 | super.onCreate(); 22 | } 23 | @Override 24 | public int onStartCommand(Intent intent, int flags,int startId) { 25 | Intent notificationIntent = new Intent(this, ForgegroundServiceActivity.class); 26 | PendingIntent contentIntent = PendingIntent.getActivity(this, 0,notificationIntent, 0); 27 | Notification.Builder builder = new Notification.Builder(this); 28 | builder.setContentTitle("ForegroundService"); 29 | builder.setContentText("ForegroundService"); 30 | builder.setContentIntent(contentIntent); 31 | builder.setSmallIcon(R.mipmap.ic_launcher); 32 | 33 | startForeground(1, builder.build()); 34 | 35 | return Service.START_NOT_STICKY; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/App/QuickSetting/QuickSettingService.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.App.QuickSetting; 2 | 3 | import android.annotation.TargetApi; 4 | import android.os.Build; 5 | import android.service.quicksettings.TileService; 6 | import android.util.Log; 7 | 8 | /** 9 | * Created by bobohuang on 2018/8/15. 10 | */ 11 | 12 | @TargetApi(Build.VERSION_CODES.N) 13 | public class QuickSettingService extends TileService { 14 | private static final String TAG = "QuickSettingService"; 15 | //当用户从Edit栏添加到快速设定中调用 16 | @Override 17 | public void onTileAdded() { 18 | Log.d(TAG, "onTileAdded"); 19 | } 20 | //当用户从快速设定栏中移除的时候调用 21 | @Override 22 | public void onTileRemoved() { 23 | Log.d(TAG, "onTileRemoved"); 24 | } 25 | // 点击的时候 26 | @Override 27 | public void onClick() { 28 | Log.d(TAG, "onClick"); 29 | } 30 | // 打开下拉菜单的时候调用,当快速设置按钮并没有在编辑栏拖到设置栏中不会调用 31 | //在TleAdded之后会调用一次 32 | @Override 33 | public void onStartListening () { 34 | Log.d(TAG, "onStartListening"); 35 | } 36 | // 关闭下拉菜单的时候调用,当快速设置按钮并没有在编辑栏拖到设置栏中不会调用 37 | // 在onTileRemoved移除之前也会调用移除 38 | @Override 39 | public void onStopListening () { 40 | Log.d(TAG, "onStopListening"); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/App/ScreenPinningActivity.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.App; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.view.KeyEvent; 6 | 7 | import utils.bobo.com.boboutils.R; 8 | 9 | public class ScreenPinningActivity extends Activity { 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | setContentView(R.layout.activity_screen_pinning); 15 | } 16 | @Override 17 | public void onResume(){ 18 | super.onResume(); 19 | this.startLockTask(); 20 | } 21 | @Override 22 | public boolean onKeyDown(int keyCode,KeyEvent event){ 23 | if((keyCode==KeyEvent.KEYCODE_BACK) 24 | ||(keyCode == KeyEvent.KEYCODE_HOME)) 25 | return true;//不执行父类点击事件 26 | return super.onKeyDown(keyCode, event);//继续执行父类其他点击事件 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/App/SecretCodeReceiver.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.App; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | 7 | import utils.bobo.com.boboutils.DemosActivity; 8 | 9 | public class SecretCodeReceiver extends BroadcastReceiver { 10 | public SecretCodeReceiver() { 11 | } 12 | 13 | @Override 14 | public void onReceive(Context context, Intent intent) { 15 | Intent activityIntent = new Intent(context, DemosActivity.class); 16 | activityIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 17 | context.startActivity(activityIntent); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/App/ShowWhenLockActivity.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.App; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.view.WindowManager; 6 | 7 | import utils.bobo.com.boboutils.R; 8 | 9 | public class ShowWhenLockActivity extends Activity { 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); 14 | super.onCreate(savedInstanceState); 15 | setContentView(R.layout.activity_show_when_lock); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/App/TestService.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.App; 2 | 3 | import android.app.Service; 4 | import android.content.Intent; 5 | import android.os.IBinder; 6 | import android.util.Log; 7 | 8 | public class TestService extends Service { 9 | public static AsyncTaskRunAlways sAsyncTaskRunAlways; 10 | private static final String TAG = "TestService"; 11 | public static final String ACTION_START_ASYNC_TASK 12 | = "utils.bobo.com.boboutils.App.TestService.ACTION_START_ASYNC_TASK"; 13 | 14 | public TestService() { 15 | } 16 | 17 | @Override 18 | public IBinder onBind(Intent intent) { 19 | // TODO: Return the communication channel to the service. 20 | throw new UnsupportedOperationException("Not yet implemented"); 21 | } 22 | 23 | @Override 24 | public int onStartCommand(Intent intent, int flags, int startId) { 25 | if (intent != null) { 26 | String action = intent.getAction(); 27 | Log.d(TAG, "onStartCommand action=" + action); 28 | if (ACTION_START_ASYNC_TASK.equals(action)) { 29 | if(sAsyncTaskRunAlways == null) { 30 | sAsyncTaskRunAlways = new AsyncTaskRunAlways(String.valueOf(System.currentTimeMillis())); 31 | sAsyncTaskRunAlways.execute(); 32 | } 33 | } 34 | } 35 | return START_STICKY; 36 | } 37 | @Override 38 | public void onDestroy() { 39 | super.onDestroy(); 40 | Log.d(TAG, "onDestroy"); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/App/TestServiceActivity.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.App; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.os.Bundle; 6 | import android.view.View; 7 | import utils.bobo.com.boboutils.R; 8 | 9 | public class TestServiceActivity extends Activity implements View.OnClickListener { 10 | protected void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | setContentView(R.layout.activity_app_two_button); 13 | this.findViewById(R.id.button1).setOnClickListener(this); 14 | findViewById(R.id.button2).setOnClickListener(this); 15 | } 16 | 17 | @Override 18 | public void onClick(View v) { 19 | switch (v.getId()) { 20 | case R.id.button1: { 21 | Intent intent = new Intent(this, TestService.class); 22 | intent.setAction(TestService.ACTION_START_ASYNC_TASK); 23 | this.startService(intent); 24 | break; 25 | } 26 | case R.id.button2: { 27 | Intent intent = new Intent(this, TestService.class); 28 | this.stopService(intent); 29 | if(TestService.sAsyncTaskRunAlways != null){ 30 | TestService.sAsyncTaskRunAlways.cancel(true); 31 | TestService.sAsyncTaskRunAlways = null; 32 | } 33 | break; 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/App/WakeLockTestApi.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.App; 2 | 3 | import android.content.Context; 4 | import android.os.PowerManager; 5 | 6 | /** 7 | * Created by bobohuang(bobohuang1985@qq.com) on 2016/10/31. 8 | */ 9 | public class WakeLockTestApi { 10 | private static final String TAG = "WakeLockTestApi"; 11 | private Context mContext; 12 | private PowerManager.WakeLock mCpuWakeLock; 13 | private PowerManager mPowerManager; 14 | private static WakeLockTestApi sApi; 15 | public synchronized static WakeLockTestApi getInstance(Context context){ 16 | if(sApi == null){ 17 | sApi = new WakeLockTestApi(context); 18 | } 19 | return sApi; 20 | } 21 | private WakeLockTestApi(Context context){ 22 | mContext = context; 23 | mPowerManager = (PowerManager)mContext.getSystemService(Context.POWER_SERVICE); 24 | } 25 | public boolean isWakeLockExist(){ 26 | if(mCpuWakeLock != null){ 27 | return true; 28 | } 29 | return false; 30 | } 31 | public boolean getAWakeLock(){ 32 | if(mCpuWakeLock != null){ 33 | return true; 34 | } 35 | mCpuWakeLock = mPowerManager.newWakeLock( 36 | PowerManager.PARTIAL_WAKE_LOCK, TAG + "-cpu"); 37 | mCpuWakeLock.acquire(); 38 | return true; 39 | } 40 | public boolean releaseWakeLock(){ 41 | if(mCpuWakeLock == null){ 42 | return true; 43 | } 44 | mCpuWakeLock.release(); 45 | mCpuWakeLock = null; 46 | return true; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/App/appwidget/CustomViewAppWidget.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.App.appwidget; 2 | 3 | import android.appwidget.AppWidgetManager; 4 | import android.appwidget.AppWidgetProvider; 5 | import android.content.Context; 6 | import android.widget.RemoteViews; 7 | 8 | import utils.bobo.com.boboutils.R; 9 | 10 | /** 11 | * Implementation of App Widget functionality. 12 | */ 13 | public class CustomViewAppWidget extends AppWidgetProvider { 14 | 15 | static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, 16 | int appWidgetId) { 17 | 18 | CharSequence widgetText = context.getString(R.string.appwidget_text); 19 | // Construct the RemoteViews object 20 | RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.custom_view_app_widget); 21 | views.setTextViewText(R.id.appwidget_text, widgetText); 22 | // Instruct the widget manager to update the widget 23 | appWidgetManager.updateAppWidget(appWidgetId, views); 24 | } 25 | 26 | @Override 27 | public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { 28 | UpdateAppWidgetService.startActionUpdateAppWidget(context); 29 | super.onUpdate(context, appWidgetManager, appWidgetIds); 30 | } 31 | 32 | @Override 33 | public void onEnabled(Context context) { 34 | // Enter relevant functionality for when the first widget is created 35 | } 36 | 37 | @Override 38 | public void onDisabled(Context context) { 39 | // Enter relevant functionality for when the last widget is disabled 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/App/call/CallAudioRecord8Dot0Activity.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.App.call; 2 | 3 | import android.app.Activity; 4 | import android.content.BroadcastReceiver; 5 | import android.content.Intent; 6 | import android.content.IntentFilter; 7 | import android.os.Bundle; 8 | import android.os.Handler; 9 | import android.view.View; 10 | 11 | import utils.bobo.com.boboutils.R; 12 | 13 | public class CallAudioRecord8Dot0Activity extends Activity implements View.OnClickListener { 14 | private static final String TAG = "CallAudioRecordActivity"; 15 | private BroadcastReceiver mBroadcastReceiver = new PhoneCall8Dot0Receiver(); 16 | @Override 17 | protected void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | setContentView(R.layout.activity_app_two_button); 20 | this.findViewById(R.id.button1).setOnClickListener(this); 21 | findViewById(R.id.button2).setOnClickListener(this); 22 | IntentFilter filter = new IntentFilter(Intent.ACTION_NEW_OUTGOING_CALL); 23 | filter.addAction("android.intent.action.PHONE_STATE"); 24 | this.registerReceiver(mBroadcastReceiver,filter); 25 | } 26 | @Override 27 | public void onDestroy(){ 28 | super.onDestroy(); 29 | this.unregisterReceiver(mBroadcastReceiver); 30 | } 31 | private Handler mHandler= new Handler(); 32 | @Override 33 | public void onClick(View v) { 34 | switch(v.getId()){ 35 | case R.id.button1: { 36 | 37 | break; 38 | } 39 | case R.id.button2:{ 40 | break; 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/App/call/CallAudioRecordActivity.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.App.call; 2 | 3 | import android.app.Activity; 4 | import android.content.BroadcastReceiver; 5 | import android.content.Intent; 6 | import android.content.IntentFilter; 7 | import android.os.Bundle; 8 | import android.os.Handler; 9 | import android.view.View; 10 | 11 | import utils.bobo.com.boboutils.R; 12 | 13 | public class CallAudioRecordActivity extends Activity implements View.OnClickListener { 14 | private static final String TAG = "CallAudioRecordActivity"; 15 | private BroadcastReceiver mBroadcastReceiver = new PhoneCallReceiver(); 16 | @Override 17 | protected void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | setContentView(R.layout.activity_app_two_button); 20 | this.findViewById(R.id.button1).setOnClickListener(this); 21 | findViewById(R.id.button2).setOnClickListener(this); 22 | IntentFilter filter = new IntentFilter(Intent.ACTION_NEW_OUTGOING_CALL); 23 | filter.addAction("android.intent.action.PHONE_STATE"); 24 | this.registerReceiver(mBroadcastReceiver,filter); 25 | } 26 | @Override 27 | public void onDestroy(){ 28 | super.onDestroy(); 29 | this.unregisterReceiver(mBroadcastReceiver); 30 | } 31 | private Handler mHandler= new Handler(); 32 | @Override 33 | public void onClick(View v) { 34 | switch(v.getId()){ 35 | case R.id.button1: { 36 | 37 | break; 38 | } 39 | case R.id.button2:{ 40 | break; 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/App/zombieservice/ZombieServiceStartActivity.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.App.zombieservice; 2 | 3 | import android.app.Activity; 4 | import android.content.Intent; 5 | import android.os.Bundle; 6 | import android.view.View; 7 | 8 | import utils.bobo.com.boboutils.R; 9 | 10 | /** 11 | * Created by huangzb1 on 2018/1/30. 12 | */ 13 | 14 | public class ZombieServiceStartActivity extends Activity implements View.OnClickListener { 15 | protected void onCreate(Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | setContentView(R.layout.activity_app_two_button); 18 | this.findViewById(R.id.button1).setOnClickListener(this); 19 | findViewById(R.id.button2).setOnClickListener(this); 20 | } 21 | 22 | @Override 23 | public void onClick(View v) { 24 | switch(v.getId()) { 25 | case R.id.button1: { 26 | Intent intent = new Intent(this, ZombieServiceFirst.class); 27 | this.startService(intent); 28 | break; 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/MainActivity.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils; 2 | 3 | import android.support.v7.app.ActionBarActivity; 4 | import android.os.Bundle; 5 | import android.view.Menu; 6 | import android.view.MenuItem; 7 | 8 | 9 | public class MainActivity extends ActionBarActivity { 10 | @Override 11 | protected void onCreate(Bundle savedInstanceState) { 12 | super.onCreate(savedInstanceState); 13 | setContentView(R.layout.activity_main); 14 | } 15 | 16 | @Override 17 | public boolean onCreateOptionsMenu(Menu menu) { 18 | // Inflate the menu; this adds items to the action bar if it is present. 19 | getMenuInflater().inflate(R.menu.menu_main, menu); 20 | return true; 21 | } 22 | 23 | @Override 24 | public boolean onOptionsItemSelected(MenuItem item) { 25 | // Handle action bar item clicks here. The action bar will 26 | // automatically handle clicks on the Home/Up button, so long 27 | // as you specify a parent activity in AndroidManifest.xml. 28 | int id = item.getItemId(); 29 | 30 | //noinspection SimplifiableIfStatement 31 | if (id == R.id.action_settings) { 32 | return true; 33 | } 34 | 35 | return super.onOptionsItemSelected(item); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/MyApp.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | 6 | import com.bobo.service.utils.BindWakeupServerServiceHelp; 7 | import com.morgoo.droidplugin.PluginHelper; 8 | 9 | import org.join.ws.WSApplication; 10 | 11 | /** 12 | * Created by bobohuang on 2018/3/25. 13 | */ 14 | 15 | public class MyApp extends Application { 16 | @Override 17 | 18 | public void onCreate() { 19 | super.onCreate(); 20 | WSApplication.getInstance().onCreate(this); 21 | 22 | PluginHelper.getInstance().applicationOnCreate(getBaseContext()); 23 | BindWakeupServerServiceHelp.bindService(this); 24 | } 25 | 26 | @Override 27 | protected void attachBaseContext(Context base) { 28 | 29 | PluginHelper.getInstance().applicationAttachBaseContext(base); 30 | 31 | super.attachBaseContext(base); 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/SimpleWebServerProxy.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils; 2 | 3 | import android.Manifest; 4 | import android.app.Activity; 5 | import android.content.Intent; 6 | import android.content.pm.PackageManager; 7 | import android.os.Bundle; 8 | import android.support.annotation.NonNull; 9 | import android.support.v4.app.ActivityCompat; 10 | import android.support.v4.content.ContextCompat; 11 | 12 | import org.join.ws.ui.WSActivity; 13 | 14 | public class SimpleWebServerProxy extends Activity { 15 | private static final int REQUESTCODE_PERMISSION_STORAGE = 0; 16 | @Override 17 | protected void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | ActivityCompat.requestPermissions(this, new String[]{ 20 | Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE}, 21 | REQUESTCODE_PERMISSION_STORAGE); 22 | setContentView(R.layout.activity_simple_web_server_proxy); 23 | } 24 | @Override 25 | public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, 26 | @NonNull int[] grantResulits){ 27 | if(REQUESTCODE_PERMISSION_STORAGE == requestCode){ 28 | for(int result:grantResulits){ 29 | if(result != PackageManager.PERMISSION_GRANTED){ 30 | finish(); 31 | return; 32 | } 33 | } 34 | Intent intent = new Intent(this,WSActivity.class); 35 | this.startActivity(intent); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/deviceinfo/ScreenInfoActivity.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.deviceinfo; 2 | 3 | import android.app.Activity; 4 | import android.content.ContentUris; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.database.ContentObserver; 8 | import android.database.Cursor; 9 | import android.net.Uri; 10 | import android.os.Bundle; 11 | import android.os.Handler; 12 | import android.os.Vibrator; 13 | import android.provider.Telephony; 14 | import android.telephony.SmsManager; 15 | import android.util.Log; 16 | import android.view.View; 17 | import android.widget.TextView; 18 | 19 | import utils.bobo.com.boboutils.App.LocationService; 20 | import utils.bobo.com.boboutils.R; 21 | 22 | public class ScreenInfoActivity extends Activity{ 23 | private static final String TAG = "ScreenInfoActivity"; 24 | TextView mStatusTextView; 25 | 26 | @Override 27 | protected void onCreate(Bundle savedInstanceState) { 28 | super.onCreate(savedInstanceState); 29 | setContentView(R.layout.activity_screen_info); 30 | View view = findViewById(R.id.infoll); 31 | 32 | TextView infoTextView = (TextView)findViewById(R.id.info); 33 | String infoText = "1dp = " + this.getResources().getDimension(R.dimen.dp_1); 34 | infoText += "; paddingEnd = " + infoTextView.getPaddingEnd() + "; paddingStart = " + infoTextView.getPaddingStart(); 35 | 36 | infoText += "\r\n; parent paddingEnd = " + view.getPaddingEnd() + "; paddingStart = " + view.getPaddingStart(); 37 | infoTextView.setText(infoText); 38 | } 39 | @Override 40 | public void onDestroy() { 41 | super.onDestroy(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/utils/bobo/com/boboutils/file/FileEncryptorActivity.java: -------------------------------------------------------------------------------- 1 | package utils.bobo.com.boboutils.file; 2 | 3 | import android.Manifest; 4 | import android.content.pm.PackageManager; 5 | import android.support.annotation.NonNull; 6 | import android.support.v4.app.ActivityCompat; 7 | import android.support.v4.app.ActivityCompat.OnRequestPermissionsResultCallback; 8 | import android.support.v4.app.FragmentTransaction; 9 | import android.os.Bundle; 10 | import android.support.v4.app.Fragment; 11 | import android.support.v4.app.FragmentActivity; 12 | 13 | import utils.bobo.com.boboutils.R; 14 | 15 | public class FileEncryptorActivity extends FragmentActivity implements OnRequestPermissionsResultCallback { 16 | private static final int REQUESTCODE_PERMISSION_STORAGE = 0; 17 | @Override 18 | protected void onCreate(Bundle savedInstanceState) { 19 | super.onCreate(savedInstanceState); 20 | setContentView(R.layout.fragment_activity); 21 | initContent(); 22 | } 23 | private void initContent() { 24 | Fragment fragment = CommonFileListFragment.newInstance(); 25 | FragmentTransaction ft = this.getSupportFragmentManager().beginTransaction(); 26 | ft.replace(R.id.content, fragment); 27 | ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN); 28 | //ft.add(R.id.content, mStatusListFragment); 29 | ft.commit(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/res/drawable-hdpi/document.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/dpi_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/res/drawable-hdpi/dpi_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/res/drawable-hdpi/folder.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/dpi_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/res/drawable-mdpi/dpi_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-nodpi/example_appwidget_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/res/drawable-nodpi/example_appwidget_preview.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/check_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/res/drawable-xhdpi/check_on.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/custom_status_bar_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/res/drawable-xhdpi/custom_status_bar_img.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/dpi_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/res/drawable-xhdpi/dpi_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/res/drawable-xxhdpi/badge.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/dpi_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/res/drawable-xxhdpi/dpi_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/dpi_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/app/src/main/res/drawable-xxxhdpi/dpi_icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/corrdinator_activity_header_gradient.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_feedback.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_info.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_badged.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 25 | 26 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_app_cutom_accessibility.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_app_foreground_service.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 15 | 16 | 23 | 24 | 30 | 31 | 32 | 36 | 37 | 38 | 46 | 47 | -------------------------------------------------------------------------------- /webrtcnoise/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/webrtcnoise/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /webrtcnoise/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/webrtcnoise/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /webrtcnoise/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/webrtcnoise/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /webrtcnoise/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/webrtcnoise/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /webrtcnoise/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bobohuang1985/android-utils-api/cfcd450d637678a3b9dea082b82b7d2c4b046817/webrtcnoise/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /webrtcnoise/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /webrtcnoise/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /webrtcnoise/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /webrtcnoise/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | WebrtcNoise 3 | 4 | -------------------------------------------------------------------------------- /webrtcnoise/src/test/java/com/test/jni/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.test.jni; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } --------------------------------------------------------------------------------